From 52da7e10506e2004dbad8f8562082dff35dcf71b Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 3 Mar 2025 21:34:15 -0800 Subject: [PATCH] Fix crash when ability is reactivated for a pokemon off the field --- src/data/arena-tag.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/arena-tag.ts b/src/data/arena-tag.ts index 580ede9596c..834bc3d3539 100644 --- a/src/data/arena-tag.ts +++ b/src/data/arena-tag.ts @@ -1243,7 +1243,7 @@ export class SuppressAbilitiesTag extends ArenaTag { if (pokemon) { globalScene.queueMessage(i18next.t("arenaTag:neutralizingGasOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); - for (const fieldPokemon of globalScene.getField()) { + for (const fieldPokemon of globalScene.getField(true)) { if (fieldPokemon && fieldPokemon.id !== pokemon.id) { [ true, false ].forEach((passive) => applyOnLoseAbAttrs(fieldPokemon, passive)); } @@ -1274,7 +1274,7 @@ export class SuppressAbilitiesTag extends ArenaTag { globalScene.queueMessage(i18next.t("arenaTag:neutralizingGasOnRemove")); } - for (const pokemon of globalScene.getField()) { + for (const pokemon of globalScene.getField(true)) { // There is only one pokemon with this attr on the field on removal, so its abilities are already active if (pokemon && !pokemon.hasAbilityWithAttr(PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr, false)) { [ true, false ].forEach((passive) => applyOnGainAbAttrs(pokemon, passive));