Add files via upload

This commit is contained in:
reschan 2021-01-10 17:16:22 -05:00 committed by GitHub
parent 51370056fc
commit aa23b055ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 34 deletions

View file

@ -92,84 +92,86 @@ const spell_table = {
{ title: "Heal", cost: 6, parts: [
{ subtitle: "First Pulse", type: "heal", strength: 0.2 },
{ subtitle: "Second and Third Pulses", type: "heal", strength: 0.05 },
{ subtitle: "Total Heal", type: "heal", strength: 0.3 }
{ subtitle: "Total Heal", type: "heal", strength: 0.3, summary: true }
] },
{ title: "Teleport", cost: 4, parts: [
{ subtitle: "", type: "damage", multiplier: 100, conversion: [60, 0, 40, 0, 0, 0] },
{ subtitle: "Total Damage", type: "damage", multiplier: 100, conversion: [60, 0, 40, 0, 0, 0], summary: true },
] },
{ title: "Meteor", cost: 8, parts: [
{ subtitle: "Blast Damage", type: "damage", multiplier: 500, conversion: [40, 30, 0, 0, 30, 0] },
{ subtitle: "Blast Damage", type: "damage", multiplier: 500, conversion: [40, 30, 0, 0, 30, 0], summary: true },
{ subtitle: "Burn Damage", type: "damage", multiplier: 125, conversion: [100, 0, 0, 0, 0, 0] },
] },
{ title: "Ice Snake", cost: 4, parts: [
{ subtitle: "", type: "damage", multiplier: 70, conversion: [50, 0, 0, 50, 0, 0] },
{ subtitle: "Total Damage", type: "damage", multiplier: 70, conversion: [50, 0, 0, 50, 0, 0], summary: true },
] },
],
"spear": [
{ title: "Bash", cost: 6, parts: [
{ subtitle: "First Damage", type: "damage", multiplier: 130, conversion: [60, 40, 0, 0, 0, 0]},
{ subtitle: "Explosion Damage", type: "damage", multiplier: 130, conversion: [100, 0, 0, 0, 0, 0]},
{ subtitle: "Total Damage", type: "total", factors: [1, 1], summary: true },
] },
{ title: "Charge", cost: 4, parts: [
{ subtitle: "", type: "damage", multiplier: 150, conversion: [60, 0, 0, 0, 40, 0] },
{ subtitle: "Total Damage", type: "damage", multiplier: 150, conversion: [60, 0, 0, 0, 40, 0], summary: true },
] },
{ title: "Uppercut", cost: 10, parts: [
{ subtitle: "First Damage", type: "damage", multiplier: 300, conversion: [70, 20, 10, 0, 0, 0] },
{ subtitle: "Fireworks Damage", type: "damage", multiplier: 50, conversion: [60, 0, 40, 0, 0, 0] },
{ subtitle: "Crash Damage", type: "damage", multiplier: 50, conversion: [80, 0, 20, 0, 0, 0] },
{ subtitle: "Total Damage", type: "total", factors: [1, 1, 1], summary: true },
] },
{ title: "War Scream", cost: 6, parts: [
{ subtitle: "Area Damage", type: "damage", multiplier: 50, conversion: [0, 0, 0, 0, 75, 25] },
{ subtitle: "Area Damage", type: "damage", multiplier: 50, conversion: [0, 0, 0, 0, 75, 25], summary: true },
{ subtitle: "Air Shout (Per Hit)", type: "damage", multiplier: 30, conversion: [0, 0, 0, 0, 75, 25] },
] },
],
"bow": [
{ title: "Arrow Storm", cost: 6, parts: [
{ subtitle: "Total Damage", type: "damage", multiplier: 600, conversion: [60, 0, 25, 0, 15, 0]},
{ subtitle: "Total Damage", type: "damage", multiplier: 600, conversion: [60, 0, 25, 0, 15, 0], summary: true },
{ subtitle: "Per Arrow", type: "damage", multiplier: 10, conversion: [60, 0, 25, 0, 15, 0]},
] },
{ title: "Escape", cost: 3, parts: [
{ subtitle: "Landing Damage", type: "damage", multiplier: 100, conversion: [50, 0, 0, 0, 0, 50] },
{ subtitle: "Landing Damage", type: "damage", multiplier: 100, conversion: [50, 0, 0, 0, 0, 50], summary: true },
] },
{ title: "Bomb Arrow", cost: 8, parts: [
{ subtitle: "", type: "damage", multiplier: 250, conversion: [60, 25, 0, 0, 15, 0] },
{ subtitle: "Total Damage", type: "damage", multiplier: 250, conversion: [60, 25, 0, 0, 15, 0], summary: true },
] },
{ title: "Arrow Shield", cost: 10, parts: [
{ subtitle: "Shield Damage", type: "damage", multiplier: 100, conversion: [70, 0, 0, 0, 0, 30] },
{ subtitle: "Shield Damage", type: "damage", multiplier: 100, conversion: [70, 0, 0, 0, 0, 30], summary: true },
{ subtitle: "Arrow Rain Damage", type: "damage", multiplier: 200, conversion: [70, 0, 0, 0, 0, 30] },
] },
],
"dagger": [
{ title: "Spin Attack", cost: 6, parts: [
{ subtitle: "", type: "damage", multiplier: 150, conversion: [70, 0, 30, 0, 0, 0]},
{ subtitle: "Total Damage", type: "damage", multiplier: 150, conversion: [70, 0, 30, 0, 0, 0], summary: true},
] },
{ title: "Vanish", cost: 1, parts: [
{ subtitle: "No Damage", type: "none" }
{ subtitle: "No Damage", type: "none", summary: true }
] },
{ title: "Multihit", cost: 8, parts: [
{ subtitle: "1st to 10th Hit", type: "damage", multiplier: 27, conversion: [100, 0, 0, 0, 0, 0] },
{ subtitle: "Fatality", type: "damage", multiplier: 120, conversion: [20, 0, 30, 50, 0, 0] },
{ subtitle: "Total Damage", type: "total", factors: [10, 1] },
{ subtitle: "Total Damage", type: "total", factors: [10, 1], summary: true },
] },
{ title: "Smoke Bomb", cost: 8, parts: [
{ subtitle: "Tick Damage", type: "damage", multiplier: 60, conversion: [45, 25, 0, 0, 0, 30] },
{ subtitle: "Total Damage", type: "damage", multiplier: 600, conversion: [45, 25, 0, 0, 0, 30] },
{ subtitle: "Total Damage", type: "damage", multiplier: 600, conversion: [45, 25, 0, 0, 0, 30], summary: true },
] },
],
"relik": [
{ title: "Totem", cost: 4, parts: [
{ subtitle: "Smash Damage", type: "damage", multiplier: 100, conversion: [80, 0, 0, 0, 20, 0]},
{ subtitle: "Damage Tick", type: "damage", multiplier: 20, conversion: [80, 0, 0, 0, 0, 20]},
{ subtitle: "Heal Tick", type: "heal", strength: 0.04 },
{ subtitle: "Heal Tick", type: "heal", strength: 0.04, summary: true },
] },
{ title: "Haul", cost: 1, parts: [
{ subtitle: "", type: "damage", multiplier: 100, conversion: [80, 0, 20, 0, 0, 0] },
{ subtitle: "Total Damage", type: "damage", multiplier: 100, conversion: [80, 0, 20, 0, 0, 0], summary: true },
] },
{ title: "Aura", cost: 8, parts: [
{ subtitle: "One Wave", type: "damage", multiplier: 200, conversion: [70, 0, 0, 30, 0, 0] },
{ subtitle: "One Wave", type: "damage", multiplier: 200, conversion: [70, 0, 0, 30, 0, 0], summary: true },
] },
{ title: "Uproot", cost: 6, parts: [
{ subtitle: "", type: "damage", multiplier: 50, conversion: [70, 30, 0, 0, 0, 0] },
{ subtitle: "Total Damage", type: "damage", multiplier: 50, conversion: [70, 30, 0, 0, 0, 0], summary: true },
] },
]
};

View file

@ -796,10 +796,11 @@ function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spell
subtitle_elem.textContent = part.subtitle;
part_div.append(subtitle_elem);
if (part.summary == true) {
let subtitle_elemavg = document.createElement("p");
subtitle_elemavg.textContent = part.subtitle;
part_divavg.append(subtitle_elemavg);
}
if (part.type === "damage") {
let _results = calculateSpellDamage(stats, part.conversion,
@ -822,17 +823,18 @@ function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spell
averageLabel.classList.add("damageSubtitle");
part_div.append(averageLabel);
if (part.summary == true) {
let overallaverageLabel = document.createElement("p");
overallaverageLabel.textContent = "Average: "+averageDamage.toFixed(2);
overallaverageLabel.classList.add("damageSubtitle");
part_divavg.append(overallaverageLabel);
}
let nonCritLabel = document.createElement("p");
nonCritLabel.textContent = "Non-Crit Average: "+nonCritAverage.toFixed(2);
nonCritLabel.classList.add("damageSubtitle");
part_div.append(nonCritLabel);
for (let i = 0; i < 6; i++){
if (results[i][1] > 0){
let p = document.createElement("p");
@ -865,12 +867,13 @@ function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spell
healLabel.textContent = heal_amount;
healLabel.classList.add("damagep");
part_div.append(healLabel);
if (part.summary == true) {
let overallhealLabel = document.createElement("p");
overallhealLabel.textContent = heal_amount;
overallhealLabel.classList.add("damagep")
part_divavg.append(overallhealLabel);
}
}
else if (part.type === "total") {
let total_damage = 0;
for (let i in part.factors) {
@ -884,7 +887,7 @@ function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spell
let overallaverageLabel = document.createElement("p");
overallaverageLabel.textContent = "Average: "+total_damage.toFixed(2);
overallaverageLabel.classList.add("damageSubtitle");
part_divavg.append(averageLabel);
part_divavg.append(overallaverageLabel);
}
}
}

View file

@ -171,7 +171,7 @@
</div>
<div class="center" style="grid-column:3;grid-row:1">
<div class = "center build-overall" id = "build-overall">
<p class="itemcenter">Overall Build Stats:<p>
<br/>
<div class = "center" id = "build-overall-stats"></div>
</div>
</div>