From 8538af1907be886a2bcc976c47e7350b6bb800f6 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sat, 8 Jan 2022 23:47:48 +0100 Subject: [PATCH] Minor fixes --- module/system/bol-utility.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/system/bol-utility.js b/module/system/bol-utility.js index 5bb805b..8037a87 100644 --- a/module/system/bol-utility.js +++ b/module/system/bol-utility.js @@ -124,7 +124,7 @@ export class BoLUtility { let attackId = event.currentTarget.attributes['data-attack-id'].value; let defenseMode = event.currentTarget.attributes['data-defense-mode'].value; let weaponId = (event.currentTarget.attributes['data-weapon-id']) ? event.currentTarget.attributes['data-weapon-id'].value : -1 - //console.log("DEFENSE1", event.currentTarget, attackId, defenseMode, weaponId); + console.log("DEFENSE1", event.currentTarget, attackId, defenseMode, weaponId); if ( game.user.isGM) { BoLUtility.processDamageHandling(event, attackId, defenseMode, weaponId) } else { @@ -165,10 +165,14 @@ export class BoLUtility { } BoLUtility.removeChatMessageId(BoLUtility.findChatMessageId(event.currentTarget)); + //console.log("Damage Handling", event, attackId, defenseMode, weaponId) // Only GM process this let attackDef = this.attackStore[attackId]; if (attackDef) { + if (attackDef.defenseDone) return; // ?? Why ??? + attackDef.defenseDone = true attackDef.defenseMode = defenseMode; + if (defenseMode == 'damage-with-armor') { let armorFormula = attackDef.defender.getArmorFormula(); attackDef.rollArmor = new Roll(armorFormula)