From 8b8a92e01747514f2ae13b73f9e4888dc8dc39a4 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Wed, 26 Mar 2025 01:41:28 +0100 Subject: [PATCH] =?UTF-8?q?Wild=20Pok=C3=A9mon=20cannot=20be=20shiny=20if?= =?UTF-8?q?=20in=20end=20and=20uncatchable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/phases/encounter-phase.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 5decab522b5..903502a9f5a 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -39,6 +39,7 @@ import { overrideHeldItems, overrideModifiers } from "#app/modifier/modifier"; import i18next from "i18next"; import { WEIGHT_INCREMENT_ON_SPAWN_MISS } from "#app/data/mystery-encounters/mystery-encounters"; import { getNatureName } from "#app/data/nature"; +import { speciesStarterCosts } from "#app/data/balance/starters"; export class EncounterPhase extends BattlePhase { private loaded: boolean; @@ -125,11 +126,25 @@ export class EncounterPhase extends BattlePhase { ) { enemySpecies = getGoldenBugNetSpecies(level); } + + let isCatchable = true; + if (globalScene.arena.biomeType === Biome.END) { + const canCatch = + globalScene.gameData.dexData[enemySpecies.speciesId].caughtAttr || + (enemySpecies.speciesId === Species.ETERNATUS && + globalScene.gameData.getStarterCount(d => !!d.caughtAttr) >= + Object.keys(speciesStarterCosts).length - 1); + if (!globalScene.gameMode.isClassic || globalScene.gameMode.isFreshStartChallenge() || !canCatch) { + isCatchable = false; + } + } + battle.enemyParty[e] = globalScene.addEnemyPokemon( enemySpecies, level, TrainerSlot.NONE, !!globalScene.getEncounterBossSegments(battle.waveIndex, level, enemySpecies), + !isCatchable, // shiny locking if the mon is uncatchable ); if (globalScene.currentBattle.battleSpec === BattleSpec.FINAL_BOSS) { battle.enemyParty[e].ivs = new Array(6).fill(31);