Skip to content

Commit

Permalink
In-Battle row command: Add battle command count check
Browse files Browse the repository at this point in the history
If an actor uses the row command and has at least 6 battle commands,
then return -1 as last battle action, otherwise 0.
  • Loading branch information
rueter37 committed Sep 10, 2020
1 parent 3193a7a commit aa908ce
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/scene_battle_rpg2k3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,14 @@ void Scene_Battle_Rpg2k3::ActionSelectedCallback(Game_Battler* for_battler) {
const lcf::rpg::BattleCommand* command = static_cast<Game_Actor*>(for_battler)->GetBattleCommands()[index];
for_battler->SetLastBattleAction(command->ID);
} else {
for_battler->SetLastBattleAction(-1);
// RPG_RT behavior: If the row command is used,
// then check if the actor has at least 6 battle commands.
// If yes, then set -1 as last battle action, otherwise 0.
if (static_cast<Game_Actor*>(for_battler)->GetBattleCommands().size() >= 6) {
for_battler->SetLastBattleAction(-1);
} else {
for_battler->SetLastBattleAction(0);
}
}
status_window->SetIndex(-1);
}
Expand Down

0 comments on commit aa908ce

Please sign in to comment.