Indicate fumbles / coups on the dice-total

This commit is contained in:
Johannes Loher 2021-03-14 08:47:03 +01:00
parent 2ccaa5da10
commit eb0866cfa7
7 changed files with 80 additions and 3 deletions

View file

@ -34,11 +34,9 @@ class CheckFactory {
private checkOptions: DS4CheckFactoryOptions;
async execute(): Promise<ChatMessage | unknown> {
const rollCls = CONFIG.Dice.rolls[0];
const innerFormula = ["ds", this.createTargetValueTerm(), this.createCritTerm()].filterJoin("");
const formula = this.checkOptions.useSlayingDice ? `{${innerFormula}}x` : innerFormula;
const roll = new rollCls(formula);
const roll = Roll.create(formula);
const rollModeTemplate = this.checkOptions.rollMode;
return roll.toMessage({}, { rollMode: rollModeTemplate, create: true });