Fix slying dice usage in CheckFactory
This commit is contained in:
parent
7f973e7de8
commit
18e6c31b5c
1 changed files with 3 additions and 11 deletions
|
@ -36,12 +36,8 @@ class CheckFactory {
|
|||
async execute(): Promise<ChatMessage | unknown> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue