Fix slaying dice modifier
This commit is contained in:
parent
1ddabc388c
commit
7a37f46017
1 changed files with 2 additions and 2 deletions
|
@ -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"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue