From 536b42dbe01244d3f989e19ef89e6e26f8d28423 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Fri, 30 Sep 2022 14:00:29 +0200 Subject: [PATCH] Fix #84 --- modules/pegasus-actor.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 2924207..a1070a7 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -771,6 +771,9 @@ export class PegasusActor extends Actor { if (this.type == 'character') { this.rollMR(true, combatId, combatantId) } + if (this.type == 'vehicle') { + this.rollMR(true, combatId, combatantId) + } console.log("Init required !!!!") return -1; } @@ -1919,7 +1922,8 @@ export class PegasusActor extends Actor { /* -------------------------------------------- */ async rollMR(isInit = false, combatId = 0, combatantId = 0) { - let mr = duplicate(this.system.mr) + + let mr = duplicate((this.type =="vehicle") ? this.system.statistics.mr : this.system.mr) if (mr) { mr.dice = PegasusUtility.getDiceFromLevel(mr.value);