diff --git a/src/module/rolls/check-factory.ts b/src/module/rolls/check-factory.ts index 2b3556b7..7e4997b1 100644 --- a/src/module/rolls/check-factory.ts +++ b/src/module/rolls/check-factory.ts @@ -36,12 +36,8 @@ class CheckFactory { async execute(): Promise { const rollCls = CONFIG.Dice.rolls[0]; - const formula = [ - "ds", - this.createTargetValueTerm(), - this.createCritTerm(), - this.createSlayingDiceTerm(), - ].filterJoin(""); + const innerFormula = ["ds", this.createTargetValueTerm(), this.createCritTerm()].filterJoin(""); + const formula = this.checkOptions.useSlayingDice ? `{${innerFormula}}x` : innerFormula; const roll = new rollCls(formula); const rollModeTemplate = this.checkOptions.rollMode; @@ -62,15 +58,11 @@ class CheckFactory { const maxCritRequired = this.checkOptions.maxCritSuccess !== defaultCheckOptions.maxCritSuccess; if (minCritRequired || maxCritRequired) { - return "c" + (this.checkOptions.maxCritSuccess ?? "") + "," + (this.checkOptions.minCritFailure ?? ""); + return "c" + (this.checkOptions.maxCritSuccess ?? "") + ":" + (this.checkOptions.minCritFailure ?? ""); } else { return null; } } - - createSlayingDiceTerm(): string | null { - return this.checkOptions.useSlayingDice ? "x" : null; - } } /**