Address PR comments
This commit is contained in:
parent
a982756ce6
commit
f23895ee48
2 changed files with 15 additions and 15 deletions
|
@ -240,7 +240,7 @@ spell_heal: {
|
||||||
|
|
||||||
const default_spells = {
|
const default_spells = {
|
||||||
wand: [{
|
wand: [{
|
||||||
name: "Magic Strike", // TODO: name for melee attacks?
|
name: "Wand Melee", // TODO: name for melee attacks?
|
||||||
display_text: "Mage basic attack",
|
display_text: "Mage basic attack",
|
||||||
base_spell: 0,
|
base_spell: 0,
|
||||||
scaling: "melee", use_atkspd: false,
|
scaling: "melee", use_atkspd: false,
|
||||||
|
@ -282,7 +282,7 @@ const default_spells = {
|
||||||
parts: [{ name: "Melee", multipliers: [100, 0, 0, 0, 0, 0] }]
|
parts: [{ name: "Melee", multipliers: [100, 0, 0, 0, 0, 0] }]
|
||||||
}],
|
}],
|
||||||
relik: [{
|
relik: [{
|
||||||
name: "Spread Beam", // TODO: name for melee attacks?
|
name: "Relik Melee", // TODO: name for melee attacks?
|
||||||
display_text: "Shaman basic attack",
|
display_text: "Shaman basic attack",
|
||||||
base_spell: 0,
|
base_spell: 0,
|
||||||
spell_type: "damage",
|
spell_type: "damage",
|
||||||
|
|
|
@ -1640,18 +1640,18 @@ function displaySpellDamage(parent_elem, overallparent_elem, stats, spell, spell
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < spell_results.length; ++i) {
|
for (let i = 0; i < spell_results.length; ++i) {
|
||||||
const damage_info = spell_results[i];
|
const spell_info = spell_results[i];
|
||||||
|
|
||||||
let part_div = document.createElement("p");
|
let part_div = document.createElement("p");
|
||||||
parent_elem.append(part_div);
|
parent_elem.append(part_div);
|
||||||
|
|
||||||
let subtitle_elem = document.createElement("p");
|
let subtitle_elem = document.createElement("p");
|
||||||
subtitle_elem.textContent = damage_info.name
|
subtitle_elem.textContent = spell_info.name
|
||||||
part_div.append(subtitle_elem);
|
part_div.append(subtitle_elem);
|
||||||
|
|
||||||
if (damage_info.type === "damage") {
|
if (spell_info.type === "damage") {
|
||||||
let totalDamNormal = damage_info.normal_total;
|
let totalDamNormal = spell_info.normal_total;
|
||||||
let totalDamCrit = damage_info.crit_total;
|
let totalDamCrit = spell_info.crit_total;
|
||||||
|
|
||||||
let nonCritAverage = (totalDamNormal[0]+totalDamNormal[1])/2 || 0;
|
let nonCritAverage = (totalDamNormal[0]+totalDamNormal[1])/2 || 0;
|
||||||
let critAverage = (totalDamCrit[0]+totalDamCrit[1])/2 || 0;
|
let critAverage = (totalDamCrit[0]+totalDamCrit[1])/2 || 0;
|
||||||
|
@ -1663,8 +1663,8 @@ function displaySpellDamage(parent_elem, overallparent_elem, stats, spell, spell
|
||||||
part_div.append(averageLabel);
|
part_div.append(averageLabel);
|
||||||
|
|
||||||
|
|
||||||
if (damage_info.name === spell.display) {
|
if (spell_info.name === spell.display) {
|
||||||
_summary(damage_info.name+ " Average: ", averageDamage, "Damage");
|
_summary(spell_info.name+ " Average: ", averageDamage, "Damage");
|
||||||
}
|
}
|
||||||
|
|
||||||
function _damage_display(label_text, average, dmg_min, dmg_max) {
|
function _damage_display(label_text, average, dmg_min, dmg_max) {
|
||||||
|
@ -1681,16 +1681,16 @@ function displaySpellDamage(parent_elem, overallparent_elem, stats, spell, spell
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_damage_display("Non-Crit Average: ", nonCritAverage, damage_info.normal_min, damage_info.normal_max);
|
_damage_display("Non-Crit Average: ", nonCritAverage, spell_info.normal_min, spell_info.normal_max);
|
||||||
_damage_display("Crit Average: ", critAverage, damage_info.crit_min, damage_info.crit_max);
|
_damage_display("Crit Average: ", critAverage, spell_info.crit_min, spell_info.crit_max);
|
||||||
} else if (damage_info.type === "heal") {
|
} else if (spell_info.type === "heal") {
|
||||||
let heal_amount = damage_info.heal_amount;
|
let heal_amount = spell_info.heal_amount;
|
||||||
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");
|
||||||
part_div.append(healLabel);
|
part_div.append(healLabel);
|
||||||
if (damage_info.name === spell.display) {
|
if (spell_info.name === spell.display) {
|
||||||
_summary(damage_info.name+ ": ", heal_amount, "Set");
|
_summary(spell_info.name+ ": ", heal_amount, "Set");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue