mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-01-31 15:41:37 +00:00
**3
This commit is contained in:
parent
3efa0e4374
commit
2057c13f98
1 changed files with 6 additions and 6 deletions
|
@ -101,14 +101,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
resource: metal.metal,
|
||||
cost() {
|
||||
let v = new Decimal(this.amount.value);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 4).div(100);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 4).div(100**3);
|
||||
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(1.3, v).times(2.5e4);
|
||||
},
|
||||
inverseCost(x: DecimalSource) {
|
||||
let v = Decimal.div(x, 2.5e4).log(1.3);
|
||||
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
||||
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100).root(4);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100**3).root(4);
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
},
|
||||
display: jsx(() => (
|
||||
|
@ -165,14 +165,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
resource: metal.metal,
|
||||
cost() {
|
||||
let v = new Decimal(this.amount.value);
|
||||
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 4).div(50);
|
||||
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 4).div(50**3);
|
||||
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(2, v).times(1e5);
|
||||
},
|
||||
inverseCost(x: DecimalSource) {
|
||||
let v = Decimal.div(x, 1e5).log(2);
|
||||
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
||||
if (Decimal.gte(v, 50)) v = Decimal.mul(v, 50).root(4);
|
||||
if (Decimal.gte(v, 50)) v = Decimal.mul(v, 50**3).root(4);
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
},
|
||||
display: jsx(() => (
|
||||
|
@ -227,14 +227,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
resource: metal.metal,
|
||||
cost() {
|
||||
let v = new Decimal(this.amount.value);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 4).div(100);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 4).div(100**3);
|
||||
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||
return Decimal.pow(8, v).times(2e5);
|
||||
},
|
||||
inverseCost(x: DecimalSource) {
|
||||
let v = Decimal.div(x, 2e5).log(8);
|
||||
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
||||
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100).root(4);
|
||||
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100**3).root(4);
|
||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||
},
|
||||
display: jsx(() => (
|
||||
|
|
Loading…
Add table
Reference in a new issue