From 2e471a4172dd88660b219fbbbe95e3cddb7d4f56 Mon Sep 17 00:00:00 2001 From: Sadfish the Sad Date: Mon, 16 Dec 2024 08:24:28 -0500 Subject: [PATCH] tidy up fixs --- src/battle_script_commands.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index f37a18b2edc..3f7b2abe177 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8840,7 +8840,6 @@ static bool32 TryDefogClear(u32 battlerAtk, bool32 clear) static bool32 TryTidyUpClear(u32 battlerAtk, bool32 clear) { s32 i; - u8 saveBattler = gBattlerAttacker; for (i = 0; i < NUM_BATTLE_SIDES; i++) { @@ -8866,12 +8865,19 @@ static bool32 TryTidyUpClear(u32 battlerAtk, bool32 clear) BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SubstituteFade; } - gBattlerAttacker = saveBattler; + if (GetBattlerSide(battlerAtk) != i) + { + SWAP(gBattlerAttacker, gBattlerTarget, i); + } return TRUE; } } - - gBattlerAttacker = saveBattler; + + if (GetBattlerSide(battlerAtk) != i) + { + SWAP(gBattlerAttacker, gBattlerTarget, i); + } + return FALSE; }