From aea463ab4b8b0ca1c328602b98d78f89c664a156 Mon Sep 17 00:00:00 2001 From: Dean <69436131+emdeann@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:07:19 -0800 Subject: [PATCH] [Hotfix] Prevent crash with two NG Pokemon fainting at the same time (#6751) Prevent crash with two NG Pokemon fainting at the same time --- src/data/arena-tag.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/data/arena-tag.ts b/src/data/arena-tag.ts index f8829ee4344..b35029af4a1 100644 --- a/src/data/arena-tag.ts +++ b/src/data/arena-tag.ts @@ -1532,6 +1532,11 @@ export class SuppressAbilitiesTag extends SerializableArenaTag { const setter = globalScene .getField(true) .filter(p => p.hasAbilityWithAttr("PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr", false))[0]; + // Setter may not exist if both NG Pokemon faint simultaneously + if (setter == null) { + return; + } + applyOnGainAbAttrs({ pokemon: setter, passive: setter.getAbility().hasAttr("PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr"),