mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-16 17:27:41 +00:00
Fix Pokemon.isTrapped
only checking enemy Pokemon for trapping abilities (#4124)
This commit is contained in:
parent
39b6a72517
commit
c710f85fd3
@ -1324,9 +1324,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const trappedByAbility = new Utils.BooleanHolder(false);
|
const trappedByAbility = new Utils.BooleanHolder(false);
|
||||||
|
const opposingField = this.isPlayer() ? this.scene.getEnemyField() : this.scene.getPlayerField();
|
||||||
|
|
||||||
this.scene.getEnemyField()!.forEach(enemyPokemon =>
|
opposingField.forEach(opponent =>
|
||||||
applyCheckTrappedAbAttrs(CheckTrappedAbAttr, enemyPokemon, trappedByAbility, this, trappedAbMessages, simulated)
|
applyCheckTrappedAbAttrs(CheckTrappedAbAttr, opponent, trappedByAbility, this, trappedAbMessages, simulated)
|
||||||
);
|
);
|
||||||
|
|
||||||
return (trappedByAbility.value || !!this.getTag(TrappedTag));
|
return (trappedByAbility.value || !!this.getTag(TrappedTag));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user