Reword and rework skillpoint display
This commit is contained in:
parent
72288338d7
commit
17d4b2b45d
2 changed files with 17 additions and 12 deletions
10
index.html
10
index.html
|
@ -142,7 +142,7 @@
|
|||
<input type="number" id="str-skp" name="str-skp" value="0" class="skpInput"/>
|
||||
</div>
|
||||
<div id="str-skp-assign">
|
||||
Before Boosts: 0
|
||||
Manually Assigned: 0
|
||||
</div>
|
||||
<div id="str-skp-base">
|
||||
Original Value: 0
|
||||
|
@ -156,7 +156,7 @@
|
|||
<input type="number" id="dex-skp" name="dex-skp" value="0" class="skpInput"/>
|
||||
</div>
|
||||
<div id="dex-skp-assign">
|
||||
Before Boosts: 0
|
||||
Manually Assigned: 0
|
||||
</div>
|
||||
<div id="dex-skp-base">
|
||||
Original Value: 0
|
||||
|
@ -170,7 +170,7 @@
|
|||
<input type="number" id="int-skp" name="int-skp" value="0" class="skpInput"/>
|
||||
</div>
|
||||
<div id="int-skp-assign">
|
||||
Before Boosts: 0
|
||||
Manually Assigned: 0
|
||||
</div>
|
||||
<div id="int-skp-base">
|
||||
Original Value: 0
|
||||
|
@ -184,7 +184,7 @@
|
|||
<input type="number" id="def-skp" name="def-skp" value="0" class="skpInput"/>
|
||||
</div>
|
||||
<div id="def-skp-assign">
|
||||
Before Boosts: 0
|
||||
Manually Assigned: 0
|
||||
</div>
|
||||
<div id="def-skp-base">
|
||||
Original Value: 0
|
||||
|
@ -198,7 +198,7 @@
|
|||
<input type="number" id="agi-skp" name="agi-skp" value="0" class="skpInput"/>
|
||||
</div>
|
||||
<div id="agi-skp-assign">
|
||||
Before Boosts: 0
|
||||
Manually Assigned: 0
|
||||
</div>
|
||||
<div id="agi-skp-base">
|
||||
Original Value: 0
|
||||
|
|
19
test.js
19
test.js
|
@ -11,7 +11,7 @@ console.log(url_tag);
|
|||
* END testing section
|
||||
*/
|
||||
|
||||
const BUILD_VERSION = "2.4";
|
||||
const BUILD_VERSION = "2.5";
|
||||
|
||||
document.getElementById("header").textContent = "Wynn build calculator "+BUILD_VERSION+" (db version "+DB_VERSION+")";
|
||||
|
||||
|
@ -360,6 +360,16 @@ function calculateBuild(save_skp, skp){
|
|||
equip_order_text += item.get("displayName") + "<br>";
|
||||
}
|
||||
setHTML("build-order", equip_order_text);
|
||||
|
||||
const assigned = player_build.base_skillpoints;
|
||||
const skillpoints = player_build.total_skillpoints;
|
||||
for (let i in skp_order){ //big bren
|
||||
if(assigned[i] <= 100){
|
||||
setText(skp_order[i] + "-skp-base", "Original Value: " + skillpoints[i]);
|
||||
}else{
|
||||
setHTML(skp_order[i] + "-skp-base", "Original Value: " + skillpoints[i] + "<br>WARNING: cannot assign " + assigned[i] + " skillpoints naturally.");
|
||||
}
|
||||
}
|
||||
if (save_skp) {
|
||||
// TODO: reduce duplicated code, @updateStats
|
||||
let skillpoints = player_build.total_skillpoints;
|
||||
|
@ -398,13 +408,8 @@ function calculateBuildStats() {
|
|||
const skillpoints = player_build.total_skillpoints;
|
||||
let skp_effects = ["% more damage dealt.","% chance to crit.","% spell cost reduction.","% less damage taken.","% chance to dodge."];
|
||||
for (let i in skp_order){ //big bren
|
||||
setText(skp_order[i] + "-skp-assign", "Base assigned: " + assigned[i]);
|
||||
setText(skp_order[i] + "-skp-assign", "Manually Assigned: " + assigned[i]);
|
||||
setValue(skp_order[i] + "-skp", skillpoints[i]);
|
||||
if(assigned[i] <= 100){
|
||||
setText(skp_order[i] + "-skp-base", "Original Value: " + skillpoints[i]);
|
||||
}else{
|
||||
setHTML(skp_order[i] + "-skp-base", "Original Value: " + skillpoints[i] + "<br>WARNING: cannot assign " + assigned[i] + " skillpoints naturally.");
|
||||
}
|
||||
setText(skp_order[i] + "-skp-pct", (skillPointsToPercentage(skillpoints[i])*100).toFixed(1).concat(skp_effects[i]));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue