Skip to content

Commit

Permalink
Fix multihit/multiattack when boosts already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
thejetou committed Sep 29, 2023
1 parent 5c5de3d commit b382560
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions calc/src/mechanics/gen789.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ export function calculateSMSSSV(
desc.moveTurns = `over ${move.timesUsed} turns`;
const hasWhiteHerb = attacker.hasItem('White Herb');
let usedWhiteHerb = false;
let dropCount = attacker.boosts[attackStat];
let dropCount = 0;
for (let times = 0; times < move.timesUsed!; times++) {
const newAttack = getModifiedStat(attack, dropCount);
let damageMultiplier = 0;
Expand Down Expand Up @@ -601,8 +601,9 @@ export function calculateSMSSSV(
}

if (move.hits > 1) {
let defenderDefBoost = defender.boosts['def'];
let defenderDefBoost = 0;
for (let times = 0; times < move.hits; times++) {
const newDefense = getModifiedStat(defense, defenderDefBoost);
let damageMultiplier = 0;
damage = damage.map(affectedAmount => {
if (times) {
Expand All @@ -618,7 +619,6 @@ export function calculateSMSSSV(
times
);
const newFinalMod = chainMods(newFinalMods, 41, 131072);
const newDefense = getModifiedStat(defense, defenderDefBoost);
const newBaseDamage = calculateBaseDamageSMSSSV(
gen,
attacker,
Expand Down

0 comments on commit b382560

Please sign in to comment.