Display Set Summary only if there are set bonuses

This commit is contained in:
b 2021-01-11 15:33:03 -06:00
parent 4d5fa370e3
commit 4b4bb1ccf9

View file

@ -174,6 +174,7 @@ function displayBuildStats(build, parent_id){
parent_div.append(title); parent_div.append(title);
parent_div.append(document.createElement("br")); parent_div.append(document.createElement("br"));
if (build.activeSetCounts.size > 0) {
let set_summary_elem = document.createElement('p'); let set_summary_elem = document.createElement('p');
set_summary_elem.classList.add('itemp'); set_summary_elem.classList.add('itemp');
set_summary_elem.classList.add('left'); set_summary_elem.classList.add('left');
@ -186,6 +187,7 @@ function displayBuildStats(build, parent_id){
set_elem.textContent = " "+setName+" Set: "+count+"/"+sets[setName].items.length; set_elem.textContent = " "+setName+" Set: "+count+"/"+sets[setName].items.length;
set_summary_elem.append(set_elem); set_summary_elem.append(set_elem);
} }
}
let stats = build.statMap; let stats = build.statMap;
console.log(build.statMap); console.log(build.statMap);
@ -1001,7 +1003,7 @@ function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spell
save_damages.push(averageDamage); save_damages.push(averageDamage);
} }
else if (part.type == "heal") { else if (part.type == "heal") {
let heal_amount = (part.strength * build.getDefenseStats()[0] * Math.max(0, Math.min(1.5, 1 + 0.05 * stats.get("wDamPct")/100))).toFixed(2); let heal_amount = (part.strength * build.getDefenseStats()[0] * Math.max(0, Math.min(1.75, 1 + 0.5 * stats.get("wDamPct")/100))).toFixed(2);
let healLabel = document.createElement("p"); let healLabel = document.createElement("p");
healLabel.textContent = heal_amount; healLabel.textContent = heal_amount;
healLabel.classList.add("damagep"); healLabel.classList.add("damagep");