···11+// It should roll when:
22+// - We're going from 1 to 0 (roll backwards)
33+// - The count is anywhere between 1 and 999
44+// - The count is going up and is a multiple of 100
55+// - The count is going down and is 1 less than a multiple of 100
66+export function decideShouldRoll(isSet: boolean, count: number) {
77+ let shouldRoll = false
88+ if (!isSet && count === 0) {
99+ shouldRoll = true
1010+ } else if (count > 0 && count < 1000) {
1111+ shouldRoll = true
1212+ } else if (count > 0) {
1313+ const mod = count % 100
1414+ if (isSet && mod === 0) {
1515+ shouldRoll = true
1616+ } else if (!isSet && mod === 99) {
1717+ shouldRoll = true
1818+ }
1919+ }
2020+ return shouldRoll
2121+}