[P1] Fix crash when starting a challenge run after revisiting challenge select screen (#4603)
Ensure EncounterPhase initializes correctly at the start of the game after revisting the challenge selection screen. Fixes #4520
This commit is contained in:
parent
a259ccfc34
commit
f5fa478eb8
|
@ -46,6 +46,7 @@ import { StarterContainer } from "#app/ui/starter-container";
|
||||||
import { DropDownColumn, FilterBar } from "#app/ui/filter-bar";
|
import { DropDownColumn, FilterBar } from "#app/ui/filter-bar";
|
||||||
import { ScrollBar } from "#app/ui/scroll-bar";
|
import { ScrollBar } from "#app/ui/scroll-bar";
|
||||||
import { SelectChallengePhase } from "#app/phases/select-challenge-phase";
|
import { SelectChallengePhase } from "#app/phases/select-challenge-phase";
|
||||||
|
import { EncounterPhase } from "#app/phases/encounter-phase";
|
||||||
import { TitlePhase } from "#app/phases/title-phase";
|
import { TitlePhase } from "#app/phases/title-phase";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
import { getPassiveCandyCount, getValueReductionCandyCounts, getSameSpeciesEggCandyCounts } from "#app/data/balance/starters";
|
import { getPassiveCandyCount, getValueReductionCandyCounts, getSameSpeciesEggCandyCounts } from "#app/data/balance/starters";
|
||||||
|
@ -3468,6 +3469,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
this.scene.clearPhaseQueue();
|
this.scene.clearPhaseQueue();
|
||||||
if (this.scene.gameMode.isChallenge) {
|
if (this.scene.gameMode.isChallenge) {
|
||||||
this.scene.pushPhase(new SelectChallengePhase(this.scene));
|
this.scene.pushPhase(new SelectChallengePhase(this.scene));
|
||||||
|
this.scene.pushPhase(new EncounterPhase(this.scene, false));
|
||||||
} else {
|
} else {
|
||||||
this.scene.pushPhase(new TitlePhase(this.scene));
|
this.scene.pushPhase(new TitlePhase(this.scene));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue