broken editable IDs

This commit is contained in:
ferricles 2022-05-15 23:50:47 -07:00
parent 057f00e478
commit 7959a12dee
7 changed files with 818 additions and 407 deletions

View file

@ -412,7 +412,355 @@
</div> </div>
<div class="col mb-5"> <div class="col mb-5">
<div class="row row-cols-1 gy-3"> <div class="row row-cols-1 gy-3">
<div class="col"> <div class="col mb-1">
<div class="row row-cols-1 row-cols-1 text-center scaled-font dark-5 rounded dark-shadow">
<div class="col fw-bold dark-4 rounded-top">
<div class = "row">
<div class = "col-4 py-2">
<button class = "button rounded scaled-font fw-bold text-light dark-5" id = "edit-ID-button" onclick = "toggle_tab('edit_id_tab'); toggleButton('edit-ID-button')">
Edit IDs
</button>
</div>
<div class = "col-4 py-2">
<button class = "button rounded scaled-font fw-bold text-light dark-5" id = "edit-ID-button" onclick = "updateStats();">
Update Stats
</button>
</div>
<div class = "col-4 py-2">
<button class = "button rounded scaled-font fw-bold text-light dark-5" id = "edit-ID-button" onclick = "resetEditableIDs(); updateStats();">
Reset Edited IDs
</button>
</div>
</div>
</div>
<div class="col dark-6 rounded-bottom my-3 my-xl-1" id = "edit_id_tab" style = "display:none;">
<div class = "row big-title justify-content-center">
Damage Stats
</div>
<div class = "row px-1">
<div class = "col-lg-3 col-sm-6">
<div class = "row">
Spell Damage %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="sdPct" name="sdPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "sdPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
Spell Damage Raw:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="sdRaw" name="sdRaw" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "sdRaw-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
Melee Damage %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="mdPct" name="mdPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "mdPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
Melee Damage Raw:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="mdRaw" name="mdRaw" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "mdRaw-base">
Original Value: 0
</div>
</div>
</div>
<div class = "row px-1">
<div class = "col-lg-3 col-sm-6">
<div class = "row">
Poison:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="poison" name="poison" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "poison-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row eDam">
Damage %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="eDamPct" name="eDamPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "eDamPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row tDam">
Damage %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="tDamPct" name="tDamPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "tDamPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row wDam">
Damage %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="wDamPct" name="wDamPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "wDamPct-base">
Original Value: 0
</div>
</div>
</div>
<div class = "row px-1">
<div class = "col-lg-3 col-sm-6">
<div class = "row fDam">
Damage %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="fDamPct" name="fDamPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "fDamPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row aDam">
Damage %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="aDamPct" name="aDamPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "aDamPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
+ Tier:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="atkTier" name="atkTier" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "atkTier-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
</div>
</div>
<div class = "row big-title justify-content-center">
Defense Stats
</div>
<div class = "row px-1">
<div class = "col-lg-3 col-sm-6">
<div class = "row Earth">
Defense %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="eDefPct" name="eDefPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "eDefPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row Thunder">
Defense %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="tDefPct" name="tDefPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "tDefPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row Water">
Defense %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="wDefPct" name="wDefPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "wDefPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row Fire">
Defense %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="fDefPct" name="fDefPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "fDefPct-base">
Original Value: 0
</div>
</div>
</div>
<div class = "row px-1">
<div class = "col-lg-3 col-sm-6">
<div class = "row Air">
Defense %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="aDefPct" name="aDefPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "aDefPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
Health Regen Raw:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="hprRaw" name="hprRaw" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "hprRaw-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
Health Regen %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="hprPct" name="hprPct" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "hprPct-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
Health Bonus:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="hpBonus" name="hpBonus" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "hpBonus-base">
Original Value: 0
</div>
</div>
</div>
<div class = "row big-title justify-content-center">
Utility Stats
</div>
<div class = "row px-1">
<div class = "col-lg-3 col-sm-6">
<div class = "row">
1st Spell Cost %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="spPct1" name="spPct1" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "spPct1-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
2nd Spell Cost %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="spPct2" name="spPct2" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "spPct2-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
3rd Spell Cost %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="spPct3" name="spPct3" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "spPct3-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
4th Spell Cost %:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="spPct4" name="spPct4" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "spPct4-base">
Original Value: 0
</div>
</div>
</div>
<div class = "row px-1">
<div class = "col-lg-3 col-sm-6">
<div class = "row">
1st Spell Cost Raw:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="spRaw1" name="spRaw1" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "spRaw1-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
2nd Spell Cost Raw:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="spRaw2" name="spRaw2" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "spRaw2-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
3rd Spell Cost Raw:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="spRaw3" name="spRaw3" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "spRaw3-base">
Original Value: 0
</div>
</div>
<div class = "col-lg-3 col-sm-6">
<div class = "row">
4th Spell Cost Raw:
</div>
<div class = "row">
<input type = "number" placeholder = "0" id="spRaw4" name="spRaw4" value="0" class="border-semi-dark border-2 text-light dark-5 rounded scaled-font form-control form-control-sm"/>
</div>
<div class = "row" id = "spRaw4-base">
Original Value: 0
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col mb-1">
<div class="row row-cols-1 row-cols-1 text-center scaled-font dark-5 rounded dark-shadow"> <div class="row row-cols-1 row-cols-1 text-center scaled-font dark-5 rounded dark-shadow">
<div class="col fw-bold dark-4 rounded-top"> <div class="col fw-bold dark-4 rounded-top">
Active boosts Active boosts
@ -448,7 +796,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col"> <div class="col mb-1">
<div class="row row-cols-1 rounded text-center dark-5 scaled-font"> <div class="row row-cols-1 rounded text-center dark-5 scaled-font">
<div class="col"> <div class="col">
<div class="row text-nowrap"> <div class="row text-nowrap">
@ -695,7 +1043,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-xl-3"> <div class="col-xl-3 mb-3">
<div class="row row-cols-1 rounded dark-shadow dark-6 scaled-font"> <div class="row row-cols-1 rounded dark-shadow dark-6 scaled-font">
<div class="col rounded-top"> <div class="col rounded-top">
<div class="row"> <div class="row">
@ -715,7 +1063,7 @@
<div id="overall-stats" class="col text-nowrap"></div> <div id="overall-stats" class="col text-nowrap"></div>
</div> </div>
</div> </div>
<div class="col-xl-3"> <div class="col-xl-3 mb-3">
<div class="row row-cols-1 gy-3 mb-4 text-center scaled-font"> <div class="row row-cols-1 gy-3 mb-4 text-center scaled-font">
<div class="col"> <div class="col">
<div class="spell-display dark-5 rounded dark-shadow py-2 border border-dark" id="build-melee-statsAvg">melee</div> <div class="spell-display dark-5 rounded dark-shadow py-2 border border-dark" id="build-melee-statsAvg">melee</div>
@ -836,402 +1184,7 @@
</div> </div>
</div> </div>
</div> </div>
<!--div id="drag-edit-ids" style="display: none;">
<div class="id-box fade-in" id="id-edit" style="display: none">
<div class="id-edit1">
<table>
<tr>
<th colspan="5">
<h1>Damage values:</h1>
</th>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="sdPct" class="idLabel" id="sdPct-label">Spell Dmg %:</label><br>
<input type="number" id="sdPct" name="sdPct" value="0" class="idInput"/>
</div>
<div id="sdPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="sdRaw" class="idLabel" id="sdRaw-label">Raw Spell:</label><br>
<input type="number" id="sdRaw" name="sdRaw" value="0" class="idInput"/>
</div>
<div id="sdRaw-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="mdPct" class="idLabel" id="mdPct-label">Melee Dmg %:</label><br>
<input type="number" id="mdPct" name="mdPct" value="0" class="idInput"/>
</div>
<div id="mdPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="mdRaw" class="idLabel" id="mdRaw-label">Raw Melee:</label><br>
<input type="number" id="mdRaw" name="mdRaw" value="0" class="idInput"/>
</div>
<div id="mdRaw-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="poison" class="idLabel" id="poison-label">Poison:</label><br>
<input type="number" id="poison" name="poison" value="0" class="idInput"/>
</div>
<div id="poison-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="eDamPct" class="idLabel Earth" id="eDamPct-label">Damage %:</label><br>
<input type="number" id="eDamPct" name="eDamPct" value="0" class="idInput"/>
</div>
<div id="eDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="tDamPct" class="idLabel Thunder" id="tDamPct-label">Damage %:</label><br>
<input type="number" id="tDamPct" name="tDamPct" value="0" class="idInput"/>
</div>
<div id="tDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="wDamPct" class="idLabel Water" id="wDamPct-label">Damage %:</label><br>
<input type="number" id="wDamPct" name="wDamPct" value="0" class="idInput"/>
</div>
<div id="wDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="fDamPct" class="idLabel Fire" id="fDamPct-label">Damage %:</label><br>
<input type="number" id="fDamPct" name="fDamPct" value="0" class="idInput"/>
</div>
<div id="fDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="aDamPct" class="idLabel Air" id="aDamPct-label">Damage %:</label><br>
<input type="number" id="aDamPct" name="aDamPct" value="0" class="idInput"/>
</div>
<div id="aDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="atkTier" class="idLabel" id="atkTier-label">+Tier:</label><br>
<input type="number" id="atkTier" name="atkTier" value="0" class="idInput"/>
</div>
<div id="atkTier-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="id-edit1">
<table>
<tr>
<th colspan="5">
<h1>Defense values:</h1>
</th>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="eDefPct" class="idLabel Earth" id="eDefPct-label">Defense %:</label><br>
<input type="number" id="eDefPct" name="eDefPct" value="0" class="idInput"/>
</div>
<div id="eDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="tDefPct" class="idLabel Thunder" id="tDefPct-label">Defense %:</label><br>
<input type="number" id="tDefPct" name="tDefPct" value="0" class="idInput"/>
</div>
<div id="tDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="wDefPct" class="idLabel Water" id="wDefPct-label">Defense %:</label><br>
<input type="number" id="wDefPct" name="wDefPct" value="0" class="idInput"/>
</div>
<div id="wDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="fDefPct" class="idLabel Fire" id="fDefPct-label">Defense %:</label><br>
<input type="number" id="fDefPct" name="fDefPct" value="0" class="idInput"/>
</div>
<div id="fDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="aDefPct" class="idLabel Air" id="aDefPct-label">Defense %:</label><br>
<input type="number" id="aDefPct" name="aDefPct" value="0" class="idInput"/>
</div>
<div id="aDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="hprRaw" class="idLabel" id="hprRaw-label">HPR Raw:</label><br>
<input type="number" id="hprRaw" name="hprRaw" value="0" class="idInput"/>
</div>
<div id="hprRaw-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="hprPct" class="idLabel" id="hprPct-label">HPR %:</label><br>
<input type="number" id="hprPct" name="hprPct" value="0" class="idInput"/>
</div>
<div id="hprPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="hpBonus" class="idLabel" id="hpBonus-label">Health Bonus:</label><br>
<input type="number" id="hpBonus" name="hpBonus" value="0" class="idInput"/>
</div>
<div id="hpBonus-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="id-edit1">
<table>
<tr>
<th colspan="5">
<h1>Utility values:</h1>
</th>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spPct1" class="idLabel" id="spPct1-label">1st Spell Cost %:</label><br>
<input type="number" id="spPct1" name="spPct1" value="0" class="idInput"/>
</div>
<div id="spPct1-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spPct2" class="idLabel" id="spPct2-label">2nd Spell Cost %:</label><br>
<input type="number" id="spPct2" name="spPct2" value="0" class="idInput"/>
</div>
<div id="spPct2-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spPct3" class="idLabel" id="spPct3-label">3rd Spell Cost %:</label><br>
<input type="number" id="spPct3" name="spPct3" value="0" class="idInput"/>
</div>
<div id="spPct3-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spPct4" class="idLabel" id="spPct4-label">4th Spell Cost %:</label><br>
<input type="number" id="spPct4" name="spPct4" value="0" class="idInput"/>
</div>
<div id="spPct4-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spRaw1" class="idLabel" id="spRaw1-label">1st Spell Cost Raw:</label><br>
<input type="number" id="spRaw1" name="spRaw1" value="0" class="idInput"/>
</div>
<div id="spRaw1-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spRaw2" class="idLabel" id="spRaw2-label">2nd Spell Cost Raw:</label><br>
<input type="number" id="spRaw2" name="spRaw2" value="0" class="idInput"/>
</div>
<div id="spRaw2-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spRaw3" class="idLabel" id="spRaw3-label">3rd Spell Cost Raw:</label><br>
<input type="number" id="spRaw3" name="spRaw3" value="0" class="idInput"/>
</div>
<div id="spRaw3-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spRaw4" class="idLabel" id="spRaw4-label">4th Spell Cost Raw:</label><br>
<input type="number" id="spRaw4" name="spRaw4" value="0" class="idInput"/>
</div>
<div id="spRaw4-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
</div-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.6/dist/autoComplete.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.6/dist/autoComplete.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/macy@2"></script> <script src="https://cdn.jsdelivr.net/npm/macy@2"></script>

396
builder/temp.html Normal file
View file

@ -0,0 +1,396 @@
<!--div id="drag-edit-ids" style="display: none;">
<div class="id-box fade-in" id="id-edit" style="display: none">
<div class="id-edit1">
<table>
<tr>
<th colspan="5">
<h1>Damage values:</h1>
</th>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="sdPct" class="idLabel" id="sdPct-label">Spell Dmg %:</label><br>
<input type="number" id="sdPct" name="sdPct" value="0" class="idInput"/>
</div>
<div id="sdPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="sdRaw" class="idLabel" id="sdRaw-label">Raw Spell:</label><br>
<input type="number" id="sdRaw" name="sdRaw" value="0" class="idInput"/>
</div>
<div id="sdRaw-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="mdPct" class="idLabel" id="mdPct-label">Melee Dmg %:</label><br>
<input type="number" id="mdPct" name="mdPct" value="0" class="idInput"/>
</div>
<div id="mdPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="mdRaw" class="idLabel" id="mdRaw-label">Raw Melee:</label><br>
<input type="number" id="mdRaw" name="mdRaw" value="0" class="idInput"/>
</div>
<div id="mdRaw-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="poison" class="idLabel" id="poison-label">Poison:</label><br>
<input type="number" id="poison" name="poison" value="0" class="idInput"/>
</div>
<div id="poison-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="eDamPct" class="idLabel Earth" id="eDamPct-label">Damage %:</label><br>
<input type="number" id="eDamPct" name="eDamPct" value="0" class="idInput"/>
</div>
<div id="eDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="tDamPct" class="idLabel Thunder" id="tDamPct-label">Damage %:</label><br>
<input type="number" id="tDamPct" name="tDamPct" value="0" class="idInput"/>
</div>
<div id="tDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="wDamPct" class="idLabel Water" id="wDamPct-label">Damage %:</label><br>
<input type="number" id="wDamPct" name="wDamPct" value="0" class="idInput"/>
</div>
<div id="wDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="fDamPct" class="idLabel Fire" id="fDamPct-label">Damage %:</label><br>
<input type="number" id="fDamPct" name="fDamPct" value="0" class="idInput"/>
</div>
<div id="fDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="aDamPct" class="idLabel Air" id="aDamPct-label">Damage %:</label><br>
<input type="number" id="aDamPct" name="aDamPct" value="0" class="idInput"/>
</div>
<div id="aDamPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="atkTier" class="idLabel" id="atkTier-label">+Tier:</label><br>
<input type="number" id="atkTier" name="atkTier" value="0" class="idInput"/>
</div>
<div id="atkTier-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="id-edit1">
<table>
<tr>
<th colspan="5">
<h1>Defense values:</h1>
</th>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="eDefPct" class="idLabel Earth" id="eDefPct-label">Defense %:</label><br>
<input type="number" id="eDefPct" name="eDefPct" value="0" class="idInput"/>
</div>
<div id="eDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="tDefPct" class="idLabel Thunder" id="tDefPct-label">Defense %:</label><br>
<input type="number" id="tDefPct" name="tDefPct" value="0" class="idInput"/>
</div>
<div id="tDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="wDefPct" class="idLabel Water" id="wDefPct-label">Defense %:</label><br>
<input type="number" id="wDefPct" name="wDefPct" value="0" class="idInput"/>
</div>
<div id="wDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="fDefPct" class="idLabel Fire" id="fDefPct-label">Defense %:</label><br>
<input type="number" id="fDefPct" name="fDefPct" value="0" class="idInput"/>
</div>
<div id="fDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="aDefPct" class="idLabel Air" id="aDefPct-label">Defense %:</label><br>
<input type="number" id="aDefPct" name="aDefPct" value="0" class="idInput"/>
</div>
<div id="aDefPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="hprRaw" class="idLabel" id="hprRaw-label">HPR Raw:</label><br>
<input type="number" id="hprRaw" name="hprRaw" value="0" class="idInput"/>
</div>
<div id="hprRaw-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="hprPct" class="idLabel" id="hprPct-label">HPR %:</label><br>
<input type="number" id="hprPct" name="hprPct" value="0" class="idInput"/>
</div>
<div id="hprPct-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="hpBonus" class="idLabel" id="hpBonus-label">Health Bonus:</label><br>
<input type="number" id="hpBonus" name="hpBonus" value="0" class="idInput"/>
</div>
<div id="hpBonus-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="id-edit1">
<table>
<tr>
<th colspan="5">
<h1>Utility values:</h1>
</th>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spPct1" class="idLabel" id="spPct1-label">1st Spell Cost %:</label><br>
<input type="number" id="spPct1" name="spPct1" value="0" class="idInput"/>
</div>
<div id="spPct1-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spPct2" class="idLabel" id="spPct2-label">2nd Spell Cost %:</label><br>
<input type="number" id="spPct2" name="spPct2" value="0" class="idInput"/>
</div>
<div id="spPct2-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spPct3" class="idLabel" id="spPct3-label">3rd Spell Cost %:</label><br>
<input type="number" id="spPct3" name="spPct3" value="0" class="idInput"/>
</div>
<div id="spPct3-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spPct4" class="idLabel" id="spPct4-label">4th Spell Cost %:</label><br>
<input type="number" id="spPct4" name="spPct4" value="0" class="idInput"/>
</div>
<div id="spPct4-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spRaw1" class="idLabel" id="spRaw1-label">1st Spell Cost Raw:</label><br>
<input type="number" id="spRaw1" name="spRaw1" value="0" class="idInput"/>
</div>
<div id="spRaw1-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spRaw2" class="idLabel" id="spRaw2-label">2nd Spell Cost Raw:</label><br>
<input type="number" id="spRaw2" name="spRaw2" value="0" class="idInput"/>
</div>
<div id="spRaw2-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spRaw3" class="idLabel" id="spRaw3-label">3rd Spell Cost Raw:</label><br>
<input type="number" id="spRaw3" name="spRaw3" value="0" class="idInput"/>
</div>
<div id="spRaw3-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
<td>
<div class="idLeft">
<div class="idWrap">
<div>
<label for="spRaw4" class="idLabel" id="spRaw4-label">4th Spell Cost Raw:</label><br>
<input type="number" id="spRaw4" name="spRaw4" value="0" class="idInput"/>
</div>
<div id="spRaw4-base" class="idDesc">
Original Value: 0
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
</div-->

View file

@ -310,6 +310,6 @@
<script type="text/javascript" src="../js/crafter.js"></script> <script type="text/javascript" src="../js/crafter.js"></script>
<script type="text/javascript" src="../js/expr_parser.js"></script> <script type="text/javascript" src="../js/expr_parser.js"></script>
<script type="text/javascript" src="../js/items.js"></script> <script type="text/javascript" src="../js/items.js"></script>
<script type="text/javascript" src="../js/sq2items.js"></script> <!-- <script type="text/javascript" src="../js/sq2items.js"></script> -->
</body> </body>
</html> </html>

View file

@ -400,3 +400,11 @@ a:hover {
.border-semi-light { .border-semi-light {
border-color: #aaa; border-color: #aaa;
} }
/* supposed to work in firefox but doesn't */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}

View file

@ -21,9 +21,7 @@ setTitle();
let player_build; let player_build;
// THIS IS SUPER DANGEROUS, WE SHOULD NOT BE KEEPING THIS IN SO MANY PLACES
let editable_item_fields = [ "sdPct", "sdRaw", "mdPct", "mdRaw", "poison", "fDamPct", "wDamPct", "aDamPct", "tDamPct", "eDamPct", "fDefPct", "wDefPct", "aDefPct", "tDefPct", "eDefPct", "hprRaw", "hprPct", "hpBonus", "atkTier", "spPct1", "spRaw1", "spPct2", "spRaw2", "spPct3", "spRaw3", "spPct4", "spRaw4" ]; let editable_item_fields = [ "sdPct", "sdRaw", "mdPct", "mdRaw", "poison", "fDamPct", "wDamPct", "aDamPct", "tDamPct", "eDamPct", "fDefPct", "wDefPct", "aDefPct", "tDefPct", "eDefPct", "hprRaw", "hprPct", "hpBonus", "atkTier", "spPct1", "spRaw1", "spPct2", "spRaw2", "spPct3", "spRaw3", "spPct4", "spRaw4" ];
let editable_elems = []; let editable_elems = [];
for (let i of editable_item_fields) { for (let i of editable_item_fields) {

View file

@ -25,7 +25,7 @@ document.addEventListener('DOMContentLoaded', function() {
document.querySelector("#level-choice").setAttribute("oninput", "calcBuildSchedule()") document.querySelector("#level-choice").setAttribute("oninput", "calcBuildSchedule()")
document.querySelector("#weapon-choice").setAttribute("oninput", document.querySelector("#weapon-choice").getAttribute("oninput") + "resetArmorPowderSpecials();"); document.querySelector("#weapon-choice").setAttribute("oninput", document.querySelector("#weapon-choice").getAttribute("oninput") + "resetArmorPowderSpecials();");
// document.querySelector("#edit-IDs-button").setAttribute("onclick", "toggle_edit_id_tab()");
let skp_fields = document.getElementsByClassName("skp-update"); let skp_fields = document.getElementsByClassName("skp-update");
@ -80,6 +80,7 @@ function calcBuildSchedule(){
} }
calcBuildTask = setTimeout(function(){ calcBuildTask = setTimeout(function(){
calcBuildTask = null; calcBuildTask = null;
resetEditableIDs();
calculateBuild(); calculateBuild();
}, 500); }, 500);
} }

View file

@ -27,14 +27,13 @@ let editable_item_fields = [ "sdPct", "sdRaw", "mdPct", "mdRaw", "poison", "fDam
let editable_elems = []; let editable_elems = [];
/*
for (let i of editable_item_fields) { for (let i of editable_item_fields) {
let elem = document.getElementById(i); let elem = document.getElementById(i);
elem.addEventListener("change", (event) => { elem.addEventListener("change", (event) => {
elem.classList.add("highlight"); elem.classList.add("highlight");
}); });
editable_elems.push(elem); editable_elems.push(elem);
}*/ }
for (let i of skp_order) { for (let i of skp_order) {
let elem = document.getElementById(i+"-skp"); let elem = document.getElementById(i+"-skp");
@ -211,6 +210,7 @@ function decodeBuild(url_tag) {
setValue(equipmentInputs[i], equipment[i]); setValue(equipmentInputs[i], equipment[i]);
} }
calculateBuild(save_skp, skillpoints); calculateBuild(save_skp, skillpoints);
updateEditableIDs();
} }
} }
@ -400,7 +400,6 @@ function calculateBuild(save_skp, skp){
calculateBuildStats(); calculateBuildStats();
if (player_build.errored) if (player_build.errored)
throw new ListError(player_build.errors); throw new ListError(player_build.errors);
} }
catch (error) { catch (error) {
console.log(error); console.log(error);
@ -503,11 +502,56 @@ function updateStats() {
updatePowderSpecials("skip", false); updatePowderSpecials("skip", false);
updateArmorPowderSpecials("skip", false); updateArmorPowderSpecials("skip", false);
updateBoosts("skip", false); updateBoosts("skip", false);
for (let id of editable_item_fields) {
player_build.statMap.set(id, parseInt(getValue(id)));
}
} }
player_build.aggregateStats(); player_build.aggregateStats();
console.log(player_build.statMap); console.log(player_build.statMap);
calculateBuildStats(); calculateBuildStats();
} }
/* Updates all IDs in the edit IDs section. Resets each input and original value text to the correct text according to the current build.
*/
function updateEditableIDs() {
if (player_build) {
for (const id of editable_item_fields) {
let edit_input = document.getElementById(id);
let val = player_build.statMap.get(id);
edit_input.value = val;
edit_input.placeholder = val;
let value_label = document.getElementById(id + "-base");
value_label.textContent = "Original Value: " + val;
//a hack to make resetting easier
value_label.value = val;
}
}
}
/* Resets all IDs in the edit IDs section to their "original" values.
*/
function resetEditableIDs() {
if (player_build) {
for (const id of editable_item_fields) {
let edit_input = document.getElementById(id);
let value_label = document.getElementById(id + "-base");
edit_input.value = value_label.value;
edit_input.placeholder = value_label.value;
}
} else {
//no player build, reset to 0
for (const id of editable_item_fields) {
let edit_input = document.getElementById(id);
edit_input.value = 0;
edit_input.placeholder = 0;
}
}
}
/* Updates all spell boosts /* Updates all spell boosts
*/ */
function updateBoosts(buttonId, recalcStats) { function updateBoosts(buttonId, recalcStats) {
@ -936,6 +980,17 @@ function toggleID() {
} }
} }
function toggleButton(button_id) {
let button = document.getElementById(button_id);
if (button) {
if (button.classList.contains("toggleOn")) {
button.classList.remove("toggleOn");
} else {
button.classList.add("toggleOn");
}
}
}
function optimizeStrDex() { function optimizeStrDex() {
const remaining = levelToSkillPoints(player_build.level) - player_build.assigned_skillpoints; const remaining = levelToSkillPoints(player_build.level) - player_build.assigned_skillpoints;
const base_skillpoints = player_build.base_skillpoints; const base_skillpoints = player_build.base_skillpoints;