Merge pull request #134 from hppeng-wynn/the-nothing-patch

The nothing patch
This commit is contained in:
hppeng-wynn 2022-07-14 21:55:43 -07:00 committed by GitHub
commit 0122018436
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 7 deletions

View file

@ -18104,12 +18104,13 @@
"lvl": 100,
"dexReq": 55,
"defReq": 55,
"sdPct": 61600,
"mdPct": 14000,
"ls": 700,
"ms": 15,
"int": -25,
"spd": 10,
"tSdRaw": 500,
"fSdRaw": 500,
"aSdRaw": 500,
"fixID": true,
"spRaw3": -10,
"id": 781

File diff suppressed because one or more lines are too long

View file

@ -77,7 +77,7 @@ function calculateSpellDamage(stats, weapon, _conversions, use_spell_damage, ign
// 2.2. Next, apply elemental conversions using damage computed in step 1.1.
// Also, track which elements are present. (Add onto those present in the weapon itself.)
let total_convert = 0; //TODO get confirmation that this is how raw works.
let total_convert = 0;
for (let i = 1; i <= 5; ++i) {
if (conversions[i] > 0) {
const conv_frac = conversions[i]/100;
@ -151,11 +151,23 @@ function calculateSpellDamage(stats, weapon, _conversions, use_spell_damage, ign
let min_boost = raw_boost;
let max_boost = raw_boost;
if (total_max > 0) { // TODO: what about total negative all raw?
// TODO: compute actual chance of 0 damage. For now we just copy max ratio
if (total_min === 0) {
min_boost += (damages_obj[1] / total_max) * prop_raw;
}
else {
min_boost += (damages_obj[0] / total_min) * prop_raw;
}
max_boost += (damages_obj[1] / total_max) * prop_raw;
}
if (i != 0 && total_elem_max > 0) { // rainraw TODO above
// TODO: compute actual chance of 0 damage. For now we just copy max ratio
if (total_elem_min === 0) {
min_boost += (damages_obj[1] / total_elem_max) * rainbow_raw;
}
else {
min_boost += (damages_obj[0] / total_elem_min) * rainbow_raw;
}
max_boost += (damages_obj[1] / total_elem_max) * rainbow_raw;
}
damages_obj[0] += min_boost * total_convert;

View file

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