diff --git a/src/battle-scene.ts b/src/battle-scene.ts index c75e44bf694..9c30e03b765 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -132,6 +132,8 @@ export default class BattleScene extends SceneBase { public enableTouchControls: boolean = false; public enableVibration: boolean = false; + public disableMenu: boolean = false; + public gameData: GameData; public sessionSlotId: integer; @@ -733,6 +735,8 @@ export default class BattleScene extends SceneBase { this.setSeed(SEED_OVERRIDE || Utils.randomString(24)); console.log('Seed:', this.seed); + this.disableMenu = false; + this.score = 0; this.money = 0; @@ -1234,6 +1238,8 @@ export default class BattleScene extends SceneBase { inputSuccess = this.ui.processInput(Button.CANCEL); this.setLastProcessedMovementTime(Button.CANCEL); } else if (this.buttonJustPressed(Button.MENU)) { + if (this.disableMenu) + return; switch (this.ui?.getMode()) { case Mode.MESSAGE: if (!(this.ui.getHandler() as MessageUiHandler).pendingPrompt) diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index e582fdfce1d..32d4b19b034 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -670,8 +670,8 @@ export default class PokemonSpecies extends PokemonSpeciesForm { const legendary = this.legendary; const mythical = this.mythical; return species => { - return pokemonEvolutions.hasOwnProperty(species.speciesId) === hasEvolution - && pokemonPrevolutions.hasOwnProperty(species.speciesId) === hasPrevolution + return (pseudoLegendary || legendary || mythical || (!pokemonEvolutions.hasOwnProperty(species.speciesId) === hasEvolution + && pokemonPrevolutions.hasOwnProperty(species.speciesId) === hasPrevolution)) && species.pseudoLegendary === pseudoLegendary && species.legendary === legendary && species.mythical === mythical diff --git a/src/phases.ts b/src/phases.ts index 6ec1cfdf853..38a858fe05f 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -742,6 +742,7 @@ export class EncounterPhase extends BattlePhase { this.scene.ui.setMode(Mode.MESSAGE).then(() => { if (!this.loaded) { this.scene.gameData.saveSystem().then(success => { + this.scene.disableMenu = false; if (!success) return this.scene.reset(true); this.scene.gameData.saveSession(this.scene, true).then(() => this.doEncounter()); @@ -3304,6 +3305,7 @@ export class ModifierRewardPhase extends BattlePhase { doReward(): Promise { return new Promise(resolve => { + this.scene.disableMenu = true; const newModifier = this.modifierType.newModifier(); this.scene.addModifier(newModifier).then(() => { this.scene.playSound('item_fanfare');