re-enable melee breakdown
This commit is contained in:
parent
42362d5d99
commit
adcf1ee362
3 changed files with 10 additions and 20 deletions
|
@ -1240,7 +1240,7 @@
|
||||||
<div class="col-xl-3 mb-3 px-0">
|
<div class="col-xl-3 mb-3 px-0">
|
||||||
<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 spell-expand dark-5 rounded dark-shadow py-2 border border-dark" id="build-melee-statsAvg">melee</div>
|
||||||
<div class = "spell-display dark-5 rounded-bottom py-2 dark-shadow" id = "build-melee-stats" style="display: none;"></div>
|
<div class = "spell-display dark-5 rounded-bottom py-2 dark-shadow" id = "build-melee-stats" style="display: none;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class = "col">
|
<div class = "col">
|
||||||
|
|
|
@ -29,6 +29,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
document.querySelector("#"+i+"Avg").setAttribute("onclick", "toggle_spell_tab('"+i+"')");
|
document.querySelector("#"+i+"Avg").setAttribute("onclick", "toggle_spell_tab('"+i+"')");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.querySelector("#build-melee-statsAvg").setAttribute("onclick", "toggle_spell_tab('build-melee-stats')");
|
||||||
|
|
||||||
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()");
|
// document.querySelector("#edit-IDs-button").setAttribute("onclick", "toggle_edit_id_tab()");
|
||||||
|
|
|
@ -692,7 +692,6 @@ function displaysq2MeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
title_elem.classList.add("title");
|
title_elem.classList.add("title");
|
||||||
title_elem.textContent = "Melee Stats";
|
title_elem.textContent = "Melee Stats";
|
||||||
parent_elem.append(title_elem);
|
parent_elem.append(title_elem);
|
||||||
parent_elem.append(document.createElement("br"));
|
|
||||||
|
|
||||||
//overall title
|
//overall title
|
||||||
let title_elemavg = document.createElement("b");
|
let title_elemavg = document.createElement("b");
|
||||||
|
@ -703,9 +702,6 @@ function displaysq2MeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
let averageDamage = document.createElement("p");
|
let averageDamage = document.createElement("p");
|
||||||
averageDamage.classList.add("left");
|
averageDamage.classList.add("left");
|
||||||
averageDamage.textContent = "Average DPS: " + stats[10];
|
averageDamage.textContent = "Average DPS: " + stats[10];
|
||||||
tooltiptext = `= ((${stats[8]} * ${(stats[6][2]).toFixed(2)}) + (${stats[9]} * ${(stats[7][2]).toFixed(2)}))`
|
|
||||||
tooltip = createTooltip(tooltip, "p", tooltiptext, averageDamage, ["melee-tooltip"]);
|
|
||||||
averageDamage.appendChild(tooltip);
|
|
||||||
parent_elem.append(averageDamage);
|
parent_elem.append(averageDamage);
|
||||||
|
|
||||||
//overall average DPS
|
//overall average DPS
|
||||||
|
@ -751,8 +747,6 @@ function displaysq2MeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
dmg.textContent = stats[i][0] + " \u2013 " + stats[i][1];
|
dmg.textContent = stats[i][0] + " \u2013 " + stats[i][1];
|
||||||
dmg.classList.add(damageClasses[i]);
|
dmg.classList.add(damageClasses[i]);
|
||||||
dmg.classList.add("itemp");
|
dmg.classList.add("itemp");
|
||||||
tooltiptext = tooltipinfo.get("damageformulas")[i].slice(0,2).join("\n");
|
|
||||||
tooltip = createTooltip(tooltip, "p", tooltiptext, dmg, ["melee-tooltip"]);
|
|
||||||
nonCritStats.append(dmg);
|
nonCritStats.append(dmg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -767,15 +761,11 @@ function displaysq2MeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
arr2.push(stats[i][1]);
|
arr2.push(stats[i][1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tooltiptext = tooltiparr[0] + arr.join(" + ") + "\n" + tooltiparr[1] + arr2.join(" + ");
|
|
||||||
tooltip = createTooltip(tooltip, "p", tooltiptext, normalDamage, ["melee-tooltip"]);
|
|
||||||
nonCritStats.append(normalDamage);
|
nonCritStats.append(normalDamage);
|
||||||
|
|
||||||
let normalDPS = document.createElement("p");
|
let normalDPS = document.createElement("p");
|
||||||
normalDPS.textContent = "Normal DPS: " + stats[8];
|
normalDPS.textContent = "Normal DPS: " + stats[8];
|
||||||
normalDPS.classList.add("tooltip");
|
normalDPS.classList.add("tooltip");
|
||||||
tooltiptext = ` = ((${stats[6][0]} + ${stats[6][1]}) / 2) * ${baseDamageMultiplier[stats[11]]}`;
|
|
||||||
tooltip = createTooltip(tooltip, "p", tooltiptext, normalDPS, ["melee-tooltip"]);
|
|
||||||
nonCritStats.append(normalDPS);
|
nonCritStats.append(normalDPS);
|
||||||
|
|
||||||
//overall average DPS
|
//overall average DPS
|
||||||
|
@ -785,9 +775,6 @@ function displaysq2MeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
let singleHitDamageSecond = document.createElement("span");
|
let singleHitDamageSecond = document.createElement("span");
|
||||||
singleHitDamageSecond.classList.add("Damage");
|
singleHitDamageSecond.classList.add("Damage");
|
||||||
singleHitDamageSecond.textContent = stats[12].toFixed(2);
|
singleHitDamageSecond.textContent = stats[12].toFixed(2);
|
||||||
tooltiptext = ` = ((${stats[6][0]} + ${stats[6][1]}) / 2) * ${stats[6][2].toFixed(2)} + ((${stats[7][0]} + ${stats[7][1]}) / 2) * ${stats[7][2].toFixed(2)}`;
|
|
||||||
// tooltip = createTooltip(tooltip, "p", tooltiptext, singleHitDamage, ["melee-tooltip", "summary-tooltip"]);
|
|
||||||
|
|
||||||
singleHitDamage.appendChild(singleHitDamageFirst);
|
singleHitDamage.appendChild(singleHitDamageFirst);
|
||||||
singleHitDamage.appendChild(singleHitDamageSecond);
|
singleHitDamage.appendChild(singleHitDamageSecond);
|
||||||
overallparent_elem.append(singleHitDamage);
|
overallparent_elem.append(singleHitDamage);
|
||||||
|
@ -812,8 +799,6 @@ function displaysq2MeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
dmg.textContent = stats[i][2] + " \u2013 " + stats[i][3];
|
dmg.textContent = stats[i][2] + " \u2013 " + stats[i][3];
|
||||||
dmg.classList.add(damageClasses[i]);
|
dmg.classList.add(damageClasses[i]);
|
||||||
dmg.classList.add("itemp");
|
dmg.classList.add("itemp");
|
||||||
tooltiptext = tooltipinfo.get("damageformulas")[i].slice(2,4).join("\n");
|
|
||||||
tooltip = createTooltip(tooltip, "p", tooltiptext, dmg, ["melee-tooltip"]);
|
|
||||||
critStats.append(dmg);
|
critStats.append(dmg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -827,15 +812,11 @@ function displaysq2MeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
arr2.push(stats[i][3]);
|
arr2.push(stats[i][3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tooltiptext = tooltiparr[0] + arr.join(" + ") + "\n" + tooltiparr[1] + arr2.join(" + ");
|
|
||||||
tooltip = createTooltip(tooltip, "p", tooltiptext, critDamage, ["melee-tooltip"]);
|
|
||||||
|
|
||||||
critStats.append(critDamage);
|
critStats.append(critDamage);
|
||||||
|
|
||||||
let critDPS = document.createElement("p");
|
let critDPS = document.createElement("p");
|
||||||
critDPS.textContent = "Crit DPS: " + stats[9];
|
critDPS.textContent = "Crit DPS: " + stats[9];
|
||||||
tooltiptext = ` = ((${stats[7][0]} + ${stats[7][1]}) / 2) * ${baseDamageMultiplier[stats[11]]}`;
|
|
||||||
tooltip = createTooltip(tooltip, "p", tooltiptext, critDPS, ["melee-tooltip"]);
|
|
||||||
critStats.append(critDPS);
|
critStats.append(critDPS);
|
||||||
|
|
||||||
let critChance = document.createElement("p");
|
let critChance = document.createElement("p");
|
||||||
|
@ -845,6 +826,13 @@ function displaysq2MeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
critStats.append(critChance);
|
critStats.append(critChance);
|
||||||
|
|
||||||
parent_elem.append(critStats);
|
parent_elem.append(critStats);
|
||||||
|
|
||||||
|
//up and down arrow - done ugly
|
||||||
|
let arrow = document.createElement("img");
|
||||||
|
arrow.id = "arrow_" + overallparent_elem.id;
|
||||||
|
arrow.style.maxWidth = document.body.clientWidth > 900 ? "3rem" : "10rem";
|
||||||
|
arrow.src = "../media/icons/" + (newIcons ? "new" : "old") + "/toggle_down.png";
|
||||||
|
overallparent_elem.appendChild(arrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
function displaysq2ArmorStats(build) {
|
function displaysq2ArmorStats(build) {
|
||||||
|
|
Loading…
Reference in a new issue