From 8f60aa95ee142037d4d1d7d14007c486e32fc49c Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sat, 16 Jul 2022 11:03:33 +0200 Subject: [PATCH] Fix d6BB combat roll --- module/controllers/bol-rolls.js | 1 + module/system/bol-utility.js | 10 ++++++++++ system.json | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/module/controllers/bol-rolls.js b/module/controllers/bol-rolls.js index e695116..f322d45 100644 --- a/module/controllers/bol-rolls.js +++ b/module/controllers/bol-rolls.js @@ -564,6 +564,7 @@ export class BoLDefaultRoll { speaker: ChatMessage.getSpeaker({ actor: actor }), flags: { msgType: "default" } }) + this.rollData.actor = undefined // Cleanup msg.setFlag("world", "bol-roll-data", this.rollData) }) } diff --git a/module/system/bol-utility.js b/module/system/bol-utility.js index 5d9be6b..8388fea 100644 --- a/module/system/bol-utility.js +++ b/module/system/bol-utility.js @@ -484,11 +484,21 @@ export class BoLUtility { nbDice++ modIndex = 4 } + if (res[3] == 'MM') { + postForm = 'kl' + nbDice + nbDice += 2 + modIndex = 4 + } if (res[3] == 'B') { postForm = 'kh' + nbDice nbDice++ modIndex = 4 } + if (res[3] == 'BB') { + postForm = 'kh' + nbDice + nbDice += 2 + modIndex = 4 + } } formula = "(" + nbDice + "d" + res[2] + reroll + postForm + "+" + modifier + ") *" + multiplier } diff --git a/system.json b/system.json index 5c9b5f6..4378837 100644 --- a/system.json +++ b/system.json @@ -14,7 +14,7 @@ "url": "https://www.uberwald.me/gitea/public/bol", "license": "LICENSE.txt", "flags": {}, - "version": "1.5.0", + "version": "1.5.1", "templateVersion": 10, "minimumCoreVersion": "0.8.6", "compatibleCoreVersion": "9",