You have {formatWhole(schools.amount.value)} schools,
- which are currently letting elves learn up to level{" "}
- {formatWhole(schools.amount.value)}.
+
+ You have {formatWhole(schools.amount.value)} schools, which are currently
+ letting elves learn up to level {formatWhole(schools.amount.value)}.
Costs {format(schoolCost.value.wood)} logs, {format(schoolCost.value.coal)}{" "}
@@ -946,27 +1140,26 @@ const layer = createLayer(id, () => {
plastic.plastic.value = Decimal.sub(plastic.plastic.value, schoolCost.value.plastic);
this.amount.value = Decimal.add(this.amount.value, 1);
},
- purchaseLimit: 5,
+ purchaseLimit() {
+ if (main.days[advancedDay - 1].opened.value) return 5
+ return 3
+ },
visibility: computed(() => showIf(teaching.bought.value)),
style: "width: 600px"
}));
const classroomCost = computed(() => {
- const classroomFactor = Decimal.add(schools.amount.value, 1).pow(1.5);
+ const classroomFactor = Decimal.add(classrooms.amount.value, 1).pow(1.5);
return {
wood: classroomFactor.mul(1e21),
- coal: classroomFactor.mul(1e32),
- paper: classroomFactor.mul(1e19),
+ paper: classroomFactor.mul(1e18),
boxes: classroomFactor.mul(1e13),
- metalIngots: classroomFactor.mul(1e12),
- cloth: classroomFactor.mul(1e4),
- plastic: classroomFactor.mul(1e6),
- dye: classroomFactor.mul(10000)
+ metalIngots: classroomFactor.mul(1e12)
};
});
const classroomEffect = computed(() => {
- return Decimal.add(classrooms.amount.value, 1).sqrt();
+ return Decimal.add(classrooms.amount.value, 1).pow(0.9);
});
const classrooms = createBuyable(() => ({
@@ -975,44 +1168,32 @@ const layer = createLayer(id, () => {
Build a Classroom
Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by{" "}
- Classrooms + 1 .
-
-
You have {formatWhole(schools.amount.value)} classrooms,
- which are currently multiplying elves' XP gain by {format(classroomEffect.value)}
+ (Classrooms + 1)0.9 .
- Costs {format(classroomCost.value.wood)} logs,{" "}
- {format(classroomCost.value.coal)} coal, {format(classroomCost.value.paper)}{" "}
- paper, {format(classroomCost.value.boxes)} boxes,{" "}
- {format(classroomCost.value.metalIngots)} metal ingots,{" "}
- {format(classroomCost.value.cloth)} cloth, {format(classroomCost.value.plastic)}{" "}
- plastic, and requires {format(classroomCost.value.dye)} of red, yellow, and blue
- dye
+ You have {formatWhole(classrooms.amount.value)} classrooms, which are currently
+ multiplying elves' XP gain by {format(classroomEffect.value)}
+
+
+ Costs {format(classroomCost.value.wood)} logs,
+ {format(classroomCost.value.paper)} paper, {format(classroomCost.value.boxes)}{" "}
+ boxes, {format(classroomCost.value.metalIngots)} metal ingots
>
)),
canPurchase(): boolean {
return (
classroomCost.value.wood.lte(trees.logs.value) &&
- classroomCost.value.coal.lte(coal.coal.value) &&
classroomCost.value.paper.lte(paper.paper.value) &&
classroomCost.value.boxes.lte(boxes.boxes.value) &&
- classroomCost.value.metalIngots.lte(metal.metal.value) &&
- classroomCost.value.cloth.lte(cloth.cloth.value) &&
- classroomCost.value.plastic.lte(plastic.plastic.value) &&
- classroomCost.value.dye.lte(dyes.dyes.blue.amount.value) &&
- classroomCost.value.dye.lte(dyes.dyes.red.amount.value) &&
- classroomCost.value.dye.lte(dyes.dyes.yellow.amount.value)
+ classroomCost.value.metalIngots.lte(metal.metal.value)
);
},
onPurchase() {
trees.logs.value = Decimal.sub(trees.logs.value, classroomCost.value.wood);
- coal.coal.value = Decimal.sub(coal.coal.value, classroomCost.value.coal);
paper.paper.value = Decimal.sub(paper.paper.value, classroomCost.value.paper);
boxes.boxes.value = Decimal.sub(boxes.boxes.value, classroomCost.value.boxes);
metal.metal.value = Decimal.sub(metal.metal.value, classroomCost.value.metalIngots);
- cloth.cloth.value = Decimal.sub(cloth.cloth.value, classroomCost.value.cloth);
- plastic.plastic.value = Decimal.sub(plastic.plastic.value, classroomCost.value.plastic);
this.amount.value = Decimal.add(this.amount.value, 1);
},
visibility: computed(() => showIf(classroomUpgrade.bought.value)),
@@ -1022,6 +1203,22 @@ const layer = createLayer(id, () => {
// ------------------------------------------------------------------------------- Modifiers
const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [
+ {
+ title: "Elves affected by Focus",
+ modifier: maximumElvesModifier,
+ base: 3
+ },
+ {
+ title: "Maximum Focus Effect",
+ modifier: focusMaxMultiModifiers,
+ base: 10
+ },
+ {
+ title: "Focus Cooldown",
+ modifier: cooldownModifiers,
+ unit: " secs",
+ base: 15
+ },
{
title: "Global XP Gain",
modifier: globalXPModifier,
@@ -1112,7 +1309,17 @@ const layer = createLayer(id, () => {
/>
));
-
+ watchEffect(() => {
+ if (main.day.value === day && day12Elves.every(elf => elf.level.value >= 3)) {
+ main.completeDay();
+ } else if (
+ main.day.value === advancedDay &&
+ day13Elves.every(elf => elf.level.value >= 5)
+ ) {
+ main.completeDay();
+ }
+ });
+
// ------------------------------------------------------------------------------- Return
return {
@@ -1123,6 +1330,7 @@ const layer = createLayer(id, () => {
elfTraining,
totalElfLevels,
+ totalElfExp,
currentShown,
generalTabCollapsed,
@@ -1132,12 +1340,19 @@ const layer = createLayer(id, () => {
classroomUpgrade,
focusMultiplier: focusMulti,
+ upgrades,
focusTargets,
- focusRolling,
+ focusCooldown,
+ focusTime,
display: jsx(() => (
<>
- {main.day.value === day ? `Get all elves to level 5.` : `${name} Complete!`} -
+ {main.day.value === day
+ ? `Get all elves to level 3.`
+ : main.day.value === advancedDay && main.days[advancedDay - 1].opened.value
+ ? `Get all elves to level 5.`
+ : `${name} Complete!`}{" "}
+ -
{
{render(modifiersModal)}
{render(dayProgress)}
-
- {renderCol(schools, classrooms)}{" "}
+
+ {renderCol(schools, classrooms)}
{renderGrid([teaching, classroomUpgrade])}
- {
- Decimal.gt(schools.amount.value, 0) ? <>
-
+
+ {Decimal.gt(schools.amount.value, 0) ? (
+ <>
+
Click on an elf to see their milestones.
-
+
+
{render(focusButton)}
-
+ {renderGrid(upgrades)}
+
{renderGrid(
[focusMeter],
treeElfTraining,
@@ -1166,8 +1384,10 @@ const layer = createLayer(id, () => {
)}
{currentElfDisplay()}
- > : ""
- }
+ >
+ ) : (
+ ""
+ )}
>
))
};
diff --git a/src/data/layers/metal.tsx b/src/data/layers/metal.tsx
index 84a9c2a..586deea 100644
--- a/src/data/layers/metal.tsx
+++ b/src/data/layers/metal.tsx
@@ -4,7 +4,7 @@ import Toggle from "components/fields/Toggle.vue";
import Modal from "components/Modal.vue";
import { createCollapsibleModifierSections, setUpDailyProgressTracker } from "data/common";
import { jsx, showIf } from "features/feature";
-import { createResource, trackBest } from "features/resources/resource";
+import { createResource, Resource, trackBest } from "features/resources/resource";
import { BaseLayer, createLayer } from "game/layers";
import Decimal, { DecimalSource } from "lib/break_eternity";
import { render, renderRow } from "util/vue";
@@ -12,6 +12,7 @@ import { persistent } from "game/persistence";
import { globalBus } from "game/events";
import {
createAdditiveModifier,
+ createExponentialModifier,
createMultiplicativeModifier,
createSequentialModifier
} from "game/modifiers";
@@ -30,6 +31,8 @@ import boxes from "./boxes";
import cloth from "./cloth";
import plastic from "./plastic";
import dyes from "./dyes";
+import management from "./management";
+import workshop from "./workshop";
const id = "metal";
const day = 7;
@@ -78,6 +81,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: () => Decimal.add(cloth.cloth.value, 1).log10().plus(1),
description: "Glistening Paint",
enabled: dyes.upgrades.redDyeUpg.bought
+ })),
+ createMultiplicativeModifier(() => ({
+ multiplier: () =>
+ Decimal.div(workshop.foundationProgress.value, 10).floor().div(10).add(1),
+ description: "400% Foundation Completed",
+ enabled: workshop.milestones.extraExpansionMilestone2.earned
+ })),
+ createExponentialModifier(() => ({
+ exponent: 1.1,
+ description: "Mary Level 2",
+ enabled: management.elfTraining.heatedPlanterElfTraining.milestones[1].earned
}))
]);
const computedOrePurity = computed(() => orePurity.apply(0.1));
@@ -108,6 +122,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: () => Decimal.add(plastic.activeRefinery.value, 1).sqrt(),
description: "De Louvre",
enabled: dyes.upgrades.redDyeUpg2.bought
+ })),
+ createMultiplicativeModifier(() => ({
+ multiplier: () => Decimal.div(management.totalElfExp.value, 1000).add(1).sqrt(),
+ description: "Mary Level 5",
+ enabled: management.elfTraining.heatedPlanterElfTraining.milestones[4].earned
}))
]);
const computedAutoSmeltSpeed = computed(() => autoSmeltSpeed.apply(0));
@@ -359,7 +378,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
.gte(10)
),
style: { width: "200px" }
- })) as GenericBuyable;
+ })) as GenericBuyable & { resource: Resource };
const industrialCrucible = createBuyable(() => ({
resource: noPersist(metal),
cost() {
@@ -382,7 +401,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
Decimal.gte(bestOre.value, 50)
),
style: { width: "200px" }
- })) as GenericBuyable;
+ })) as GenericBuyable & { resource: Resource };
const autoSmeltEnabled = persistent
(true);
const hotterForge = createBuyable(() => ({
resource: coal.coal,
@@ -403,7 +422,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
visibility: () =>
showIf(Decimal.gte(hotterForge.amount.value, 1) || industrialFurnace.bought.value),
style: { width: "200px" }
- })) as GenericBuyable;
+ })) as GenericBuyable & { resource: Resource };
const hotterForgeEffect = computed(() => Decimal.times(hotterForge.amount.value, 0.25));
globalBus.on("update", diff => {
@@ -573,6 +592,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
)}
{renderRow(oreDrill, industrialCrucible, hotterForge)}
>
+ )),
+ minimizedDisplay: jsx(() => (
+
+ {name} - {format(metal.value)} {metal.displayName}
+
))
};
});
diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx
index aa7a515..2866b02 100644
--- a/src/data/layers/oil.tsx
+++ b/src/data/layers/oil.tsx
@@ -35,6 +35,8 @@ import { formatGain } from "util/bignum";
import plastic from "./plastic";
import paper from "./paper";
import dyes from "./dyes";
+import management from "./management";
+import workshop from "./workshop";
const id = "oil";
const day = 9;
@@ -247,8 +249,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
Pump that oil from the ground.
- Gain oil based on the number of Heavy buildings active and well
- depth, but coal usage is multiplied by {row2Upgrades[3].bought.value ? 4 : 5}×.
+ Gain oil based on the number of Heavy buildings active and well depth, but coal
+ usage is multiplied by {row2Upgrades[3].bought.value ? 4 : 5}×.
Currently:
@@ -718,6 +720,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: () => coalEffectiveness.value,
description: "Effectiveness",
enabled: () => Decimal.lt(coalEffectiveness.value, 1)
+ })),
+ createMultiplicativeModifier(() => ({
+ multiplier: () =>
+ Decimal.div(workshop.foundationProgress.value, 10).floor().div(10).add(1),
+ description: "600% Foundation Completed",
+ enabled: workshop.milestones.extraExpansionMilestone3.earned
+ })),
+ createMultiplicativeModifier(() => ({
+ multiplier: () => Decimal.sqrt(management.totalElfLevels.value),
+ description: "Jack Level 4",
+ enabled: management.elfTraining.heatedCutterElfTraining.milestones[3].earned
}))
]);
const computedOilSpeed = computed(() => oilSpeed.apply(0));
@@ -947,6 +960,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
(
<>
@@ -1068,7 +1082,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
{Decimal.gte(totalOil.value, 50) ? oilMilestonesDisplay() : ""}
>
);
- })
+ }),
+ minimizedDisplay: jsx(() => (
+
+ {name} - {format(oil.value)} {oil.displayName}
+
+ ))
};
});
diff --git a/src/data/layers/paper.tsx b/src/data/layers/paper.tsx
index 94022e3..06d0223 100644
--- a/src/data/layers/paper.tsx
+++ b/src/data/layers/paper.tsx
@@ -28,6 +28,7 @@ import plastic from "./plastic";
import trees from "./trees";
import dyes from "./dyes";
import management from "./management";
+import workshop from "./workshop";
const id = "paper";
const day = 5;
@@ -38,7 +39,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
const paper = createResource(0, "paper");
const pulp = createResource(
- computed(() => Decimal.min(Decimal.div(trees.logs.value, 1e9), Decimal.div(coal.ash.value, computedAshCost.value))),
+ computed(() =>
+ Decimal.min(
+ Decimal.div(trees.logs.value, 1e9),
+ Decimal.div(coal.ash.value, computedAshCost.value)
+ )
+ ),
"pulp"
);
@@ -49,7 +55,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
roundUpCost: true,
spend(gain, cost) {
trees.logs.value = Decimal.sub(trees.logs.value, Decimal.times(cost, 1e9));
- coal.ash.value = Decimal.sub(coal.ash.value, Decimal.times(cost, computedAshCost.value));
+ coal.ash.value = Decimal.sub(
+ coal.ash.value,
+ Decimal.times(cost, computedAshCost.value)
+ );
},
gainModifier: paperGain
}));
@@ -68,7 +77,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
Cost: {displayResource(trees.logs, cost)} {pulp.displayName} (
{formatWhole(Decimal.times(cost, 1e9))} {trees.logs.displayName};{" "}
- {formatWhole(Decimal.times(cost, computedAshCost.value))} {coal.ash.displayName})
+ {formatWhole(Decimal.times(cost, computedAshCost.value))}{" "}
+ {coal.ash.displayName})
>
);
@@ -187,6 +197,34 @@ const layer = createLayer(id, function (this: BaseLayer) {
buyableName: "Cloth Buyables",
visibility: () => showIf(elves.elves.clothElf.bought.value)
});
+ const miningDrillBook = createBook({
+ name: "Drills and Mills",
+ elfName: "Peppermint",
+ buyableName: "Mining Drill",
+ visibility: () =>
+ showIf(management.elfTraining.expandersElfTraining.milestones[3].earned.value)
+ });
+ const heavyDrillBook = createBook({
+ name: "Deep in the Earth",
+ elfName: "Frosty",
+ buyableName: "Oil Drills",
+ visibility: () =>
+ showIf(management.elfTraining.fertilizerElfTraining.milestones[4].earned.value)
+ });
+ const oilBook = createBook({
+ name: "Burning the Midnight Oil",
+ elfName: "Cocoa",
+ buyableName: "Oil-Consuming Machines",
+ visibility: () =>
+ showIf(management.elfTraining.heatedCutterElfTraining.milestones[4].earned.value)
+ });
+ const metalBook = createBook({
+ name: "Physical Metallurgy",
+ elfName: "Twinkle",
+ buyableName: "Metal Buyables",
+ visibility: () =>
+ showIf(management.elfTraining.expandersElfTraining.milestones[4].earned.value)
+ });
const books = {
cuttersBook,
plantersBook,
@@ -199,9 +237,15 @@ const layer = createLayer(id, function (this: BaseLayer) {
kilnBook,
paperBook,
boxBook,
- clothBook
+ clothBook,
+ miningDrillBook,
+ heavyDrillBook,
+ oilBook,
+ metalBook
};
- const sumBooks = computed(() => Object.values(books).reduce((acc, curr) => acc.add(curr.amount.value), new Decimal(0)));
+ const sumBooks = computed(() =>
+ Object.values(books).reduce((acc, curr) => acc.add(curr.amount.value), new Decimal(0))
+ );
const clothUpgrade = createUpgrade(() => ({
resource: noPersist(paper),
@@ -257,11 +301,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: dyes.boosts.yellow1,
description: "Yellow Dye Boost 1",
enabled: () => Decimal.gte(dyes.dyes.yellow.amount.value, 1)
+ })),
+ createMultiplicativeModifier(() => ({
+ multiplier: 2,
+ description: "1000% Foundation Completed",
+ enabled: workshop.milestones.extraExpansionMilestone5.earned
}))
]) as WithRequired;
const ashCost = createSequentialModifier(() => [
createMultiplicativeModifier(() => ({
- multiplier: .1,
+ multiplier: 0.1,
description: "Star Level 2",
enabled: management.elfTraining.paperElfTraining.milestones[1].earned
}))
@@ -340,6 +389,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
{renderCol(...Object.values(books))}
>
+ )),
+ minimizedDisplay: jsx(() => (
+
+ {name} - {format(paper.value)} {paper.displayName}
+
))
};
});
diff --git a/src/data/layers/plastic.tsx b/src/data/layers/plastic.tsx
index 3e3717e..917f24c 100644
--- a/src/data/layers/plastic.tsx
+++ b/src/data/layers/plastic.tsx
@@ -32,6 +32,8 @@ import boxes from "./boxes";
import metal from "./metal";
import oil from "./oil";
import dyes from "./dyes";
+import management from "./management";
+import workshop from "./workshop";
const id = "plastic";
const day = 10;
@@ -66,7 +68,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
resource: metal.metal,
cost() {
const v = new Decimal(this.amount.value);
- return Decimal.pow(1.2, v).times(1e7);
+ let cost = Decimal.pow(1.2, v).times(1e7);
+ if (management.elfTraining.fertilizerElfTraining.milestones[3].earned.value) {
+ cost = Decimal.sub(cost, Decimal.pow(plastic.value, 2)).max(0);
+ }
+ return cost;
},
display: jsx(() => (
<>
@@ -257,6 +263,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: dyes.boosts.yellow1,
description: "Yellow Dye Boost 1",
enabled: () => Decimal.gte(dyes.dyes.yellow.amount.value, 1)
+ })),
+ createMultiplicativeModifier(() => ({
+ multiplier: () =>
+ Decimal.div(workshop.foundationProgress.value, 10).floor().div(10).add(1),
+ description: "800% Foundation Completed",
+ enabled: workshop.milestones.extraExpansionMilestone4.earned
}))
]);
const computedPlasticGain = computed(() => plasticGain.apply(0));
@@ -299,11 +311,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
<>
{render(trackerDisplay)}
-
+ }
+ />
{render(buildRefinery)}
@@ -319,6 +336,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
{renderCol(clothTools, clothElf, clothGains)}
>
+ )),
+ minimizedDisplay: jsx(() => (
+
+ {name} - {format(plastic.value)} {plastic.displayName}
+
))
};
});
diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx
index 0c6ef6c..478931e 100644
--- a/src/data/layers/trees.tsx
+++ b/src/data/layers/trees.tsx
@@ -27,7 +27,7 @@ import { noPersist, persistent } from "game/persistence";
import Decimal, { DecimalSource, format, formatGain, formatLimit, formatWhole } from "util/bignum";
import { Direction, WithRequired } from "util/common";
import { render, renderGrid, renderRow } from "util/vue";
-import { computed, ref } from "vue";
+import { computed, ref, watch } from "vue";
import boxes from "./boxes";
import cloth from "./cloth";
import coal from "./coal";
@@ -83,6 +83,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
addend: dyes.boosts.blue1,
description: "Blue Dye Boost 1",
enabled: () => Decimal.gte(dyes.dyes.blue.amount.value, 1)
+ })),
+ createAdditiveModifier(() => ({
+ addend: () => Decimal.pow(computedManualCuttingAmount.value, 0.99),
+ description: "Hope Level 1",
+ enabled: management.elfTraining.expandersElfTraining.milestones[0].earned
}))
]) as WithRequired;
const trees = createResource(
@@ -201,6 +206,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
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);
+ if (Decimal.gte(v, 2e30)) v = Decimal.pow(v,10000).div(Decimal.pow(2e30,9999));
v = Decimal.pow(0.95, paper.books.cuttersBook.amount.value).times(v);
return Decimal.times(100, v).add(200);
},
@@ -217,8 +223,13 @@ const layer = createLayer(id, function (this: BaseLayer) {
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);
+ if (Decimal.gte(v, 2e30)) v = Decimal.pow(v,10000).div(Decimal.pow(2e30,9999));
v = Decimal.pow(0.95, paper.books.plantersBook.amount.value).times(v);
- return Decimal.times(100, v).add(200);
+ let cost = Decimal.times(100, v).add(200);
+ if (management.elfTraining.planterElfTraining.milestones[3].earned.value) {
+ cost = Decimal.div(cost, 10);
+ }
+ return cost;
},
display: {
title: "Generic Planters",
@@ -232,6 +243,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
let v = this.amount.value;
if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100);
if (Decimal.gte(v, 1e5)) v = Decimal.pow(v, 2).div(1e5);
+ if (Decimal.gte(v, 1e15)) v = Decimal.pow(v, 10).div(1e135);
v = Decimal.pow(0.95, paper.books.expandersBook.amount.value).times(v);
return Decimal.pow(Decimal.add(v, 1), 1.5).times(500);
},
@@ -282,7 +294,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
enabled: researchUpgrade2.bought
})),
createAdditiveModifier(() => ({
- addend: () => Decimal.div(workshop.foundationProgress.value, 5).floor(),
+ addend: () =>
+ Decimal.div(workshop.foundationProgress.value, 5).floor(),
description: "10% Foundation Completed",
enabled: workshop.milestones.autoCutMilestone1.earned
})),
@@ -305,9 +318,28 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: 4,
description: "Lumberjack Jeans",
enabled: cloth.treesUpgrades.treesUpgrade2.bought
+ })),
+ createMultiplicativeModifier(() => ({
+ multiplier: () => Decimal.pow(1.1, main.day.value),
+ description: "Holly Level 4",
+ enabled: management.elfTraining.cutterElfTraining.milestones[3].earned
+ })),
+ createAdditiveModifier(() => ({
+ addend: () =>
+ Decimal.sub(lastAutoCuttingAmount.value, lastAutoPlantedAmount.value).max(0),
+ description: "Ivy Level 5",
+ enabled: management.elfTraining.planterElfTraining.milestones[4].earned
}))
]) as WithRequired;
const computedAutoCuttingAmount = computed(() => autoCuttingAmount.apply(0));
+ const lastAutoCuttingAmount = ref(0);
+ setInterval(
+ () =>
+ watch(computedAutoCuttingAmount, cut => {
+ lastAutoCuttingAmount.value = cut;
+ }),
+ 0
+ );
const manualPlantingAmount = createSequentialModifier(() => [
createAdditiveModifier(() => ({
@@ -377,13 +409,32 @@ const layer = createLayer(id, function (this: BaseLayer) {
description: "Ivy Level 1",
enabled: management.elfTraining.planterElfTraining.milestones[0].earned
})),
+ createMultiplicativeModifier(() => ({
+ multiplier: () => Decimal.pow(trees.value, 0.2).log10().pow_base(2),
+ description: "Ivy Level 3",
+ enabled: management.elfTraining.planterElfTraining.milestones[2].earned
+ })),
createMultiplicativeModifier(() => ({
multiplier: 2,
- description: "Mary Level 2",
- enabled: management.elfTraining.planterElfTraining.milestones[1].earned
+ description: "Mary Level 4",
+ enabled: management.elfTraining.heatedPlanterElfTraining.milestones[3].earned
+ })),
+ createAdditiveModifier(() => ({
+ addend: () =>
+ Decimal.sub(lastAutoPlantedAmount.value, lastAutoCuttingAmount.value).max(0),
+ description: "Ivy Level 5",
+ enabled: management.elfTraining.planterElfTraining.milestones[4].earned
}))
]) as WithRequired;
const computedAutoPlantingAmount = computed(() => autoPlantingAmount.apply(0));
+ const lastAutoPlantedAmount = ref(0);
+ setInterval(
+ () =>
+ watch(computedAutoPlantingAmount, planted => {
+ lastAutoPlantedAmount.value = planted;
+ }),
+ 0
+ );
const logGain = createSequentialModifier(() => [
createMultiplicativeModifier(() => ({
@@ -397,7 +448,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
enabled: researchUpgrade2.bought
})),
createMultiplicativeModifier(() => ({
- multiplier: () => Decimal.div(workshop.foundationProgress.value, 20).add(1),
+ multiplier: () => workshop.milestones.extraExpansionMilestone1.earned.value
+ ? Decimal.pow(1.02, workshop.foundationProgress.value) : Decimal.div(workshop.foundationProgress.value, 20).add(1),
description: "1% Foundation Completed",
enabled: workshop.milestones.logGainMilestone1.earned
})),
@@ -444,9 +496,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
enabled: dyes.upgrades.blueDyeUpg.bought
})),
createMultiplicativeModifier(() => ({
- multiplier: computed(() =>
- Decimal.add(computedAutoCuttingAmount.value, 1).log10().plus(1)
- ),
+ multiplier: computed(() => Decimal.add(computedAutoCuttingAmount.value, 1).root(9)),
description: "Holly Level 1",
enabled: management.elfTraining.cutterElfTraining.milestones[0].earned
})),
@@ -770,6 +820,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
{renderRow(...row1Buyables)}
>
+ )),
+ minimizedDisplay: jsx(() => (
+
+ {name} - {format(logs.value)} {logs.displayName}
+
))
};
});
diff --git a/src/data/layers/workshop.tsx b/src/data/layers/workshop.tsx
index b026eea..e6f5e3a 100644
--- a/src/data/layers/workshop.tsx
+++ b/src/data/layers/workshop.tsx
@@ -8,33 +8,24 @@ import { main } from "data/projEntry";
import { createBar } from "features/bars/bar";
import { createClickable } from "features/clickables/clickable";
import {
- Conversion,
+ addSoftcap,
createIndependentConversion,
- createPolynomialScaling,
- ScalingFunction
+ createPolynomialScaling
} from "features/conversion";
import { jsx, showIf } from "features/feature";
import { createHotkey } from "features/hotkey";
import { createMilestone } from "features/milestones/milestone";
-import { createResource, displayResource, Resource } from "features/resources/resource";
+import { createResource, displayResource } from "features/resources/resource";
import { BaseLayer, createLayer } from "game/layers";
+import { createExponentialModifier, createSequentialModifier } from "game/modifiers";
import { noPersist } from "game/persistence";
-import Decimal, { DecimalSource, formatWhole } from "util/bignum";
+import Decimal, { DecimalSource, format, formatWhole } from "util/bignum";
import { Direction } from "util/common";
import { render } from "util/vue";
import { computed, unref, watchEffect } from "vue";
import elves from "./elves";
-import trees from "./trees";
import management from "./management";
-
-interface FoundationConversionOptions {
- scaling: ScalingFunction;
- baseResource: Resource;
- gainResource: Resource;
- roundUpCost: boolean;
- buyMax: boolean;
- spend: (gain: DecimalSource, spent: DecimalSource) => void;
-}
+import trees from "./trees";
const id = "workshop";
const day = 2;
@@ -45,22 +36,34 @@ const layer = createLayer(id, function (this: BaseLayer) {
const foundationProgress = createResource(0, "foundation progress");
- const foundationConversion: Conversion =
- createIndependentConversion(() => ({
- scaling: createPolynomialScaling(250, 1.5),
- baseResource: trees.logs,
- gainResource: noPersist(foundationProgress),
- roundUpCost: true,
- buyMax: false,
- spend(gain, spent) {
- trees.logs.value = Decimal.sub(trees.logs.value, spent);
- }
- }));
+ const foundationConversion = createIndependentConversion(() => ({
+ scaling: addSoftcap(
+ addSoftcap(createPolynomialScaling(250, 1.5), 5387, 1 / 1e10),
+ 1e20,
+ 3e8
+ ),
+ baseResource: trees.logs,
+ gainResource: noPersist(foundationProgress),
+ roundUpCost: true,
+ // buyMax: management.elfTraining.expandersElfTraining.milestones[2].earned,
+ spend(gain, spent) {
+ trees.logs.value = Decimal.sub(trees.logs.value, spent);
+ },
+ costModifier: createSequentialModifier(() => [
+ createExponentialModifier(() => ({
+ exponent: 0.95,
+ description: "Holly Level 5",
+ enabled: management.elfTraining.cutterElfTraining.milestones[4].earned
+ }))
+ ])
+ }));
const buildFoundation = createClickable(() => ({
display: jsx(() => (
<>
- Build part of the foundation
+
+ Build {formatWhole(foundationConversion.actualGain.value)}% of the foundation
+
@@ -75,10 +78,15 @@ const layer = createLayer(id, function (this: BaseLayer) {
>
)),
- visibility: () => showIf(Decimal.lt(foundationProgress.value, 100)),
+ visibility: () =>
+ showIf(
+ Decimal.lt(foundationProgress.value, 100) ||
+ management.elfTraining.expandersElfTraining.milestones[2].earned.value
+ ),
canClick: () =>
- Decimal.gte(foundationConversion.actualGain.value, 1) &&
- Decimal.lt(foundationProgress.value, 100),
+ Decimal.gte(trees.logs.value, foundationConversion.currentAt.value) &&
+ (Decimal.lt(foundationProgress.value, 100) ||
+ management.elfTraining.expandersElfTraining.milestones[2].earned.value),
onClick() {
if (!unref(this.canClick)) {
return;
@@ -171,52 +179,67 @@ const layer = createLayer(id, function (this: BaseLayer) {
}));
const extraExpansionMilestone1 = createMilestone(() => ({
display: {
- requirement: "120% Foundation Completed",
+ requirement: "200% Foundation Completed",
effectDisplay: "The 1% milestone is now +2% and multiplicative"
},
- shouldEarn: () => Decimal.gte(foundationProgress.value, 120),
+ shouldEarn: () => Decimal.gte(foundationProgress.value, 200),
visibility: () =>
- showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value),
+ showIf(
+ logGainMilestone3.earned.value &&
+ management.elfTraining.expandersElfTraining.milestones[2].earned.value
+ ),
showPopups: shouldShowPopups
}));
const extraExpansionMilestone2 = createMilestone(() => ({
display: {
- requirement: "140% Foundation Completed",
+ requirement: "400% Foundation Completed",
effectDisplay: "Gain +10% metal for every 10% foundation completed"
},
- shouldEarn: () => Decimal.gte(foundationProgress.value, 140),
+ shouldEarn: () => Decimal.gte(foundationProgress.value, 400),
visibility: () =>
- showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value),
+ showIf(
+ extraExpansionMilestone1.earned.value &&
+ management.elfTraining.expandersElfTraining.milestones[2].earned.value
+ ),
showPopups: shouldShowPopups
}));
const extraExpansionMilestone3 = createMilestone(() => ({
display: {
- requirement: "160% Foundation Completed",
+ requirement: "600% Foundation Completed",
effectDisplay: "Gain +10% oil for every 10% foundation completed"
},
- shouldEarn: () => Decimal.gte(foundationProgress.value, 160),
+ shouldEarn: () => Decimal.gte(foundationProgress.value, 600),
visibility: () =>
- showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value),
+ showIf(
+ extraExpansionMilestone2.earned.value &&
+ management.elfTraining.expandersElfTraining.milestones[2].earned.value
+ ),
showPopups: shouldShowPopups
}));
const extraExpansionMilestone4 = createMilestone(() => ({
display: {
- requirement: "180% Foundation Completed",
+ requirement: "800% Foundation Completed",
effectDisplay: "Gain +10% plastic for every 10% foundation completed"
},
- shouldEarn: () => Decimal.gte(foundationProgress.value, 180),
+ shouldEarn: () => Decimal.gte(foundationProgress.value, 800),
visibility: () =>
- showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value),
+ showIf(
+ extraExpansionMilestone3.earned.value &&
+ management.elfTraining.expandersElfTraining.milestones[2].earned.value
+ ),
showPopups: shouldShowPopups
}));
const extraExpansionMilestone5 = createMilestone(() => ({
display: {
- requirement: "200% Foundation Completed",
+ requirement: "1000% Foundation Completed",
effectDisplay: "Double paper, boxes, and all cloth actions"
},
- shouldEarn: () => Decimal.gte(foundationProgress.value, 200),
+ shouldEarn: () => Decimal.gte(foundationProgress.value, 1000),
visibility: () =>
- showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value),
+ showIf(
+ extraExpansionMilestone4.earned.value &&
+ management.elfTraining.expandersElfTraining.milestones[2].earned.value
+ ),
showPopups: shouldShowPopups
}));
const milestones = {
@@ -280,11 +303,19 @@ const layer = createLayer(id, function (this: BaseLayer) {
% completed
: null}
+ {Decimal.lt(foundationProgress.value, 100) ||
+ management.elfTraining.expandersElfTraining.milestones[2].earned.value ? (
+
+ ) : null}
{render(buildFoundation)}
{milestonesDisplay()}
>
+ )),
+ minimizedDisplay: jsx(() => (
+
+ {name} - {format(foundationProgress.value)} {foundationProgress.displayName}
+
))
};
});
diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx
index 98f99c5..de4db37 100644
--- a/src/data/projEntry.tsx
+++ b/src/data/projEntry.tsx
@@ -148,7 +148,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
loreScene.value = -1;
loreTitle.value = unref(layers[layer ?? "trees"]?.name ?? "");
loreBody.value = story;
- player.devSpeed = null;
+ if (player.autoPause) player.devSpeed = null;
showLoreModal.value = true;
}, 1000);
}
@@ -262,23 +262,25 @@ export const main = createLayer("main", function (this: BaseLayer) {
createDay(() => ({
day: 12,
shouldNotify: false,
- layer: null,
+ layer: "management",
symbol: managementSymbol,
story: "You watch as the elves work, and you realize that they could probably be trained to help out better. Just then, Santa comes over to check on your progress. You reply that you're doing fine, except that the elves may need a bit of behavior management. Santa offers to help, saying that he doesn't want to leave you to do everything. Unfortunately for you, the behavior problems won't fix themselves, so let's get to work!",
- completedStory: ""
+ completedStory:
+ "Woo! You are exhausted - this layer felt really long to you. It's great seeing the elves so productive, although you worry a bit about your own job security now! Good Job!"
})),
createDay(() => ({
day: 13,
shouldNotify: false,
- layer: null, // ""
+ layer: null, // "management" (advanced)
symbol: "",
- story: "",
- completedStory: ""
+ story: "So after a good night's rest you decide that maybe making these elves able to do all the work for you isn't something to be scared of, but rather encouraged. Let's spend another day continuing to train them up and really get this place spinning. They are Santa's elves after all, they're supposed to be able to run everything without you!",
+ completedStory:
+ "The elves are doing an incredible job, and Santa does not seem keen on firing you - Score! Now you can get to work on guiding this properly trained highly functional group of hard workers to make Christmas as great as possible. Good Job!"
})),
createDay(() => ({
day: 14,
shouldNotify: false,
- layer: null, // ""
+ layer: null, // "letters to santa"
symbol: "",
story: "",
completedStory: ""
@@ -372,7 +374,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
showLoreModal.value = true;
day.value++;
main.minimized.value = false;
- player.devSpeed = 0;
+ if (player.autoPause) player.devSpeed = 0;
}
return {
@@ -436,6 +438,7 @@ export const getInitialLayers = (
plastic,
dyes,
wrappingPaper,
+ management
];
/**
@@ -459,7 +462,7 @@ export function fixOldSave(
if (!["0.0", "0.1", "0.2", "0.3", "0.4"].includes(oldVersion ?? "")) {
return;
}
- player.offlineProd = false;
+ /*player.offlineProd = false;
delete player.layers?.management;
if ((player.layers?.main as LayerData