mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 23:13:42 +02:00
[Bug] Allow catch in limted catch during teleporter ME (#6531)
Allow catch in teleporter ME
This commit is contained in:
parent
14c7d615b8
commit
e4a6a3de82
@ -1,5 +1,6 @@
|
|||||||
import type { FixedBattleConfig } from "#app/battle";
|
import type { FixedBattleConfig } from "#app/battle";
|
||||||
import { getRandomTrainerFunc } from "#app/battle";
|
import { getRandomTrainerFunc } from "#app/battle";
|
||||||
|
import { globalScene } from "#app/global-scene";
|
||||||
import { defaultStarterSpeciesAndEvolutions } from "#balance/pokemon-evolutions";
|
import { defaultStarterSpeciesAndEvolutions } from "#balance/pokemon-evolutions";
|
||||||
import { speciesStarterCosts } from "#balance/starters";
|
import { speciesStarterCosts } from "#balance/starters";
|
||||||
import type { PokemonSpecies } from "#data/pokemon-species";
|
import type { PokemonSpecies } from "#data/pokemon-species";
|
||||||
@ -12,6 +13,7 @@ import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
|||||||
import { ModifierTier } from "#enums/modifier-tier";
|
import { ModifierTier } from "#enums/modifier-tier";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
import type { MoveSourceType } from "#enums/move-source-type";
|
import type { MoveSourceType } from "#enums/move-source-type";
|
||||||
|
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
import { Nature } from "#enums/nature";
|
import { Nature } from "#enums/nature";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
@ -1076,7 +1078,12 @@ export class LimitedCatchChallenge extends Challenge {
|
|||||||
|
|
||||||
override applyPokemonAddToParty(pokemon: EnemyPokemon, status: BooleanHolder): boolean {
|
override applyPokemonAddToParty(pokemon: EnemyPokemon, status: BooleanHolder): boolean {
|
||||||
if (status.value) {
|
if (status.value) {
|
||||||
status.value = pokemon.metWave % 10 === 1;
|
const isTeleporter =
|
||||||
|
globalScene.currentBattle.mysteryEncounter?.encounterType === MysteryEncounterType.TELEPORTING_HIJINKS
|
||||||
|
&& globalScene.currentBattle.mysteryEncounter.selectedOption
|
||||||
|
!== globalScene.currentBattle.mysteryEncounter.options[2]; // don't allow catch when not choosing biome change option
|
||||||
|
const isFirstWave = pokemon.metWave % 10 === 1;
|
||||||
|
status.value = isTeleporter || isFirstWave;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user