mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 10:16:14 +00:00
Merge pull request #4207 from ben-lear/mystery-encounters
handle undefined introVisuals properly
This commit is contained in:
commit
cabb1692ba
@ -366,8 +366,8 @@ export class EncounterPhase extends BattlePhase {
|
|||||||
}
|
}
|
||||||
} else if (this.scene.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER && this.scene.currentBattle.mysteryEncounter) {
|
} else if (this.scene.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER && this.scene.currentBattle.mysteryEncounter) {
|
||||||
const encounter = this.scene.currentBattle.mysteryEncounter;
|
const encounter = this.scene.currentBattle.mysteryEncounter;
|
||||||
const introVisuals = encounter.introVisuals!;
|
const introVisuals = encounter.introVisuals;
|
||||||
introVisuals.playAnim();
|
introVisuals?.playAnim();
|
||||||
|
|
||||||
if (encounter.onVisualsStart) {
|
if (encounter.onVisualsStart) {
|
||||||
encounter.onVisualsStart(this.scene);
|
encounter.onVisualsStart(this.scene);
|
||||||
|
Loading…
Reference in New Issue
Block a user