diff --git a/src/data/mystery-encounters/utils/encounter-phase-utils.ts b/src/data/mystery-encounters/utils/encounter-phase-utils.ts index 76f530cf0db..3f600a0f389 100644 --- a/src/data/mystery-encounters/utils/encounter-phase-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-phase-utils.ts @@ -522,10 +522,14 @@ export function leaveEncounterWithoutBattle(scene: BattleScene, addHealPhase: bo export function handleMysteryEncounterVictory(scene: BattleScene, addHealPhase: boolean = false) { const allowedPkm = scene.getParty().filter((pkm) => pkm.isAllowedInBattle()); + if (allowedPkm.length === 0) { scene.clearPhaseQueue(); scene.unshiftPhase(new GameOverPhase(scene)); - } else if (scene.currentBattle.mysteryEncounter.encounterVariant === MysteryEncounterVariant.SAFARI_BATTLE) { + return; + } + + if (scene.currentBattle.mysteryEncounter.encounterVariant === MysteryEncounterVariant.SAFARI_BATTLE) { scene.pushPhase(new MysteryEncounterRewardsPhase(scene, addHealPhase)); } else if (scene.currentBattle.mysteryEncounter.encounterVariant === MysteryEncounterVariant.NO_BATTLE) { scene.pushPhase(new EggLapsePhase(scene));