diff --git a/damage_calc.js b/damage_calc.js index d109dae..b3ab47d 100644 --- a/damage_calc.js +++ b/damage_calc.js @@ -87,18 +87,19 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier, } for (let i in damages) { - let damageBoost = Math.max(1 + skillBoost[i] + staticBoost, 0); + let damageBoost = 1 + skillBoost[i] + staticBoost; damages_results.push([ - Math.max(damages[i][0] * damageBoost * damageMult, 0), // Normal min - Math.max(damages[i][1] * damageBoost * damageMult, 0), // Normal max - Math.max(damages[i][0] * (1 + damageBoost) * damageMult, 0), // Crit min - Math.max(damages[i][1] * (1 + damageBoost) * damageMult, 0), // Crit max + Math.max(damages[i][0] * Math.max(damageBoost,0) * damageMult, 0), // Normal min + Math.max(damages[i][1] * Math.max(damageBoost,0) * damageMult, 0), // Normal max + Math.max(damages[i][0] * Math.max(1 + damageBoost, 0) * damageMult, 0), // Crit min + Math.max(damages[i][1] * Math.max(1 + damageBoost, 0) * damageMult, 0), // Crit max ]); totalDamNorm[0] += damages_results[i][0]; totalDamNorm[1] += damages_results[i][1]; totalDamCrit[0] += damages_results[i][2]; totalDamCrit[1] += damages_results[i][3]; } + console.log(damages_results); if (melee) { totalDamNorm[0] += Math.max(rawModifier, -damages_results[0][0]); totalDamNorm[1] += Math.max(rawModifier, -damages_results[0][1]); diff --git a/display.js b/display.js index 38559c3..dea2cdc 100644 --- a/display.js +++ b/display.js @@ -293,6 +293,7 @@ function displayExpandedItem(item, parent_id){ let display_commands = [ "#cdiv", "displayName", + //"type", //REPLACE THIS WITH SKIN "#ldiv", "atkSpd", "#ldiv", @@ -407,6 +408,18 @@ function displayExpandedItem(item, parent_id){ if (item.get("tier") !== " ") { p_elem.classList.add(item.get("tier")); } + /*let validTypes = ["helmet", "chestplate", "leggings", "boots", "relik", "wand", "bow", "spear", "dagger", "ring", "bracelet", "necklace"]; + if (item.has("type") && validTypes.includes(item.get("type"))) { + p = document.createElement("p"); + img = document.createElement("img"); + img.src = "./media/items/generic-"+item.get("type")+".png"; + img.alt = "image no display :("; + img.classList.add("center"); + p.append(img); + p.classList.add("itemp"); + + p_elem.append(p); + }*/ } else if (skp_order.includes(id)) { //id = str, dex, int, def, or agi p_elem.textContent = ""; p_elem.classList.add("itemtable"); @@ -426,7 +439,7 @@ function displayExpandedItem(item, parent_id){ p_elem.appendChild(row); } else if (id === "restrict") { p_elem.classList.add("restrict"); - } + } } } else if (rolledIDs.includes(id) && item.get("minRolls").get(id)){ // && item.get("maxRolls").get(id) ){//rolled ID & non-0/non-null/non-und ID diff --git a/media/items/boots--diamond.png b/media/items/boots--diamond.png deleted file mode 100644 index 793207e..0000000 Binary files a/media/items/boots--diamond.png and /dev/null differ