From 32891e3acf2568a7a0028d553a8982bf55a8a952 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Sun, 17 Aug 2025 00:40:59 +0200 Subject: [PATCH] Special casing full fresh start --- src/game-mode.ts | 13 +++++++++++++ src/phases/command-phase.ts | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/game-mode.ts b/src/game-mode.ts index b44e786b3d9..c555723d676 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -90,6 +90,19 @@ export class GameMode implements GameModeConfig { return this.hasChallenge(Challenges.FRESH_START); } + /** + * Helper function to see if the game mode is using fresh start + * @returns true if a fresh start challenge is being applied + */ + isFullFreshStartChallenge(): boolean { + for (const challenge of this.challenges) { + if (challenge.id === Challenges.FRESH_START && challenge.value === 1) { + return true; + } + } + return false; + } + /** * Helper function to get starting level for game mode. * @returns either: diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index f37f6413707..ae7ba86d131 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -389,6 +389,7 @@ export class CommandPhase extends FieldPhase { const isClassicFinalBoss = globalScene.gameMode.isBattleClassicFinalBoss(globalScene.currentBattle.waveIndex); const isEndlessMinorBoss = globalScene.gameMode.isEndlessMinorBoss(globalScene.currentBattle.waveIndex); + const isFullFreshStart = globalScene.gameMode.isFullFreshStartChallenge(); const someUncaughtSpeciesOnField = globalScene .getEnemyField() @@ -396,10 +397,19 @@ export class CommandPhase extends FieldPhase { const missingMultipleStarters = gameData.getStarterCount(d => !!d.caughtAttr) < Object.keys(speciesStarterCosts).length - 1; if (biomeType === BiomeId.END) { - if ((isClassic && !isClassicFinalBoss && someUncaughtSpeciesOnField) || (isEndless && !isEndlessMinorBoss)) { + if ( + (isClassic && !isClassicFinalBoss && someUncaughtSpeciesOnField) || + (isFullFreshStart && !isClassicFinalBoss) || + (isEndless && !isEndlessMinorBoss) + ) { // Uncatchable paradox mons in classic and endless this.queueShowText("battle:noPokeballForce"); - } else if ((isClassic && missingMultipleStarters) || (isEndless && isEndlessMinorBoss) || isDaily) { + } else if ( + (isClassic && isClassicFinalBoss && missingMultipleStarters) || + (isFullFreshStart && isClassicFinalBoss) || + (isEndless && isEndlessMinorBoss) || + isDaily + ) { // Uncatchable final boss in classic and endless this.queueShowText("battle:noPokeballForceFinalBoss"); } else {