Fix crafted skillpoint (2)

This commit is contained in:
b 2021-02-14 17:33:37 -06:00
parent 17c1e0b74d
commit 0b12daa968
2 changed files with 6 additions and 6 deletions

View file

@ -2,7 +2,7 @@ const url_tag = location.hash.slice(1);
console.log(url_base);
console.log(url_tag);
const BUILD_VERSION = "6.9.27";
const BUILD_VERSION = "6.9.28";
function setTitle() {
let text;

View file

@ -8,12 +8,12 @@ function calculate_skillpoints(equipment, weapon) {
let crafted = [];
//console.log(equipment);
for (const item of equipment) {
if (item.get("reqs").every(x => x === 0)) {
fixed.push(item);
}
else if (item.get("crafted")) {
if (item.get("crafted")) {
crafted.push(item);
}
else if (item.get("reqs").every(x => x === 0)) {
fixed.push(item);
}
// TODO hack: We will treat ALL set items as unsafe :(
else if (item.get("skillpoints").every(x => x === 0) && item.get("set") === null) {
noboost.push(item);
@ -191,6 +191,6 @@ function calculate_skillpoints(equipment, weapon) {
apply_skillpoints(final_skillpoints, weapon, best_activeSetCounts);
best_total += total_diff;
}
let equip_order = fixed.concat(best);
let equip_order = fixed.concat(best).concat(crafted);
return [equip_order, best_skillpoints, final_skillpoints, best_total, best_activeSetCounts];
}