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; } diff --git a/src/features/boards/Board.vue b/src/features/boards/Board.vue index 221ed4a..4fd026b 100644 --- a/src/features/boards/Board.vue +++ b/src/features/boards/Board.vue @@ -1,7 +1,7 @@