From 4b0157d5d772dcc77248190a64bde5748bf05ffe Mon Sep 17 00:00:00 2001 From: NxKarim <43686802+NxKarim@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:16:00 -0600 Subject: [PATCH] [Bug] Self effect moves fix for Shield Dust (#3167) * Self effect moves fix for Shield Dust Moves with self effects no longer affected by Shield Dust. * comma spaces Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com> --------- Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com> --- src/data/move.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 20c369ef106..431ffb0bae4 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -973,7 +973,9 @@ export class MoveEffectAttr extends MoveAttr { getMoveChance(user: Pokemon, target: Pokemon, move: Move, selfEffect?: Boolean, showAbility?: Boolean): integer { const moveChance = new Utils.NumberHolder(move.chance); applyAbAttrs(MoveEffectChanceMultiplierAbAttr, user, null, moveChance, move, target, selfEffect, showAbility); - applyPreDefendAbAttrs(IgnoreMoveEffectsAbAttr,target,user,null,null, moveChance); + if (!selfEffect) { + applyPreDefendAbAttrs(IgnoreMoveEffectsAbAttr, target, user, null, null, moveChance); + } return moveChance.value; } }