From c81e61db72d013a406d1b35cadacac9dc3a0a345 Mon Sep 17 00:00:00 2001 From: shrianshChari <30420527+shrianshChari@users.noreply.github.com> Date: Tue, 22 Oct 2024 08:35:17 -0400 Subject: [PATCH] Ability Shield should protect holder from Neutralizing Gas (#655) --- calc/src/mechanics/gen789.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/calc/src/mechanics/gen789.ts b/calc/src/mechanics/gen789.ts index 08cfe7b25..55a4f9b26 100644 --- a/calc/src/mechanics/gen789.ts +++ b/calc/src/mechanics/gen789.ts @@ -191,13 +191,21 @@ export function calculateSMSSSV( if (attacker.hasAbility('Neutralizing Gas') && !ignoresNeutralizingGas.includes(defender.ability || '')) { desc.attackerAbility = attacker.ability; - defender.ability = '' as AbilityName; + if (defender.hasItem('Ability Shield')) { + desc.defenderItem = defender.item; + } else { + defender.ability = '' as AbilityName; + } } if (defender.hasAbility('Neutralizing Gas') && !ignoresNeutralizingGas.includes(attacker.ability || '')) { desc.defenderAbility = defender.ability; - attacker.ability = '' as AbilityName; + if (attacker.hasItem('Ability Shield')) { + desc.attackerItem = attacker.item; + } else { + attacker.ability = '' as AbilityName; + } } // Merciless does not ignore Shell Armor, damage dealt to a poisoned Pokemon with Shell Armor