From 224f5ad3d27046388eb9fc6976058eb68268c234 Mon Sep 17 00:00:00 2001 From: b Date: Fri, 15 Jan 2021 04:24:52 -0600 Subject: [PATCH] Bump version, fix powdering --- builder.js | 2 +- display.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builder.js b/builder.js index 5664708..25d0631 100644 --- a/builder.js +++ b/builder.js @@ -11,7 +11,7 @@ console.log(url_tag); * END testing section */ -const BUILD_VERSION = "6.9"; +const BUILD_VERSION = "6.9.1"; function setTitle() { document.getElementById("header").textContent = "WynnBuilder version "+BUILD_VERSION+" (db version "+DB_VERSION+")"; diff --git a/display.js b/display.js index a2f6f4c..13ceb11 100644 --- a/display.js +++ b/display.js @@ -55,8 +55,8 @@ function expandItem(item, powders){ //console.log(powderStats[id]); let powder = powderStats[id]; let name = powderNames.get(id); - expandedItem.set(name.charAt(0) + "Def", expandedItem.get(name.charAt(0)+"Def") + powder["defPlus"]); - expandedItem.set(skp_elements[(skp_elements.indexOf(name.charAt(0)) + 6 )% 5] + "Def", expandedItem.get(skp_elements[(skp_elements.indexOf(name.charAt(0)) + 6 )% 5]+"Def") - powder["defMinus"]); + expandedItem.set(name.charAt(0) + "Def", (expandedItem.get(name.charAt(0)+"Def") || 0) + powder["defPlus"]); + expandedItem.set(skp_elements[(skp_elements.indexOf(name.charAt(0)) + 4 )% 5] + "Def", (expandedItem.get(skp_elements[(skp_elements.indexOf(name.charAt(0)) + 4 )% 5]+"Def") || 0) - powder["defMinus"]); } }