From 94256cd94a89b23e8b45e26c52115128a57eb948 Mon Sep 17 00:00:00 2001 From: ferricles Date: Wed, 18 May 2022 15:14:36 -0700 Subject: [PATCH] readded optimize str/dex button --- builder/index.html | 3 +++ js/sq2builder.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/builder/index.html b/builder/index.html index 3575f77..0e6df47 100644 --- a/builder/index.html +++ b/builder/index.html @@ -398,6 +398,9 @@ +
+ +
diff --git a/js/sq2builder.js b/js/sq2builder.js index 063b453..d6afe29 100644 --- a/js/sq2builder.js +++ b/js/sq2builder.js @@ -735,7 +735,7 @@ function resetArmorPowderSpecials() { document.getElementById(skp + "_boost_armor").value = 0; document.getElementById(skp + "_boost_armor_prev").value = 0; document.getElementById(skp + "_boost_armor").style.background = `linear-gradient(to right, #AAAAAA, #AAAAAA 0%, #AAAAAA 100%)`; - document.getElementById(skp + "_boost_armor_label").textContent = `% ${capitalizeFirst(elem_names[skpnames.indexOf(skp)])} Damage Boost: 0` + document.getElementById(skp + "_boost_armor_label").textContent = `% ${capitalizeFirst(elem_names[skp_names.indexOf(skp)])} Damage Boost: 0` } } @@ -982,6 +982,9 @@ function toggleButton(button_id) { } function optimizeStrDex() { + if (!player_build) { + return; + } const remaining = levelToSkillPoints(player_build.level) - player_build.assigned_skillpoints; const base_skillpoints = player_build.base_skillpoints; const max_str_boost = 100 - base_skillpoints[0];