From a740bc719037612da65941482e4a0dab4837c629 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 2 Feb 2019 11:32:00 +0100 Subject: [PATCH] Name action 11 --- include/battle.h | 7 ++++--- src/battle_main.c | 6 +++--- src/battle_script_commands.c | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/battle.h b/include/battle.h index 9295a35481..94596c75ea 100644 --- a/include/battle.h +++ b/include/battle.h @@ -28,10 +28,11 @@ #define B_ACTION_SAFARI_GO_NEAR 7 #define B_ACTION_SAFARI_RUN 8 #define B_ACTION_WALLY_THROW 9 -// The exact purposes of these are unclear -#define B_ACTION_EXEC_SCRIPT 10 // when executing an action +#define B_ACTION_EXEC_SCRIPT 10 +#define B_ACTION_TRY_FINISH 11 +#define B_ACTION_FINISHED 12 + #define B_ACTION_CANCEL_PARTNER 12 // when choosing an action -#define B_ACTION_FINISHED 12 // when executing an action #define B_ACTION_NOTHING_FAINTED 13 // when choosing an action #define B_ACTION_NONE 0xFF diff --git a/src/battle_main.c b/src/battle_main.c index 09ea3dfc9a..043e758087 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -139,7 +139,7 @@ static void HandleAction_ThrowPokeblock(void); static void HandleAction_GoNear(void); static void HandleAction_SafariZoneRun(void); static void HandleAction_WallyBallThrow(void); -static void HandleAction_Action11(void); +static void HandleAction_TryFinish(void); static void HandleAction_NothingIsFainted(void); static void HandleAction_ActionFinished(void); @@ -553,7 +553,7 @@ static void (* const sTurnActionsFuncsTable[])(void) = [B_ACTION_SAFARI_RUN] = HandleAction_SafariZoneRun, [B_ACTION_WALLY_THROW] = HandleAction_WallyBallThrow, [B_ACTION_EXEC_SCRIPT] = HandleAction_RunBattleScript, - [11] = HandleAction_Action11, // not sure about this one + [B_ACTION_TRY_FINISH] = HandleAction_TryFinish, [B_ACTION_FINISHED] = HandleAction_ActionFinished, [B_ACTION_NOTHING_FAINTED] = HandleAction_NothingIsFainted, }; @@ -5845,7 +5845,7 @@ static void HandleAction_WallyBallThrow(void) gActionsByTurnOrder[1] = B_ACTION_FINISHED; } -static void HandleAction_Action11(void) +static void HandleAction_TryFinish(void) { if (!HandleFaintedMonActions()) { diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 6bbee842ea..6023b2c1b6 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -4233,13 +4233,13 @@ static void atk3D_end(void) gMoveResultFlags = 0; gActiveBattler = 0; - gCurrentActionFuncId = 0xB; + gCurrentActionFuncId = B_ACTION_TRY_FINISH; } static void atk3E_end2(void) { gActiveBattler = 0; - gCurrentActionFuncId = 0xB; + gCurrentActionFuncId = B_ACTION_TRY_FINISH; } static void atk3F_end3(void) // pops the main function stack