From 25a619708a28d7ddbfb7af82ae83eb85921a6711 Mon Sep 17 00:00:00 2001 From: Mumble Date: Thu, 4 Jul 2024 22:06:36 -0700 Subject: [PATCH] [BUG] Magic Guard-Spiky Shield Fix (#2803) * Added new condition for PostDefendContactAbAttr * Magic Guard-Spiky Shield interaction fix --------- Co-authored-by: Frutescens --- src/data/battler-tags.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 015b8b44984..41b6f73ec28 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -934,7 +934,9 @@ export class ContactDamageProtectedTag extends ProtectedTag { const effectPhase = pokemon.scene.getCurrentPhase(); if (effectPhase instanceof MoveEffectPhase && effectPhase.move.getMove().hasFlag(MoveFlags.MAKES_CONTACT)) { const attacker = effectPhase.getPokemon(); - attacker.damageAndUpdate(Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio)), HitResult.OTHER); + if (!attacker.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) { + attacker.damageAndUpdate(Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio)), HitResult.OTHER); + } } }