small bug fix + resetting armor powder slider now resets label text
This commit is contained in:
parent
2c8bc4785e
commit
e465d5e5a3
3 changed files with 14 additions and 2 deletions
|
@ -693,7 +693,7 @@ function updateArmorPowderSpecials(elem_id, recalc_stats) {
|
|||
}
|
||||
|
||||
|
||||
if (recalc_stats) {
|
||||
if (recalc_stats && player_build) {
|
||||
//calc build stats and display powder special
|
||||
calculateBuildStats();
|
||||
// displaysq2PowderSpecials(document.getElementById("powder-special-stats"), powderSpecials, player_build, true);
|
||||
|
@ -706,7 +706,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`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,14 @@ let elem_chars = [
|
|||
'a'
|
||||
]
|
||||
|
||||
let elem_names = [
|
||||
'earth',
|
||||
'thunder',
|
||||
'water',
|
||||
'fire',
|
||||
'air'
|
||||
]
|
||||
|
||||
let elem_colors = [
|
||||
"#00AA00",
|
||||
"#FFFF55",
|
||||
|
|
|
@ -409,3 +409,7 @@ async function hardReload() {
|
|||
location.reload(true);
|
||||
}
|
||||
|
||||
|
||||
function capitalizeFirst(str) {
|
||||
return str.charAt(0).toUpperCase + str.slice(1);
|
||||
}
|
Loading…
Reference in a new issue