mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-06-04 09:03:50 -04: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 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) {
|
if (!minMaxOverride) {
|
||||||
mmLoop: for (let m = rollConf.dieSize - 1; m > 0; m--) {
|
mmLoop: for (let m = rollConf.dieSize - 1; m > 0; m--) {
|
||||||
|
loopCountCheck(++loopCount);
|
||||||
|
|
||||||
if (!rollConf.reroll.nums.includes(m)) {
|
if (!rollConf.reroll.nums.includes(m)) {
|
||||||
minMaxOverride = m;
|
minMaxOverride = m;
|
||||||
break mmLoop;
|
break mmLoop;
|
||||||
|
|||||||
Reference in New Issue
Block a user