diff --git a/src/battle_util.c b/src/battle_util.c index a2f55b9773..5507c19497 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1846,18 +1846,18 @@ bool32 HandleFaintedMonActions(void) && !(gAbsentBattlerFlags & (1u << gBattleStruct->eventState.faintedActionBattler))) { BattleScriptExecute(BattleScript_GiveExp); - gBattleStruct->eventState.faintedAction = 2; + gBattleStruct->eventState.faintedAction = FAINTED_ACTIONS_SET_ABSENT_FLAGS; return TRUE; } } while (++gBattleStruct->eventState.faintedActionBattler != gBattlersCount); - gBattleStruct->eventState.faintedAction = 3; + gBattleStruct->eventState.faintedAction = FAINTED_ACTIONS_WAIT_STATE; break; case FAINTED_ACTIONS_SET_ABSENT_FLAGS: OpponentSwitchInResetSentPokesToOpponentValue(gBattlerFainted); if (++gBattleStruct->eventState.faintedActionBattler == gBattlersCount) - gBattleStruct->eventState.faintedAction = 3; + gBattleStruct->eventState.faintedAction = FAINTED_ACTIONS_WAIT_STATE; else - gBattleStruct->eventState.faintedAction = 1; + gBattleStruct->eventState.faintedAction = FAINTED_ACTIONS_GIVE_EXP; // Don't switch mons until all pokemon performed their actions or the battle's over. if (B_FAINT_SWITCH_IN >= GEN_4 && gBattleOutcome == 0 @@ -1865,7 +1865,7 @@ bool32 HandleFaintedMonActions(void) && gCurrentTurnActionNumber != gBattlersCount) { gAbsentBattlerFlags |= 1u << gBattlerFainted; - if (gBattleStruct->eventState.faintedAction != 1) + if (gBattleStruct->eventState.faintedAction != FAINTED_ACTIONS_GIVE_EXP) return FALSE; } break; @@ -1889,7 +1889,7 @@ bool32 HandleFaintedMonActions(void) && !(gAbsentBattlerFlags & (1u << gBattleStruct->eventState.faintedActionBattler))) { BattleScriptExecute(BattleScript_HandleFaintedMon); - gBattleStruct->eventState.faintedAction = 5; + gBattleStruct->eventState.faintedAction = FAINTED_ACTIONS_HANDLE_NEXT_BATTLER; return TRUE; } } while (++gBattleStruct->eventState.faintedActionBattler != gBattlersCount); @@ -1899,7 +1899,7 @@ bool32 HandleFaintedMonActions(void) if (++gBattleStruct->eventState.faintedActionBattler == gBattlersCount) gBattleStruct->eventState.faintedAction = FAINTED_ACTIONS_MAX_CASE; else - gBattleStruct->eventState.faintedAction = 4; + gBattleStruct->eventState.faintedAction = FAINTED_ACTIONS_HANDLE_FAINTED_MON; break; case FAINTED_ACTIONS_MAX_CASE: break;