Skip to content

Commit

Permalink
tidy up fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrueSadfish committed Dec 16, 2024
1 parent 12f199c commit 2e471a4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand All @@ -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;
}

Expand Down

0 comments on commit 2e471a4

Please sign in to comment.