Merge remote-tracking branch 'RHH/battle_engine' into RHH_masterMerge

This commit is contained in:
Eduardo Quezada 2022-07-27 08:16:10 -04:00
commit e1c15a9cf6
2 changed files with 5 additions and 1 deletions

View File

@ -180,6 +180,7 @@
#define B_SPORT_TURNS GEN_7 // In Gen6+, Water/Mud Sport last 5 turns, even if the user switches out.
#define B_MEGA_EVO_TURN_ORDER GEN_7 // In Gen7, a Pokémon's Speed after Mega Evolution is used to determine turn order, not its Speed before.
#define B_RECALC_TURN_AFTER_ACTIONS GEN_8 // In Gen8, switching/using a move affects the current turn's order of actions.
#define B_FAINT_SWITCH_IN GEN_7 // In Gen4+, sending out a new Pokémon after the previous one fainted happens at the end of the turn. Before, it would happen after each action.
// Move data settings
#define B_UPDATED_MOVE_DATA GEN_8 // Updates move data in gBattleMoves, including Power, Accuracy, PP, stat changes, targets, chances of secondary effects, etc.

View File

@ -3291,7 +3291,7 @@ bool8 HandleFaintedMonActions(void)
gBattleStruct->faintedActionsState = 3;
else
gBattleStruct->faintedActionsState = 1;
#if B_FAINT_SWITCH_IN >= GEN_4
// Don't switch mons until all pokemon performed their actions or the battle's over.
if (gBattleOutcome == 0
&& !NoAliveMonsForEitherParty()
@ -3300,8 +3300,10 @@ bool8 HandleFaintedMonActions(void)
gAbsentBattlerFlags |= gBitTable[gBattlerFainted];
return FALSE;
}
#endif
break;
case 3:
#if B_FAINT_SWITCH_IN >= GEN_4
// Don't switch mons until all pokemon performed their actions or the battle's over.
if (gBattleOutcome == 0
&& !NoAliveMonsForEitherParty()
@ -3309,6 +3311,7 @@ bool8 HandleFaintedMonActions(void)
{
return FALSE;
}
#endif
gBattleStruct->faintedActionsBattlerId = 0;
gBattleStruct->faintedActionsState++;
// fall through