Initial deletion seems good

This commit is contained in:
frutescens 2024-08-24 13:08:56 -07:00
parent 872f05d2a7
commit 8da0f06385
1 changed files with 5 additions and 0 deletions

View File

@ -38,6 +38,11 @@ export class BattleEndPhase extends BattlePhase {
} }
this.scene.clearEnemyHeldItemModifiers(); 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)[]; const lapsingModifiers = this.scene.findModifiers(m => m instanceof LapsingPersistentModifier || m instanceof LapsingPokemonHeldItemModifier) as (LapsingPersistentModifier | LapsingPokemonHeldItemModifier)[];
for (const m of lapsingModifiers) { for (const m of lapsingModifiers) {