mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-04-28 12:34: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();
|
globalScene.clearEnemyHeldItemModifiers();
|
||||||
try {
|
for (const p of globalScene.getEnemyParty()) {
|
||||||
globalScene.getEnemyParty().forEach(p => p.destroy());
|
try {
|
||||||
} catch {
|
p.destroy();
|
||||||
console.warn("Unable to destroy stale pokemon objects in BattleEndPhase.");
|
} catch {
|
||||||
|
console.warn("Unable to destroy stale pokemon objects in BattleEndPhase.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const lapsingModifiers = globalScene.findModifiers(
|
const lapsingModifiers = globalScene.findModifiers(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user