mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 16:56:11 +00:00
Fix softlock with double battle fainting
This commit is contained in:
parent
7fc4dbce85
commit
1bf2a725c9
@ -1,6 +1,6 @@
|
||||
import Phaser from 'phaser';
|
||||
import UI, { Mode } from './ui/ui';
|
||||
import { NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, TurnInitPhase, ReturnPhase, LevelCapPhase, ShowTrainerPhase, LoginPhase, MovePhase, TitlePhase } from './phases';
|
||||
import { NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, TurnInitPhase, ReturnPhase, LevelCapPhase, ShowTrainerPhase, LoginPhase, MovePhase, TitlePhase, SwitchPhase } from './phases';
|
||||
import Pokemon, { PlayerPokemon, EnemyPokemon } from './field/pokemon';
|
||||
import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies } from './data/pokemon-species';
|
||||
import * as Utils from './utils';
|
||||
@ -710,6 +710,9 @@ export default class BattleScene extends SceneBase {
|
||||
|
||||
const lastBattle = this.currentBattle;
|
||||
|
||||
if (lastBattle?.double && !newDouble)
|
||||
this.tryRemovePhase(p => p instanceof SwitchPhase);
|
||||
|
||||
const maxExpLevel = this.getMaxExpLevel();
|
||||
|
||||
this.lastEnemyTrainer = lastBattle?.trainer ?? null;
|
||||
|
Loading…
Reference in New Issue
Block a user