Skip to content

Commit

Permalink
Support Neutralizing Gas (smogon#615)
Browse files Browse the repository at this point in the history
Neutralizing Gas will completely remove the opposing Pokemon's ability, with the exception of certain abilities, the list of which was taken from the [Smogon Dex](https://www.smogon.com/dex/sv/abilities/neutralizing-gas/).

https://www.smogon.com/forums/posts/10029886
  • Loading branch information
shrianshChari authored Apr 9, 2024
1 parent d1457fe commit da99a27
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion calc/src/mechanics/gen789.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export function calculateSMSSSV(

const defenderIgnoresAbility = defender.hasAbility(
'Full Metal Body',
'Neutralizing Gas',
'Prism Armor',
'Shadow Shield',
'Tablets of Ruin',
Expand Down Expand Up @@ -168,6 +167,25 @@ export function calculateSMSSSV(
}
}

const ignoresNeutralizingGas = [
'As One (Glastrier)', 'As One (Spectrier)', 'Battle Bond', 'Comatose',
'Disguise', 'Gulp Missile', 'Ice Face', 'Multitype', 'Neutralizing Gas',
'Power Construct', 'RKS System', 'Schooling', 'Shields Down',
'Stance Change', 'Tera Shift', 'Zen Mode', 'Zero to Hero',
];

if (attacker.hasAbility('Neutralizing Gas') &&
!ignoresNeutralizingGas.includes(defender.ability || '')) {
desc.attackerAbility = attacker.ability;
defender.ability = '' as AbilityName;
}

if (defender.hasAbility('Neutralizing Gas') &&
!ignoresNeutralizingGas.includes(attacker.ability || '')) {
desc.defenderAbility = defender.ability;
attacker.ability = '' as AbilityName;
}

// Merciless does not ignore Shell Armor, damage dealt to a poisoned Pokemon with Shell Armor
// will not be a critical hit (UltiMario)
const isCritical = !defender.hasAbility('Battle Armor', 'Shell Armor') &&
Expand Down

0 comments on commit da99a27

Please sign in to comment.