Skip to content

Commit

Permalink
Fix Punching Glove moves making contact (smogon#614)
Browse files Browse the repository at this point in the history
https://www.smogon.com/forums/posts/10061460

If we compare the results with a Melmetal using Double Iron Bash on a Fluffy Bewear with and without the Punching Glove item:

Before:
`0 Atk Iron Fist Melmetal Double Iron Bash (2 hits) vs. 0 HP / 0 Def Fluffy Bewear: 126-150 (33 - 39.3%) -- approx. 99.9% chance to 3HKO`
`0 Atk Punching Glove Iron Fist Melmetal Double Iron Bash (2 hits) vs. 0 HP / 0 Def Fluffy Bewear: 140-166 (36.7 - 43.5%) -- approx. 3HKO`

140 / 126 = 1.111 ~ 1.1
166 / 150 = 1.107 ~ 1.1

After:
`0 Atk Iron Fist Melmetal Double Iron Bash (2 hits) vs. 0 HP / 0 Def Fluffy Bewear: 126-150 (33 - 39.3%) -- approx. 99.9% chance to 3HKO`
`0 Atk Punching Glove Iron Fist Melmetal Double Iron Bash (2 hits) vs. 0 HP / 0 Def Bewear: 282-332 (74 - 87.1%) -- approx. 2HKO`

282 / 126 = 2.238 ~ 2.2
332 / 150 = 2.213 ~ 2.2

2.2 = 1.1 / 0.5 (the debuff associated with Fluffy)
  • Loading branch information
shrianshChari authored Apr 6, 2024
1 parent c0b5958 commit 2c5a6b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion calc/src/mechanics/gen789.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ export function calculateSMSSSV(
return result;
}

if (move.flags.punch && attacker.hasItem('Punching Glove')) {
desc.attackerItem = attacker.item;
move.flags.contact = 0;
}

const breaksProtect = move.breaksProtect || move.isZ || attacker.isDynamaxed ||
(attacker.hasAbility('Unseen Fist') && move.flags.contact);

Expand Down Expand Up @@ -1152,7 +1157,6 @@ export function calculateBPModsSMSSSV(

if (attacker.hasItem('Punching Glove') && move.flags.punch) {
bpMods.push(4506);
desc.attackerItem = attacker.item;
}

if (gen.num <= 8 && defender.hasAbility('Heatproof') && move.hasType('Fire')) {
Expand Down

0 comments on commit 2c5a6b5

Please sign in to comment.