diff --git a/src/battle-scene.ts b/src/battle-scene.ts index daf250b7c..fd1ba7fee 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -591,7 +591,10 @@ export default class BattleScene extends SceneBase { return this.currentBattle.randSeedInt(this, range, min); } - reset(clearScene?: boolean): void { + reset(clearScene: boolean = false, clearData: boolean = false): void { + if (clearData) + this.gameData = new GameData(this); + this.gameMode = gameModes[GameModes.CLASSIC]; this.setSeed(SEED_OVERRIDE || Utils.randomString(24)); diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 26103f51e..7c50d9241 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -284,7 +284,7 @@ export default class MenuUiHandler extends MessageUiHandler { if (!res.ok) console.error(`Log out failed (${res.status}: ${res.statusText})`); Utils.setCookie(Utils.sessionIdKey, ''); - updateUserInfo().then(() => this.scene.reset(true)); + updateUserInfo().then(() => this.scene.reset(true, true)); }); }; if (this.scene.currentBattle) {