fixed elemental resistance for magic attack calculations

This commit is contained in:
tmont 2021-02-22 20:51:51 -08:00
parent b6c901e561
commit 549f393539

View File

@ -479,9 +479,9 @@
.show(); .show();
window.saga.spells.filter(x => !!x.power && rowData.spells.includes(x.name)).forEach((spell) => { window.saga.spells.filter(x => !!x.power && rowData.spells.includes(x.name)).forEach((spell) => {
const elementalRes = ''; const elementalRes = 0;
const resArmor = 0; const resArmor = 0;
const resAccessory = charStats.accessor ? charStats.accessor.resistance[spell.element.toLowerCase()] : 0; const resAccessory = charStats.accessory ? charStats.accessory.resistance[spell.element.toLowerCase()] : 0;
let def = calc.magicalAttack(enemyMagic, charMagic, elementalRes, resArmor, resAccessory, spell.power); let def = calc.magicalAttack(enemyMagic, charMagic, elementalRes, resArmor, resAccessory, spell.power);
let magicUp = calc.magicalAttack(enemyMagic, charMagic, elementalRes, resArmor, resAccessory, spell.power, { let magicUp = calc.magicalAttack(enemyMagic, charMagic, elementalRes, resArmor, resAccessory, spell.power, {
targetMagicUp: true, targetMagicUp: true,