Skip to content

Commit

Permalink
Fix critical multihit attacks
Browse files Browse the repository at this point in the history
  • Loading branch information
thejetou committed Sep 23, 2023
1 parent b0f2ffb commit 8db5857
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion calc/src/mechanics/gen789.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,10 @@ export function calculateSMSSSV(
times
);
const newFinalMod = chainMods(newFinalMods, 41, 131072);
const newBaseDamage = getBaseDamage(attacker.level, basePower, attack, newDefense);
let newBaseDamage = getBaseDamage(attacker.level, basePower, attack, newDefense);
if (isCritical) {
newBaseDamage = Math.floor(OF32(newBaseDamage * 1.5));
}
const newFinalDamage = getFinalDamage(
newBaseDamage,
damageMultiplier,
Expand Down

0 comments on commit 8db5857

Please sign in to comment.