From d717781d2f2ca289c367d3441c8391113a10c023 Mon Sep 17 00:00:00 2001 From: b Date: Sat, 20 Mar 2021 21:00:34 -0700 Subject: [PATCH] Sp behavior fix --- skillpoints.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skillpoints.js b/skillpoints.js index 1daa896..a17d710 100644 --- a/skillpoints.js +++ b/skillpoints.js @@ -10,7 +10,8 @@ function calculate_skillpoints(equipment, weapon) { if (item.get("crafted")) { crafted.push(item); } - else if (item.get("reqs").every(x => x === 0)) { + else if (item.get("reqs").every(x => x === 0) && item.get("skillpoints").every(x => x >= 0)) { + // All reqless item without -skillpoints. fixed.push(item); } // TODO hack: We will treat ALL set items as unsafe :( @@ -60,7 +61,7 @@ function calculate_skillpoints(equipment, weapon) { } } if (item.get("reqs")[i] == 0) continue; - skillpoint_min[i] = Math.max(skillpoint_min[i], item.get("reqs")[i] + item.get("skillpoints")[i]); + skillpoint_min[i] = Math.max(skillpoint_min[i], item.get("reqs")[i]);// + item.get("skillpoints")[i]); const req = item.get("reqs")[i]; const cur = skillpoints[i]; if (req > cur) {