Add files via upload
This commit is contained in:
parent
96f4c69c8d
commit
51370056fc
2 changed files with 205 additions and 61 deletions
242
display.js
242
display.js
|
@ -3,6 +3,7 @@ let rolledIDs = ["hprPct", "mr", "sdPct", "mdPct", "ls", "ms", "xpb", "lb", "ref
|
||||||
let damageClasses = ["Neutral","Earth","Thunder","Water","Fire","Air"];
|
let damageClasses = ["Neutral","Earth","Thunder","Water","Fire","Air"];
|
||||||
let reversedIDs = [ "atkTier", "spPct1", "spRaw1", "spPct2", "spRaw2", "spPct3", "spRaw3", "spPct4", "spRaw4" ];
|
let reversedIDs = [ "atkTier", "spPct1", "spRaw1", "spPct2", "spRaw2", "spPct3", "spRaw3", "spPct4", "spRaw4" ];
|
||||||
|
|
||||||
|
|
||||||
function expandItem(item, powders){
|
function expandItem(item, powders){
|
||||||
let minRolls = new Map();
|
let minRolls = new Map();
|
||||||
let maxRolls = new Map();
|
let maxRolls = new Map();
|
||||||
|
@ -152,6 +153,14 @@ function displayBuildStats(build, parent_id){
|
||||||
// Clear the parent div.
|
// Clear the parent div.
|
||||||
setHTML(parent_id, "");
|
setHTML(parent_id, "");
|
||||||
let parent_div = document.getElementById(parent_id);
|
let parent_div = document.getElementById(parent_id);
|
||||||
|
let title = document.createElement("p");
|
||||||
|
title.classList.add("itemcenter");
|
||||||
|
title.classList.add("itemp");
|
||||||
|
title.classList.add("title");
|
||||||
|
title.classList.add("Normal");
|
||||||
|
title.textContent = "Overall Build Stats";
|
||||||
|
parent_div.append(title);
|
||||||
|
parent_div.append(document.createElement("br"));
|
||||||
|
|
||||||
let set_summary_elem = document.createElement('p');
|
let set_summary_elem = document.createElement('p');
|
||||||
set_summary_elem.classList.add('itemp');
|
set_summary_elem.classList.add('itemp');
|
||||||
|
@ -273,7 +282,9 @@ function displayExpandedItem(item, parent_id){
|
||||||
"eSteal",
|
"eSteal",
|
||||||
"gXp", "gSpd",
|
"gXp", "gSpd",
|
||||||
"#ldiv",
|
"#ldiv",
|
||||||
|
"!elemental",
|
||||||
"slots",
|
"slots",
|
||||||
|
"!elemental",
|
||||||
"set",
|
"set",
|
||||||
"quest",
|
"quest",
|
||||||
"restrict"];
|
"restrict"];
|
||||||
|
@ -312,16 +323,69 @@ function displayExpandedItem(item, parent_id){
|
||||||
if(nonRolledIDs.includes(id) && item.get(id)){//nonRolledID & non-0/non-null/non-und ID
|
if(nonRolledIDs.includes(id) && item.get(id)){//nonRolledID & non-0/non-null/non-und ID
|
||||||
let p_elem = displayFixedID(active_elem, id, item.get(id), elemental_format);
|
let p_elem = displayFixedID(active_elem, id, item.get(id), elemental_format);
|
||||||
if (id === "slots") {
|
if (id === "slots") {
|
||||||
// HACK TO MAKE POWDERS DISPLAY NICE!! TODO
|
// PROPER POWDER DISPLAYING EZ CLAP
|
||||||
//let powderMap = new Map([ ["e", "Earth"], ["t", "Thunder"], ["w", "Water"], ["f", "Fire"], ["a", "Air"]]);
|
p_elem.textContent = "";
|
||||||
p_elem.textContent = idPrefixes[id].concat(item.get(id), idSuffixes[id]) +
|
let powderMap = new Map([ ["e", "Earth"], ["t", "Thunder"], ["w", "Water"], ["f", "Fire"], ["a", "Air"]]);
|
||||||
" [ " + item.get("powders").map(x => powderNames.get(x)) + " ]";
|
let numerals = new Map([["1", "I"], ["2", "II"], ["3", "III"], ["4", "IV"], ["5", "V"], ["6", "VI"]]);
|
||||||
|
/*p_elem.textContent = idPrefixes[id].concat(item.get(id), idSuffixes[id]) +
|
||||||
|
" [ " + item.get("powders").map(x => powderNames.get(x)) + " ]";*/
|
||||||
|
let wrapper = document.createElement("p");
|
||||||
|
p_elem.classList.add("itemtable");
|
||||||
|
let row = document.createElement("tr");
|
||||||
|
|
||||||
|
let powderPrefix = document.createElement("td");
|
||||||
|
powderPrefix.classList.add("itemp");
|
||||||
|
powderPrefix.classList.add("left");
|
||||||
|
powderPrefix.textContent = "Powders: " + " [";
|
||||||
|
row.appendChild(powderPrefix);
|
||||||
|
|
||||||
|
let spaceElem = document.createElement("td");
|
||||||
|
//spaceElem.textContent = " ";
|
||||||
|
spaceElem.classList.add("itemp");
|
||||||
|
spaceElem.classList.add("left");
|
||||||
|
|
||||||
|
let powderList = item.get("powders").map(x => powderNames.get(x))
|
||||||
|
for(let i = 0; i < powderList.length; i++){
|
||||||
|
let powder = document.createElement("td");
|
||||||
|
let powderStr = powderList[i];
|
||||||
|
console.log(powderStr);
|
||||||
|
powder.textContent = numerals.get(powderStr.charAt(1), 10);
|
||||||
|
powder.classList.add(powderMap.get(powderStr.charAt(0)));
|
||||||
|
row.appendChild(powder);
|
||||||
|
}
|
||||||
|
|
||||||
|
let powderSuffix = document.createElement("td");
|
||||||
|
powderSuffix.classList.add("itemp");
|
||||||
|
powderSuffix.classList.add("left");
|
||||||
|
powderSuffix.textContent = " ]";
|
||||||
|
row.appendChild(powderSuffix);
|
||||||
|
|
||||||
|
wrapper.appendChild(row);
|
||||||
|
p_elem.appendChild(wrapper);
|
||||||
}else if(id === "displayName"){
|
}else if(id === "displayName"){
|
||||||
p_elem.classList.add("title");
|
p_elem.classList.add("title");
|
||||||
if(item.get("tier") !== " "){
|
if(item.get("tier") !== " "){
|
||||||
p_elem.classList.add(item.get("tier"));
|
p_elem.classList.add(item.get("tier"));
|
||||||
}
|
}
|
||||||
|
}else if(skp_order.includes(id)){ //id = str, dex, int, def, or agi
|
||||||
|
p_elem.textContent = "";
|
||||||
|
p_elem.classList.add("itemtable");
|
||||||
|
let row = document.createElement("tr");
|
||||||
|
let title = document.createElement("td");
|
||||||
|
title.textContent = idPrefixes[id] + " ";
|
||||||
|
let boost = document.createElement("td");
|
||||||
|
if(item.get(id) < 0){
|
||||||
|
boost.classList.add("negative");
|
||||||
|
}else{ //boost = 0 SHOULD not come up
|
||||||
|
boost.classList.add("positive");
|
||||||
|
}
|
||||||
|
boost.classList.add("spaceLeft");
|
||||||
|
boost.textContent = item.get(id);
|
||||||
|
row.appendChild(title);
|
||||||
|
row.appendChild(boost);
|
||||||
|
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
|
else if (rolledIDs.includes(id) && item.get("minRolls").get(id)){ // && item.get("maxRolls").get(id) ){//rolled ID & non-0/non-null/non-und ID
|
||||||
|
@ -329,12 +393,17 @@ function displayExpandedItem(item, parent_id){
|
||||||
if (item.get("minRolls").get(id) < 0) {
|
if (item.get("minRolls").get(id) < 0) {
|
||||||
style = "negative";
|
style = "negative";
|
||||||
}
|
}
|
||||||
|
//let flipPosNeg = ["spRaw1","spRaw2","spRaw3","spRaw4","spPct1","spPct2","spPct3","spPct4"];
|
||||||
|
if(reversedIDs.filter(e => e !== "atkTier").includes(id)){
|
||||||
|
style === "positive" ? style = "negative" : style = "positive";
|
||||||
|
}
|
||||||
if (fix_id) {
|
if (fix_id) {
|
||||||
displayFixedID(active_elem, id, item.get("minRolls").get(id), elemental_format, style);
|
displayFixedID(active_elem, id, item.get("minRolls").get(id), elemental_format, style);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let row = document.createElement('tr');
|
let row = document.createElement('tr');
|
||||||
let min_elem = document.createElement('td');
|
let min_elem = document.createElement('td');
|
||||||
|
|
||||||
min_elem.classList.add('left');
|
min_elem.classList.add('left');
|
||||||
min_elem.classList.add(style);
|
min_elem.classList.add(style);
|
||||||
min_elem.textContent = item.get("minRolls").get(id) + idSuffixes[id];
|
min_elem.textContent = item.get("minRolls").get(id) + idSuffixes[id];
|
||||||
|
@ -373,6 +442,9 @@ function displayExpandedItem(item, parent_id){
|
||||||
|
|
||||||
function displayFixedID(active, id, value, elemental_format, style) {
|
function displayFixedID(active, id, value, elemental_format, style) {
|
||||||
if (style) {
|
if (style) {
|
||||||
|
if(reversedIDs.filter(e => e !== "atkTier").includes(id)){
|
||||||
|
style === "positive" ? style = "negative" : style = "positive";
|
||||||
|
}
|
||||||
let row = document.createElement('tr');
|
let row = document.createElement('tr');
|
||||||
let desc_elem = document.createElement('td');
|
let desc_elem = document.createElement('td');
|
||||||
desc_elem.classList.add('left');
|
desc_elem.classList.add('left');
|
||||||
|
@ -415,7 +487,10 @@ function displayEquipOrder(parent_elem,buildOrder){
|
||||||
let title_elem = document.createElement("p");
|
let title_elem = document.createElement("p");
|
||||||
title_elem.textContent = "Equip order ";
|
title_elem.textContent = "Equip order ";
|
||||||
title_elem.classList.add("title");
|
title_elem.classList.add("title");
|
||||||
|
title_elem.classList.add("Normal");
|
||||||
|
title_elem.classList.add("itemp");
|
||||||
parent_elem.append(title_elem);
|
parent_elem.append(title_elem);
|
||||||
|
parent_elem.append(document.createElement("br"));
|
||||||
for (const item of order) {
|
for (const item of order) {
|
||||||
let p_elem = document.createElement("p");
|
let p_elem = document.createElement("p");
|
||||||
p_elem.classList.add("itemp");
|
p_elem.classList.add("itemp");
|
||||||
|
@ -448,6 +523,8 @@ function displayMeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
//title
|
//title
|
||||||
let title_elem = document.createElement("p");
|
let title_elem = document.createElement("p");
|
||||||
title_elem.classList.add("title");
|
title_elem.classList.add("title");
|
||||||
|
title_elem.classList.add("Normal");
|
||||||
|
title_elem.classList.add("itemp");
|
||||||
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"));
|
parent_elem.append(document.createElement("br"));
|
||||||
|
@ -455,13 +532,13 @@ function displayMeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
//overall title
|
//overall title
|
||||||
let title_elemavg = document.createElement("p");
|
let title_elemavg = document.createElement("p");
|
||||||
title_elemavg.classList.add("title");
|
title_elemavg.classList.add("title");
|
||||||
|
title_elemavg.classList.add("Normal");
|
||||||
title_elemavg.textContent = "Melee Stats";
|
title_elemavg.textContent = "Melee Stats";
|
||||||
overallparent_elem.append(title_elemavg);
|
overallparent_elem.append(title_elemavg);
|
||||||
|
|
||||||
//average DPS
|
//average DPS
|
||||||
let averageDamage = document.createElement("p");
|
let averageDamage = document.createElement("p");
|
||||||
|
averageDamage.classList.add("left");
|
||||||
averageDamage.classList.add("center");
|
|
||||||
averageDamage.classList.add("itemp");
|
averageDamage.classList.add("itemp");
|
||||||
averageDamage.textContent = "Average DPS: " + stats[10];
|
averageDamage.textContent = "Average DPS: " + stats[10];
|
||||||
parent_elem.append(averageDamage);
|
parent_elem.append(averageDamage);
|
||||||
|
@ -475,7 +552,7 @@ function displayMeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
|
|
||||||
//attack speed
|
//attack speed
|
||||||
let atkSpd = document.createElement("p");
|
let atkSpd = document.createElement("p");
|
||||||
atkSpd.classList.add("center");
|
atkSpd.classList.add("left");
|
||||||
atkSpd.classList.add("itemp");
|
atkSpd.classList.add("itemp");
|
||||||
atkSpd.textContent = "Attack Speed: " + attackSpeeds[stats[11]];
|
atkSpd.textContent = "Attack Speed: " + attackSpeeds[stats[11]];
|
||||||
parent_elem.append(atkSpd);
|
parent_elem.append(atkSpd);
|
||||||
|
@ -491,7 +568,7 @@ function displayMeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
|
|
||||||
//Non-Crit: n->elem, total dmg, DPS
|
//Non-Crit: n->elem, total dmg, DPS
|
||||||
let nonCritStats = document.createElement("p");
|
let nonCritStats = document.createElement("p");
|
||||||
nonCritStats.classList.add("center");
|
nonCritStats.classList.add("left");
|
||||||
nonCritStats.classList.add("itemp");
|
nonCritStats.classList.add("itemp");
|
||||||
nonCritStats.textContent = "Non-Crit Stats: ";
|
nonCritStats.textContent = "Non-Crit Stats: ";
|
||||||
nonCritStats.append(document.createElement("br"));
|
nonCritStats.append(document.createElement("br"));
|
||||||
|
@ -521,7 +598,7 @@ function displayMeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
|
|
||||||
//Crit: n->elem, total dmg, DPS
|
//Crit: n->elem, total dmg, DPS
|
||||||
let critStats = document.createElement("p");
|
let critStats = document.createElement("p");
|
||||||
critStats.classList.add("center");
|
critStats.classList.add("left");
|
||||||
critStats.classList.add("itemp");
|
critStats.classList.add("itemp");
|
||||||
critStats.textContent = "Crit Stats: ";
|
critStats.textContent = "Crit Stats: ";
|
||||||
critStats.append(document.createElement("br"));
|
critStats.append(document.createElement("br"));
|
||||||
|
@ -554,8 +631,12 @@ function displayDefenseStats(parent_elem,defenseStats){
|
||||||
let title_elem = document.createElement("p");
|
let title_elem = document.createElement("p");
|
||||||
title_elem.textContent = "Defense Stats";
|
title_elem.textContent = "Defense Stats";
|
||||||
title_elem.classList.add("title");
|
title_elem.classList.add("title");
|
||||||
|
title_elem.classList.add("Normal");
|
||||||
|
title_elem.classList.add("itemp");
|
||||||
parent_elem.append(title_elem);
|
parent_elem.append(title_elem);
|
||||||
parent_elem.append(document.createElement("br"));
|
parent_elem.append(document.createElement("br"));
|
||||||
|
let statsTable = document.createElement("table");
|
||||||
|
statsTable.classList.add("itemtable");
|
||||||
|
|
||||||
//[total hp, ehp, total hpr, ehpr, [def%, agi%], [edef,tdef,wdef,fdef,adef]]
|
//[total hp, ehp, total hpr, ehpr, [def%, agi%], [edef,tdef,wdef,fdef,adef]]
|
||||||
for(const i in stats){
|
for(const i in stats){
|
||||||
|
@ -568,70 +649,125 @@ function displayDefenseStats(parent_elem,defenseStats){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//total HP
|
//total HP
|
||||||
let hpElem = document.createElement("p");
|
let hpRow = document.createElement("tr");
|
||||||
hpElem.textContent = "HP: " + stats[0];
|
let hp = document.createElement("td");
|
||||||
hpElem.classList.add("left");
|
hp.classList.add("Health");
|
||||||
hpElem.classList.add("Health");
|
hp.classList.add("left");
|
||||||
parent_elem.append(hpElem);
|
hp.textContent = "HP:";
|
||||||
|
let boost = document.createElement("td");
|
||||||
|
boost.textContent = stats[0];
|
||||||
|
boost.classList.add("right");
|
||||||
|
|
||||||
|
hpRow.appendChild(hp);
|
||||||
|
hpRow.append(boost);
|
||||||
|
statsTable.appendChild(hpRow);
|
||||||
//EHP
|
//EHP
|
||||||
let ehpElem = document.createElement("p");
|
let ehpRow = document.createElement("tr");
|
||||||
ehpElem.textContent = "Effective HP: " + stats[1];
|
let ehp = document.createElement("td");
|
||||||
ehpElem.classList.add("left");
|
ehp.classList.add("left");
|
||||||
parent_elem.append(ehpElem);
|
ehp.textContent = "Effective HP:";
|
||||||
|
|
||||||
|
boost = document.createElement("td");
|
||||||
|
boost.textContent = stats[1];
|
||||||
|
boost.classList.add("right");
|
||||||
|
|
||||||
|
ehpRow.appendChild(ehp);
|
||||||
|
ehpRow.append(boost);
|
||||||
|
statsTable.append(ehpRow);
|
||||||
//total HPR
|
//total HPR
|
||||||
let hprElem = document.createElement("p");
|
let hprRow = document.createElement("tr");
|
||||||
hprElem.textContent = "HP Regen: " + stats[2];
|
let hpr = document.createElement("td");
|
||||||
hprElem.classList.add("left");
|
hpr.classList.add("Health");
|
||||||
hprElem.classList.add("Health");
|
hpr.classList.add("left");
|
||||||
parent_elem.append(hprElem);
|
hpr.textContent = "HP Regen:";
|
||||||
|
boost = document.createElement("td");
|
||||||
|
boost.textContent =stats[2];
|
||||||
|
boost.classList.add("right");
|
||||||
|
|
||||||
|
hprRow.appendChild(hpr);
|
||||||
|
hprRow.appendChild(boost);
|
||||||
|
statsTable.appendChild(hprRow);
|
||||||
//EHPR
|
//EHPR
|
||||||
let ehprElem = document.createElement("p");
|
let ehprRow = document.createElement("tr");
|
||||||
ehprElem.textContent = "Effective HP Regen: " + stats[3];
|
let ehpr = document.createElement("td");
|
||||||
ehprElem.classList.add("left");
|
ehpr.classList.add("left");
|
||||||
parent_elem.append(ehprElem);
|
ehpr.textContent = "Effective HP Regen:";
|
||||||
|
|
||||||
|
boost = document.createElement("td");
|
||||||
|
boost.textContent = stats[3];
|
||||||
|
boost.classList.add("right");
|
||||||
|
|
||||||
|
ehprRow.appendChild(ehpr);
|
||||||
|
ehprRow.append(boost);
|
||||||
|
statsTable.append(ehprRow);
|
||||||
//eledefs
|
//eledefs
|
||||||
let eledefs = stats[5];
|
let eledefs = stats[5];
|
||||||
for (let i = 0; i < eledefs.length; i++){
|
for (let i = 0; i < eledefs.length; i++){
|
||||||
/* TODO: make this comment work
|
let row = document.createElement("tr");
|
||||||
let eledefElem = document.createElement("p");
|
let eledefElem = document.createElement("p");
|
||||||
let ele = document.createElement("b");
|
eledefElem.classList.add("itemtable");
|
||||||
ele.classList.add(damageClasses[i+1]);
|
eledefElem.classList.add("itemp");
|
||||||
ele.textContent = damageClasses[i+1];
|
let eledefElemRow = document.createElement("tr");
|
||||||
eledefElem.textContent = " Defense: " + eledefs[i];
|
|
||||||
//eledefElem.classList.add(damageClasses[i+1]);
|
let eledefTitle = document.createElement("td");
|
||||||
eledefElem.classList.add("left");
|
eledefTitle.textContent = damageClasses[i+1];
|
||||||
parent_elem.append(ele);
|
eledefTitle.classList.add(damageClasses[i+1]);
|
||||||
parent_elem.append(eledefElem);
|
|
||||||
*/
|
let defense = document.createElement("td");
|
||||||
let eledefElem = document.createElement("p");
|
defense.textContent = "Defense: ";
|
||||||
eledefElem.textContent = damageClasses[i+1] + " Defense: " + eledefs[i];
|
defense.classList.add("spaceLeft");
|
||||||
eledefElem.classList.add(damageClasses[i+1]);
|
|
||||||
eledefElem.classList.add("left");
|
eledefElemRow.appendChild(eledefTitle);
|
||||||
parent_elem.append(eledefElem);
|
eledefElemRow.appendChild(defense);
|
||||||
|
eledefElem.appendChild(eledefElemRow);
|
||||||
|
//"Defense: ";
|
||||||
|
let boost = document.createElement("td");
|
||||||
|
boost.textContent = eledefs[i];
|
||||||
|
boost.classList.add("right");
|
||||||
|
|
||||||
|
row.appendChild(eledefElem);
|
||||||
|
row.appendChild(boost);
|
||||||
|
statsTable.appendChild(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
//skp
|
//skp
|
||||||
let defElem = document.createElement("p");
|
let defRow = document.createElement("tr");
|
||||||
defElem.textContent = "Damage Absorbed %: " + stats[4][0] + "%";
|
let defElem = document.createElement("td");
|
||||||
defElem.classList.add("left");
|
defElem.classList.add("left");
|
||||||
parent_elem.append(defElem);
|
defElem.textContent = "Damage Absorbed %:";
|
||||||
let agiElem = document.createElement("p");
|
boost = document.createElement("td");
|
||||||
agiElem.textContent = "Dodge Chance %: " + stats[4][1] + "%";
|
boost.classList.add("right");
|
||||||
|
boost.textContent = stats[4][0] + "%";
|
||||||
|
defRow.appendChild(defElem);
|
||||||
|
defRow.appendChild(boost);
|
||||||
|
statsTable.append(defRow);
|
||||||
|
|
||||||
|
let agiRow = document.createElement("tr");
|
||||||
|
let agiElem = document.createElement("td");
|
||||||
agiElem.classList.add("left");
|
agiElem.classList.add("left");
|
||||||
parent_elem.append(agiElem);
|
agiElem.textContent = "Dodge Chance %:";
|
||||||
|
boost = document.createElement("td");
|
||||||
|
boost.classList.add("right");
|
||||||
|
boost.textContent = stats[4][1] + "%";
|
||||||
|
agiRow.appendChild(agiElem);
|
||||||
|
agiRow.appendChild(boost);
|
||||||
|
statsTable.append(agiRow);
|
||||||
|
|
||||||
|
parent_elem.append(statsTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spellIdx) {
|
function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spellIdx) {
|
||||||
parent_elem.textContent = "";
|
parent_elem.textContent = "";
|
||||||
|
|
||||||
const stats = build.statMap;
|
const stats = build.statMap;
|
||||||
let title_elem = document.createElement("p");
|
let title_elem = document.createElement("p");
|
||||||
title_elem.classList.add('title');
|
title_elem.classList.add("title");
|
||||||
|
title_elem.classList.add("Normal");
|
||||||
|
|
||||||
overallparent_elem.textContent = "";
|
overallparent_elem.textContent = "";
|
||||||
let title_elemavg = document.createElement("p");
|
let title_elemavg = document.createElement("p");
|
||||||
title_elemavg.classList.add('title');
|
title_elemavg.classList.add('title');
|
||||||
|
title_elemavg.classList.add('Normal');
|
||||||
|
|
||||||
if (spellIdx != 0) {
|
if (spellIdx != 0) {
|
||||||
title_elem.textContent = spell.title + " (" + build.getSpellCost(spellIdx, spell.cost) + ")";
|
title_elem.textContent = spell.title + " (" + build.getSpellCost(spellIdx, spell.cost) + ")";
|
||||||
title_elemavg.textContent = spell.title + " (" + build.getSpellCost(spellIdx, spell.cost) + ")";
|
title_elemavg.textContent = spell.title + " (" + build.getSpellCost(spellIdx, spell.cost) + ")";
|
||||||
|
@ -730,7 +866,6 @@ function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spell
|
||||||
healLabel.classList.add("damagep");
|
healLabel.classList.add("damagep");
|
||||||
part_div.append(healLabel);
|
part_div.append(healLabel);
|
||||||
|
|
||||||
|
|
||||||
let overallhealLabel = document.createElement("p");
|
let overallhealLabel = document.createElement("p");
|
||||||
overallhealLabel.textContent = heal_amount;
|
overallhealLabel.textContent = heal_amount;
|
||||||
overallhealLabel.classList.add("damagep")
|
overallhealLabel.classList.add("damagep")
|
||||||
|
@ -746,7 +881,6 @@ function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spell
|
||||||
averageLabel.classList.add("damageSubtitle");
|
averageLabel.classList.add("damageSubtitle");
|
||||||
part_div.append(averageLabel);
|
part_div.append(averageLabel);
|
||||||
|
|
||||||
|
|
||||||
let overallaverageLabel = document.createElement("p");
|
let overallaverageLabel = document.createElement("p");
|
||||||
overallaverageLabel.textContent = "Average: "+total_damage.toFixed(2);
|
overallaverageLabel.textContent = "Average: "+total_damage.toFixed(2);
|
||||||
overallaverageLabel.classList.add("damageSubtitle");
|
overallaverageLabel.classList.add("damageSubtitle");
|
||||||
|
|
12
styles.css
12
styles.css
|
@ -73,6 +73,9 @@ a.link{
|
||||||
border: 3px solid #BCBCBC;
|
border: 3px solid #BCBCBC;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
width: 96%;
|
width: 96%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spell-info {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,6 +94,10 @@ a.link{
|
||||||
width: 94%;
|
width: 94%;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
/* VERY BAD. NEED FIX. */
|
||||||
|
.spaceLeft {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.itemp, .damagep {
|
.itemp, .damagep {
|
||||||
margin: 2px 2%;
|
margin: 2px 2%;
|
||||||
|
@ -245,5 +252,8 @@ input {
|
||||||
color:#a0a;
|
color:#a0a;
|
||||||
}
|
}
|
||||||
.Set{
|
.Set{
|
||||||
color:#5f5
|
color:#5f5;
|
||||||
|
}
|
||||||
|
.restrict{
|
||||||
|
color: #ff006a;
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue