mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-04-28 04:24:37 +01:00
Move try/catch
inside for
loop
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
This commit is contained in:
parent
cb5deb408f
commit
17a56cc6c1
@ -73,10 +73,12 @@ 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.");
|
||||
for (const p of globalScene.getEnemyParty()) {
|
||||
try {
|
||||
p.destroy();
|
||||
} catch {
|
||||
console.warn("Unable to destroy stale pokemon objects in BattleEndPhase.");
|
||||
}
|
||||
}
|
||||
|
||||
const lapsingModifiers = globalScene.findModifiers(
|
||||
|
Loading…
x
Reference in New Issue
Block a user