From 5daa7064cd6e9510660fab462b71d99a5422736c Mon Sep 17 00:00:00 2001 From: hppeng Date: Sun, 17 Jul 2022 23:13:20 -0500 Subject: [PATCH] Separate cases a bit more cleanly, include -sp items in noboost --- js/skillpoints.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/skillpoints.js b/js/skillpoints.js index 24f8b3a..d739c5d 100644 --- a/js/skillpoints.js +++ b/js/skillpoints.js @@ -95,12 +95,15 @@ function calculate_skillpoints(equipment, weapon) { if (item.get("crafted")) { crafted.push(item); } + // TODO hack: We will treat ALL set items as unsafe :( + else if (item.set !== null) { + consider.push(item); + } else if (item.get("reqs").every(x => x === 0) && item.skillpoints.every(x => x >= 0)) { // All reqless item without -skillpoints. fixed.push(item); } - // TODO hack: We will treat ALL set items as unsafe :( - else if (item.skillpoints.every(x => x === 0) && item.set === null) { + else if (item.skillpoints.every(x => x <= 0)) { noboost.push(item); } else {