From 7a37f4601720980d9e88f4f599c450aee81cf2a2 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Thu, 1 Jul 2021 01:51:50 +0200 Subject: [PATCH] Fix slaying dice modifier --- src/module/rolls/slaying-dice-modifier.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module/rolls/slaying-dice-modifier.ts b/src/module/rolls/slaying-dice-modifier.ts index 9e2757e..9dbdd2b 100644 --- a/src/module/rolls/slaying-dice-modifier.ts +++ b/src/module/rolls/slaying-dice-modifier.ts @@ -7,7 +7,6 @@ import { DS4Check } from "./check"; export default function registerSlayingDiceModifier(): void { PoolTerm.MODIFIERS.x = slay; - // PoolTerm.POOL_REGEX = /^{([^}]+)}([A-z]([A-z0-9<=>]+)?)?$/; // TODO: Maybe we don't need this anymore? } function slay(this: PoolTerm, modifier: string): void { @@ -21,10 +20,11 @@ function slay(this: PoolTerm, modifier: string): void { checked++; if (diceTerm instanceof DS4Check && diceTerm.coup) { const formula = `dsv${diceTerm.checkTargetNumber}c${diceTerm.maximumCoupResult}:${diceTerm.minimumFumbleResult}n`; - const additionalRoll = Roll.create(formula).evaluate(); + const additionalRoll = Roll.create(formula).evaluate({ async: false }); this.rolls.push(additionalRoll); this.results.push({ result: additionalRoll.total ?? 0, active: true }); + this.terms.push(formula); } if (checked > 1000) throw new Error(game.i18n.localize("DS4.ErrorSlayingDiceRecursionLimitExceeded")); }