From 1bda93c08ef2b7f43746dbe02f000db0d61f62b5 Mon Sep 17 00:00:00 2001 From: b Date: Tue, 6 Jul 2021 20:36:12 -0700 Subject: [PATCH] Fix crafted sp (or any maxroll sp) override bug... spaghetti codes... --- build.js | 5 ++++- builder.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 77e439b..758a2eb 100644 --- a/build.js +++ b/build.js @@ -484,7 +484,7 @@ class Build{ */ initBuildStats(){ - let staticIDs = ["hp", "eDef", "tDef", "wDef", "fDef", "aDef"]; + let staticIDs = ["hp", "eDef", "tDef", "wDef", "fDef", "aDef", "str", "dex", "int", "def", "agi"]; //Create a map of this build's stats let statMap = new Map(); @@ -497,6 +497,9 @@ class Build{ let major_ids = new Set(); for (const item of this.items){ for (let [id, value] of item.get("maxRolls")) { + if (staticIDs.includes(id)) { + continue; + } statMap.set(id,(statMap.get(id) || 0)+value); } for (const staticID of staticIDs) { diff --git a/builder.js b/builder.js index f717ad3..e35509b 100644 --- a/builder.js +++ b/builder.js @@ -3,7 +3,7 @@ const url_tag = location.hash.slice(1); // console.log(url_tag); -const BUILD_VERSION = "7.0.15"; +const BUILD_VERSION = "7.0.16"; function setTitle() { let text;