Fix armors

This commit is contained in:
2022-03-21 13:28:27 +01:00
parent 80725d57e1
commit fff6b2a733
3 changed files with 8 additions and 6 deletions

View File

@ -220,7 +220,8 @@ export class BoLUtility {
if (defenseMode == 'damage-with-armor') {
let armorFormula = attackDef.defender.getArmorFormula()
attackDef.rollArmor = new Roll(armorFormula)
attackDef.rollArmor.roll({ async: false })
attackDef.rollArmor.roll( { async: false } )
console.log("Armor roll ", attackDef.rollArmor)
attackDef.armorProtect = (attackDef.rollArmor.total < 0) ? 0 : attackDef.rollArmor.total;
attackDef.finalDamage = attackDef.damageRoll.total - attackDef.armorProtect;
attackDef.finalDamage = (attackDef.finalDamage < 0) ? 0 : attackDef.finalDamage;