From afe4fc2a1bf8b1a9c5a72fe62999a8992935070a Mon Sep 17 00:00:00 2001 From: sladecraven Date: Fri, 30 Sep 2022 11:54:48 +0200 Subject: [PATCH] Fix #80 --- modules/pegasus-actor.js | 4 ++-- modules/pegasus-utility.js | 5 ++++- templates/item-power-sheet.html | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index ba321f4..dfc142f 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -2261,12 +2261,12 @@ export class PegasusActor extends Actor { if (actor) { let stat = this.getStat("hr") let rollData = this.getCommonRollData("hr") + rollData.isVehicleStun = true rollData.mode = "stat" - rollData.title = `Stat ${stat.label}`; + rollData.title = `Stat ${stat.label}` this.addVehicleArmors(rollData) this.startRoll(rollData) - this.modifyVehicleStun(1) } } diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js index 3854cc7..147f64d 100644 --- a/modules/pegasus-utility.js +++ b/modules/pegasus-utility.js @@ -831,10 +831,13 @@ export class PegasusUtility { combat.updateEmbeddedDocuments("Combatant", [{ _id: rollData.combatantId, initiative: rollData.finalScore }]) } - // Stun specific -> Suffere a stun level when dmg-res + // Stun specific -> Suffer a stun level when dmg-res for character if (rollData.subKey && rollData.subKey == "dmg-res") { actor.modifyStun(+1) } + if (rollData.isVehicleStun) { + this.modifyVehicleStun(1) + } //this.removeUsedPerkEffects( rollData) // Unused for now this.removeOneUseEffects(rollData) // Unused for now diff --git a/templates/item-power-sheet.html b/templates/item-power-sheet.html index 19ab025..adee16d 100644 --- a/templates/item-power-sheet.html +++ b/templates/item-power-sheet.html @@ -34,8 +34,8 @@