Skip to content

Commit

Permalink
[P1] Fix crash when starting a challenge run after revisiting challen…
Browse files Browse the repository at this point in the history
…ge select screen (pagefaultgames#4603)

Ensure EncounterPhase initializes correctly at the start of the game
after revisting the challenge selection screen.

Fixes pagefaultgames#4520
  • Loading branch information
acelynnzhang authored Oct 7, 2024
1 parent a259ccf commit f5fa478
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui/starter-select-ui-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import { StarterContainer } from "#app/ui/starter-container";
import { DropDownColumn, FilterBar } from "#app/ui/filter-bar";
import { ScrollBar } from "#app/ui/scroll-bar";
import { SelectChallengePhase } from "#app/phases/select-challenge-phase";
import { EncounterPhase } from "#app/phases/encounter-phase";
import { TitlePhase } from "#app/phases/title-phase";
import { Abilities } from "#enums/abilities";
import { getPassiveCandyCount, getValueReductionCandyCounts, getSameSpeciesEggCandyCounts } from "#app/data/balance/starters";
Expand Down Expand Up @@ -3468,6 +3469,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.scene.clearPhaseQueue();
if (this.scene.gameMode.isChallenge) {
this.scene.pushPhase(new SelectChallengePhase(this.scene));
this.scene.pushPhase(new EncounterPhase(this.scene, false));
} else {
this.scene.pushPhase(new TitlePhase(this.scene));
}
Expand Down

0 comments on commit f5fa478

Please sign in to comment.