From 481d8e2796d7d8378dbf0add07b2d48defbf5a70 Mon Sep 17 00:00:00 2001 From: lucfd <83493765+lucfd@users.noreply.github.com> Date: Sun, 28 Apr 2024 23:49:26 -0400 Subject: [PATCH] removed redundant condition --- src/data/ability.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index b7997e5fa..9f4e2c5b0 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -312,7 +312,7 @@ export class TypeImmunityAbAttr extends PreDefendAbAttr { const target = move.getMove().moveTarget; const targetsField = target === MoveTarget.ENEMY_SIDE || target === MoveTarget.USER_SIDE || target === MoveTarget.BOTH_SIDES; // should not activate on moves like spikes or grassy terrain - if (((move.getMove() instanceof Move && !targetsField) || move.getMove().getAttrs(StatusMoveTypeImmunityAttr).find(attr => (attr as StatusMoveTypeImmunityAttr).immuneType === this.immuneType)) && move.getMove().type === this.immuneType) { + if ((!targetsField || move.getMove().getAttrs(StatusMoveTypeImmunityAttr).find(attr => (attr as StatusMoveTypeImmunityAttr).immuneType === this.immuneType)) && move.getMove().type === this.immuneType) { (args[0] as Utils.NumberHolder).value = 0; return true; }