Remove unnecessary gBattlerAttacker usage (#5554)

This commit is contained in:
Alex 2024-10-21 12:32:10 +02:00 committed by GitHub
parent 59e617b16d
commit 17614f8032
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3877,11 +3877,11 @@ static void TryDoEventsBeforeFirstTurn(void)
case FIRST_TURN_EVENTS_SWITCH_IN_ABILITIES:
while (gBattleStruct->switchInBattlerCounter < gBattlersCount) // From fastest to slowest
{
gBattlerAttacker = gBattlerByTurnOrder[gBattleStruct->switchInBattlerCounter++];
i = gBattlerByTurnOrder[gBattleStruct->switchInBattlerCounter++];
if (TryPrimalReversion(gBattlerAttacker))
if (TryPrimalReversion(i))
return;
if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gBattlerAttacker, 0, 0, 0) != 0)
if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, i, 0, 0, 0) != 0)
return;
}
gBattleStruct->switchInBattlerCounter = 0;