mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-01-19 20:11:37 +00:00
Fix coal inverse function
This commit is contained in:
parent
0e9d09fc6a
commit
ef0a8ed845
1 changed files with 6 additions and 3 deletions
|
@ -169,7 +169,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
return Decimal.pow(0.95, paper.books.bonfireBook.totalAmount.value).times(10);
|
||||
},
|
||||
inverseCost(x: DecimalSource) {
|
||||
return Decimal.div(x, Decimal.pow(0.95, paper.books.bonfireBook.totalAmount.value).times(10)).floor();
|
||||
return Decimal.div(
|
||||
x,
|
||||
Decimal.pow(0.95, paper.books.bonfireBook.totalAmount.value).times(10)
|
||||
).floor();
|
||||
},
|
||||
display: jsx(() => (
|
||||
<>
|
||||
|
@ -301,10 +304,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
},
|
||||
inverseCost(x: DecimalSource) {
|
||||
if (management.elfTraining.coalDrillElfTraining.milestones[2].earned.value) {
|
||||
x = Decimal.div(x, 10);
|
||||
x = Decimal.mul(x, 10);
|
||||
}
|
||||
if (management.elfTraining.fertilizerElfTraining.milestones[2].earned.value) {
|
||||
x = Decimal.div(x, Decimal.add(trees.totalLogs.value, Math.E).ln());
|
||||
x = Decimal.mul(x, Decimal.add(trees.totalLogs.value, Math.E).ln());
|
||||
}
|
||||
let v = Decimal.div(x, 10).log(1.15);
|
||||
v = v.div(Decimal.pow(0.95, paper.books.coalDrillBook.totalAmount.value));
|
||||
|
|
Loading…
Add table
Reference in a new issue