This commit is contained in:
ferricles 2022-05-25 13:17:50 -07:00
commit be69c687b4
4 changed files with 13 additions and 6 deletions

View file

@ -276,8 +276,8 @@
</div> </div>
<div class="col-3"> <div class="col-3">
<div class="row row-cols-1 h-100 align-items-center"> <div class="row row-cols-1 h-100 align-items-center">
<div class="col scaled-font fw-bold gx-3" id="weapon-dps"> <div class="col text-nowrap scaled-font fw-bold gx-3 Damage base_dps" id="weapon-dps">
base dps: 0 0
</div> </div>
<div class="col text-nowrap scaled-font lvl fw-bold gx-3" id="weapon-lv"> <div class="col text-nowrap scaled-font lvl fw-bold gx-3" id="weapon-lv">
0 0

View file

@ -34,6 +34,7 @@ Wynn-Related CSS
} }
/* Tier Colors */ /* Tier Colors */
.Normal { .Normal {
@ -132,6 +133,10 @@ Wynn-Related CSS
/* Damages */ /* Damages */
.base_dps:before { /* Little Dagger icon */
content: "\1F5E1";
}
.Damage { .Damage {
color: rgb(255, 198, 85) color: rgb(255, 198, 85)
} }

View file

@ -495,11 +495,12 @@ function displaysq2ExpandedItem(item, parent_id){
let base_dps_min = total_damages[0] * damage_mult; let base_dps_min = total_damages[0] * damage_mult;
let base_dps_max = total_damages[1] * damage_mult; let base_dps_max = total_damages[1] * damage_mult;
base_dps_elem.textContent = "Base DPS: "+base_dps_min.toFixed(3)+"\u279c"+base_dps_max.toFixed(3); // base_dps_elem.textContent = "Base DPS: "+base_dps_min.toFixed(3)+"\u279c"+base_dps_max.toFixed(3);
base_dps_elem.textContent = base_dps_min.toFixed(3)+"\u279c"+base_dps_max.toFixed(3);
} }
else { else {
let bdps = total_damages * damage_mult; let bdps = total_damages * damage_mult;
base_dps_elem.textContent = "Base DPS: " + (bdps ? bdps : 0); base_dps_elem.textContent = (bdps ? bdps : 0);
} }
parent_div.appendChild(document.createElement("p")); parent_div.appendChild(document.createElement("p"));
parent_div.appendChild(base_dps_elem); parent_div.appendChild(base_dps_elem);
@ -589,7 +590,8 @@ function displaysq2WeaponStats(build) {
tot /= 2; tot /= 2;
let dps = Math.max(0, Math.round(tot * baseDamageMultiplier[attackSpeeds.indexOf(item.get("atkSpd"))] )); //atkspeeds let dps = Math.max(0, Math.round(tot * baseDamageMultiplier[attackSpeeds.indexOf(item.get("atkSpd"))] )); //atkspeeds
document.getElementById("weapon-dps").textContent = "base dps: " + (isNaN(dps) ? 0 : dps); // document.getElementById("weapon-dps").textContent = "base dps: " + (isNaN(dps) ? 0 : dps);
document.getElementById("weapon-dps").textContent = (isNaN(dps) ? 0 : dps);
document.getElementById("weapon-lv").textContent = item.get("lvl"); document.getElementById("weapon-lv").textContent = item.get("lvl");
if (item.get("type")) { if (item.get("type")) {

View file

@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
let filterInputs = new Map([["item-category", ["ALL", "armor", "helmet", "chestplate", "leggings", "boots", "accessory", "ring", "bracelet", "weapon", "wand", "spear", "bow", "dagger", "relik"]], let filterInputs = new Map([["item-category", ["ALL", "armor", "helmet", "chestplate", "leggings", "boots", "accessory", "ring", "bracelet", "necklace", "weapon", "wand", "spear", "bow", "dagger", "relik"]],
["item-rarity", ["ANY", "Normal", "Unique", "Set", "Rare", "Legendary", "Fabled", "Mythic", "Sane"]], ["item-rarity", ["ANY", "Normal", "Unique", "Set", "Rare", "Legendary", "Fabled", "Mythic", "Sane"]],
["filter1", sq2ItemFilters], ["filter1", sq2ItemFilters],
["filter2", sq2ItemFilters], ["filter2", sq2ItemFilters],