From 48f32ff5d994c86105c7c2ce8f8d5d42efe08d61 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Tue, 27 Sep 2022 16:56:59 +0200 Subject: [PATCH] Fix #53 --- modules/pegasus-actor.js | 11 +++++++++++ templates/partial-roll-select-effects.html | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 700b5ab..c58a4de 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -2199,6 +2199,16 @@ export class PegasusActor extends Actor { } } + /* -------------------------------------------- */ + addVehicleArmors( rollData) { + for (let arcKey in this.system.arcs) { + let arc = this.system.arcs[arcKey] + if (arc.armourlevel > 0) { + rollData.vehicleShieldList.push({ label: `${arc.label} Armor`, type: "vehicleshield", applied: false, value: arc.armourlevel }) + } + } + } + /* -------------------------------------------- */ rollVehicleDamageResistance() { let actor = this.isValidActor() @@ -2209,6 +2219,7 @@ export class PegasusActor extends Actor { rollData.title = `Stat ${stat.label}`; this.addVehicleShields(rollData) + this.addVehicleArmors(rollData) this.startRoll(rollData) this.modifyVehicleStun(1) } diff --git a/templates/partial-roll-select-effects.html b/templates/partial-roll-select-effects.html index 2a0949c..ad395ca 100644 --- a/templates/partial-roll-select-effects.html +++ b/templates/partial-roll-select-effects.html @@ -154,7 +154,7 @@ {{/if}} {{#if (notEmpty vehicleShieldList)}} - +