Fix bcata, update formula

This commit is contained in:
b 2021-06-20 00:20:38 -07:00
parent 13b5a2d596
commit 2cdbe4e196
8 changed files with 24 additions and 29 deletions

View file

@ -3,7 +3,7 @@ const url_tag = location.hash.slice(1);
// console.log(url_tag);
const BUILD_VERSION = "7.0.10";
const BUILD_VERSION = "7.0.11";
function setTitle() {
let text;

View file

@ -9,7 +9,6 @@
"spRegen": -5,
"hp": -325,
"lvl": 83,
"sdPct": 8,
"str": -2,
"dex": -2,
"int": -2,
@ -112616,4 +112615,4 @@
]
}
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -144,8 +144,8 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
damages_results.push([
Math.max(damages[i][0] * strBoost * Math.max(damageBoost,0) * damageMult, 0), // Normal min
Math.max(damages[i][1] * strBoost * Math.max(damageBoost,0) * damageMult, 0), // Normal max
Math.max(damages[i][0] * strBoost * 2 * Math.max(damageBoost,0) * damageMult, 0), // Crit min
Math.max(damages[i][1] * strBoost * 2 * Math.max(damageBoost,0) * damageMult, 0), // Crit max
Math.max(damages[i][0] * (strBoost + 1) * Math.max(damageBoost,0) * damageMult, 0), // Crit min
Math.max(damages[i][1] * (strBoost + 1) * Math.max(damageBoost,0) * damageMult, 0), // Crit max
]);
damageformulas[i][0] += `(max((${tooltipinfo.get("damageBases")[i][0]} * ${strBoost} * max(${tooltipinfo.get("damageBoost")}, 0) * ${tooltipinfo.get("dmgMult")}), 0))`
damageformulas[i][1] += `(max((${tooltipinfo.get("damageBases")[i][1]} * ${strBoost} * max(${tooltipinfo.get("damageBoost")}, 0) * ${tooltipinfo.get("dmgMult")}), 0))`
@ -164,8 +164,8 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
}
damages_results[0][0] += strBoost*rawModifier;
damages_results[0][1] += strBoost*rawModifier;
damages_results[0][2] += strBoost*2*rawModifier;
damages_results[0][3] += strBoost*2*rawModifier;
damages_results[0][2] += (strBoost + 1)*rawModifier;
damages_results[0][3] += (strBoost + 1)*rawModifier;
for (let i = 0; i < 2; i++) {
damageformulas[0][i] += ` + (${strBoost} * ${tooltipinfo.get("rawModifier")})`
}

View file

@ -1,4 +1,4 @@
const DB_VERSION = 49;
const DB_VERSION = 50;
// @See https://github.com/mdn/learning-area/blob/master/javascript/apis/client-side-storage/indexeddb/video-store/index.jsA
let db;

View file

@ -1,4 +1,4 @@
const DB_VERSION = 49;
const DB_VERSION = 50;
// @See https://github.com/mdn/learning-area/blob/master/javascript/apis/client-side-storage/indexeddb/video-store/index.jsA
let db;

View file

@ -1,7 +1,22 @@
import requests
import json
import numpy as np
response = requests.get("https://api.wynncraft.com/public_api.php?action=itemDB&category=all")
with open("dump.json", "w") as outfile:
outfile.write(json.dumps(response.json()))
arr = np.array([])
for i in range(4):
response = requests.get("https://api.wynncraft.com/v2/ingredient/search/tier/" + str(i))
arr = np.append(arr, np.array(response.json()['data']))
with open("../ingreds.json", "w") as outfile:
outfile.write(json.dumps(list(arr)))
with open("../ingreds_compress.json", "w") as outfile:
outfile.write(json.dumps(list(arr)))
with open("../ingreds_clean.json", "w") as outfile:
json.dump(list(arr), outfile, indent = 2) #needs further cleaning

View file

@ -1,19 +0,0 @@
import json
import requests
import numpy as np
#Nothing to ingreds.json
arr = np.array([])
for i in range(4):
response = requests.get("https://api.wynncraft.com/v2/ingredient/search/tier/" + str(i))
arr = np.append(arr, np.array(response.json()['data']))
with open("../ingreds.json", "w") as outfile:
outfile.write(json.dumps(list(arr)))
with open("../ingreds_compress.json", "w") as outfile:
outfile.write(json.dumps(list(arr)))
with open("../ingreds_clean.json", "w") as outfile:
json.dump(list(arr), outfile, indent = 2) #needs further cleaning