diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index e2f238e29af..a1305b6b1b2 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1324,9 +1324,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } const trappedByAbility = new Utils.BooleanHolder(false); + const opposingField = this.isPlayer() ? this.scene.getEnemyField() : this.scene.getPlayerField(); - this.scene.getEnemyField()!.forEach(enemyPokemon => - applyCheckTrappedAbAttrs(CheckTrappedAbAttr, enemyPokemon, trappedByAbility, this, trappedAbMessages, simulated) + opposingField.forEach(opponent => + applyCheckTrappedAbAttrs(CheckTrappedAbAttr, opponent, trappedByAbility, this, trappedAbMessages, simulated) ); return (trappedByAbility.value || !!this.getTag(TrappedTag));