From b0c7c0fbc40d79bb09fecb0adecb0d6e6c60ca2f Mon Sep 17 00:00:00 2001 From: b Date: Sun, 4 Jul 2021 11:12:43 -0700 Subject: [PATCH] Fix average not displaying raw spellchanges --- damage_calc3.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/damage_calc3.js b/damage_calc3.js index d8e3669..5aceba5 100644 --- a/damage_calc3.js +++ b/damage_calc3.js @@ -117,17 +117,18 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier, rawModifier *= spellMultiplier * damageMultiplier; let totalDamNorm = [0, 0]; let totalDamCrit = [0, 0]; - if(!melee){ - totalDamNorm = [rawModifier, rawModifier]; - totalDamCrit = [rawModifier, rawModifier]; - for (let arr of damageformulas) { - arr = arr.map(x => x + " + " +tooltipinfo.get("rawModifier")); - } - } let damages_results = []; // 0th skillpoint is strength, 1st is dex. let str = total_skillpoints[0]; let strBoost = 1 + skillPointsToPercentage(str); + if(!melee){ + let baseDam = rawModifier * strBoost; + totalDamNorm = [baseDam, baseDam]; + totalDamCrit = [baseDam, baseDam]; + for (let arr of damageformulas) { + arr = arr.map(x => x + " + " +tooltipinfo.get("rawModifier")); + } + } let staticBoost = (pctModifier / 100.); tooltipinfo.set("staticBoost", `${(pctModifier/ 100.).toFixed(2)}`); tooltipinfo.set("skillBoost",["","","","","",""]);