Expand usage of FaintedActions enum in HandleFaintedMonActions (#8346)
This commit is contained in:
parent
a4482f0ee2
commit
9fde188033
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user