From dba4ad3220f2bc405bc2733ccf4e2dcd02ae7d3d Mon Sep 17 00:00:00 2001 From: hppeng Date: Wed, 6 Jul 2022 01:46:47 -0700 Subject: [PATCH] Revert to 1.20.3 powder calculation --- js/powders.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/js/powders.js b/js/powders.js index cd2ab00..a75cf9a 100644 --- a/js/powders.js +++ b/js/powders.js @@ -169,14 +169,14 @@ function calc_weapon_powder(weapon, damageBases) { let min_diff = Math.min(neutralRemainingRaw[0], conversionRatio * neutralBase[0]); let max_diff = Math.min(neutralRemainingRaw[1], conversionRatio * neutralBase[1]); - //damages[element+1][0] = Math.floor(round_near(damages[element+1][0] + min_diff)); - //damages[element+1][1] = Math.floor(round_near(damages[element+1][1] + max_diff)); - //neutralRemainingRaw[0] = Math.floor(round_near(neutralRemainingRaw[0] - min_diff)); - //neutralRemainingRaw[1] = Math.floor(round_near(neutralRemainingRaw[1] - max_diff)); - damages[element+1][0] += min_diff; - damages[element+1][1] += max_diff; - neutralRemainingRaw[0] -= min_diff; - neutralRemainingRaw[1] -= max_diff; + damages[element+1][0] = Math.floor(round_near(damages[element+1][0] + min_diff)); + damages[element+1][1] = Math.floor(round_near(damages[element+1][1] + max_diff)); + neutralRemainingRaw[0] = Math.floor(round_near(neutralRemainingRaw[0] - min_diff)); + neutralRemainingRaw[1] = Math.floor(round_near(neutralRemainingRaw[1] - max_diff)); + //damages[element+1][0] += min_diff; + //damages[element+1][1] += max_diff; + //neutralRemainingRaw[0] -= min_diff; + //neutralRemainingRaw[1] -= max_diff; } damages[element+1][0] += powder.min; damages[element+1][1] += powder.max;