This commit is contained in:
Mumble 2024-12-20 23:41:58 -08:00 committed by GitHub
commit 7762db9474
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,11 @@ export class BattleEndPhase extends BattlePhase {
}
this.scene.clearEnemyHeldItemModifiers();
try {
this.scene.getEnemyParty().forEach(p => p.destroy());
} catch {
console.log("Garbage collection failed.");
}
const lapsingModifiers = this.scene.findModifiers(m => m instanceof LapsingPersistentModifier || m instanceof LapsingPokemonHeldItemModifier) as (LapsingPersistentModifier | LapsingPokemonHeldItemModifier)[];
for (const m of lapsingModifiers) {