Merge branch 'day-18-toy-factory' of https://github.com/thepaperpilot/Advent-Incremental into day-18-toy-factory

This commit is contained in:
unsoftcapped3 2022-12-22 02:46:09 +00:00
commit a58c3b682b
10 changed files with 130 additions and 74 deletions

View file

@ -8,7 +8,7 @@ import { globalBus } from "game/events";
import { createLayer } from "game/layers"; import { createLayer } from "game/layers";
import { Persistent, persistent, State } from "game/persistence"; import { Persistent, persistent, State } from "game/persistence";
import player from "game/player"; import player from "game/player";
import { formatWhole } from "util/bignum"; import Decimal, { formatWhole } from "util/bignum";
import { Direction } from "util/common"; import { Direction } from "util/common";
import { computed, ComputedRef, reactive, ref, watchEffect } from "vue"; import { computed, ComputedRef, reactive, ref, watchEffect } from "vue";
import conveyor from "./factory-components/conveyor.png"; import conveyor from "./factory-components/conveyor.png";
@ -74,6 +74,16 @@ const factory = createLayer(id, () => {
const name = "The Factory"; const name = "The Factory";
const color = "grey"; const color = "grey";
const energy = computed(() => 100);
const energyConsumption = computed(() =>
Object.values(components.value)
.map(c => FACTORY_COMPONENTS[c.type].energyCost ?? 0)
.reduce((a, b) => a + b, 0)
);
const tickRate = computed(() =>
Decimal.div(energyConsumption.value, energy.value).pow(2).min(1)
);
// ---------------------------------------------- Components // ---------------------------------------------- Components
const FACTORY_COMPONENTS = { const FACTORY_COMPONENTS = {
@ -93,6 +103,7 @@ const factory = createLayer(id, () => {
imageSrc: conveyor, imageSrc: conveyor,
name: "Conveyor", name: "Conveyor",
description: "Moves items at 1 block per second.", description: "Moves items at 1 block per second.",
energyCost: 1,
tick: 1, tick: 1,
ports: { ports: {
[Direction.Left]: { [Direction.Left]: {
@ -107,6 +118,7 @@ const factory = createLayer(id, () => {
imageSrc: wood, imageSrc: wood,
name: "Wood Machine", name: "Wood Machine",
description: "Produces 1 wood every 1 second.", description: "Produces 1 wood every 1 second.",
energyCost: 10,
tick: 1, tick: 1,
outputs: { outputs: {
wood: { wood: {
@ -114,11 +126,22 @@ const factory = createLayer(id, () => {
} }
} }
}, },
receiver: {
blocks: { imageSrc: square,
imageSrc: blocks, name: "Receiver",
name: "Wooden Block Maker", description: "Obtains squares. Pretty much does nothing else.",
description: "Turns 1 wood into 1 wooden block every second.", tick: 0,
inputs: {
square: {
amount: Infinity
}
}
},
shrinker: {
imageSrc: square,
name: "Shrinker",
description:
"Converts 100 squares to 1 square. I don't know why you would want to do this but here you go anyways.",
tick: 1, tick: 1,
inputs: { inputs: {
wood: { wood: {
@ -165,6 +188,7 @@ const factory = createLayer(id, () => {
imageSrc: string; imageSrc: string;
name: string; name: string;
description: string; description: string;
energyCost?: number;
/** amount it consumes */ /** amount it consumes */
inputs?: Record< inputs?: Record<
@ -295,6 +319,9 @@ const factory = createLayer(id, () => {
globalBus.on("update", diff => { globalBus.on("update", diff => {
if (!loaded) return; if (!loaded) return;
const factoryTicks = tickRate.value.times(diff).toNumber();
//debugger //debugger
// make them produce // make them produce
for (const id in components.value) { for (const id in components.value) {
@ -348,7 +375,8 @@ const factory = createLayer(id, () => {
key--; key--;
} else { } else {
const change = const change =
dirAmt * Math.min(Math.abs(x + 1.3 * dirAmt - block.x), diff); dirAmt *
Math.min(Math.abs(x + 1.3 * dirAmt - block.x), factoryTicks);
block.x += change; block.x += change;
block.sprite.x += change * blockSize; block.sprite.x += change * blockSize;
} }
@ -382,7 +410,8 @@ const factory = createLayer(id, () => {
key--; key--;
} else { } else {
const change = const change =
dirAmt * Math.min(Math.abs(y + 1.3 * dirAmt - block.y), diff); dirAmt *
Math.min(Math.abs(y + 1.3 * dirAmt - block.y), factoryTicks);
block.y += change; block.y += change;
block.sprite.y += change * blockSize; block.sprite.y += change * blockSize;
} }
@ -412,7 +441,7 @@ const factory = createLayer(id, () => {
data.ticksDone -= cyclesDone * factoryData.tick; data.ticksDone -= cyclesDone * factoryData.tick;
} }
} else { } else {
data.ticksDone += diff; data.ticksDone += factoryTicks;
} }
// now look at each component direction and see if it accepts items coming in // now look at each component direction and see if it accepts items coming in
// components are 1x1 so simple math for now // components are 1x1 so simple math for now

View file

@ -68,6 +68,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
style: { style: {
minHeight: "80px" minHeight: "80px"
}, },
visibility: () => showIf(Decimal.lt(totalLetters.value, 8e9)),
canClick: () => canClick: () =>
Decimal.gte(processingProgress.value, computedProcessingCooldown.value) && Decimal.gte(processingProgress.value, computedProcessingCooldown.value) &&
(!main.isMastery.value || masteryEffectActive.value), (!main.isMastery.value || masteryEffectActive.value),
@ -338,10 +339,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
) : null} ) : null}
<MainDisplay resource={letters} color={color} /> <MainDisplay resource={letters} color={color} />
{render(process)} {render(process)}
{Decimal.lt(totalLetters.value, 8e9) ? (
<div> <div>
The more letters you process, the more you'll improve at processing letters. The more letters you process, the more you'll improve at processing letters.
</div>
<div>Currently: {format(synergy.value)}x</div> <div>Currently: {format(synergy.value)}x</div>
</div>
) : (
<div>You've processed all of humanity's letters to Santa!</div>
)}
<Spacer /> <Spacer />
{renderRow(...Object.values(buyables))} {renderRow(...Object.values(buyables))}
<Spacer /> <Spacer />

View file

@ -311,7 +311,7 @@ const layer = createLayer(id, () => {
effectDisplay: jsx(() => ( effectDisplay: jsx(() => (
<> <>
Multiply log gain by <sup>9</sup> Multiply log gain by <sup>9</sup>
<Sqrt>Cutter amount</Sqrt>. <Sqrt>Cutter amount</Sqrt>
</> </>
)) ))
}, },
@ -320,7 +320,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Holly Level 2", requirement: "Holly Level 2",
effectDisplay: "Holly now buys max." effectDisplay: "Holly now buys max"
}, },
visibility: () => showIf(cutterElfMilestones[0].earned.value), visibility: () => showIf(cutterElfMilestones[0].earned.value),
shouldEarn: () => cutterElfTraining.level.value >= 2 shouldEarn: () => cutterElfTraining.level.value >= 2
@ -330,8 +330,7 @@ const layer = createLayer(id, () => {
requirement: "Holly Level 3", requirement: "Holly Level 3",
effectDisplay: jsx(() => ( effectDisplay: jsx(() => (
<> <>
Multiply all cloth actions' effectiveness by log<sub>10</sub>(Cutter Multiply all cloth actions' effectiveness by log<sub>10</sub>(Cutter amount)
amount).
</> </>
)) ))
}, },
@ -349,7 +348,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Holly Level 5", requirement: "Holly Level 5",
effectDisplay: "Unlock an elf that autobuys oil drills and extractors." effectDisplay: "Unlock an elf that autobuys oil drills and extractors"
}, },
visibility: () => showIf(cutterElfMilestones[3].earned.value && main.day.value >= 13), visibility: () => showIf(cutterElfMilestones[3].earned.value && main.day.value >= 13),
shouldEarn: () => cutterElfTraining.level.value >= 5, shouldEarn: () => cutterElfTraining.level.value >= 5,
@ -362,14 +361,14 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Ivy Level 1", requirement: "Ivy Level 1",
effectDisplay: "Planters are now twice as efficent." effectDisplay: "Planters are now twice as efficent"
}, },
shouldEarn: () => planterElfTraining.level.value >= 1 shouldEarn: () => planterElfTraining.level.value >= 1
})), })),
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Ivy Level 2", requirement: "Ivy Level 2",
effectDisplay: "Ivy now buys max." effectDisplay: "Ivy now buys max"
}, },
visibility: () => showIf(planterElfMilestones[0].earned.value), visibility: () => showIf(planterElfMilestones[0].earned.value),
shouldEarn: () => planterElfTraining.level.value >= 2 shouldEarn: () => planterElfTraining.level.value >= 2
@ -418,7 +417,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Hope Level 2", requirement: "Hope Level 2",
effectDisplay: "Hope now buys max." effectDisplay: "Hope now buys max"
}, },
visibility: () => showIf(expanderElfMilestones[0].earned.value), visibility: () => showIf(expanderElfMilestones[0].earned.value),
shouldEarn: () => expandersElfTraining.level.value >= 2 shouldEarn: () => expandersElfTraining.level.value >= 2
@ -426,7 +425,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Hope Level 3", requirement: "Hope Level 3",
effectDisplay: "The workshop can be expanded past 100%, but costs scale faster." effectDisplay: "The workshop can be expanded past 100%, but costs scale faster"
}, },
visibility: () => showIf(expanderElfMilestones[1].earned.value), visibility: () => showIf(expanderElfMilestones[1].earned.value),
shouldEarn: () => expandersElfTraining.level.value >= 3 shouldEarn: () => expandersElfTraining.level.value >= 3
@ -434,7 +433,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Hope Level 4", requirement: "Hope Level 4",
effectDisplay: "Unlock an elf that autobuys coal drills." effectDisplay: "Unlock an elf that autobuys coal drills"
}, },
visibility: () => showIf(expanderElfMilestones[2].earned.value && main.day.value >= 13), visibility: () => showIf(expanderElfMilestones[2].earned.value && main.day.value >= 13),
shouldEarn: () => expandersElfTraining.level.value >= 4, shouldEarn: () => expandersElfTraining.level.value >= 4,
@ -455,7 +454,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Jack Level 1", requirement: "Jack Level 1",
effectDisplay: '"Fahrenheit 451" affects "Heated Cutters" twice.' effectDisplay: '"Fahrenheit 451" affects "Heated Cutters" twice'
}, },
shouldEarn: () => heatedCutterElfTraining.level.value >= 1 shouldEarn: () => heatedCutterElfTraining.level.value >= 1
})), })),
@ -470,7 +469,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Jack Level 3", requirement: "Jack Level 3",
effectDisplay: "Jack and Joy now buy max." effectDisplay: "Jack and Joy now buy max"
}, },
visibility: () => showIf(heatedCutterElfMilestones[1].earned.value), visibility: () => showIf(heatedCutterElfMilestones[1].earned.value),
shouldEarn: () => heatedCutterElfTraining.level.value >= 3 shouldEarn: () => heatedCutterElfTraining.level.value >= 3
@ -480,7 +479,7 @@ const layer = createLayer(id, () => {
requirement: "Jack Level 4", requirement: "Jack Level 4",
effectDisplay: jsx(() => ( effectDisplay: jsx(() => (
<> <>
Oil gain is multiplied by <Sqrt>total elf levels</Sqrt>. Oil gain is multiplied by <Sqrt>total elf levels</Sqrt>
</> </>
)) ))
}, },
@ -491,7 +490,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Jack Level 5", requirement: "Jack Level 5",
effectDisplay: "Unlock an elf that autobuys oil-using machines." effectDisplay: "Unlock an elf that autobuys oil-using machines"
}, },
visibility: () => visibility: () =>
showIf(heatedCutterElfMilestones[3].earned.value && main.day.value >= 13), showIf(heatedCutterElfMilestones[3].earned.value && main.day.value >= 13),
@ -505,14 +504,14 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Mary Level 1", requirement: "Mary Level 1",
effectDisplay: `"Tillamook Burn Country" affects "Heated Planters" twice.` effectDisplay: `"Tillamook Burn Country" affects "Heated Planters" twice`
}, },
shouldEarn: () => heatedPlanterElfTraining.level.value >= 1 shouldEarn: () => heatedPlanterElfTraining.level.value >= 1
})), })),
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Mary Level 2", requirement: "Mary Level 2",
effectDisplay: "Metal gain is raised to the 1.1." effectDisplay: "Metal gain is raised to the 1.1"
}, },
visibility: () => showIf(heatedPlanterElfMilestones[0].earned.value), visibility: () => showIf(heatedPlanterElfMilestones[0].earned.value),
shouldEarn: () => heatedPlanterElfTraining.level.value >= 2 shouldEarn: () => heatedPlanterElfTraining.level.value >= 2
@ -520,7 +519,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Mary Level 3", requirement: "Mary Level 3",
effectDisplay: "Mary, Noel, and Faith now buy max." effectDisplay: "Mary, Noel, and Faith now buy max"
}, },
visibility: () => showIf(heatedPlanterElfMilestones[1].earned.value), visibility: () => showIf(heatedPlanterElfMilestones[1].earned.value),
shouldEarn: () => heatedPlanterElfTraining.level.value >= 3 shouldEarn: () => heatedPlanterElfTraining.level.value >= 3
@ -539,7 +538,7 @@ const layer = createLayer(id, () => {
requirement: "Mary Level 5", requirement: "Mary Level 5",
effectDisplay: jsx(() => ( effectDisplay: jsx(() => (
<> <>
Auto smelting speed is multiplied by <Sqrt>total XP/1e6</Sqrt>. Auto smelting speed is multiplied by <Sqrt>total XP/1e6</Sqrt>
</> </>
)) ))
}, },
@ -554,7 +553,7 @@ const layer = createLayer(id, () => {
requirement: "Noel Level 1", requirement: "Noel Level 1",
effectDisplay: jsx(() => ( effectDisplay: jsx(() => (
<> <>
Log gain is multiplied by <Sqrt>total elf levels</Sqrt>. Log gain is multiplied by <Sqrt>total elf levels</Sqrt>
</> </>
)) ))
}, },
@ -606,7 +605,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Joy Level 1", requirement: "Joy Level 1",
effectDisplay: "Small Fire synergy counts bonfires at reduced rate." effectDisplay: "Small Fire synergy counts bonfires at reduced rate"
}, },
shouldEarn: () => smallfireElfTraining.level.value >= 1 shouldEarn: () => smallfireElfTraining.level.value >= 1
})), })),
@ -649,7 +648,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Faith Level 1", requirement: "Faith Level 1",
effectDisplay: "Multiply bonfire efficiency by 5." effectDisplay: "Multiply bonfire efficiency by 5"
}, },
shouldEarn: () => bonfireElfTraining.level.value >= 1 shouldEarn: () => bonfireElfTraining.level.value >= 1
})), })),
@ -690,7 +689,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Snowball Level 1", requirement: "Snowball Level 1",
effectDisplay: "Multiply kiln efficiency by 5." effectDisplay: "Multiply kiln efficiency by 5"
}, },
shouldEarn: () => kilnElfTraining.level.value >= 1 shouldEarn: () => kilnElfTraining.level.value >= 1
})), })),
@ -731,7 +730,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Star Level 1", requirement: "Star Level 1",
effectDisplay: "Book cost is divided by total books bought." effectDisplay: "Book cost is divided by total books bought"
}, },
shouldEarn: () => paperElfTraining.level.value >= 1 shouldEarn: () => paperElfTraining.level.value >= 1
})), })),
@ -762,7 +761,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Star Level 5", requirement: "Star Level 5",
effectDisplay: "Gain 5 free books for all prior elves that are at level 5 or above." effectDisplay: "Gain 5 free books for all prior elves that are at level 5 or above"
}, },
visibility: () => showIf(paperElfMilestones[3].earned.value && main.day.value >= 13), visibility: () => showIf(paperElfMilestones[3].earned.value && main.day.value >= 13),
shouldEarn: () => paperElfTraining.level.value >= 5 shouldEarn: () => paperElfTraining.level.value >= 5
@ -774,7 +773,7 @@ const layer = createLayer(id, () => {
requirement: "Bell Level 1", requirement: "Bell Level 1",
effectDisplay: jsx(() => ( effectDisplay: jsx(() => (
<> <>
Every box buyable adds <Sqrt>level</Sqrt> levels to same-row box buyables. Every box buyable adds <Sqrt>level</Sqrt> levels to same-row box buyables
</> </>
)) ))
}, },
@ -823,7 +822,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Gingersnap Level 1", requirement: "Gingersnap Level 1",
effectDisplay: "Multiply all primary dye colors by ln(cloth + e)." effectDisplay: "Multiply all primary dye colors by ln(cloth + e)"
}, },
shouldEarn: () => clothElfTraining.level.value >= 1 shouldEarn: () => clothElfTraining.level.value >= 1
})), })),
@ -932,7 +931,7 @@ const layer = createLayer(id, () => {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "Twinkle Level 3", requirement: "Twinkle Level 3",
effectDisplay: "Auto smelting multi is tripled." effectDisplay: "Auto smelting multi is tripled"
}, },
visibility: () => showIf(metalElfMilestones[1].earned.value), visibility: () => showIf(metalElfMilestones[1].earned.value),
shouldEarn: () => metalElfTraining.level.value >= 3 shouldEarn: () => metalElfTraining.level.value >= 3
@ -1107,7 +1106,7 @@ const layer = createLayer(id, () => {
effectDisplay: jsx(() => ( effectDisplay: jsx(() => (
<> <>
Every plastic buyable adds <Sqrt>level</Sqrt> levels to the other plastic Every plastic buyable adds <Sqrt>level</Sqrt> levels to the other plastic
buyables. buyables
</> </>
)) ))
}, },

View file

@ -746,12 +746,22 @@ const layer = createLayer(id, function (this: BaseLayer) {
{autoSmeltEnabled.value && {autoSmeltEnabled.value &&
(Decimal.gte(industrialCrucible.amount.value, 1) || (Decimal.gte(industrialCrucible.amount.value, 1) ||
masteryEffectActive.value) masteryEffectActive.value)
? `+${formatLimit( ? masteryEffectActive.value
? formatGain(
Decimal.mul(
computedOrePurity.value,
computedOrePurity.value
).mul(computedAutoSmeltSpeed.value)
)
: `+${formatLimit(
[ [
[computedAutoSmeltSpeed.value, "smelting speed"], [computedAutoSmeltSpeed.value, "smelting speed"],
[computedOreGain.value, "ore gain"], [computedOreGain.value, "ore gain"],
[ [
Decimal.div(coal.computedCoalGain.value, coalCost), Decimal.div(
coal.computedCoalGain.value,
coalCost
),
"coal gain" "coal gain"
] ]
], ],

View file

@ -513,7 +513,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
display: { display: {
requirement: "5m Well Depth", requirement: "5m Well Depth",
effectDisplay: effectDisplay:
"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)." "Gain 25% more coal for each metre of well depth (after the 3 elf milestone)"
}, },
shouldEarn: () => Decimal.gte(depth.value, 5) shouldEarn: () => Decimal.gte(depth.value, 5)
})), })),
@ -528,7 +528,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createMilestone(() => ({ createMilestone(() => ({
display: { display: {
requirement: "25m Well Depth", requirement: "25m Well Depth",
effectDisplay: "Gain 5% more ore for each metre of well depth." effectDisplay: "Gain 5% more ore for each metre of well depth"
}, },
shouldEarn: () => Decimal.gte(depth.value, 25), shouldEarn: () => Decimal.gte(depth.value, 25),
visibility: () => showIf(depthMilestones[1].earned.value) visibility: () => showIf(depthMilestones[1].earned.value)

View file

@ -32,6 +32,9 @@
pointer-events: none; pointer-events: none;
transition: height .3s; transition: height .3s;
pointer-events: none;
user-select: none;
} }
.factory-container { .factory-container {
position: absolute; position: absolute;

View file

@ -231,14 +231,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
display: { display: {
requirement: "10 toys", requirement: "10 toys",
effectDisplay: effectDisplay:
"The cost of making toys is divided by the number of complete workshops you have." "The cost of making toys is divided by the number of complete workshops you have"
}, },
shouldEarn: () => Decimal.gte(toySum.value, 10) shouldEarn: () => Decimal.gte(toySum.value, 10)
})); }));
const milestone2 = createMilestone(() => ({ const milestone2 = createMilestone(() => ({
display: { display: {
requirement: "100 toys", requirement: "100 toys",
effectDisplay: "Unlock black dyes." effectDisplay: "Unlock black dyes"
}, },
shouldEarn: () => Decimal.gte(toySum.value, 100), shouldEarn: () => Decimal.gte(toySum.value, 100),
visibility: () => showIf(milestone1.earned.value) visibility: () => showIf(milestone1.earned.value)
@ -247,7 +247,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const milestone3 = createMilestone(() => ({ const milestone3 = createMilestone(() => ({
display: { display: {
requirement: "200 toys", requirement: "200 toys",
effectDisplay: "Beach wrapping paper is much more powerful." effectDisplay: "Beach wrapping paper is much more powerful"
}, },
shouldEarn: () => Decimal.gte(toySum.value, 200), shouldEarn: () => Decimal.gte(toySum.value, 200),
visibility: () => showIf(milestone2.earned.value) visibility: () => showIf(milestone2.earned.value)
@ -255,7 +255,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const milestone4 = createMilestone(() => ({ const milestone4 = createMilestone(() => ({
display: { display: {
requirement: "350 toys", requirement: "350 toys",
effectDisplay: "Gain 50x oil and plastic." effectDisplay: "Gain 50x oil and plastic"
}, },
shouldEarn: () => Decimal.gte(toySum.value, 350), shouldEarn: () => Decimal.gte(toySum.value, 350),
visibility: () => showIf(milestone3.earned.value) visibility: () => showIf(milestone3.earned.value)

View file

@ -908,17 +908,27 @@ const layer = createLayer(id, function (this: BaseLayer) {
style="margin-bottom: 0" style="margin-bottom: 0"
productionDisplay={ productionDisplay={
Decimal.gt(computedAutoCuttingAmount.value, 0) Decimal.gt(computedAutoCuttingAmount.value, 0)
? `+${format( ? `+${format(averageLogGain.value)}/s average<br/>equilibrium: +${
averageLogGain.value management.elfTraining.planterElfTraining.milestones[4].earned
)}/s average<br/>equilibrium: +${formatLimit( .value
? format(logGain.apply(computedAutoCuttingAmount.value)) +
"/s"
: formatLimit(
[ [
[computedAutoCuttingAmount.value, "cutting speed"], [computedAutoCuttingAmount.value, "cutting speed"],
[computedAutoPlantingAmount.value, "planting speed"], [
[Decimal.mul(computedTotalTrees.value, 20), "forest cap"] computedAutoPlantingAmount.value,
"planting speed"
],
[
Decimal.mul(computedTotalTrees.value, 20),
"forest cap"
]
], ],
"/s", "/s",
logGain.apply(1) logGain.apply(1)
)}` )
}`
: undefined : undefined
} }
/> />

View file

@ -293,7 +293,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const extraExpansionMilestone6 = createMilestone(() => ({ const extraExpansionMilestone6 = createMilestone(() => ({
display: { display: {
requirement: "1200% Foundation Completed", requirement: "1200% Foundation Completed",
effectDisplay: "Quadruple oil gain" effectDisplay: "Quadruple drill power"
}, },
shouldEarn: () => Decimal.gte(foundationProgress.value, 1200), shouldEarn: () => Decimal.gte(foundationProgress.value, 1200),
visibility: () => visibility: () =>

View file

@ -442,7 +442,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
symbol: toysSymbol, symbol: toysSymbol,
story: "You've had enough of this running around and stalling - it is time to create some toys NOW! You have everything you need and then some, so let's finally just sit down and get this process started!", story: "You've had enough of this running around and stalling - it is time to create some toys NOW! You have everything you need and then some, so let's finally just sit down and get this process started!",
completedStory: completedStory:
"In your haste you may have been a bit wasteful with resources, but it feels really good to finally make some meaningful process on making toys for Santa. You already envision plans on how to get elves to help you out and start pumping out these toys, but for now... Good Job!", "In your haste you may have been a bit wasteful with resources, but it feels really good to finally make some meaningful progress on making toys for Santa. You already envision plans on how to get elves to help you out and start pumping out these toys, but for now... Good Job!",
masteredStory: "" masteredStory: ""
})), })),
createDay(() => ({ createDay(() => ({