mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-01-06 20:37:54 -05:00
Add loopCountCheck to maximizeRoll reroll shortcut
This commit is contained in:
@ -538,6 +538,8 @@ export const roll = (rollStr: string, maximizeRoll: boolean, nominalRoll: boolea
|
||||
// If maximizeRoll is on and we've entered the reroll code, dieSize is not allowed, determine the next best option and always return that
|
||||
if (!minMaxOverride) {
|
||||
mmLoop: for (let m = rollConf.dieSize - 1; m > 0; m--) {
|
||||
loopCountCheck(++loopCount);
|
||||
|
||||
if (!rollConf.reroll.nums.includes(m)) {
|
||||
minMaxOverride = m;
|
||||
break mmLoop;
|
||||
|
||||
Reference in New Issue
Block a user