mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-20 16:42:45 +02:00
[Refactor] Delete stale pokemon objects at the end of a battle
Co-authored-by: Frutescens <info@laptop>
This commit is contained in:
parent
1b79d1f832
commit
cb5deb408f
@ -73,6 +73,11 @@ export class BattleEndPhase extends BattlePhase {
|
||||
}
|
||||
|
||||
globalScene.clearEnemyHeldItemModifiers();
|
||||
try {
|
||||
globalScene.getEnemyParty().forEach(p => p.destroy());
|
||||
} catch {
|
||||
console.warn("Unable to destroy stale pokemon objects in BattleEndPhase.");
|
||||
}
|
||||
|
||||
const lapsingModifiers = globalScene.findModifiers(
|
||||
m => m instanceof LapsingPersistentModifier || m instanceof LapsingPokemonHeldItemModifier,
|
||||
|
Loading…
Reference in New Issue
Block a user