From e96cd3c9cee81a5c0e97b150aa5010eaa9402a3a Mon Sep 17 00:00:00 2001 From: b Date: Mon, 11 Jan 2021 15:34:59 -0600 Subject: [PATCH] Add prettyprint to long copy --- display.js | 4 ++-- test.js | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/display.js b/display.js index 3b86e43..2554099 100644 --- a/display.js +++ b/display.js @@ -1002,8 +1002,8 @@ function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spell } save_damages.push(averageDamage); } - else if (part.type == "heal") { - let heal_amount = (part.strength * build.getDefenseStats()[0] * Math.max(0, Math.min(1.75, 1 + 0.5 * stats.get("wDamPct")/100))).toFixed(2); + else if (part.type === "heal") { + let heal_amount = (part.strength * build.getDefenseStats()[0] * Math.max(0.5,Math.min(1.75, 1 + 0.5 * stats.get("wDamPct")/100)).toFixed(2)); let healLabel = document.createElement("p"); healLabel.textContent = heal_amount; healLabel.classList.add("damagep"); diff --git a/test.js b/test.js index bdd51ce..bcb1dfc 100644 --- a/test.js +++ b/test.js @@ -592,15 +592,15 @@ function shareBuild() { if (player_build) { let text = url_base+location.hash+"\n"+ "WynnBuilder build:\n"+ - player_build.helmet.get("displayName")+"\n"+ - player_build.chestplate.get("displayName")+"\n"+ - player_build.leggings.get("displayName")+"\n"+ - player_build.boots.get("displayName")+"\n"+ - player_build.ring1.get("displayName")+"\n"+ - player_build.ring2.get("displayName")+"\n"+ - player_build.bracelet.get("displayName")+"\n"+ - player_build.necklace.get("displayName")+"\n"+ - player_build.weapon.get("displayName"); + "> "+player_build.helmet.get("displayName")+"\n"+ + "> "+player_build.chestplate.get("displayName")+"\n"+ + "> "+player_build.leggings.get("displayName")+"\n"+ + "> "+player_build.boots.get("displayName")+"\n"+ + "> "+player_build.ring1.get("displayName")+"\n"+ + "> "+player_build.ring2.get("displayName")+"\n"+ + "> "+player_build.bracelet.get("displayName")+"\n"+ + "> "+player_build.necklace.get("displayName")+"\n"+ + "> "+player_build.weapon.get("displayName")+" ["+player_build.weapon.get("powders").map(x => powderNames.get(x)).join("")+"]"; copyTextToClipboard(text); document.getElementById("share-button").textContent = "Copied!"; }