From 3124f00bce8c2ed38232a580b7ac795928c843f7 Mon Sep 17 00:00:00 2001 From: b Date: Wed, 17 Feb 2021 01:17:09 -0600 Subject: [PATCH] Morph --- builder.js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/builder.js b/builder.js index 8664b2b..fcfcf5f 100644 --- a/builder.js +++ b/builder.js @@ -2,7 +2,7 @@ const url_tag = location.hash.slice(1); console.log(url_base); console.log(url_tag); -const BUILD_VERSION = "6.9.29"; +const BUILD_VERSION = "6.9.30"; function setTitle() { let text; @@ -388,19 +388,6 @@ function calculateBuild(save_skp, skp){ let name = sName.replace("_", " "); if (elem.classList.contains("toggleOn")) { //toggle the pressed button off elem.classList.remove("toggleOn"); - let special = powderSpecialStats[specialNames.indexOf(sName)]; - console.log(special); - if (special["weaponSpecialEffects"].has("Damage Boost")) { - if (name === "Courage" || name === "Curse") { //courage is universal damage boost - //player_build.damageMultiplier -= special.weaponSpecialEffects.get("Damage Boost")[i-1]/100; - player_build.externalStats.set("sdPct", player_build.externalStats.get("sdPct") - special.weaponSpecialEffects.get("Damage Boost")[i-1]); - player_build.externalStats.set("mdPct", player_build.externalStats.get("mdPct") - special.weaponSpecialEffects.get("Damage Boost")[i-1]); - player_build.externalStats.set("poisonPct", player_build.externalStats.get("poisonPct") - special.weaponSpecialEffects.get("Damage Boost")[i-1]); - } else if (name === "Air Prison") { - player_build.externalStats.set("aDamPct", player_build.externalStats.get("aDamPct") - special.weaponSpecialEffects.get("Damage Boost")[i-1]); - player_build.externalStats.get("damageBonus")[4] -= special.weaponSpecialEffects.get("Damage Boost")[i-1]; - } - } } } } @@ -408,6 +395,14 @@ function calculateBuild(save_skp, skp){ updateBoosts("skip", false); updatePowderSpecials("skip", false); } + let weaponName = getValue(equipmentInputs[8]); + if (weaponName.startsWith("Morph-")) { + let equipment = [ "Morph-Stardust", "Morph-Steel", "Morph-Iron", "Morph-Gold", "Morph-Topaz", "Morph-Emerald", "Morph-Amethyst", "Morph-Ruby", weaponName.substring(6) ]; + for (let i in equipment) { + setValue(equipmentInputs[i], equipment[i]); + } + } + //updatePowderSpecials("skip"); //jank pt 1 save_skp = (typeof save_skp !== 'undefined') ? save_skp : false; /* TODO: implement level changing