fix: reset powder specials on input
This commit is contained in:
parent
365c9f72e9
commit
4bb7e82063
2 changed files with 15 additions and 1 deletions
15
sq2bs.js
15
sq2bs.js
|
@ -133,7 +133,7 @@ function update_field(field) {
|
||||||
|
|
||||||
// call calc build
|
// call calc build
|
||||||
}
|
}
|
||||||
|
/* tabulars */
|
||||||
|
|
||||||
let tabs = ['all-stats', 'minimal-offensive-stats', 'minimal-defensive-stats'];
|
let tabs = ['all-stats', 'minimal-offensive-stats', 'minimal-defensive-stats'];
|
||||||
|
|
||||||
|
@ -168,6 +168,19 @@ function collapse_element(eq) {
|
||||||
document.querySelector("#"+eq+"-tooltip").style.display = "";
|
document.querySelector("#"+eq+"-tooltip").style.display = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// disable boosts
|
||||||
|
|
||||||
|
function reset_powder_specials() {
|
||||||
|
let specials = ["Quake", "Chain_Lightning", "Curse", "Courage", "Wind_Prison"]
|
||||||
|
for (const special of specials) {
|
||||||
|
for (i = 1; i < 6; i++) {
|
||||||
|
if (document.querySelector("#"+special+"-"+i).classList.contains("toggleOn")) {
|
||||||
|
document.querySelector("#"+special+"-"+i).classList.remove("toggleOn");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// autocomplete initialize
|
// autocomplete initialize
|
||||||
function init_autocomplete() {
|
function init_autocomplete() {
|
||||||
let dropdowns = new Map()
|
let dropdowns = new Map()
|
||||||
|
|
|
@ -306,6 +306,7 @@ function calculateBuild(save_skp, skp){
|
||||||
if(player_build){
|
if(player_build){
|
||||||
updateBoosts("skip", false);
|
updateBoosts("skip", false);
|
||||||
updatePowderSpecials("skip", false);
|
updatePowderSpecials("skip", false);
|
||||||
|
reset_powder_specials();
|
||||||
}
|
}
|
||||||
let weaponName = getValue(equipmentInputs[8]);
|
let weaponName = getValue(equipmentInputs[8]);
|
||||||
if (weaponName.startsWith("Morph-")) {
|
if (weaponName.startsWith("Morph-")) {
|
||||||
|
|
Loading…
Reference in a new issue