Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/game_interpreter_battle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,12 @@ bool Game_Interpreter_Battle::CommandShowBattleAnimation(lcf::rpg::EventCommand
Game_Battler* battler_target = nullptr;

if (allies) {
// Allies counted from 1
target -= 1;
if (target >= 0 && target < Main_Data::game_party->GetBattlerCount()) {
battler_target = &(*Main_Data::game_party)[target];
// RPG_RT: The target is the ID of a hero (RPG Maker 2003 lists the heroes of the database),
// the animation is only shown when the hero is in the party
for (auto* actor: Main_Data::game_party->GetActors()) {
if (actor->GetId() == target) {
battler_target = actor;
}
}
}
else {
Expand Down
Loading