[Hotfix] hotfix for expert breeder ME crashing if player loses with queued enemy stat changes (#4476)

Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
This commit is contained in:
ImperialSympathizer 2024-09-27 20:07:47 -04:00 committed by GitHub
parent e5af2dc49a
commit 2e7f6a2f4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -558,6 +558,10 @@ function onGameOver(scene: BattleScene) {
// Revert BGM
scene.playBgm(scene.arena.bgm);
// Clear any leftover battle phases
scene.clearPhaseQueue();
scene.clearPhaseQueueSplice();
// Return enemy Pokemon
const pokemon = scene.getEnemyPokemon();
if (pokemon) {