diff --git a/src/battle_main.c b/src/battle_main.c index 9385aaf228..ec4a3e2c3b 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -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;