mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-22 08:31:35 +00:00
get latest changes
This commit is contained in:
commit
63e015d82e
3 changed files with 21 additions and 10 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));
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { main } from "data/projEntry";
|
||||||
import { createBar, GenericBar } from "features/bars/bar";
|
import { createBar, GenericBar } from "features/bars/bar";
|
||||||
import { GenericBuyable } from "features/buyable";
|
import { GenericBuyable } from "features/buyable";
|
||||||
import { ClickableOptions } from "features/clickables/clickable";
|
import { ClickableOptions } from "features/clickables/clickable";
|
||||||
import { jsx, showIf } from "features/feature";
|
import { jsx, showIf, Visibility } from "features/feature";
|
||||||
import { createMilestone } from "features/milestones/milestone";
|
import { createMilestone } from "features/milestones/milestone";
|
||||||
import { createReset } from "features/reset";
|
import { createReset } from "features/reset";
|
||||||
import { Resource } from "features/resources/resource";
|
import { Resource } from "features/resources/resource";
|
||||||
|
@ -110,6 +110,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
coal.betterFertilizer.bought.value = true;
|
coal.betterFertilizer.bought.value = true;
|
||||||
coal.unlockKiln.bought.value = true;
|
coal.unlockKiln.bought.value = true;
|
||||||
coal.efficientSmelther.bought.value = true;
|
coal.efficientSmelther.bought.value = true;
|
||||||
|
coal.arsonistAssistance.bought.value = true;
|
||||||
|
coal.refinedCoal.bought.value = true;
|
||||||
|
coal.coloredFire.bought.value = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -585,6 +588,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
|
|
||||||
(isArray(options.buyable) ? options.buyable : [options.buyable]).forEach(
|
(isArray(options.buyable) ? options.buyable : [options.buyable]).forEach(
|
||||||
buyable => {
|
buyable => {
|
||||||
|
if (unref(buyable.visibility) !== Visibility.Visible) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const buyAmount = Decimal.min(
|
const buyAmount = Decimal.min(
|
||||||
Decimal.sub(
|
Decimal.sub(
|
||||||
buyable.inverseCost(buyable.resource?.value),
|
buyable.inverseCost(buyable.resource?.value),
|
||||||
|
|
|
@ -101,14 +101,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
resource: metal.metal,
|
resource: metal.metal,
|
||||||
cost() {
|
cost() {
|
||||||
let v = new Decimal(this.amount.value);
|
let v = new Decimal(this.amount.value);
|
||||||
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 4).div(100**3);
|
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);
|
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||||
return Decimal.pow(1.3, v).times(2.5e4);
|
return Decimal.pow(1.3, v).times(2.5e4);
|
||||||
},
|
},
|
||||||
inverseCost(x: DecimalSource) {
|
inverseCost(x: DecimalSource) {
|
||||||
let v = Decimal.div(x, 2.5e4).log(1.3);
|
let v = Decimal.div(x, 2.5e4).log(1.3);
|
||||||
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
||||||
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100**3).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);
|
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||||
},
|
},
|
||||||
display: jsx(() => (
|
display: jsx(() => (
|
||||||
|
@ -165,14 +165,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
resource: metal.metal,
|
resource: metal.metal,
|
||||||
cost() {
|
cost() {
|
||||||
let v = new Decimal(this.amount.value);
|
let v = new Decimal(this.amount.value);
|
||||||
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 4).div(50**3);
|
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);
|
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||||
return Decimal.pow(2, v).times(1e5);
|
return Decimal.pow(2, v).times(1e5);
|
||||||
},
|
},
|
||||||
inverseCost(x: DecimalSource) {
|
inverseCost(x: DecimalSource) {
|
||||||
let v = Decimal.div(x, 1e5).log(2);
|
let v = Decimal.div(x, 1e5).log(2);
|
||||||
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
||||||
if (Decimal.gte(v, 50)) v = Decimal.mul(v, 50**3).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);
|
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||||
},
|
},
|
||||||
display: jsx(() => (
|
display: jsx(() => (
|
||||||
|
@ -227,14 +227,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
resource: metal.metal,
|
resource: metal.metal,
|
||||||
cost() {
|
cost() {
|
||||||
let v = new Decimal(this.amount.value);
|
let v = new Decimal(this.amount.value);
|
||||||
if (Decimal.gte(v, 10)) v = Decimal.pow(v, 4).div(10**3);
|
if (Decimal.gte(v, 10)) v = Decimal.pow(v, 4).div(10 ** 3);
|
||||||
|
if (Decimal.gte(v, 1e3)) v = Decimal.pow(v, 4).div(1e3 ** 3);
|
||||||
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
v = Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value).times(v);
|
||||||
return Decimal.pow(8, v).times(2e5);
|
return Decimal.pow(8, v).times(2e5);
|
||||||
},
|
},
|
||||||
inverseCost(x: DecimalSource) {
|
inverseCost(x: DecimalSource) {
|
||||||
let v = Decimal.div(x, 2e5).log(8);
|
let v = Decimal.div(x, 2e5).log(8);
|
||||||
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
v = v.div(Decimal.pow(0.95, paper.books.heavyDrillBook.totalAmount.value));
|
||||||
if (Decimal.gte(v, 10)) v = Decimal.mul(v, 10**3).root(4);
|
if (Decimal.gte(v, 1e3)) v = Decimal.mul(v, 1e3 ** 3).root(4);
|
||||||
|
if (Decimal.gte(v, 10)) v = Decimal.mul(v, 10 ** 3).root(4);
|
||||||
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
|
||||||
},
|
},
|
||||||
display: jsx(() => (
|
display: jsx(() => (
|
||||||
|
|
Loading…
Reference in a new issue