Merge branch 'dev' of https://github.com/hppeng-wynn/hppeng-wynn.github.io into dev
This commit is contained in:
commit
33da3b89e7
4 changed files with 116 additions and 100 deletions
94
display.js
94
display.js
|
@ -227,7 +227,25 @@ function displayBuildStats(build, parent_id){
|
||||||
style = "negative";
|
style = "negative";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
displayFixedID(active_elem, id, stats.get(id), elemental_format, style);
|
let id_val = stats.get(id);
|
||||||
|
displayFixedID(active_elem, id, id_val, elemental_format, style);
|
||||||
|
if (id === "poison" && id_val > 0) {
|
||||||
|
let style = "positive";
|
||||||
|
let row = document.createElement('tr');
|
||||||
|
let value_elem = document.createElement('td');
|
||||||
|
value_elem.classList.add('right');
|
||||||
|
value_elem.setAttribute("colspan", "2");
|
||||||
|
let prefix_elem = document.createElement('b');
|
||||||
|
prefix_elem.textContent = "-> With Strength: ";
|
||||||
|
let number_elem = document.createElement('b');
|
||||||
|
number_elem.classList.add(style);
|
||||||
|
number_elem.textContent = (id_val * (1+skillPointsToPercentage(build.total_skillpoints[0]))).toFixed(0) + idSuffixes[id];
|
||||||
|
value_elem.append(prefix_elem);
|
||||||
|
value_elem.append(number_elem);
|
||||||
|
row.appendChild(value_elem);
|
||||||
|
|
||||||
|
active_elem.appendChild(row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -332,49 +350,38 @@ function displayExpandedItem(item, parent_id){
|
||||||
else {
|
else {
|
||||||
let id = command;
|
let id = command;
|
||||||
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);
|
|
||||||
if (id === "slots") {
|
if (id === "slots") {
|
||||||
|
let p_elem = document.createElement("p");
|
||||||
// PROPER POWDER DISPLAYING EZ CLAP
|
// PROPER POWDER DISPLAYING EZ CLAP
|
||||||
p_elem.textContent = "";
|
let numerals = new Map([[1, "I"], [2, "II"], [3, "III"], [4, "IV"], [5, "V"], [6, "VI"]]);
|
||||||
let powderMap = new Map([ ["e", "Earth"], ["t", "Thunder"], ["w", "Water"], ["f", "Fire"], ["a", "Air"]]);
|
|
||||||
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]) +
|
/*p_elem.textContent = idPrefixes[id].concat(item.get(id), idSuffixes[id]) +
|
||||||
" [ " + item.get("powders").map(x => powderNames.get(x)) + " ]";*/
|
" [ " + 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");
|
let powderPrefix = document.createElement("b");
|
||||||
powderPrefix.classList.add("itemp");
|
powderPrefix.classList.add("itemp");
|
||||||
powderPrefix.classList.add("left");
|
powderPrefix.classList.add("left");
|
||||||
powderPrefix.textContent = "Powders: [";
|
powderPrefix.textContent = "Powder Slots: " + item.get(id) + " [";
|
||||||
row.appendChild(powderPrefix);
|
p_elem.appendChild(powderPrefix);
|
||||||
|
|
||||||
let spaceElem = document.createElement("td");
|
let powders = item.get("powders");
|
||||||
//spaceElem.textContent = " ";
|
console.log(powders);
|
||||||
spaceElem.classList.add("itemp");
|
for (let i = 0; i < powders.length; i++) {
|
||||||
|
let powder = document.createElement("b");
|
||||||
|
powder.textContent = numerals.get((powders[i]%6)+1)+" ";
|
||||||
let powderList = item.get("powders").map(x => powderNames.get(x))
|
powder.classList.add(damageClasses[Math.floor(powders[i]/6)+1]+"_powder");
|
||||||
for(let i = 0; i < powderList.length; i++){
|
p_elem.appendChild(powder);
|
||||||
let powder = document.createElement("td");
|
|
||||||
let powderStr = powderList[i];
|
|
||||||
powder.textContent = numerals.get(powderStr.charAt(1), 10);
|
|
||||||
powder.classList.add(powderMap.get(powderStr.charAt(0)));
|
|
||||||
powder.classList.add("nopadding");
|
|
||||||
row.appendChild(powder);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let powderSuffix = document.createElement("td");
|
let powderSuffix = document.createElement("b");
|
||||||
powderSuffix.classList.add("itemp");
|
powderSuffix.classList.add("itemp");
|
||||||
powderSuffix.classList.add("left");
|
powderSuffix.classList.add("left");
|
||||||
powderSuffix.classList.add("nopadding");
|
|
||||||
powderSuffix.textContent = "]";
|
powderSuffix.textContent = "]";
|
||||||
row.appendChild(powderSuffix);
|
p_elem.appendChild(powderSuffix);
|
||||||
|
active_elem.appendChild(p_elem);
|
||||||
wrapper.appendChild(row);
|
}
|
||||||
p_elem.appendChild(wrapper);
|
else {
|
||||||
}else if(id === "displayName"){
|
let p_elem = displayFixedID(active_elem, id, item.get(id), elemental_format);
|
||||||
|
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"));
|
||||||
|
@ -400,6 +407,7 @@ function displayExpandedItem(item, parent_id){
|
||||||
p_elem.classList.add("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
|
||||||
let style = "positive";
|
let style = "positive";
|
||||||
if (item.get("minRolls").get(id) < 0) {
|
if (item.get("minRolls").get(id) < 0) {
|
||||||
|
@ -580,6 +588,24 @@ function displayEquipOrder(parent_elem,buildOrder){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function displayPoisonDamage(overallparent_elem, build) {
|
||||||
|
overallparent_elem.textContent = "";
|
||||||
|
|
||||||
|
//Title
|
||||||
|
let title_elemavg = document.createElement("p");
|
||||||
|
title_elemavg.classList.add("smalltitle");
|
||||||
|
title_elemavg.classList.add("Normal");
|
||||||
|
title_elemavg.textContent = "Poison Stats";
|
||||||
|
overallparent_elem.append(title_elemavg);
|
||||||
|
|
||||||
|
let overallpoisonDamage = document.createElement("p");
|
||||||
|
overallpoisonDamage.classList.add("itemp");
|
||||||
|
let poison_tick = Math.floor(build.statMap.get("poison") * (1+skillPointsToPercentage(build.total_skillpoints[0]))/3);
|
||||||
|
overallpoisonDamage.textContent = "Poison Tick: " + poison_tick;
|
||||||
|
overallparent_elem.append(overallpoisonDamage);
|
||||||
|
overallparent_elem.append(document.createElement("br"));
|
||||||
|
}
|
||||||
|
|
||||||
function displayMeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
function displayMeleeDamage(parent_elem, overallparent_elem, meleeStats){
|
||||||
let attackSpeeds = ["Super Slow", "Very Slow", "Slow", "Normal", "Fast", "Very Fast", "Super Fast"];
|
let attackSpeeds = ["Super Slow", "Very Slow", "Slow", "Normal", "Fast", "Very Fast", "Super Fast"];
|
||||||
//let damagePrefixes = ["Neutral Damage: ","Earth Damage: ","Thunder Damage: ","Water Damage: ","Fire Damage: ","Air Damage: "];
|
//let damagePrefixes = ["Neutral Damage: ","Earth Damage: ","Thunder Damage: ","Water Damage: ","Fire Damage: ","Air Damage: "];
|
||||||
|
@ -612,7 +638,7 @@ 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("smalltitle");
|
||||||
title_elemavg.classList.add("Normal");
|
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);
|
||||||
|
@ -873,12 +899,12 @@ function displaySpellDamage(parent_elem, overallparent_elem, build, spell, spell
|
||||||
|
|
||||||
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("smalltitle");
|
||||||
title_elem.classList.add("Normal");
|
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('smalltitle');
|
||||||
title_elemavg.classList.add('Normal');
|
title_elemavg.classList.add('Normal');
|
||||||
|
|
||||||
if (spellIdx != 0) {
|
if (spellIdx != 0) {
|
||||||
|
|
|
@ -185,6 +185,9 @@
|
||||||
<div class="spell-info">
|
<div class="spell-info">
|
||||||
<div class="center" id="spell3-infoAvg">spell4</div>
|
<div class="center" id="spell3-infoAvg">spell4</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="spell-info">
|
||||||
|
<div class="center" id="build-poison-stats">poison</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="skillpoints">
|
<div class="skillpoints">
|
||||||
|
|
68
styles.css
68
styles.css
|
@ -60,6 +60,10 @@ a.link{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 150%;
|
font-size: 150%;
|
||||||
}
|
}
|
||||||
|
.smalltitle{
|
||||||
|
text-align: center;
|
||||||
|
font-size: 125%;
|
||||||
|
}
|
||||||
.center {
|
.center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -134,53 +138,33 @@ a.link{
|
||||||
/*text-shadow: 2px 2px 0 #1f1515;*/
|
/*text-shadow: 2px 2px 0 #1f1515;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.Earth {
|
.Earth { color: #0a0; }
|
||||||
color: #0a0;
|
.Earth:before { content: "\2724" ' '; }
|
||||||
/*text-shadow: 2px 2px 0 #002a00;*/
|
.Earth_powder { color: #0a0; }
|
||||||
}
|
.Earth_powder:before { content: "\2724"; }
|
||||||
.Earth:before {
|
|
||||||
content: "\2724" ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
.Thunder {
|
.Thunder { color: #ff5; }
|
||||||
color: #ff5;
|
.Thunder:before { content: "\2726" ' '; }
|
||||||
/*text-shadow: 2px 2px 0 #3f3f15;*/
|
.Thunder_powder { color: #ff5; }
|
||||||
}
|
.Thunder_powder:before { content: "\2726"; }
|
||||||
.Thunder:before {
|
|
||||||
content: "\2726" ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
.Water {
|
.Water { color: #5ff; }
|
||||||
color: #5ff;
|
.Water:before { content: "\2749" ' '; }
|
||||||
/*text-shadow: 2px 2px 0 #153f3f;*/
|
.Water_powder { color: #5ff; }
|
||||||
}
|
.Water_powder:before { content: "\2749"; }
|
||||||
.Water:before {
|
|
||||||
content: "\2749" ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
.Fire {
|
.Fire { color: #f55; }
|
||||||
color: #f55;
|
.Fire:before { content: "\2739" ' '; }
|
||||||
/*text-shadow: 2px 2px 0 #1f1515;*/
|
.Fire_powder { color: #f55; }
|
||||||
}
|
.Fire_powder:before { content: "\2739"; }
|
||||||
.Fire:before {
|
|
||||||
content: "\2739" ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
.Air {
|
.Air { color: #fff; }
|
||||||
color: #fff;
|
.Air:before { content: "\274b" ' '; }
|
||||||
/*text-shadow: 2px 2px 0 #3f3f3f;*/
|
.Air_powder { color: #fff; }
|
||||||
}
|
.Air_powder:before { content: "\274b"; }
|
||||||
.Air:before {
|
|
||||||
content: "\274b" ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
.Neutral {
|
.Neutral { color: #fa0; }
|
||||||
color: #fa0;
|
.Neutral:before { content: "\2724" ' '; }
|
||||||
/*text-shadow: 2px 2px 0 #2a2a00;*/
|
|
||||||
}
|
|
||||||
.Neutral:before {
|
|
||||||
content: "\2724" ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
.Health {
|
.Health {
|
||||||
color: #a00;
|
color: #a00;
|
||||||
|
|
5
test.js
5
test.js
|
@ -11,7 +11,7 @@ console.log(url_tag);
|
||||||
* END testing section
|
* END testing section
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const BUILD_VERSION = "5.2";
|
const BUILD_VERSION = "5.3";
|
||||||
|
|
||||||
document.getElementById("header").textContent = "Wynn build calculator "+BUILD_VERSION+" (db version "+DB_VERSION+")";
|
document.getElementById("header").textContent = "Wynn build calculator "+BUILD_VERSION+" (db version "+DB_VERSION+")";
|
||||||
|
|
||||||
|
@ -543,6 +543,8 @@ function calculateBuildStats() {
|
||||||
|
|
||||||
//setHTML("build-defense-stats", "".concat(defenseStats));
|
//setHTML("build-defense-stats", "".concat(defenseStats));
|
||||||
|
|
||||||
|
displayPoisonDamage(document.getElementById("build-poison-stats"),player_build);
|
||||||
|
|
||||||
let spells = spell_table[player_build.weapon.get("type")];
|
let spells = spell_table[player_build.weapon.get("type")];
|
||||||
for (let i = 0; i < 4; ++i) {
|
for (let i = 0; i < 4; ++i) {
|
||||||
let parent_elem = document.getElementById("spell"+i+"-info");
|
let parent_elem = document.getElementById("spell"+i+"-info");
|
||||||
|
@ -565,6 +567,7 @@ function resetFields(){
|
||||||
setValue("int-skp", "0");
|
setValue("int-skp", "0");
|
||||||
setValue("def-skp", "0");
|
setValue("def-skp", "0");
|
||||||
setValue("agi-skp", "0");
|
setValue("agi-skp", "0");
|
||||||
|
setValue("level-choice", "");
|
||||||
location.hash = "";
|
location.hash = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue