diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 0ee9fec..853a97e 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -912,6 +912,13 @@ const factory = createLayer(id, () => { } while (times > 0) { + if ( + !Object.values(allToys).some(i => + Decimal.gte(i.value, computedToyMultiplier.value) + ) + ) { + return; + } while (Decimal.lt(value[toysIndex].value, computedToyMultiplier.value)) { toysIndex = (toysIndex + 1) % value.length; }