From aa908ce7bdb70e6e2e0a1975bde2cd10b92ac830 Mon Sep 17 00:00:00 2001 From: rueter37 <61623769+rueter37@users.noreply.github.com> Date: Thu, 10 Sep 2020 17:25:17 +0200 Subject: [PATCH] In-Battle row command: Add battle command count check If an actor uses the row command and has at least 6 battle commands, then return -1 as last battle action, otherwise 0. --- src/scene_battle_rpg2k3.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/scene_battle_rpg2k3.cpp b/src/scene_battle_rpg2k3.cpp index 7642a4302f..24a4b8dc40 100644 --- a/src/scene_battle_rpg2k3.cpp +++ b/src/scene_battle_rpg2k3.cpp @@ -1498,7 +1498,14 @@ void Scene_Battle_Rpg2k3::ActionSelectedCallback(Game_Battler* for_battler) { const lcf::rpg::BattleCommand* command = static_cast(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(for_battler)->GetBattleCommands().size() >= 6) { + for_battler->SetLastBattleAction(-1); + } else { + for_battler->SetLastBattleAction(0); + } } status_window->SetIndex(-1); }