Skip to content

Commit

Permalink
Ability Shield should protect holder from Neutralizing Gas (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrianshChari authored Oct 22, 2024
1 parent 3262907 commit c81e61d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions calc/src/mechanics/gen789.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c81e61d

Please sign in to comment.