mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-01-31 23:51:41 +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);
|
return Decimal.pow(0.95, paper.books.bonfireBook.totalAmount.value).times(10);
|
||||||
},
|
},
|
||||||
inverseCost(x: DecimalSource) {
|
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(() => (
|
display: jsx(() => (
|
||||||
<>
|
<>
|
||||||
|
@ -301,10 +304,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
},
|
},
|
||||||
inverseCost(x: DecimalSource) {
|
inverseCost(x: DecimalSource) {
|
||||||
if (management.elfTraining.coalDrillElfTraining.milestones[2].earned.value) {
|
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) {
|
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);
|
let v = Decimal.div(x, 10).log(1.15);
|
||||||
v = v.div(Decimal.pow(0.95, paper.books.coalDrillBook.totalAmount.value));
|
v = v.div(Decimal.pow(0.95, paper.books.coalDrillBook.totalAmount.value));
|
||||||
|
|
Loading…
Add table
Reference in a new issue