From f1f43398a705de94ae94d630b2f5c0f7c4860a85 Mon Sep 17 00:00:00 2001 From: ducdat0507 <62660527+ducdat0507@users.noreply.github.com> Date: Thu, 15 Dec 2022 11:57:33 +0700 Subject: [PATCH] Fix oil smelter's inverse cost --- src/data/layers/oil.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index 64a0ad4..dd37b69 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -450,7 +450,9 @@ const layer = createLayer(id, function (this: BaseLayer) { } let v = Decimal.div(x, 1e7).log(10); v = v.div(Decimal.pow(0.95, paper.books.oilBook.totalAmount.value)); - if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100).root(4); + if (Decimal.gte(v, 1e4)) v = Decimal.mul(v, 1e4).root(2); + if (Decimal.gte(v, 200)) v = Decimal.mul(v, 200).root(2); + if (Decimal.gte(v, 50)) v = Decimal.mul(v, 50).root(2); return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0); }, display: jsx(() => (