diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 566a239822..006add36de 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -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. diff --git a/src/battle_util.c b/src/battle_util.c index f96659dd94..2abea70586 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -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