From 4e841db7304593a204c4ce5ad9a59524f4e65e05 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 29 Dec 2023 21:36:26 -0500 Subject: [PATCH] Fix stack overflow on game over --- src/battle-phases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 96d896ca8..13b4525d4 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -2501,7 +2501,7 @@ export class GameOverPhase extends BattlePhase { this.scene.ui.clearText(); this.handleUnlocks(this.scene.getParty()); this.scene.reset(); - this.scene.newBattle(); + this.scene.unshiftPhase(new CheckLoadPhase(this.scene)); this.end(); }); });