Added GEQ/LEQ option to reroll (similar to cs modifier)
This commit is contained in:
parent
c8882bd500
commit
72b715b188
|
@ -145,10 +145,27 @@ export const roll = (rollStr: string, maximiseRoll: boolean, nominalRoll: boolea
|
||||||
rollConf.keepLow.count = tNum;
|
rollConf.keepLow.count = tNum;
|
||||||
break;
|
break;
|
||||||
case "r":
|
case "r":
|
||||||
|
case "r=":
|
||||||
// Configure Reroll (this can happen multiple times)
|
// Configure Reroll (this can happen multiple times)
|
||||||
rollConf.reroll.on = true;
|
rollConf.reroll.on = true;
|
||||||
rollConf.reroll.nums.push(tNum);
|
rollConf.reroll.nums.push(tNum);
|
||||||
break;
|
break;
|
||||||
|
case "r>":
|
||||||
|
// Configure reroll for all numbers greater than or equal to tNum (this could happen multiple times, but why)
|
||||||
|
rollConf.reroll.on = true;
|
||||||
|
for (let i = tNum; i <= rollConf.dieSize; i++) {
|
||||||
|
log(LT.LOG, `Handling roll ${rollStr} | Parsing r> ${i}`);
|
||||||
|
rollConf.reroll.nums.push(i);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "r<":
|
||||||
|
// Configure CritScore for all numbers less than or equal to tNum (this could happen multiple times, but why)
|
||||||
|
rollConf.reroll.on = true;
|
||||||
|
for (let i = 1; i <= tNum; i++) {
|
||||||
|
log(LT.LOG, `Handling roll ${rollStr} | Parsing r< ${i}`);
|
||||||
|
rollConf.reroll.nums.push(i);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "cs":
|
case "cs":
|
||||||
case "cs=":
|
case "cs=":
|
||||||
// Configure CritScore for one number (this can happen multiple times)
|
// Configure CritScore for one number (this can happen multiple times)
|
||||||
|
|
Loading…
Reference in New Issue