From 2e8b8c8f62f7f15375979949ebf265c07dc447f4 Mon Sep 17 00:00:00 2001 From: vodofrede Date: Sun, 20 Mar 2022 14:55:41 +0100 Subject: [PATCH] highlight buffed virtual stats --- src/script/optimizer.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/script/optimizer.js b/src/script/optimizer.js index 06a5b31..df4cb8b 100644 --- a/src/script/optimizer.js +++ b/src/script/optimizer.js @@ -2,12 +2,10 @@ const CLASSES = fetch("/data/classes.json") .then(response => response.json()) .then(data => data.classes) .catch(error => console.log(error)); - const TALISMANS = fetch("/data/talismans.json") .then(response => response.json()) .then(data => data.talismans) .catch(error => console.log(error)); - const HELMS = fetch("data/equipment.json") .then(response => response.json()) .then(data => data.helms) @@ -79,7 +77,7 @@ async function update() { document.getElementsByName("virtual-stat").forEach((elem, i) => { elem.value = ((desired[i] > best.stats[i] ? desired[i] : best.stats[i]) + items[i]); - // elem.style.color = IS_RADAGON[i] && virtual[i] ? "firebrick" : !IS_RADAGON[i] && virtual[i] ? "royalblue" : "unset"; + elem.value > desired[i] && elem.value > best.stats[i] ? (elem.style.color = "tomato", elem.style.fontWeight = "bold") : (elem.style.color = "unset", elem.style.fontWeight = "unset"); }); // update talismans