From 009d33383f5ccd5e56a4d4715ad54d5f8f0fd853 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Tue, 6 Dec 2022 19:43:55 -0800 Subject: [PATCH] add .max(0)s --- src/data/layers/elves.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/layers/elves.tsx b/src/data/layers/elves.tsx index f2b58e4..c70fce4 100644 --- a/src/data/layers/elves.tsx +++ b/src/data/layers/elves.tsx @@ -450,11 +450,11 @@ const layer = createLayer(id, function (this: BaseLayer) { coal.buildFire.amount.value = Decimal.sub( coal.buildFire.amount.value, unref(this.buyable.cost!) - ); + ).max(0); coal.activeFires.value = Decimal.sub( coal.activeFires.value, unref(this.buyable.cost!) - ); + ).max(0); } }, onPurchase() {