diff --git a/calc/src/mechanics/gen56.ts b/calc/src/mechanics/gen56.ts index 8cc5d5865..38d793388 100644 --- a/calc/src/mechanics/gen56.ts +++ b/calc/src/mechanics/gen56.ts @@ -865,12 +865,12 @@ export function calculateBWXY( } if (move.hits > 1) { - let defenderDefenseBoost = defender.boosts['def']; + let defenderDefBoost = defender.boosts['def']; for (let times = 0; times < move.hits; times++) { let damageMultiplier = 0; damage = damage.map(affectedAmount => { if (times) { - const newDefense = getModifiedStat(defense, defenderDefenseBoost); + const newDefense = getModifiedStat(defense, defenderDefBoost); const newFinalMods = calculateFinalModsBWXY( gen, attacker, @@ -898,7 +898,8 @@ export function calculateBWXY( return affectedAmount; }); if (hitsPhysical && defender.ability === 'Weak Armor') { - defenderDefenseBoost = Math.max(-6, defenderDefenseBoost - 1); + defenderDefBoost = Math.max(-6, defenderDefBoost - 1); + desc.defenderAbility = 'Weak Armor'; } } } diff --git a/calc/src/mechanics/gen789.ts b/calc/src/mechanics/gen789.ts index 6014b5ce2..353df05ae 100644 --- a/calc/src/mechanics/gen789.ts +++ b/calc/src/mechanics/gen789.ts @@ -623,12 +623,12 @@ export function calculateSMSSSV( } if (move.hits > 1) { - let defenderDefenseBoost = defender.boosts['def']; + let defenderDefBoost = defender.boosts['def']; for (let times = 0; times < move.hits; times++) { let damageMultiplier = 0; damage = damage.map(affectedAmount => { if (times) { - const newDefense = getModifiedStat(defense, defenderDefenseBoost); + const newDefense = getModifiedStat(defense, defenderDefBoost); const newFinalMods = calculateFinalModsSMSSSV( gen, attacker, @@ -660,9 +660,11 @@ export function calculateSMSSSV( return affectedAmount; }); if (hitsPhysical && defender.ability === 'Stamina') { - defenderDefenseBoost = Math.min(6, defenderDefenseBoost + 1); + defenderDefBoost = Math.min(6, defenderDefBoost + 1); + desc.defenderAbility = 'Stamina'; } else if (hitsPhysical && defender.ability === 'Weak Armor') { - defenderDefenseBoost = Math.max(-6, defenderDefenseBoost - 1); + defenderDefBoost = Math.max(-6, defenderDefBoost - 1); + desc.defenderAbility = 'Weak Armor'; } } }