Merge branch 'dev' of https://github.com/hppeng-wynn/hppeng-wynn.github.io into dev
|
@ -87,18 +87,19 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i in damages) {
|
for (let i in damages) {
|
||||||
let damageBoost = Math.max(1 + skillBoost[i] + staticBoost, 0);
|
let damageBoost = 1 + skillBoost[i] + staticBoost;
|
||||||
damages_results.push([
|
damages_results.push([
|
||||||
Math.max(damages[i][0] * damageBoost * damageMult, 0), // Normal min
|
Math.max(damages[i][0] * Math.max(damageBoost,0) * damageMult, 0), // Normal min
|
||||||
Math.max(damages[i][1] * damageBoost * damageMult, 0), // Normal max
|
Math.max(damages[i][1] * Math.max(damageBoost,0) * damageMult, 0), // Normal max
|
||||||
Math.max(damages[i][0] * (1 + damageBoost) * damageMult, 0), // Crit min
|
Math.max(damages[i][0] * Math.max(1 + damageBoost, 0) * damageMult, 0), // Crit min
|
||||||
Math.max(damages[i][1] * (1 + damageBoost) * damageMult, 0), // Crit max
|
Math.max(damages[i][1] * Math.max(1 + damageBoost, 0) * damageMult, 0), // Crit max
|
||||||
]);
|
]);
|
||||||
totalDamNorm[0] += damages_results[i][0];
|
totalDamNorm[0] += damages_results[i][0];
|
||||||
totalDamNorm[1] += damages_results[i][1];
|
totalDamNorm[1] += damages_results[i][1];
|
||||||
totalDamCrit[0] += damages_results[i][2];
|
totalDamCrit[0] += damages_results[i][2];
|
||||||
totalDamCrit[1] += damages_results[i][3];
|
totalDamCrit[1] += damages_results[i][3];
|
||||||
}
|
}
|
||||||
|
console.log(damages_results);
|
||||||
if (melee) {
|
if (melee) {
|
||||||
totalDamNorm[0] += Math.max(rawModifier, -damages_results[0][0]);
|
totalDamNorm[0] += Math.max(rawModifier, -damages_results[0][0]);
|
||||||
totalDamNorm[1] += Math.max(rawModifier, -damages_results[0][1]);
|
totalDamNorm[1] += Math.max(rawModifier, -damages_results[0][1]);
|
||||||
|
|
13
display.js
|
@ -293,6 +293,7 @@ function displayExpandedItem(item, parent_id){
|
||||||
let display_commands = [
|
let display_commands = [
|
||||||
"#cdiv",
|
"#cdiv",
|
||||||
"displayName",
|
"displayName",
|
||||||
|
//"type", //REPLACE THIS WITH SKIN
|
||||||
"#ldiv",
|
"#ldiv",
|
||||||
"atkSpd",
|
"atkSpd",
|
||||||
"#ldiv",
|
"#ldiv",
|
||||||
|
@ -407,6 +408,18 @@ function displayExpandedItem(item, parent_id){
|
||||||
if (item.get("tier") !== " ") {
|
if (item.get("tier") !== " ") {
|
||||||
p_elem.classList.add(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
|
} else if (skp_order.includes(id)) { //id = str, dex, int, def, or agi
|
||||||
p_elem.textContent = "";
|
p_elem.textContent = "";
|
||||||
p_elem.classList.add("itemtable");
|
p_elem.classList.add("itemtable");
|
||||||
|
|
Before Width: | Height: | Size: 463 B |
BIN
media/items/generic-boots.png
Normal file
After Width: | Height: | Size: 418 B |
BIN
media/items/generic-bow.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
media/items/generic-bracelet.png
Normal file
After Width: | Height: | Size: 582 B |
BIN
media/items/generic-chestplate.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
media/items/generic-dagger.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
media/items/generic-helmet.png
Normal file
After Width: | Height: | Size: 395 B |
BIN
media/items/generic-leggings.png
Normal file
After Width: | Height: | Size: 411 B |
BIN
media/items/generic-necklace.png
Normal file
After Width: | Height: | Size: 88 B |
BIN
media/items/generic-relik.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
media/items/generic-ring.png
Normal file
After Width: | Height: | Size: 435 B |
BIN
media/items/generic-spear.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
media/items/generic-wand.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
media/items/palette.png
Normal file
After Width: | Height: | Size: 223 B |
4
utils.js
|
@ -99,7 +99,7 @@ Base64 = (function () {
|
||||||
// Base64.toInt("200000"); // gives -2147483648
|
// Base64.toInt("200000"); // gives -2147483648
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Turns a raw stat and a % stat into a final stat on the basis that - raw and >= 100% becomes 0 and + raw and <=-100% becomes 0.
|
Turns a raw stat and a % stat into a final stat on the basis that - raw and >= 100% becomes 0 and + raw and <=-100% becomes negative.
|
||||||
Pct would be 0.80 for 80%, -1.20 for 120%, etc
|
Pct would be 0.80 for 80%, -1.20 for 120%, etc
|
||||||
Example Outputs:
|
Example Outputs:
|
||||||
raw: -100
|
raw: -100
|
||||||
|
@ -112,7 +112,7 @@ Base64 = (function () {
|
||||||
pct: +0.20, output = 120
|
pct: +0.20, output = 120
|
||||||
pct: +1.20, output = 220
|
pct: +1.20, output = 220
|
||||||
pct: -0.20, output = 80
|
pct: -0.20, output = 80
|
||||||
pct: -1.20, output = 0
|
pct: -1.20, output = -20
|
||||||
*/
|
*/
|
||||||
function rawToPct(raw, pct){
|
function rawToPct(raw, pct){
|
||||||
final = 0;
|
final = 0;
|
||||||
|
|