maybe this works? just maybe...

This commit is contained in:
Chunkybanana 2022-12-16 02:37:36 +00:00
parent bc0db8c017
commit 47c4874746
10 changed files with 857 additions and 154 deletions

View file

@ -58,7 +58,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createExponentialModifier(() => ({
exponent: 1.1,
description: "Bell Level 2",
enabled: management.elfTraining.boxElfTraining.milestones[1].earned
enabled: () => management.elfTraining.boxElfTraining.milestones[1].earned.value && !main.isMastery.value
}))
]) as WithRequired<Modifier, "description" | "revert">;

View file

@ -375,12 +375,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: gingersnapEffect,
description: "Gingersnap Level 2",
enabled: management.elfTraining.clothElfTraining.milestones[1].earned
enabled: () => management.elfTraining.clothElfTraining.milestones[1].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: hollyEffect,
description: "Holly Level 3",
enabled: management.elfTraining.cutterElfTraining.milestones[2].earned
enabled: () => management.elfTraining.cutterElfTraining.milestones[2].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
@ -415,12 +415,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: gingersnapEffect,
description: "Gingersnap Level 2",
enabled: management.elfTraining.clothElfTraining.milestones[1].earned
enabled: () => management.elfTraining.clothElfTraining.milestones[1].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: hollyEffect,
description: "Holly Level 3",
enabled: management.elfTraining.cutterElfTraining.milestones[2].earned
enabled: () => management.elfTraining.cutterElfTraining.milestones[2].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
@ -455,12 +455,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: gingersnapEffect,
description: "Gingersnap Level 2",
enabled: management.elfTraining.clothElfTraining.milestones[1].earned
enabled: () => management.elfTraining.clothElfTraining.milestones[1].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: hollyEffect,
description: "Holly Level 3",
enabled: management.elfTraining.cutterElfTraining.milestones[2].earned
enabled: () => management.elfTraining.cutterElfTraining.milestones[2].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: 2,

View file

@ -83,10 +83,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
const ash = createResource<DecimalSource>(0, "ash");
const activeFires = persistent<DecimalSource>(0);
const fireLogs = computed(() => Decimal.times(activeFires.value, 1000));
const fireCoal = computed(() => Decimal.times(activeFires.value, 0.1));
const fireLogs = computed(() => Decimal.times(main.isMastery.value ? mastery.activeFires.value : activeFires.value, 1000));
const fireCoal = computed(() => Decimal.times(main.isMastery.value ? mastery.activeFires.value : activeFires.value, 0.1));
const fireAsh = computed(() => {
let gain = Decimal.times(activeFires.value, 50);
let gain = Decimal.times(main.isMastery.value ? mastery.activeFires.value : activeFires.value, 50);
if (management.elfTraining.smallfireElfTraining.milestones[0].earned.value) {
gain = gain.times(5);
}
@ -148,16 +148,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
const fireResource = createResource(buildFire.amount, "small fires");
const activeBonfires = persistent<DecimalSource>(0);
const bonfireLogs = computed(() => Decimal.times(activeBonfires.value, 10000));
const bonfireLogs = computed(() => Decimal.times(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value, 10000));
const bonfireCoal = computed(() => {
let gain = Decimal.times(activeBonfires.value, 10);
let gain = Decimal.times(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value, 10);
if (management.elfTraining.bonfireElfTraining.milestones[0].earned.value) {
gain = gain.times(5);
}
return gain;
});
const bonfireAsh = computed(() => {
let gain = Decimal.times(activeBonfires.value, 1000);
let gain = Decimal.times(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value, 1000);
if (management.elfTraining.bonfireElfTraining.milestones[0].earned.value) {
gain = gain.times(5);
}
@ -210,16 +210,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
active: activeBonfires
});
const activeKilns = persistent<DecimalSource>(0);
const kilnLogs = computed(() => Decimal.times(activeKilns.value, 1e6));
const kilnLogs = computed(() => Decimal.times(main.isMastery.value ? mastery.activeKilns.value : activeKilns.value, 1e6));
const kilnCoal = computed(() => {
let gain = Decimal.times(activeKilns.value, 1e4);
let gain = Decimal.times(main.isMastery.value ? mastery.activeKilns.value : activeKilns.value, 1e4);
if (management.elfTraining.kilnElfTraining.milestones[0].earned.value) {
gain = gain.times(5);
}
return gain;
});
const kilnAsh = computed(() => {
let gain = Decimal.times(activeKilns.value, 1e4);
let gain = Decimal.times(main.isMastery.value ? mastery.activeKilns.value : activeKilns.value, 1e4);
if (management.elfTraining.kilnElfTraining.milestones[0].earned.value) {
gain = gain.times(5);
}
@ -278,7 +278,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const activeDrills = persistent<DecimalSource>(0);
const drillCoal = computed(() =>
Decimal.times(
Decimal.pow(activeDrills.value, oil.row2Upgrades[1].bought.value ? 2 : 1),
Decimal.pow(main.isMastery.value ? mastery.activeDrills.value : activeDrills.value, oil.row2Upgrades[1].bought.value ? 2 : 1),
5e7
)
.times(metal.efficientDrill.bought.value ? 2 : 1)
@ -603,17 +603,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
const heatedCutterEffect = createSequentialModifier(() => [
createAdditiveModifier(() => ({
addend() {
return Decimal.times(heatedCutters.amount.value, 0.25);
return Decimal.times(main.isMastery.value ? mastery.heatedCutters.amount.value : heatedCutters.amount.value, 0.25);
},
description: "Heated Cutters",
enabled() {
return Decimal.gt(heatedCutters.amount.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.heatedCutters.amount.value : heatedCutters.amount.value, 0);
}
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
description: "Dedicated Cutter Heaters",
enabled: dedicatedCutters.bought
enabled: () => main.isMastery.value ? mastery.dedicatedCutters.bought.value : dedicatedCutters.bought.value
}))
]);
const computedHeatedCutterEffect = computed(() => heatedCutterEffect.apply(1));
@ -621,17 +621,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
const heatedPlanterEffect = createSequentialModifier(() => [
createAdditiveModifier(() => ({
addend() {
return Decimal.times(heatedPlanters.amount.value, 0.25);
return Decimal.times(main.isMastery.value ? mastery.heatedPlanters.amount.value : heatedPlanters.amount.value, 0.25);
},
description: "Heated Planters",
enabled() {
return Decimal.gt(heatedPlanters.amount.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.heatedPlanters.amount.value : heatedPlanters.amount.value, 0);
}
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
description: "Dedicated Planter Heaters",
enabled: dedicatedPlanters.bought
enabled: () => main.isMastery.value ? mastery.dedicatedPlanters.bought.value : dedicatedPlanters.bought.value
}))
]);
const computedHeatedPlanterEffect = computed(() => heatedPlanterEffect.apply(1));
@ -639,17 +639,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
const fertilizerEffect = createSequentialModifier(() => [
createAdditiveModifier(() => ({
addend() {
return Decimal.times(moreFertilizer.amount.value, 0.25);
return Decimal.times(main.isMastery.value ? mastery.moreFertilizer.amount.value : moreFertilizer.amount.value, 0.25);
},
description: "Fertilized Soil",
enabled() {
return Decimal.gt(moreFertilizer.amount.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.moreFertilizer.amount.value : moreFertilizer.amount.value, 0);
}
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
description: "Mulched Soil",
enabled: betterFertilizer.bought
enabled: () => main.isMastery.value ? mastery.betterFertilizer.bought.value : betterFertilizer.bought.value
}))
]);
const computedFertilizerEffect = computed(() => fertilizerEffect.apply(1));
@ -661,7 +661,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
},
description: "Small Fires",
enabled() {
return Decimal.gt(activeFires.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.activeFires.value : activeFires.value, 0);
}
})),
createAdditiveModifier(() => ({
@ -670,16 +670,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
},
description: "Bonfires",
enabled() {
return Decimal.gt(activeBonfires.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value, 0);
}
})),
createAdditiveModifier(() => ({
addend() {
return kilnCoal.value;
return kilnCoal.value;
},
description: "Charcoal Kilns",
enabled() {
return Decimal.gt(activeKilns.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.activeKilns.value : activeKilns.value, 0);
}
})),
createAdditiveModifier(() => ({
@ -688,7 +688,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
},
description: "Coal Drills",
enabled() {
return Decimal.gt(activeDrills.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.activeDrills.value : activeDrills.value, 0);
}
})),
createMultiplicativeModifier(() => ({
@ -703,7 +703,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
})),
createMultiplicativeModifier(() => ({
multiplier: () => {
let v = buildFire.amount.value;
let v = main.isMastery.value ? mastery.buildFire.amount.value : buildFire.amount.value;
if (management.elfTraining.smallfireElfTraining.milestones[0].earned.value) {
v = Decimal.div(buildBonfire.amount.value, 10).add(v);
}
@ -717,13 +717,13 @@ const layer = createLayer(id, function (this: BaseLayer) {
enabled: elves.elves.smallFireElf.bought
})),
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.div(buildBonfire.amount.value, 1000).add(1),
multiplier: () => Decimal.div(main.isMastery.value ? mastery.buildBonfire.amount.value : buildBonfire.amount.value, 1000).add(1),
description: "Bonfires Synergy",
enabled: elves.elves.bonfireElf.bought
})),
createMultiplicativeModifier(() => ({
multiplier: () =>
Decimal.div(buildKiln.amount.value, 100).times(dyes.boosts.green2.value).add(1),
Decimal.div(main.isMastery.value ? mastery.buildKiln.amount.value : buildKiln.amount.value, 100).times(dyes.boosts.green2.value).add(1),
description: "Kiln Synergy",
enabled: elves.elves.kilnElf.bought
})),
@ -773,7 +773,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: Decimal.add(coal.value, 1).log10().add(1).sqrt(),
description: "Peppermint Level 2",
enabled: management.elfTraining.coalDrillElfTraining.milestones[1].earned
enabled: () => management.elfTraining.coalDrillElfTraining.milestones[1].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: Decimal.add(plastic.buildRefinery.amount.value, 1).sqrt(),
@ -783,7 +783,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createExponentialModifier(() => ({
exponent: 1.05,
description: "Jack Level 2",
enabled: management.elfTraining.heatedCutterElfTraining.milestones[1].earned
enabled: () => management.elfTraining.heatedCutterElfTraining.milestones[1].earned.value && !main.isMastery.value
}))
]) as WithRequired<Modifier, "description" | "revert">;
const computedCoalGain = computed(() => coalGain.apply(0));
@ -795,7 +795,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
},
description: "Small Fires",
enabled() {
return Decimal.gt(activeFires.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.activeFires.value : activeFires.value, 0);
}
})),
createAdditiveModifier(() => ({
@ -804,7 +804,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
},
description: "Bonfires",
enabled() {
return Decimal.gt(activeBonfires.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value, 0);
}
})),
createAdditiveModifier(() => ({
@ -828,7 +828,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
})),
createMultiplicativeModifier(() => ({
multiplier: () => {
let v = buildFire.amount.value;
let v = main.isMastery.value ? mastery.buildFire.amount.value : buildFire.amount.value;
if (management.elfTraining.smallfireElfTraining.milestones[0].earned.value) {
v = Decimal.div(buildBonfire.amount.value, 100).add(v);
}
@ -838,13 +838,13 @@ const layer = createLayer(id, function (this: BaseLayer) {
enabled: elves.elves.smallFireElf.bought
})),
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.div(buildBonfire.amount.value, 1000).add(1),
multiplier: () => Decimal.div(main.isMastery.value ? mastery.buildBonfire.amount.value : buildBonfire.amount.value, 1000).add(1),
description: "Bonfires Synergy",
enabled: elves.elves.bonfireElf.bought
})),
createMultiplicativeModifier(() => ({
multiplier: () =>
Decimal.div(buildKiln.amount.value, 100).times(dyes.boosts.green2.value).add(1),
Decimal.div(main.isMastery.value ? mastery.buildKiln.amount.value : buildKiln.amount.value, 100).times(dyes.boosts.green2.value).add(1),
description: "Kiln Synergy",
enabled: elves.elves.kilnElf.bought
})),
@ -861,17 +861,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
createExponentialModifier(() => ({
exponent: 1.1,
description: "Joy Level 2",
enabled: management.elfTraining.smallfireElfTraining.milestones[1].earned
enabled: () => management.elfTraining.smallfireElfTraining.milestones[1].earned.value && !main.isMastery.value
})),
createExponentialModifier(() => ({
exponent: 1.1,
description: "Faith Level 2",
enabled: management.elfTraining.bonfireElfTraining.milestones[1].earned
enabled: () => management.elfTraining.bonfireElfTraining.milestones[1].earned.value && !main.isMastery.value
})),
createExponentialModifier(() => ({
exponent: 1.1,
description: "Snowball Level 2",
enabled: management.elfTraining.kilnElfTraining.milestones[1].earned
enabled: () => management.elfTraining.kilnElfTraining.milestones[1].earned.value && !main.isMastery.value
})),
createAdditiveModifier(() => ({
addend: paper.paper,
@ -888,7 +888,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
},
description: "Small Fires",
enabled() {
return Decimal.gt(activeFires.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.activeFires.value : activeFires.value, 0);
}
})),
createAdditiveModifier(() => ({
@ -897,7 +897,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
},
description: "Bonfires",
enabled() {
return Decimal.gt(activeBonfires.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value, 0);
}
})),
createAdditiveModifier(() => ({
@ -906,7 +906,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
},
description: "Charcoal Kilns",
enabled() {
return Decimal.gt(activeKilns.value, 0);
return Decimal.gt(main.isMastery.value ? mastery.activeKilns.value : activeKilns.value, 0);
}
}))
]);
@ -919,9 +919,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
base: 0,
visible() {
return (
Decimal.gt(activeFires.value, 0) ||
Decimal.gt(activeBonfires.value, 0) ||
Decimal.gt(activeKilns.value, 0)
Decimal.gt(main.isMastery.value ? mastery.activeFires.value : activeFires.value, 0) ||
Decimal.gt(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value, 0) ||
Decimal.gt(main.isMastery.value ? mastery.activeKilns.value : activeKilns.value, 0)
);
}
},
@ -931,9 +931,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
base: 0,
visible() {
return (
Decimal.gt(activeFires.value, 0) ||
Decimal.gt(activeBonfires.value, 0) ||
Decimal.gt(activeKilns.value, 0)
Decimal.gt(main.isMastery.value ? mastery.activeFires.value : activeFires.value, 0) ||
Decimal.gt(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value, 0) ||
Decimal.gt(main.isMastery.value ? mastery.activeKilns.value : activeKilns.value, 0)
);
}
},
@ -943,9 +943,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
base: 0,
visible() {
return (
Decimal.gt(activeFires.value, 0) ||
Decimal.gt(activeBonfires.value, 0) ||
Decimal.gt(activeKilns.value, 0)
Decimal.gt(main.isMastery.value ? mastery.activeFires.value : activeFires.value, 0) ||
Decimal.gt(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value, 0) ||
Decimal.gt(main.isMastery.value ? mastery.activeKilns.value : activeKilns.value, 0)
);
}
}
@ -988,6 +988,489 @@ const layer = createLayer(id, function (this: BaseLayer) {
}
});
const mastery = (() => {
const activeFires = persistent<DecimalSource>(0);
const activeBonfires = persistent<DecimalSource>(0);
const activeKilns = persistent<DecimalSource>(0);
const coal = createResource<DecimalSource>(0);
const ash = createResource<DecimalSource>(0);
const buildFire = createBuyable(() => ({
resource: trees.logs,
cost() {
let v = Decimal.times(buildBonfire.amount.value, unref(buildBonfire.cost!)).plus(
this.amount.value
);
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
if (Decimal.gte(v, 10000)) v = Decimal.pow(v, 2).div(10000);
v = Decimal.pow(0.95, paper.books.smallFireBook.totalAmount.value).times(v);
return v.pow(1.5).times(1e4);
},
inverseCost(x: DecimalSource) {
let v = Decimal.div(x, 1e4).root(1.5);
v = v.div(Decimal.pow(0.95, paper.books.smallFireBook.totalAmount.value));
if (Decimal.gte(v, 10000)) v = Decimal.mul(v, 10000).root(2);
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100).root(2);
v = v.sub(Decimal.times(buildBonfire.amount.value, unref(buildBonfire.cost!)));
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
},
display: jsx(() => (
<>
<h3>Small Fire</h3>
<br />
Burn 1000 logs for 0.1 coal and 50 ash
<br />
<br />
Currently:
<br />-{format(fireLogs.value)} logs/sec
<br />+{format(fireCoal.value)} coal/sec
<br />+{format(fireAsh.value)} ash/sec
<br />
<br />
Cost: {formatWhole(unref(buildFire.cost!))} {buildFire.resource!.displayName}
</>
)),
onPurchase() {
activeFires.value = Decimal.add(activeFires.value, 1);
},
style: {
color: colorText,
width: "160px"
}
})) as ElfBuyable & { resource: Resource };
const {
min: minFire,
max: maxFire,
add: addFire,
remove: removeFire
} = changeActiveBuyables({
active: activeFires,
buyable: buildFire
});
const buildBonfire = createBuyable(() => ({
resource: fireResource,
cost() {
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();
},
display: jsx(() => (
<>
<h3>Bonfire</h3>
<br />
Burn 10,000 logs for 10 coal and 1000 ash
<br />
<br />
Currently:
<br />-{format(bonfireLogs.value)} logs/sec
<br />+{format(bonfireCoal.value)} coal/sec
<br />+{format(bonfireAsh.value)} ash/sec
<br />
<br />
Cost: {formatWhole(unref(buildBonfire.cost!))} {buildBonfire.resource!.displayName}
</>
)),
onPurchase(cost) {
activeFires.value = Decimal.sub(activeFires.value, cost!).max(0);
activeBonfires.value = Decimal.add(activeBonfires.value, 1);
},
style: {
color: colorText,
width: "160px"
},
visibility: () => showIf(unlockBonfire.bought.value)
})) as ElfBuyable & { resource: Resource };
const {
min: minBonfire,
max: maxBonfire,
add: addBonfire,
remove: removeBonfire
} = changeActiveBuyables({
buyable: buildBonfire,
active: activeBonfires
});
const buildKiln = createBuyable(() => ({
resource: trees.logs,
cost() {
let v = this.amount.value;
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
if (Decimal.gte(v, 10000)) v = Decimal.pow(v, 2).div(10000);
v = Decimal.pow(0.95, paper.books.kilnBook.totalAmount.value).times(v);
return Decimal.pow(1.1, v).times(1e7);
},
inverseCost(x: DecimalSource) {
let v = Decimal.div(x, 1e7).log(1.1);
v = v.div(Decimal.pow(0.95, paper.books.kilnBook.totalAmount.value));
if (Decimal.gte(v, 10000)) v = Decimal.mul(v, 10000).root(2);
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100).root(2);
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
},
display: jsx(() => (
<>
<h3>Charcoal Kiln</h3>
<br />
Burn 1,000,000 logs for 10,000 coal and 10,000 ash
<br />
<br />
Currently:
<br />-{format(kilnLogs.value)} logs/sec
<br />+{format(kilnCoal.value)} coal/sec
<br />+{format(kilnAsh.value)} ash/sec
<br />
<br />
Cost: {formatWhole(unref(buildKiln.cost!))} {buildKiln.resource!.displayName}
</>
)),
onPurchase() {
activeKilns.value = Decimal.add(activeKilns.value, 1);
},
style: {
color: colorText,
width: "160px"
},
visibility: () => showIf(unlockKiln.bought.value)
})) as ElfBuyable & { resource: Resource };
const {
min: minKiln,
max: maxKiln,
add: addKiln,
remove: removeKiln
} = changeActiveBuyables({
buyable: buildKiln,
active: activeKilns
});
const warmerCutters = createUpgrade(() => ({
resource: noPersist(coal),
cost: 5,
display: {
title: "Warmer Cutters",
description: "Cut down twice as many trees/s"
},
style: { color: colorText }
}));
const warmerPlanters = createUpgrade(() => ({
resource: noPersist(coal),
cost: 5,
display: {
title: "Warmer Planters",
description: "Plant twice as many trees/s"
},
style: { color: colorText }
}));
const basicFertilizer = createUpgrade(() => ({
resource: noPersist(ash),
cost: 5000,
display: {
title: "Ashy Soil",
description: "Trees give 25% more logs"
},
style: { color: colorText }
}));
const unlockBonfire = createUpgrade(() => ({
resource: fireResource,
cost: 10,
display: {
title: "Bigger Fires",
description: "Put all those fires together into a larger blaze"
},
onPurchase() {
fireResource.value = Decimal.add(fireResource.value, this.cost);
},
style: { color: colorText }
}));
const row1upgrades = [warmerCutters, warmerPlanters, basicFertilizer, unlockBonfire];
const dedicatedCutters = createUpgrade(() => ({
resource: noPersist(coal),
cost: 250,
display: {
title: "Dedicated Cutter Heaters",
description: "Double the bonus from Heated Cutters"
},
style: { color: colorText },
visibility: () => showIf(unlockBonfire.bought.value)
}));
const dedicatedPlanters = createUpgrade(() => ({
resource: noPersist(coal),
cost: 250,
display: {
title: "Dedicated Planter Heaters",
description: "Double the bonus from Heated Planters"
},
style: { color: colorText },
visibility: () => showIf(unlockBonfire.bought.value)
}));
const betterFertilizer: Upgrade<BetterFertilizerUpgOptions> = createUpgrade(() => ({
canAfford() {
return Decimal.gte(trees.logs.value, 1e5) && Decimal.gte(ash.value, 1e5);
},
onPurchase() {
trees.logs.value = Decimal.sub(trees.logs.value, 1e5);
ash.value = Decimal.sub(ash.value, 1e5);
},
display: jsx(() => (
<>
<h3>Mulched Soil</h3>
<br />
Double the bonus from Fertilized Soil
<br />
<br />
Cost: {formatWhole(1e5)} {trees.logs.displayName}
<br />
{formatWhole(1e5)} {ash.displayName}
</>
)),
style: { color: colorText },
visibility: () => showIf(unlockBonfire.bought.value)
}));
const unlockKiln: Upgrade<UnlockKilnUpgOptions> = createUpgrade(() => ({
resource: trees.logs,
cost: 1e7,
display: {
title: "Efficient Fires",
description: "Move the fires underground to keep the coal from turning to ash"
},
style: { color: colorText },
visibility: () => showIf(unlockBonfire.bought.value)
}));
const row2upgrades = [dedicatedCutters, dedicatedPlanters, betterFertilizer, unlockKiln];
const efficientSmelther: Upgrade<EfficientSmeltherUpgOptions> = createUpgrade(() => ({
resource: noPersist(coal),
cost: 1e19,
display: {
title: "Efficient Crucibles",
description: "Double auto smelting speed and triple metal gain from auto smelting"
},
style: { color: colorText },
visibility: () => showIf(oil.depthMilestones[4].earned.value)
}));
const row3upgrades = [efficientSmelther];
const buildDrill = createBuyable(() => ({
resource: metal.metal,
cost() {
let v = this.amount.value;
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
if (Decimal.gte(v, 10000)) v = Decimal.pow(v, 2).div(10000);
v = Decimal.pow(0.95, paper.books.coalDrillBook.totalAmount.value).times(v);
let cost = Decimal.pow(1.15, v).times(10);
if (management.elfTraining.fertilizerElfTraining.milestones[2].earned.value) {
cost = cost.div(Decimal.add(trees.totalLogs.value, Math.E).ln());
}
if (management.elfTraining.coalDrillElfTraining.milestones[2].earned.value) {
cost = cost.div(10);
}
return cost;
},
inverseCost(x: DecimalSource) {
if (management.elfTraining.coalDrillElfTraining.milestones[2].earned.value) {
x = Decimal.mul(x, 10);
}
if (management.elfTraining.fertilizerElfTraining.milestones[2].earned.value) {
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));
if (Decimal.gte(v, 10000)) v = Decimal.mul(v, 10000).root(2);
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100).root(2);
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
},
display: jsx(() => (
<>
<h3>Coal Drill</h3>
<br />
Dig through the ground to find 50,000,000 coal
<br />
<br />
Currently:
<br />+{format(drillCoal.value)} coal/sec
<br />
<br />
Cost: {formatWhole(unref(buildDrill.cost!))} {buildDrill.resource.displayName}
</>
)),
onPurchase() {
activeDrills.value = Decimal.add(activeDrills.value, 1);
},
style: {
color: colorText,
width: "160px"
},
visibility: () => showIf(metal.coalDrill.bought.value)
})) as ElfBuyable & { resource: Resource };
const activeDrills = persistent<DecimalSource>(0)
const {
max: maxDrill,
min: minDrill,
add: addDrill,
remove: removeDrill
} = changeActiveBuyables({
buyable: buildDrill,
active: activeDrills
});
const heatedCutters = createBuyable(() => ({
resource: noPersist(coal),
cost() {
let v = this.amount.value;
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 2).div(50);
if (Decimal.gte(v, 200)) v = Decimal.pow(v, 2).div(200);
if (Decimal.gte(v, 2e6)) v = Decimal.pow(v, 2).div(2e6);
v = Decimal.pow(0.95, paper.books.heatedCuttersBook.totalAmount.value).times(v);
if (management.elfTraining.heatedCutterElfTraining.milestones[0].earned.value) {
v = Decimal.pow(0.95, paper.books.heatedCuttersBook.totalAmount.value).times(v);
}
v = v.div(wrappingPaper.boosts.rainbow1.value);
return Decimal.add(v, 1).pow(2.5).times(10);
},
inverseCost(x: DecimalSource) {
let v = Decimal.div(x, 10).root(2.5).sub(1);
v = v.mul(wrappingPaper.boosts.rainbow1.value);
if (management.elfTraining.heatedCutterElfTraining.milestones[0].earned.value) {
v = v.div(Decimal.pow(0.95, paper.books.heatedCuttersBook.totalAmount.value));
}
v = v.div(Decimal.pow(0.95, paper.books.heatedCuttersBook.totalAmount.value));
if (Decimal.gte(v, 2e6)) v = Decimal.mul(v, 2e6).root(2);
if (Decimal.gte(v, 200)) v = Decimal.mul(v, 200).root(2);
if (Decimal.gte(v, 50)) v = Decimal.mul(v, 50).root(2);
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
},
display: {
title: "Heated Cutters",
description: "Even warmer cutters cut down trees faster",
effectDisplay: jsx(() => (
<>Cutters cut down trees {format(computedHeatedCutterEffect.value)}x faster</>
))
},
style: { color: colorText },
visibility: () => showIf(warmerCutters.bought.value)
})) as ElfBuyable & { display: { title: string }; resource: Resource };
const heatedPlanters = createBuyable(() => ({
resource: noPersist(coal),
cost() {
let v = this.amount.value;
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 2).div(50);
if (Decimal.gte(v, 200)) v = Decimal.pow(v, 2).div(200);
if (Decimal.gte(v, 2e6)) v = Decimal.pow(v, 2).div(2e6);
v = Decimal.pow(0.95, paper.books.heatedPlantersBook.totalAmount.value).times(v);
if (management.elfTraining.heatedPlanterElfTraining.milestones[0].earned.value) {
v = Decimal.pow(0.95, paper.books.heatedPlantersBook.totalAmount.value).times(v);
}
v = v.div(wrappingPaper.boosts.rainbow1.value);
return Decimal.add(v, 1).pow(2.5).times(10);
},
inverseCost(x: DecimalSource) {
let v = Decimal.div(x, 10).root(2.5).sub(1);
v = v.mul(wrappingPaper.boosts.rainbow1.value);
if (management.elfTraining.heatedPlanterElfTraining.milestones[0].earned.value) {
v = v.div(Decimal.pow(0.95, paper.books.heatedPlantersBook.totalAmount.value));
}
v = v.div(Decimal.pow(0.95, paper.books.heatedPlantersBook.totalAmount.value));
if (Decimal.gte(v, 2e6)) v = Decimal.mul(v, 2e6).root(2);
if (Decimal.gte(v, 200)) v = Decimal.mul(v, 200).root(2);
if (Decimal.gte(v, 50)) v = Decimal.mul(v, 50).root(2);
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
},
display: {
title: "Heated Planters",
description: "Even warmer planters plant trees faster",
effectDisplay: jsx(() => (
<>Planters plant trees {format(computedHeatedPlanterEffect.value)}x faster</>
))
},
style: { color: colorText },
visibility: () => showIf(warmerPlanters.bought.value)
})) as ElfBuyable & { display: { title: string }; resource: Resource };
const moreFertilizer = createBuyable(() => ({
resource: noPersist(ash),
cost() {
let v = this.amount.value;
if (Decimal.gte(v, 50)) v = Decimal.pow(v, 2).div(50);
if (Decimal.gte(v, 200)) v = Decimal.pow(v, 2).div(200);
if (Decimal.gte(v, 2e6)) v = Decimal.pow(v, 2).div(2e6);
v = Decimal.pow(0.95, paper.books.fertilizerBook.totalAmount.value).times(v);
if (management.elfTraining.fertilizerElfTraining.milestones[1].earned.value) {
v = Decimal.pow(0.95, paper.books.fertilizerBook.totalAmount.value).times(v);
}
v = v.div(wrappingPaper.boosts.rainbow1.value);
return Decimal.add(v, 1).pow(1.5).times(50000);
},
inverseCost(x: DecimalSource) {
let v = Decimal.div(x, 50000).root(1.5).sub(1);
v = v.mul(wrappingPaper.boosts.rainbow1.value);
if (management.elfTraining.fertilizerElfTraining.milestones[0].earned.value) {
v = v.div(Decimal.pow(0.95, paper.books.fertilizerBook.totalAmount.value));
}
v = v.div(Decimal.pow(0.95, paper.books.fertilizerBook.totalAmount.value));
if (Decimal.gte(v, 2e6)) v = Decimal.mul(v, 2e6).root(2);
if (Decimal.gte(v, 200)) v = Decimal.mul(v, 200).root(2);
if (Decimal.gte(v, 50)) v = Decimal.mul(v, 50).root(2);
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
},
display: {
title: "Fertilized Soil",
description: "More fertilizer helps trees grow bigger",
effectDisplay: jsx(() => (
<>Trees give {format(computedFertilizerEffect.value)}x more logs</>
))
},
style: { color: colorText },
visibility: () => showIf(basicFertilizer.bought.value)
})) as ElfBuyable & { display: { title: string }; resource: Resource };
const row3buyables = [heatedCutters, heatedPlanters, moreFertilizer];
return {
buildFire,
activeFires,
buildBonfire,
activeBonfires,
buildKiln,
activeKilns,
minFire,
maxFire,
addFire,
removeFire,
minBonfire,
maxBonfire,
addBonfire,
removeBonfire,
minKiln,
maxKiln,
addKiln,
removeKiln,
row1upgrades,
row2upgrades,
row3upgrades,
unlockBonfire,
unlockKiln,
dedicatedCutters,
dedicatedPlanters,
betterFertilizer,
efficientSmelther,
warmerCutters,
warmerPlanters,
basicFertilizer,
activeDrills,
buildDrill,
minDrill,
maxDrill,
addDrill,
removeDrill,
coal,
ash,
heatedCutters,
heatedPlanters,
moreFertilizer,
row3buyables,
}
})()
return {
name,
color: colorCoal,
@ -1028,7 +1511,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
{render(trackerDisplay)}
<Spacer />
<MainDisplay
resource={coal}
resource={main.isMastery.value ? mastery.coal : coal}
color={colorCoal}
style={{ marginBottom: 0 }}
resourceStyle={{ textShadow: "grey 0px 0px 10px" }}
@ -1040,7 +1523,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
/>
<Spacer />
<MainDisplay
resource={ash}
resource={main.isMastery.value ? mastery.ash : ash}
color={colorAsh}
style="margin-bottom: 0"
effectDisplay={
@ -1052,36 +1535,36 @@ const layer = createLayer(id, function (this: BaseLayer) {
<Spacer />
<Row>
<Column>
{render(buildFire)}
{render(main.isMastery.value ? mastery.buildFire : buildFire)}
<div>
{formatWhole(Decimal.floor(activeFires.value))}/
{formatWhole(Decimal.floor(buildFire.amount.value))}
{formatWhole(Decimal.floor(main.isMastery ? mastery.activeFires.value : activeFires.value))}/
{formatWhole(Decimal.floor(main.isMastery ? mastery.buildFire.amount.value : buildFire.amount.value))}
</div>
{renderRow(minFire, removeFire, addFire, maxFire)}
{renderRow(... main.isMastery.value ? [mastery.minFire, mastery.removeFire, mastery.addFire, mastery.maxFire] : [minFire, removeFire, addFire, maxFire])}
</Column>
{unlockBonfire.bought.value ? (
{(main.isMastery.value ? mastery.unlockBonfire.bought.value : unlockBonfire.bought.value) ? (
<>
<Spacer />
<Column>
{render(buildBonfire)}
<div>
{formatWhole(activeBonfires.value)}/
{formatWhole(buildBonfire.amount.value)}
{formatWhole(main.isMastery.value ? mastery.activeBonfires.value : activeBonfires.value)}/
{formatWhole(main.isMastery.value ? mastery.buildBonfire.amount.value : buildBonfire.amount.value)}
</div>
{renderRow(minBonfire, removeBonfire, addBonfire, maxBonfire)}
{renderRow(...main.isMastery.value ? [mastery.minBonfire, mastery.removeBonfire, mastery.addBonfire, mastery.maxBonfire] : [minBonfire, removeBonfire, addBonfire, maxBonfire] )}
</Column>
</>
) : undefined}
{unlockKiln.bought.value ? (
{(main.isMastery.value ? mastery.unlockKiln.bought.value : unlockKiln.bought.value) ? (
<>
<Spacer />
<Column>
{render(buildKiln)}
{render(main.isMastery.value ? mastery.buildKiln : buildKiln)}
<div>
{formatWhole(activeKilns.value)}/
{formatWhole(buildKiln.amount.value)}
{formatWhole(main.isMastery.value ? mastery.activeKilns.value : activeKilns.value)}/
{formatWhole(main.isMastery.value ? mastery.buildKiln.amount.value : buildKiln.amount.value)}
</div>
{renderRow(minKiln, removeKiln, addKiln, maxKiln)}
{renderRow(...main.isMastery.value ? [mastery.minKiln, mastery.removeKiln, mastery.addKiln, mastery.maxKiln] : [minKiln, removeKiln, addKiln, maxKiln])}
</Column>
</>
) : undefined}
@ -1089,24 +1572,24 @@ const layer = createLayer(id, function (this: BaseLayer) {
<>
<Spacer />
<Column>
{render(buildDrill)}
{render(main.isMastery.value ? mastery.buildDrill : buildDrill)}
<div>
{formatWhole(activeDrills.value)}/
{formatWhole(buildDrill.amount.value)}
{formatWhole(main.isMastery.value ? mastery.activeDrills.value : activeDrills.value)}/
{formatWhole(main.isMastery.value ? mastery.buildDrill.amount.value : buildDrill.amount.value)}
</div>
{renderRow(minDrill, removeDrill, addDrill, maxDrill)}
{renderRow(...main.isMastery.value ? [mastery.minDrill, mastery.removeDrill, mastery.addDrill, mastery.maxDrill] : [minDrill, removeDrill, addDrill, maxDrill])}
</Column>
</>
) : undefined}
</Row>
<Spacer />
{renderGrid(row1upgrades, row2upgrades, row3upgrades)}
{renderRow(...row3buyables)}
{renderGrid(...main.isMastery.value ? [mastery.row1upgrades, mastery.row2upgrades, mastery.row3upgrades] : [row1upgrades, row2upgrades, row3upgrades] )}
{renderRow(...main.isMastery.value ? mastery.row3buyables : row3buyables)}
</>
)),
minimizedDisplay: jsx(() => (
<div>
{name} - {format(coal.value)} {coal.displayName}
{name} - {format(main.isMastery.value ? mastery.coal.value : coal.value)} {coal.displayName}
</div>
))
};

View file

@ -33,6 +33,7 @@ import wrappingPaper from "./wrapping-paper";
import paper from "./paper";
import boxes from "./boxes";
import { ElfBuyable } from "./elves";
import { main } from "../projEntry"
interface Dye {
name: string;
@ -143,7 +144,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.add(cloth.cloth.value, Math.E).ln(),
description: "Gingersnap Level 1",
enabled: management.elfTraining.clothElfTraining.milestones[0].earned
enabled: () => management.elfTraining.clothElfTraining.milestones[0].earned.value && !main.isMastery.value
}))
);
modifiers.push(
@ -171,7 +172,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: 2,
description: "Gingersnap Level 3",
enabled: management.elfTraining.clothElfTraining.milestones[2].earned
enabled: () => management.elfTraining.clothElfTraining.milestones[2].earned.value && !main.isMastery.value
}))
);
modifiers.push(

View file

@ -93,17 +93,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.add(oil.buildHeavy.amount.value, 1).sqrt(),
description: "Joy Level 4",
enabled: management.elfTraining.smallfireElfTraining.milestones[3].earned
enabled: () => management.elfTraining.smallfireElfTraining.milestones[3].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.add(management.schools.amount.value, 1),
description: "Twinkle Level 1",
enabled: management.elfTraining.metalElfTraining.milestones[0].earned
enabled: () => management.elfTraining.metalElfTraining.milestones[0].earned.value && !main.isMastery.value
})),
createExponentialModifier(() => ({
exponent: 1.1,
description: "Mary Level 2",
enabled: management.elfTraining.heatedPlanterElfTraining.milestones[1].earned
enabled: () => management.elfTraining.heatedPlanterElfTraining.milestones[1].earned.value && !main.isMastery.value
}))
]);
const computedOrePurity = computed(() => orePurity.apply(0.1));
@ -117,17 +117,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
createExponentialModifier(() => ({
exponent: 1.1,
description: "Joy Level 5",
enabled: management.elfTraining.smallfireElfTraining.milestones[4].earned
enabled: () => management.elfTraining.smallfireElfTraining.milestones[4].earned.value && !main.isMastery.value
})),
createExponentialModifier(() => ({
exponent: 1.1,
description: "Faith Level 5",
enabled: management.elfTraining.bonfireElfTraining.milestones[4].earned
enabled: () => management.elfTraining.bonfireElfTraining.milestones[4].earned.value && !main.isMastery.value
})),
createExponentialModifier(() => ({
exponent: 1.1,
description: "Snowball Level 5",
enabled: management.elfTraining.kilnElfTraining.milestones[4].earned
enabled: () => management.elfTraining.kilnElfTraining.milestones[4].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
@ -153,13 +153,13 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.div(management.totalElfExp.value, 1e6).add(1).sqrt(),
description: "Mary Level 5",
enabled: management.elfTraining.heatedPlanterElfTraining.milestones[4].earned
enabled: () => management.elfTraining.heatedPlanterElfTraining.milestones[4].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: () =>
Decimal.pow(1.25, management.elfTraining.metalElfTraining.level.value),
description: "Twinkle Level 2",
enabled: management.elfTraining.metalElfTraining.milestones[1].earned
enabled: () => management.elfTraining.metalElfTraining.milestones[1].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: () =>
@ -187,7 +187,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: 3,
description: "Twinkle Level 3",
enabled: management.elfTraining.metalElfTraining.milestones[2].earned
enabled: () => management.elfTraining.metalElfTraining.milestones[2].earned.value && !main.isMastery.value
}))
]);
const computedAutoSmeltMulti = computed(() => autoSmeltMulti.apply(1));

View file

@ -847,12 +847,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.add(totalOil.value, 1).log10().add(1),
description: "Cocoa Level 2",
enabled: management.elfTraining.oilElfTraining.milestones[1].earned
enabled: () => management.elfTraining.oilElfTraining.milestones[1].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
description: "Cocoa Level 3",
enabled: management.elfTraining.oilElfTraining.milestones[2].earned
enabled: () => management.elfTraining.oilElfTraining.milestones[2].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: () => coalEffectiveness.value,
@ -906,17 +906,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.sqrt(management.totalElfLevels.value),
description: "Jack Level 4",
enabled: management.elfTraining.heatedCutterElfTraining.milestones[3].earned
enabled: () => management.elfTraining.heatedCutterElfTraining.milestones[3].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.add(buildHeavy2.amount.value, 1).sqrt(),
description: "Faith Level 4",
enabled: management.elfTraining.bonfireElfTraining.milestones[3].earned
enabled: () => management.elfTraining.bonfireElfTraining.milestones[3].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
description: "Cocoa Level 3",
enabled: management.elfTraining.oilElfTraining.milestones[2].earned
enabled: () => management.elfTraining.oilElfTraining.milestones[2].earned.value && !main.isMastery.value
}))
]) as WithRequired<Modifier, "description" | "revert">;
const computedOilSpeed = computed(() => oilSpeed.apply(0));

View file

@ -412,7 +412,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: 0.1,
description: "Star Level 2",
enabled: management.elfTraining.paperElfTraining.milestones[1].earned
enabled: () => management.elfTraining.paperElfTraining.milestones[1].earned.value && !main.isMastery.value
}))
]) as WithRequired<Modifier, "description" | "revert">;
const computedAshCost = computed(() => ashCost.apply(1e6));

View file

@ -280,7 +280,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.add(oil.buildExtractor.amount.value, 1).pow(1.25),
description: "Snowball Level 4",
enabled: management.elfTraining.kilnElfTraining.milestones[3].earned
enabled: () => management.elfTraining.kilnElfTraining.milestones[3].earned.value && !main.isMastery.value
}))
]);
const computedPlasticGain = computed(() => plasticGain.apply(0));

View file

@ -93,11 +93,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
createAdditiveModifier(() => ({
addend: () => Decimal.pow(computedManualCuttingAmount.value, 0.99),
description: "Hope Level 1",
enabled: management.elfTraining.expandersElfTraining.milestones[0].earned
enabled: () => management.elfTraining.expandersElfTraining.milestones[0].earned.value && !main.isMastery.value
}))
]) as WithRequired<Modifier, "description" | "revert">;
const trees = createResource(
computed(() => Decimal.sub(totalTrees.apply(10), main.isMastery.value ? mastery.saplings.value : saplings.value)),
computed(() => Decimal.sub(totalTrees.apply(10), saplings.value)),
"trees"
);
const computedTotalTrees = computed(() => totalTrees.apply(10));
@ -299,7 +299,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createAdditiveModifier(() => ({
addend: computedAutoCuttingAmount,
description: "Smart Knives",
enabled: manualCutUpgrade3.bought
enabled: main.isMastery.value ? mastery.manualCutUpgrade3.bought : manualCutUpgrade3.bought
}))
]);
const computedManualCuttingAmount = computed(() => manualCuttingAmount.apply(1));
@ -307,7 +307,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: 0.5,
description: "Sharper Fingers",
enabled: manualCutUpgrade2.bought
enabled: main.isMastery.value ? mastery.manualCutUpgrade2.bought : manualCutUpgrade2.bought
})),
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.pow(0.5, elves.totalElves.value),
@ -356,13 +356,13 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.pow(1.1, main.day.value),
description: "Holly Level 4",
enabled: management.elfTraining.cutterElfTraining.milestones[3].earned
enabled: () => management.elfTraining.cutterElfTraining.milestones[3].earned.value && !main.isMastery.value
})),
createAdditiveModifier(() => ({
addend: () =>
Decimal.sub(lastAutoPlantedAmount.value, lastAutoCuttingAmount.value).max(0),
description: "Ivy Level 5",
enabled: management.elfTraining.planterElfTraining.milestones[4].earned
enabled: () => management.elfTraining.planterElfTraining.milestones[4].earned.value && !main.isMastery.value
}))
]) as WithRequired<Modifier, "description" | "revert">;
const computedAutoCuttingAmount = computed(() => autoCuttingAmount.apply(0));
@ -371,12 +371,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
createAdditiveModifier(() => ({
addend: 1,
description: "Leafy Fingers",
enabled: manualPlantUpgrade1.bought
enabled: main.isMastery.value ? mastery.manualPlantUpgrade1.bought : manualPlantUpgrade1.bought
})),
createAdditiveModifier(() => ({
addend: computedAutoPlantingAmount,
description: "Smart Spades",
enabled: manualPlantUpgrade3.bought
enabled: main.isMastery.value ? mastery.manualPlantUpgrade3.bought : manualPlantUpgrade3.bought
}))
]);
const computedManualPlantingAmount = computed(() => manualPlantingAmount.apply(1));
@ -384,7 +384,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: 0.5,
description: "Greener Fingers",
enabled: manualPlantUpgrade2.bought
enabled: main.isMastery.value ? mastery.manualPlantUpgrade2.bought : manualPlantUpgrade2.bought
})),
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.pow(0.5, elves.totalElves.value),
@ -398,10 +398,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
createAdditiveModifier(() => ({
addend: 1,
description: "Automated Spade",
enabled: autoPlantUpgrade1.bought
enabled: main.isMastery.value ? mastery.autoPlantUpgrade1.bought : autoPlantUpgrade1.bought
})),
createAdditiveModifier(() => ({
addend: () => Decimal.div(autoPlantingBuyable1.amount.value, 2),
addend: () => Decimal.div(main.isMastery.value ? mastery.autoPlantingBuyable1.amount.value : autoPlantingBuyable1.amount.value, 2),
description: "Generic Planters",
enabled: researchUpgrade2.bought
})),
@ -433,23 +433,23 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: 2,
description: "Ivy Level 1",
enabled: management.elfTraining.planterElfTraining.milestones[0].earned
enabled: () => management.elfTraining.planterElfTraining.milestones[0].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.pow(trees.value, 0.2).max(1).log10().pow_base(2),
description: "Ivy Level 3",
enabled: management.elfTraining.planterElfTraining.milestones[2].earned
enabled: () => management.elfTraining.planterElfTraining.milestones[2].earned.value && !main.isMastery.value
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
description: "Mary Level 4",
enabled: management.elfTraining.heatedPlanterElfTraining.milestones[3].earned
enabled: () => management.elfTraining.heatedPlanterElfTraining.milestones[3].earned.value && !main.isMastery.value
})),
createAdditiveModifier(() => ({
addend: () =>
Decimal.sub(lastAutoCuttingAmount.value, lastAutoPlantedAmount.value).max(0),
description: "Ivy Level 5",
enabled: management.elfTraining.planterElfTraining.milestones[4].earned
enabled: () => management.elfTraining.planterElfTraining.milestones[4].earned.value && !main.isMastery.value
}))
]) as WithRequired<Modifier, "description" | "revert">;
const computedAutoPlantingAmount = computed(() => autoPlantingAmount.apply(0));
@ -458,12 +458,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: 1.25,
description: "Research I",
enabled: researchUpgrade1.bought
enabled: main.isMastery.value ? mastery.researchUpgrade1.bought : researchUpgrade1.bought
})),
createMultiplicativeModifier(() => ({
multiplier: 1.25,
description: "Research II",
enabled: researchUpgrade2.bought
enabled: main.isMastery.value ? mastery.researchUpgrade2.bought : researchUpgrade2.bought
})),
createMultiplicativeModifier(() => ({
multiplier: () =>
@ -518,12 +518,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMultiplicativeModifier(() => ({
multiplier: computed(() => Decimal.add(computedAutoCuttingAmount.value, 1).root(9)),
description: "Holly Level 1",
enabled: management.elfTraining.cutterElfTraining.milestones[0].earned
enabled () {
return management.elfTraining.cutterElfTraining.milestones[0].earned.value && !main.isMastery.value;
}
})),
createMultiplicativeModifier(() => ({
multiplier: () => Decimal.sqrt(management.totalElfLevels.value),
description: "Noel Level 1",
enabled: management.elfTraining.fertilizerElfTraining.milestones[0].earned
enabled () {
return management.elfTraining.fertilizerElfTraining.milestones[0].earned.value && !main.isMastery.value;
}
})),
createMultiplicativeModifier(() => ({
multiplier: wrappingPaper.boosts.christmas1,
@ -565,7 +569,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
minHeight: "80px"
},
canClick: () =>
Decimal.gte(trees.value, 1) &&
Decimal.gte((main.isMastery.value ? mastery.trees.value : trees.value), 1) &&
Decimal.gte(manualCutProgress.value, computedManualCuttingCooldown.value),
onClick() {
if (Decimal.lt(manualCutProgress.value, computedManualCuttingCooldown.value)) {
@ -573,7 +577,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
}
const amount = Decimal.floor(
Decimal.min(
trees.value,
main.isMastery.value ? mastery.trees.value : trees.value,
Decimal.times(
computedManualCuttingAmount.value,
Decimal.div(
@ -583,8 +587,13 @@ const layer = createLayer(id, function (this: BaseLayer) {
)
)
);
logs.value = Decimal.add(logs.value, Decimal.times(logGain.apply(1), amount));
saplings.value = Decimal.add(saplings.value, amount);
if (main.isMastery.value) {
mastery.logs.value = Decimal.add(mastery.logs.value, Decimal.times(logGain.apply(1), amount));
mastery.saplings.value = Decimal.add(Decimal.mul(mastery.saplings.value, 2), amount);
} else {
logs.value = Decimal.add(logs.value, Decimal.times(logGain.apply(1), amount));
saplings.value = Decimal.add(saplings.value, amount);
}
manualCutProgress.value = 0;
}
}));
@ -616,7 +625,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
minHeight: "80px"
},
canClick: () =>
Decimal.gte(saplings.value, 1) &&
Decimal.gte(main.isMastery.value ? mastery.saplings.value : saplings.value, 1) &&
Decimal.gte(manualPlantProgress.value, computedManualPlantingCooldown.value),
onClick() {
if (Decimal.lt(manualPlantProgress.value, computedManualPlantingCooldown.value)) {
@ -624,7 +633,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
}
const amount = Decimal.floor(
Decimal.min(
saplings.value,
main.isMastery.value ? mastery.saplings.value : saplings.value,
Decimal.times(
computedManualPlantingAmount.value,
Decimal.div(
@ -634,7 +643,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
)
)
);
saplings.value = Decimal.sub(saplings.value, amount);
if (main.isMastery.value) {
mastery.saplings.value = Decimal.sub(mastery.saplings.value, amount);
} else {
saplings.value = Decimal.sub(saplings.value, amount);
}
manualPlantProgress.value = 0;
}
}));
@ -644,55 +657,55 @@ const layer = createLayer(id, function (this: BaseLayer) {
title: "Logs per Tree",
modifier: logGain,
base: 1,
visible: researchUpgrade1.bought
visible: main.isMastery.value ? mastery.researchUpgrade1.bought : researchUpgrade1.bought
},
{
title: "Manual Cutting Amount",
modifier: manualCuttingAmount,
base: 1,
visible: manualCutUpgrade1.bought,
visible: main.isMastery.value ? mastery.manualCutUpgrade1.bought : manualCutUpgrade1.bought,
unit: "/click"
},
{
title: "Manual Cutting Cooldown",
modifier: manualCuttingCooldown,
base: 1,
visible: manualCutUpgrade1.bought,
visible: main.isMastery.value ? mastery.manualCutUpgrade1.bought : manualCutUpgrade1.bought,
unit: "s"
},
{
title: "Manual Planting Amount",
modifier: manualPlantingAmount,
base: 1,
visible: manualPlantUpgrade1.bought,
visible: main.isMastery.value ? mastery.manualPlantUpgrade1.bought : manualPlantUpgrade1.bought,
unit: "/click"
},
{
title: "Manual Planting Cooldown",
modifier: manualPlantingCooldown,
base: 1,
visible: manualPlantUpgrade1.bought,
visible: main.isMastery.value ? mastery.manualPlantUpgrade1.bought : manualPlantUpgrade1.bought,
unit: "s"
},
{
title: `Auto Cutting Amount`,
modifier: autoCuttingAmount,
base: 0,
visible: autoCutUpgrade1.bought,
visible: main.isMastery.value ? mastery.autoCutUpgrade1.bought : autoCutUpgrade1.bought,
unit: "/s"
},
{
title: `Auto Planting Amount`,
modifier: autoPlantingAmount,
base: 0,
visible: autoPlantUpgrade1.bought,
visible: main.isMastery.value ? mastery.autoCutUpgrade1.bought : autoCutUpgrade1.bought,
unit: "/s"
},
{
title: `Forest Size`,
modifier: totalTrees,
base: 10,
visible: researchUpgrade2.bought
visible: main.isMastery.value ? mastery.researchUpgrade2.bought: researchUpgrade2.bought,
}
]);
const showModifiersModal = ref(false);
@ -741,7 +754,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
lastAutoCuttingAmount.value = Decimal.isNaN(cuttingAmount) ? 0 : cuttingAmount;
const amountCut = Decimal.min(
trees.value,
(main.isMastery ? mastery.trees.value : trees.value),
Decimal.times(computedAutoCuttingAmount.value, diff)
);
const logsGained = Decimal.mul(logGain.apply(1), amountCut);
@ -750,15 +763,22 @@ const layer = createLayer(id, function (this: BaseLayer) {
ema.value = Decimal.mul(effectiveLogsGained, SMOOTHING_FACTOR).add(
Decimal.mul(ema.value, Decimal.dOne.sub(SMOOTHING_FACTOR))
);
logs.value = Decimal.add(logs.value, logsGained);
saplings.value = Decimal.add(saplings.value, amountCut);
if (main.isMastery.value) {
mastery.logs.value = Decimal.add(mastery.logs.value, logsGained);
mastery.saplings.value = Decimal.add(Decimal.mul(mastery.saplings.value, 2), amountCut);
} else {
logs.value = Decimal.add(logs.value, logsGained);
saplings.value = Decimal.add(Decimal.mul(saplings.value, mastered ? 2 : 1), amountCut);
}
const amountPlanted = Decimal.min(
saplings.value,
Decimal.times(computedAutoPlantingAmount.value, diff)
);
saplings.value = Decimal.sub(saplings.value, amountPlanted);
if (main.isMastery.value) {
mastery.saplings.value = Decimal.sub(mastery.saplings.value, amountPlanted);
} else {
saplings.value = Decimal.sub(saplings.value, amountPlanted);
}
});
const netSaplingGain = computed(() =>
@ -938,15 +958,15 @@ const layer = createLayer(id, function (this: BaseLayer) {
if (Decimal.gte(v, 2e30)) v = Decimal.pow(v, 10).div(Decimal.pow(2e30, 9));
v = Decimal.pow(0.95, paper.books.plantersBook.totalAmount.value).times(v);
let cost = Decimal.times(100, v).add(200);
if (management.elfTraining.planterElfTraining.milestones[3].earned.value) {
/*if (management.elfTraining.planterElfTraining.milestones[3].earned.value) {
cost = Decimal.div(cost, 10);
}
}*/
return cost;
},
inverseCost(x: DecimalSource) {
if (management.elfTraining.planterElfTraining.milestones[3].earned.value) {
/*if (management.elfTraining.planterElfTraining.milestones[3].earned.value) {
x = Decimal.mul(x, 10);
}
}*/
let v = Decimal.sub(x, 200).div(100);
v = v.div(Decimal.pow(0.95, paper.books.plantersBook.totalAmount.value));
if (Decimal.gte(v, 2e30)) v = Decimal.mul(v, Decimal.pow(2e30, 9)).root(10);
@ -985,9 +1005,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
},
visibility: () => showIf(researchUpgrade2.bought.value)
})) as ElfBuyable & { display: { title: string }; resource: Resource };
const trees = createResource(
computed(() => Decimal.sub(totalTrees.apply(10), saplings.value)),
"trees"
);
return {
logs,
saplings,
trees,
manualCutUpgrade1,
manualCutUpgrade2,
manualCutUpgrade3,
@ -1057,7 +1082,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
productionDisplay={formatGain(netSaplingGain.value)}
/>
<MainDisplay
resource={trees}
resource={main.isMastery.value ? mastery.trees : trees}
color={colorDark}
style="margin-bottom: 0"
productionDisplay={formatGain(netTreeGain.value)}

View file

@ -22,7 +22,7 @@ import {
createMultiplicativeModifier,
createSequentialModifier
} from "game/modifiers";
import { noPersist } from "game/persistence";
import { noPersist, persistent } from "game/persistence";
import Decimal, { DecimalSource, format, formatWhole } from "util/bignum";
import { Direction } from "util/common";
import { render } from "util/vue";
@ -38,6 +38,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const name = "Workshop";
const color = "#D66B02";
const colorDark = "#D66B02";
const mastered = persistent<boolean>(false);
const foundationProgress = createResource<DecimalSource>(0, "foundation progress");
@ -50,7 +51,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createExponentialModifier(() => ({
exponent: 0.99,
description: "Holly Level 5",
enabled: management.elfTraining.cutterElfTraining.milestones[4].earned
enabled: () => management.elfTraining.cutterElfTraining.milestones[4].earned.value && !main.isMastery.value
}))
])
@ -76,17 +77,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
display: jsx(() => (
<>
<b style="font-size: x-large">
Build {formatWhole(foundationConversion.actualGain.value)}% of the foundation
Build {formatWhole((main.isMastery.value ? mastery.foundationConversion : foundationConversion).actualGain.value)}% of the foundation
</b>
<br />
<br />
<span style="font-size: large">
Cost:{" "}
{main.isMastery.value || mastered ? "Requirement" : "Cost"}:{" "}
{displayResource(
trees.logs,
Decimal.gte(foundationConversion.actualGain.value, 1)
? foundationConversion.currentAt.value
: foundationConversion.nextAt.value
main.isMastery.value ? trees.mastery.logs : trees.logs,
Decimal.gte((main.isMastery.value ? mastery.foundationConversion : foundationConversion).actualGain.value, 1)
? (main.isMastery.value ? mastery.foundationConversion : foundationConversion).currentAt.value
: (main.isMastery.value ? mastery.foundationConversion : foundationConversion).nextAt.value
)}{" "}
{trees.logs.displayName}
</span>
@ -94,18 +95,18 @@ const layer = createLayer(id, function (this: BaseLayer) {
)),
visibility: () =>
showIf(
Decimal.lt(foundationProgress.value, 100) ||
Decimal.lt(main.isMastery.value ? mastery.foundationProgress.value : foundationProgress.value, 100) ||
management.elfTraining.expandersElfTraining.milestones[2].earned.value
),
canClick: () =>
Decimal.gte(trees.logs.value, foundationConversion.nextAt.value) &&
Decimal.gte((main.isMastery.value ? trees.mastery.logs.value : trees.logs.value), (main.isMastery.value ? mastery.foundationConversion : foundationConversion).nextAt.value) &&
(Decimal.lt(foundationProgress.value, 100) ||
management.elfTraining.expandersElfTraining.milestones[2].earned.value),
onClick() {
if (!unref(this.canClick)) {
return;
}
foundationConversion.convert();
(main.isMastery.value ? mastery.foundationConversion : foundationConversion).convert();
},
style: "width: 600px; min-height: unset"
}));
@ -285,12 +286,204 @@ const layer = createLayer(id, function (this: BaseLayer) {
)
}));
watchEffect(() => {
if (main.day.value === day && Decimal.gte(foundationProgress.value, 100)) {
main.completeDay();
}
});
const mastery = (() => {
const foundationProgress = createResource<DecimalSource>(0, "foundation progress");
const foundationConversion = createIndependentConversion(() => ({
scaling: addSoftcap(
addSoftcap(createPolynomialScaling(
addScaling(250), 1.5), addScaling(5423), 1 / 1e10),
addScaling(1e20),
3e8
),
baseResource: trees.logs,
gainResource: noPersist(foundationProgress),
roundUpCost: true,
// buyMax: management.elfTraining.expandersElfTraining.milestones[2].earned,
spend(gain, spent) {}
}));
const logGainMilestone1 = createMilestone(() => ({
display: {
requirement: "1% Foundation Completed",
effectDisplay: "Trees give 5% more logs for each % of foundation completed"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 1),
showPopups: shouldShowPopups
}));
const autoCutMilestone1 = createMilestone(() => ({
display: {
requirement: "10% Foundation Completed",
effectDisplay: "Cut an additional tree per second for each 5% of foundation completed"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 10),
visibility: () => showIf(logGainMilestone1.earned.value),
showPopups: shouldShowPopups
}));
const autoPlantMilestone1 = createMilestone(() => ({
display: {
requirement: "20% Foundation Completed",
effectDisplay:
"Plant an additional tree per second for each 10% of foundation completed"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 20),
visibility: () => showIf(autoCutMilestone1.earned.value),
showPopups: shouldShowPopups
}));
const autoCutMilestone2 = createMilestone(() => ({
display: {
requirement: "30% Foundation Completed",
effectDisplay: "All automatic tree cutting is doubled"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 30),
visibility: () => showIf(autoPlantMilestone1.earned.value),
showPopups: shouldShowPopups
}));
const autoPlantMilestone2 = createMilestone(() => ({
display: {
requirement: "40% Foundation Completed",
effectDisplay: "All automatic tree planting is doubled"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 40),
visibility: () => showIf(autoCutMilestone2.earned.value),
showPopups: shouldShowPopups
}));
const logGainMilestone2 = createMilestone(() => ({
display: {
requirement: "50% Foundation Completed",
effectDisplay: "Trees give twice as many logs"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 50),
visibility: () => showIf(autoPlantMilestone2.earned.value),
showPopups: shouldShowPopups
}));
const morePlantsMilestone1 = createMilestone(() => ({
display: {
requirement: "75% Foundation Completed",
effectDisplay: "The forest gains an extra tree for every 2% of foundation completed"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 75),
visibility: () => showIf(logGainMilestone2.earned.value),
showPopups: shouldShowPopups
}));
const logGainMilestone3 = createMilestone(() => ({
display: {
requirement: "100% Foundation Completed",
effectDisplay: "Log per tree is raised to the 1.2th power"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 100),
visibility: () => showIf(morePlantsMilestone1.earned.value),
showPopups: shouldShowPopups
}));
const extraExpansionMilestone1 = createMilestone(() => ({
display: {
requirement: "200% Foundation Completed",
effectDisplay: "The 1% milestone is now +2% and multiplicative"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 200),
visibility: () =>
showIf(
logGainMilestone3.earned.value &&
management.elfTraining.expandersElfTraining.milestones[2].earned.value
),
showPopups: shouldShowPopups
}));
const extraExpansionMilestone2 = createMilestone(() => ({
display: {
requirement: "400% Foundation Completed",
effectDisplay: "Gain +10% metal for every 10% foundation completed"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 400),
visibility: () =>
showIf(
extraExpansionMilestone1.earned.value &&
management.elfTraining.expandersElfTraining.milestones[2].earned.value
),
showPopups: shouldShowPopups
}));
const extraExpansionMilestone3 = createMilestone(() => ({
display: {
requirement: "600% Foundation Completed",
effectDisplay: "Gain +10% oil for every 10% foundation completed"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 600),
visibility: () =>
showIf(
extraExpansionMilestone2.earned.value &&
management.elfTraining.expandersElfTraining.milestones[2].earned.value
),
showPopups: shouldShowPopups
}));
const extraExpansionMilestone4 = createMilestone(() => ({
display: {
requirement: "800% Foundation Completed",
effectDisplay: "Gain +10% plastic for every 10% foundation completed"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 800),
visibility: () =>
showIf(
extraExpansionMilestone3.earned.value &&
management.elfTraining.expandersElfTraining.milestones[2].earned.value
),
showPopups: shouldShowPopups
}));
const extraExpansionMilestone5 = createMilestone(() => ({
display: {
requirement: "1000% Foundation Completed",
effectDisplay: "Double paper, boxes, and all cloth actions"
},
shouldEarn: () => Decimal.gte(foundationProgress.value, 1000),
visibility: () =>
showIf(
extraExpansionMilestone4.earned.value &&
management.elfTraining.expandersElfTraining.milestones[2].earned.value
),
showPopups: shouldShowPopups
}));
const milestones = {
logGainMilestone1,
autoCutMilestone1,
autoPlantMilestone1,
autoCutMilestone2,
autoPlantMilestone2,
logGainMilestone2,
morePlantsMilestone1,
logGainMilestone3,
extraExpansionMilestone1,
extraExpansionMilestone2,
extraExpansionMilestone3,
extraExpansionMilestone4,
extraExpansionMilestone5
};
const { collapseMilestones, display: milestonesDisplay } =
createCollapsibleMilestones(milestones);
return {
foundationProgress,
foundationConversion,
milestones,
collapseMilestones,
milestonesDisplay,
logGainMilestone1,
autoCutMilestone1,
autoPlantMilestone1,
autoCutMilestone2,
autoPlantMilestone2,
logGainMilestone2,
morePlantsMilestone1,
logGainMilestone3,
extraExpansionMilestone1,
extraExpansionMilestone2,
extraExpansionMilestone3,
extraExpansionMilestone4,
extraExpansionMilestone5
}
})()
return {
name,
day,
@ -301,6 +494,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
collapseMilestones,
minWidth: 700,
buildFoundationHK,
mastery,
display: jsx(() => (
<>
<div>
@ -313,7 +507,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
<div>
<span>The foundation is </span>
<h2 style={`color: ${color}; text-shadow: 0 0 10px ${color}`}>
{formatWhole(foundationProgress.value)}
{formatWhole(main.isMastery.value ? mastery.foundationProgress.value : foundationProgress.value)}
</h2>
% completed
</div>
@ -323,7 +517,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
) : null}
{render(buildFoundation)}
<Spacer />
{milestonesDisplay()}
{(main.isMastery.value ? mastery.milestonesDisplay : milestonesDisplay)()}
</>
)),
minimizedDisplay: jsx(() => (