handle undefined introVisuals properly

This commit is contained in:
ImperialSympathizer 2024-09-12 23:22:13 -04:00
parent acc1fa2b4e
commit 588c48dbce
1 changed files with 2 additions and 2 deletions

View File

@ -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);