Star book scaling to prevent future inflation

This commit is contained in:
unsoftcapped3 2022-12-14 07:21:14 -08:00 committed by GitHub
parent 2057c13f98
commit 2349748353
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,6 +114,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
resource: noPersist(paper),
cost() {
let v = this.amount.value;
if (options.elfName === "Star" && Decimal.gte(v, 10)) v = Decimal.pow(10, v.div(10));
if (options.elfName === "Star" || options.elfName === "Bell") v = Decimal.pow(v, 2);
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
if (Decimal.gte(v, 10000)) v = Decimal.pow(v, 2).div(10000);
@ -150,7 +151,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
if (Decimal.gte(v, 10000)) v = Decimal.mul(v, 10000).root(2);
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100).root(2);
if (options.elfName === "Star" || options.elfName === "Bell") v = Decimal.root(v, 2);
if (options.elfName === "Star" && Decimal.gte(v, 10)) v=v.mul(10).log10();
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
},
style: "width: 600px",