dummy commit
This commit is contained in:
parent
4fa951ce23
commit
3902ddce63
2 changed files with 18 additions and 10 deletions
|
@ -29,7 +29,7 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
|
||||||
damages.push(damage_vals);
|
damages.push(damage_vals);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Applying powder.
|
// Applying spell conversions
|
||||||
let neutralBase = damages[0].slice();
|
let neutralBase = damages[0].slice();
|
||||||
let neutralRemainingRaw = damages[0];
|
let neutralRemainingRaw = damages[0];
|
||||||
for (let i = 0; i < 5; ++i) {
|
for (let i = 0; i < 5; ++i) {
|
||||||
|
@ -46,10 +46,6 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
|
||||||
let powders = weapon.get("powders").slice();
|
let powders = weapon.get("powders").slice();
|
||||||
|
|
||||||
|
|
||||||
//Double powder apply for weapons - this implementation is wrong
|
|
||||||
if (weapon.get("tier") === "Crafted") {
|
|
||||||
powders = powders.flatMap(x => [x,x]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//apply powders to weapon
|
//apply powders to weapon
|
||||||
for (const powderID of powders) {
|
for (const powderID of powders) {
|
||||||
|
@ -60,14 +56,25 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
|
||||||
if (neutralRemainingRaw[1] > 0) {
|
if (neutralRemainingRaw[1] > 0) {
|
||||||
let min_diff = Math.min(neutralRemainingRaw[0], conversionRatio * neutralBase[0]);
|
let min_diff = Math.min(neutralRemainingRaw[0], conversionRatio * neutralBase[0]);
|
||||||
let max_diff = Math.min(neutralRemainingRaw[1], conversionRatio * neutralBase[1]);
|
let max_diff = Math.min(neutralRemainingRaw[1], conversionRatio * neutralBase[1]);
|
||||||
damages[element+1][0] = Math.floor(damages[element+1][0] + min_diff);
|
//Wynnbuilder version (consistent w/ monster)
|
||||||
damages[element+1][1] = Math.floor(damages[element+1][1] + max_diff);
|
damages[element+1][0] = Math.round(damages[element+1][0] + min_diff);
|
||||||
neutralRemainingRaw[0] = Math.floor(neutralRemainingRaw[0] - min_diff);
|
damages[element+1][1] = Math.round(damages[element+1][1] + max_diff);
|
||||||
neutralRemainingRaw[1] = Math.floor(neutralRemainingRaw[1] - max_diff);
|
neutralRemainingRaw[0] = Math.round(neutralRemainingRaw[0] - min_diff);
|
||||||
|
neutralRemainingRaw[1] = Math.round(neutralRemainingRaw[1] - max_diff);
|
||||||
|
|
||||||
|
//NBCSS version (consistent w/ thrundacrack)
|
||||||
|
/*damages[element+1][0] = damages[element+1][0] + Math.floor(min_diff);
|
||||||
|
damages[element+1][1] = damages[element+1][1] + Math.floor(max_diff);
|
||||||
|
neutralRemainingRaw[0] = neutralRemainingRaw[0] - Math.floor(min_diff);
|
||||||
|
neutralRemainingRaw[1] = neutralRemainingRaw[1] - Math.floor(max_diff); */
|
||||||
}
|
}
|
||||||
damages[element+1][0] += powder.min;
|
damages[element+1][0] += powder.min;
|
||||||
damages[element+1][1] += powder.max;
|
damages[element+1][1] += powder.max;
|
||||||
}
|
}
|
||||||
|
//Double powder apply for weapons - this implementation is wrong
|
||||||
|
if (weapon.get("tier") === "Crafted") {
|
||||||
|
powders = powders.flatMap(x => [x,x]);
|
||||||
|
}
|
||||||
|
|
||||||
let damageMult = damageMultiplier;
|
let damageMult = damageMultiplier;
|
||||||
let melee = false;
|
let melee = false;
|
||||||
|
|
1
utils.js
1
utils.js
|
@ -218,3 +218,4 @@ function copyTextToClipboard(text) {
|
||||||
console.error('Async: Could not copy text: ', err);
|
console.error('Async: Could not copy text: ', err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue