From 27c09989b693a4fd1d3c68b7eea862559ee14d3b Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 17 Feb 2024 09:22:51 -0500 Subject: [PATCH] Fix crash when generated trainer battle levels mismatch with loaded data --- src/system/game-data.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 339e24eacbc..41543c44e7b 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -492,6 +492,7 @@ export class GameData { const battleType = sessionData.battleType || 0; const battle = scene.newBattle(sessionData.waveIndex, battleType, sessionData.trainer, battleType === BattleType.TRAINER ? trainerConfigs[sessionData.trainer.trainerType].isDouble : sessionData.enemyParty.length > 1); + battle.enemyLevels = sessionData.enemyParty.map(p => p.level); scene.newArena(sessionData.arena.biome, true);