From eb4a6159790ddeb21c72c902716f3d60d5b9cc51 Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Wed, 14 Dec 2022 02:51:43 +0000 Subject: [PATCH 001/124] changed days --- src/data/projEntry.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index f7adfac..05bf0db 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -288,7 +288,7 @@ export const main = createLayer("main", function (this: BaseLayer) { createDay(() => ({ day: 15, shouldNotify: false, - layer: null, // "wrapping paper" + layer: null, // "wrappingPaper" symbol: wrappingPaperSymbol, story: "You'll need to produce wrapping paper so the presents can be wrapped. The elves are getting a bit bored of their boring old workstations, so you decide to let them decorate with some wrapping paper.", completedStory: "You've produced enough wrapping paper, and the elves are happy with their new workstations. However, some will need more than just wrapping paper to decorate." From be4f0cef38c5534277a8286aaf0ce0e7b36d92b3 Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Wed, 14 Dec 2022 05:41:51 +0000 Subject: [PATCH 002/124] maybe do stuff? --- src/data/layers/wrapping-paper.tsx | 17 +++++++++++- src/data/projEntry.tsx | 43 ++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/src/data/layers/wrapping-paper.tsx b/src/data/layers/wrapping-paper.tsx index a791730..c6d49af 100644 --- a/src/data/layers/wrapping-paper.tsx +++ b/src/data/layers/wrapping-paper.tsx @@ -14,6 +14,8 @@ import { format } from "util/bignum"; import { createCollapsibleModifierSections, setUpDailyProgressTracker, createCollapsibleMilestones } from "data/common"; import Modal from "components/Modal.vue"; import { createMilestone } from "features/milestones/milestone"; +import { createClickable } from "features/clickables/clickable"; +import { main } from "../projEntry"; const id = "wrappingPaper"; const day = 15; @@ -347,6 +349,19 @@ const layer = createLayer (id, () => { const { collapseMilestones, display: milestonesDisplay } = createCollapsibleMilestones(milestones); + const enterMasteryButton = createClickable(() => ({ + display: jsx(() => { + return ( + <>{ + main.isMastery.value ? "Leave Mastery" : "Enter Mastery" + } + ) + }), + onClick () { + main.toggleMastery(); + } + })) + return { name, @@ -361,7 +376,7 @@ const layer = createLayer (id, () => { {renderRow(wrappingPaper.sunshine.display, wrappingPaper.ocean.display, wrappingPaper.beach.display)} {renderRow(wrappingPaper.sunshine.buyable, wrappingPaper.ocean.buyable, wrappingPaper.beach.buyable)} - button goes here + {render(enterMasteryButton)} {milestonesDisplay()} diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index 05bf0db..bfd0bd1 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -44,6 +44,7 @@ import plastic from "./layers/plastic"; import dyes from "./layers/dyes"; import management from "./layers/management"; import wrappingPaper from "./layers/wrapping-paper"; +import { createReset } from "features/reset"; export interface Day extends VueFeature { day: number; @@ -56,6 +57,20 @@ export interface Day extends VueFeature { shouldNotify: ProcessedComputable; } +const masterableLayers = [ + trees, + workshop, + coal, + elves, + paper, + boxes, + metal, + cloth, + oil, + plastic, + dyes +] + export const main = createLayer("main", function (this: BaseLayer) { const day = persistent(1); const timeUntilNewDay = computed( @@ -67,6 +82,25 @@ export const main = createLayer("main", function (this: BaseLayer) { const loreTitle = ref(""); const loreBody = ref(); + const isMastery = persistent(false); + const cachedSaves = persistent>({}); + const toggleMastery = () => { + isMastery.value = !isMastery.value; + for (let layer of masterableLayers) { + const stringSave = JSON.stringify(layer, (key, value) => unref(value)); + if (cachedSaves.value[layer.name]) { + Object.assign(layer, JSON.parse(cachedSaves.value[layer.name])); + } else { + // hacky but only occurs once, to create a new layer for mastery + const reset = createReset(() => ({ + thingsToReset: [layer], + })); + reset.reset(); + cachedSaves.value[layer.name] = stringSave; + } + } + } + function createDay( optionsFunc: () => { day: number; @@ -79,6 +113,8 @@ export const main = createLayer("main", function (this: BaseLayer) { ): Day { const opened = persistent(false); const recentlyUpdated = persistent(false); + const cachedSaves = persistent([]); + const getLayer = computed(() => player.layers[optionsFunc().layer ?? "trees"]) // Probably a better way to do this return createLazyProxy(() => { const day = optionsFunc(); @@ -103,7 +139,7 @@ export const main = createLayer("main", function (this: BaseLayer) { shouldNotify, story, completedStory, - recentlyUpdated + recentlyUpdated, } = this; return { @@ -288,7 +324,7 @@ export const main = createLayer("main", function (this: BaseLayer) { createDay(() => ({ day: 15, shouldNotify: false, - layer: null, // "wrappingPaper" + layer: "wrappingPaper", symbol: wrappingPaperSymbol, story: "You'll need to produce wrapping paper so the presents can be wrapped. The elves are getting a bit bored of their boring old workstations, so you decide to let them decorate with some wrapping paper.", completedStory: "You've produced enough wrapping paper, and the elves are happy with their new workstations. However, some will need more than just wrapping paper to decorate." @@ -388,6 +424,9 @@ export const main = createLayer("main", function (this: BaseLayer) { showLoreModal, completeDay, minWidth: 700, + isMastery, + toggleMastery, + display: jsx(() => ( <> {player.devSpeed === 0 ?
Game Paused
: null} From f64fb63cd58315d3daa176188cd679c6e756b8e2 Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Thu, 15 Dec 2022 00:15:26 +0000 Subject: [PATCH 003/124] I give up --- src/data/layers/wrapping-paper.tsx | 7 +++++-- src/data/projEntry.tsx | 17 ----------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/data/layers/wrapping-paper.tsx b/src/data/layers/wrapping-paper.tsx index c6d49af..32110bc 100644 --- a/src/data/layers/wrapping-paper.tsx +++ b/src/data/layers/wrapping-paper.tsx @@ -50,7 +50,7 @@ interface WrappingPaperOptions { const layer = createLayer (id, () => { const name = "Wrapping Paper"; - const color = "white"; // todo: change + const color = "gold"; // todo: change const createWrappingPaper = (options: WrappingPaperOptions & Partial) => { const getCost: Computable<{ @@ -353,12 +353,15 @@ const layer = createLayer (id, () => { display: jsx(() => { return ( <>{ - main.isMastery.value ? "Leave Mastery" : "Enter Mastery" + main.isMastery.value ? "Stop Decorating" : "Begin Decoration" } ) }), onClick () { main.toggleMastery(); + }, + style: { + backgroundColor: "gold" } })) diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index bfd0bd1..8833a71 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -83,22 +83,8 @@ export const main = createLayer("main", function (this: BaseLayer) { const loreBody = ref(); const isMastery = persistent(false); - const cachedSaves = persistent>({}); const toggleMastery = () => { isMastery.value = !isMastery.value; - for (let layer of masterableLayers) { - const stringSave = JSON.stringify(layer, (key, value) => unref(value)); - if (cachedSaves.value[layer.name]) { - Object.assign(layer, JSON.parse(cachedSaves.value[layer.name])); - } else { - // hacky but only occurs once, to create a new layer for mastery - const reset = createReset(() => ({ - thingsToReset: [layer], - })); - reset.reset(); - cachedSaves.value[layer.name] = stringSave; - } - } } function createDay( @@ -113,8 +99,6 @@ export const main = createLayer("main", function (this: BaseLayer) { ): Day { const opened = persistent(false); const recentlyUpdated = persistent(false); - const cachedSaves = persistent([]); - const getLayer = computed(() => player.layers[optionsFunc().layer ?? "trees"]) // Probably a better way to do this return createLazyProxy(() => { const day = optionsFunc(); @@ -426,7 +410,6 @@ export const main = createLayer("main", function (this: BaseLayer) { minWidth: 700, isMastery, toggleMastery, - display: jsx(() => ( <> {player.devSpeed === 0 ?
Game Paused
: null} From be43298ee4ab116d349ad928ed10d089a18354cc Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Thu, 15 Dec 2022 01:12:09 +0000 Subject: [PATCH 004/124] begin mastering trees (warnings) --- src/data/layers/trees.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx index 1dab5fb..4678595 100644 --- a/src/data/layers/trees.tsx +++ b/src/data/layers/trees.tsx @@ -793,6 +793,12 @@ const layer = createLayer(id, function (this: BaseLayer) { } }); + const mastery = { + logs: createResource(0,'logs'), + saplings: createResource(0,'saplings'), + + } + return { name, color: colorBright, From c89f37a8679373fa745357d6ef64c5f70bf5e1ac Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Thu, 15 Dec 2022 02:33:24 +0000 Subject: [PATCH 005/124] Never touching this again --- src/data/layers/elves.tsx | 3 ++- src/data/layers/workshop.tsx | 36 ++++++++++++++++++++---------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/data/layers/elves.tsx b/src/data/layers/elves.tsx index 5bad141..4e76e99 100644 --- a/src/data/layers/elves.tsx +++ b/src/data/layers/elves.tsx @@ -877,7 +877,8 @@ const layer = createLayer(id, function (this: BaseLayer) { "Carol will automatically purchase all dyes you can afford, without actually spending any resources.", buyable: Object.values(dyes.dyes).map(dye => dye.buyable), cooldownModifier: dyeCooldown, // Note: Buy max will be unlocked at this point - visibility: () => showIf(wrappingPaper.milestones.unlockDyeElf.earned.value) + visibility: () => showIf(wrappingPaper.milestones.unlockDyeElf.earned.value), + buyMax: true }); const wrappingPaperElves = [dyeElf]; const elves = { diff --git a/src/data/layers/workshop.tsx b/src/data/layers/workshop.tsx index 2f945f5..baeeaf1 100644 --- a/src/data/layers/workshop.tsx +++ b/src/data/layers/workshop.tsx @@ -41,10 +41,26 @@ const layer = createLayer(id, function (this: BaseLayer) { const foundationProgress = createResource(0, "foundation progress"); + const costDecrease = createSequentialModifier(() => [ + createMultiplicativeModifier(() => ({ + multiplier: computed(() => Decimal.recip(wrappingPaper.boosts.beach1.value)), + description: "Beach Wrapping Paper", + enabled: computed(() => Decimal.gt(wrappingPaper.boosts.beach1.value, 1)) + })), + createExponentialModifier(() => ({ + exponent: 0.99, + description: "Holly Level 5", + enabled: management.elfTraining.cutterElfTraining.milestones[4].earned + })) + ]) + + const addScaling = (value: DecimalSource) => computed(() => costDecrease.apply(value)); + const foundationConversion = createIndependentConversion(() => ({ scaling: addSoftcap( - addSoftcap(createPolynomialScaling(250, 1.5), 5387, 1 / 1e10), - 1e20, + addSoftcap(createPolynomialScaling( + addScaling(250), 1.5), addScaling(5387), 1 / 1e10), + addScaling(1e20), 3e8 ), baseResource: trees.logs, @@ -53,20 +69,8 @@ const layer = createLayer(id, function (this: BaseLayer) { // buyMax: management.elfTraining.expandersElfTraining.milestones[2].earned, spend(gain, spent) { trees.logs.value = Decimal.sub(trees.logs.value, spent); - }, - costModifier: createSequentialModifier(() => [ - createMultiplicativeModifier(() => ({ - multiplier: computed(() => wrappingPaper.boosts.beach1.value), - description: "Beach Wrapping Paper", - enabled: computed(() => Decimal.gt(wrappingPaper.boosts.beach1.value, 1)) - })), - createExponentialModifier(() => ({ - exponent: 1 / 0.99, - description: "Holly Level 5", - enabled: management.elfTraining.cutterElfTraining.milestones[4].earned - })) - ]) - })); + } + })); const buildFoundation = createClickable(() => ({ display: jsx(() => ( From 52994915c33015eefe31f1bb6cb87b5973ccb73d Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Thu, 15 Dec 2022 04:29:08 +0000 Subject: [PATCH 006/124] min width --- src/data/layers/wrapping-paper.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/layers/wrapping-paper.tsx b/src/data/layers/wrapping-paper.tsx index 32110bc..a7ec249 100644 --- a/src/data/layers/wrapping-paper.tsx +++ b/src/data/layers/wrapping-paper.tsx @@ -390,7 +390,8 @@ const layer = createLayer (id, () => { generalTabCollapsed, boosts, milestones, - collapseMilestones + collapseMilestones, + minWidth: 700 } }) From bc0db8c0177226c9cca9314d9932a8d9f664a069 Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Thu, 15 Dec 2022 12:01:54 +0000 Subject: [PATCH 007/124] kludge go brrr (incomplete) --- src/data/common.tsx | 9 ++ src/data/layers/trees.tsx | 241 ++++++++++++++++++++++++++++++++--- src/data/layers/workshop.tsx | 2 +- 3 files changed, 236 insertions(+), 16 deletions(-) diff --git a/src/data/common.tsx b/src/data/common.tsx index be75f9b..c6f45ee 100644 --- a/src/data/common.tsx +++ b/src/data/common.tsx @@ -16,6 +16,7 @@ import { GenericMilestone } from "features/milestones/milestone"; import { displayResource, Resource, trackTotal } from "features/resources/resource"; import type { GenericTree, GenericTreeNode, TreeNode, TreeNodeOptions } from "features/trees/tree"; import { createTreeNode } from "features/trees/tree"; +import { BaseLayer, Layer } from "game/layers"; import type { Modifier } from "game/modifiers"; import type { Persistent } from "game/persistence"; import { DefaultValue, persistent } from "game/persistence"; @@ -544,3 +545,11 @@ export function changeActiveBuyables(options: { max }; } +/* ugh +export function masteryHelper(layer: BaseLayer & {mastery: Partial}, main: Layer & { isMastery: Ref }): ProxyHandler{ + return new Proxy({}, { + get (__, key: keyof typeof layer.mastery) { + return main.isMastery.value ? layer.mastery[key] : layer[key] + } + }) +} */ \ No newline at end of file diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx index a134221..9618822 100644 --- a/src/data/layers/trees.tsx +++ b/src/data/layers/trees.tsx @@ -26,6 +26,7 @@ import { import { noPersist, persistent } from "game/persistence"; import Decimal, { DecimalSource, format, formatGain, formatLimit, formatWhole } from "util/bignum"; import { Direction, WithRequired } from "util/common"; +import { createLazyProxy } from "util/proxies"; import { render, renderGrid, renderRow } from "util/vue"; import { computed, ref } from "vue"; import boxes from "./boxes"; @@ -51,6 +52,7 @@ const layer = createLayer(id, function (this: BaseLayer) { const logs = createResource(0, "logs"); // Think of saplings as spent trees const saplings = createResource(0, "saplings"); + const mastered = persistent(false); const ema = ref(0); @@ -59,9 +61,9 @@ const layer = createLayer(id, function (this: BaseLayer) { const totalTrees = createSequentialModifier(() => [ createAdditiveModifier(() => ({ - addend: () => Decimal.times(expandingForestBuyable.amount.value, 10), + addend: () => Decimal.times((main.isMastery.value ? mastery.expandingForestBuyable : expandingForestBuyable).amount.value, 10), description: "Expand Forest", - enabled: researchUpgrade2.bought + enabled: (main.isMastery.value ? mastery.researchUpgrade2 : researchUpgrade2).bought })), createAdditiveModifier(() => ({ addend: () => Decimal.div(workshop.foundationProgress.value, 2), @@ -95,7 +97,7 @@ const layer = createLayer(id, function (this: BaseLayer) { })) ]) as WithRequired; const trees = createResource( - computed(() => Decimal.sub(totalTrees.apply(10), saplings.value)), + computed(() => Decimal.sub(totalTrees.apply(10), main.isMastery.value ? mastery.saplings.value : saplings.value)), "trees" ); const computedTotalTrees = computed(() => totalTrees.apply(10)); @@ -292,7 +294,7 @@ const layer = createLayer(id, function (this: BaseLayer) { createAdditiveModifier(() => ({ addend: 1, description: "Wooden Fingers", - enabled: manualCutUpgrade1.bought + enabled: (main.isMastery ? mastery.manualCutUpgrade1 : manualCutUpgrade1).bought })), createAdditiveModifier(() => ({ addend: computedAutoCuttingAmount, @@ -793,11 +795,218 @@ const layer = createLayer(id, function (this: BaseLayer) { } }); - const mastery = { - logs: createResource(0,'logs'), - saplings: createResource(0,'saplings'), - - } + // This would be a lazy proxy if the typings worked properly, REEE + // Doesn't matter too much, nothing needs lazy inittialization + const mastery = (() => { + const logs = createResource(0, "logs") + const manualCutUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 10, + display: { + title: "Wooden Fingers", + description: "Cut down an additional tree per click" + } + })); + const manualPlantUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 10, + display: { + title: "Leafy Fingers", + description: "Plant an additional tree per click" + } + })); + const autoCutUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 25, + display: { + title: "Automated Knives", + description: "Cut down a tree every second" + } + })); + const autoPlantUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 25, + display: { + title: "Automated Spade", + description: "Plant a tree every second" + } + })); + const researchUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 40, + display: { + title: "Research I", + description: "Trees give 25% more logs, and unlock more upgrades" + } + })); + const row1Upgrades = [ + manualCutUpgrade1, + manualPlantUpgrade1, + autoCutUpgrade1, + autoPlantUpgrade1, + researchUpgrade1 + ]; + + const manualCutUpgrade2 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 50, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Sharper Fingers", + description: "Manually cut trees twice as often" + } + })); + const manualPlantUpgrade2 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 50, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Greener Fingers", + description: "Manually Plant trees twice as often" + } + })); + const manualCutUpgrade3 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 150, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Smart Knives", + description: + "Each time you manually chop trees, gain 1s of automatic tree chopping production" + } + })); + const manualPlantUpgrade3 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 150, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Smart Spades", + description: + "Each time you manually plant trees, gain 1s of automatic tree planting production" + } + })); + const researchUpgrade2 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 300, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Research II", + description: "Trees give 25% more logs, and unlock repeatable purchases" + } + })); + const row2Upgrades = [ + manualCutUpgrade2, + manualPlantUpgrade2, + manualCutUpgrade3, + manualPlantUpgrade3, + researchUpgrade2 + ]; + + const autoCuttingBuyable1 = createBuyable(() => ({ + resource: noPersist(logs), + 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); + if (Decimal.gte(v, 2e30)) v = Decimal.pow(v, 10).div(Decimal.pow(2e30, 9)); + v = Decimal.pow(0.95, paper.books.cuttersBook.totalAmount.value).times(v); + return Decimal.times(100, v).add(200); + }, + inverseCost(x: DecimalSource) { + let v = Decimal.sub(x, 200).div(100); + v = v.div(Decimal.pow(0.95, paper.books.cuttersBook.totalAmount.value)); + if (Decimal.gte(v, 2e30)) v = Decimal.mul(v, Decimal.pow(2e30, 9)).root(10); + 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: "Generic Cutters", + description: "Each cutter cuts down 1 tree/s" + }, + visibility: () => showIf(researchUpgrade2.bought.value) + })) as ElfBuyable & { display: { title: string }; resource: Resource }; + const autoPlantingBuyable1 = createBuyable(() => ({ + resource: noPersist(logs), + 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); + 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) { + cost = Decimal.div(cost, 10); + } + return cost; + }, + inverseCost(x: DecimalSource) { + 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); + 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: "Generic Planters", + description: "Each planter plants 0.5 trees/s" + }, + visibility: () => showIf(researchUpgrade2.bought.value) + })) as ElfBuyable & { display: { title: string }; resource: Resource }; + const expandingForestBuyable = createBuyable(() => ({ + resource: noPersist(logs), + cost() { + 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.totalAmount.value).times(v); + return Decimal.pow(Decimal.add(v, 1), 1.5).times(500); + }, + inverseCost(x: DecimalSource) { + let v = Decimal.div(x, 500).root(1.5).sub(1); + v = v.div(Decimal.pow(0.95, paper.books.expandersBook.totalAmount.value)); + if (Decimal.gte(v, 1e15)) v = Decimal.mul(v, 1e135).root(10); + if (Decimal.gte(v, 1e5)) v = Decimal.mul(v, 1e5).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: { + title: "Expand Forest", + description: "Add 10 trees to the forest" + }, + visibility: () => showIf(researchUpgrade2.bought.value) + })) as ElfBuyable & { display: { title: string }; resource: Resource }; + return { + logs, + saplings, + manualCutUpgrade1, + manualCutUpgrade2, + manualCutUpgrade3, + manualPlantUpgrade1, + manualPlantUpgrade2, + manualPlantUpgrade3, + autoCuttingBuyable1, + autoPlantingBuyable1, + expandingForestBuyable, + researchUpgrade1, + researchUpgrade2, + autoCutUpgrade1, + autoPlantUpgrade1, + row1Buyables, + row1Upgrades, + row2Upgrades + } + })(); + //mastery.manualCutUpgrade1 return { name, @@ -817,13 +1026,14 @@ const layer = createLayer(id, function (this: BaseLayer) { manualPlantProgress, generalTabCollapsed, computedAutoCuttingAmount, + mastery, minWidth: 700, display: jsx(() => ( <> {render(trackerDisplay)} Tip: You can hold down on actions to perform them automatically - {renderGrid(row1Upgrades, row2Upgrades)} + {renderGrid(...main.isMastery.value ? [mastery.row1Upgrades, mastery.row2Upgrades] : [row1Upgrades, row2Upgrades])} - {renderRow(...row1Buyables)} + {renderRow(...main.isMastery.value ? mastery.row1Buyables : row1Buyables)} )), minimizedDisplay: jsx(() => (
- {name} - {format(logs.value)} {logs.displayName} + {name} - {format(main.isMastery.value ? mastery.logs.value : logs.value)} {logs.displayName}
- )) + )), + mastered }; }); diff --git a/src/data/layers/workshop.tsx b/src/data/layers/workshop.tsx index baeeaf1..e1845ff 100644 --- a/src/data/layers/workshop.tsx +++ b/src/data/layers/workshop.tsx @@ -59,7 +59,7 @@ const layer = createLayer(id, function (this: BaseLayer) { const foundationConversion = createIndependentConversion(() => ({ scaling: addSoftcap( addSoftcap(createPolynomialScaling( - addScaling(250), 1.5), addScaling(5387), 1 / 1e10), + addScaling(250), 1.5), addScaling(5423), 1 / 1e10), addScaling(1e20), 3e8 ), From 2432d2242aecf73584c41175d79b1f9d68221d0d Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Thu, 15 Dec 2022 16:04:40 -0800 Subject: [PATCH 008/124] start day 17 --- src/data/layers/toys.tsx | 871 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 871 insertions(+) create mode 100644 src/data/layers/toys.tsx diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx new file mode 100644 index 0000000..81d5805 --- /dev/null +++ b/src/data/layers/toys.tsx @@ -0,0 +1,871 @@ +/** + * @module + * @hidden + */ +import Spacer from "components/layout/Spacer.vue"; +import Modal from "components/Modal.vue"; +import { createCollapsibleModifierSections, setUpDailyProgressTracker } from "data/common"; +import { main } from "data/projEntry"; +import { createBar } from "features/bars/bar"; +import { createBuyable, GenericBuyable } from "features/buyable"; +import { createClickable } from "features/clickables/clickable"; +import { jsx, showIf } from "features/feature"; +import { createHotkey } from "features/hotkey"; +import MainDisplay from "features/resources/MainDisplay.vue"; +import { createResource, Resource } from "features/resources/resource"; +import { createUpgrade } from "features/upgrades/upgrade"; +import { globalBus } from "game/events"; +import { BaseLayer, createLayer } from "game/layers"; +import { + createAdditiveModifier, + createExponentialModifier, + createMultiplicativeModifier, + createSequentialModifier, + Modifier +} from "game/modifiers"; +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 boxes from "./boxes"; +import cloth from "./cloth"; +import coal from "./coal"; +import dyes from "./dyes"; +import elves, { ElfBuyable } from "./elves"; +import management from "./management"; +import paper from "./paper"; +import workshop from "./workshop"; +import wrappingPaper from "./wrapping-paper"; +const id = "toys"; +const day = 17; + +// how much to prioritize this' income +// vs the previous ones +const SMOOTHING_FACTOR = 0.1; +const layer = createLayer(id, function (this: BaseLayer) { + const name = "Toys"; + const colorBright = "#4BDC13"; + const colorDark = "green"; + + const logs = createResource(0, "logs"); + // Think of saplings as spent trees + const saplings = createResource(0, "saplings"); + + const ema = ref(0); + + const lastAutoCuttingAmount = ref(0); + const lastAutoPlantedAmount = ref(0); + + const totalTrees = createSequentialModifier(() => [ + createAdditiveModifier(() => ({ + addend: () => Decimal.times(expandingForestBuyable.amount.value, 10), + description: "Expand Forest", + enabled: researchUpgrade2.bought + })), + createAdditiveModifier(() => ({ + addend: () => Decimal.div(workshop.foundationProgress.value, 2), + description: "75% Foundation Completed", + enabled: workshop.milestones.morePlantsMilestone1.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "5 Elves Trained", + enabled: elves.milestones[4].earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "8 Elves Trained", + enabled: elves.milestones[7].earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 4, + description: "Lumberjack Boots", + enabled: cloth.treesUpgrades.treesUpgrade1.bought + })), + createAdditiveModifier(() => ({ + 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( + computed(() => Decimal.sub(totalTrees.apply(10), saplings.value)), + "trees" + ); + const computedTotalTrees = computed(() => totalTrees.apply(10)); + + const manualCutUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 10, + display: { + title: "Wooden Fingers", + description: "Cut down an additional tree per click" + } + })); + const manualPlantUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 10, + display: { + title: "Leafy Fingers", + description: "Plant an additional tree per click" + } + })); + const autoCutUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 25, + display: { + title: "Automated Knives", + description: "Cut down a tree every second" + } + })); + const autoPlantUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 25, + display: { + title: "Automated Spade", + description: "Plant a tree every second" + } + })); + const researchUpgrade1 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 40, + display: { + title: "Research I", + description: "Trees give 25% more logs, and unlock more upgrades" + } + })); + const row1Upgrades = [ + manualCutUpgrade1, + manualPlantUpgrade1, + autoCutUpgrade1, + autoPlantUpgrade1, + researchUpgrade1 + ]; + + const manualCutUpgrade2 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 50, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Sharper Fingers", + description: "Manually cut trees twice as often" + } + })); + const manualPlantUpgrade2 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 50, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Greener Fingers", + description: "Manually Plant trees twice as often" + } + })); + const manualCutUpgrade3 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 150, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Smart Knives", + description: + "Each time you manually chop trees, gain 1s of automatic tree chopping production" + } + })); + const manualPlantUpgrade3 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 150, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Smart Spades", + description: + "Each time you manually plant trees, gain 1s of automatic tree planting production" + } + })); + const researchUpgrade2 = createUpgrade(() => ({ + resource: noPersist(logs), + cost: 300, + visibility: () => showIf(researchUpgrade1.bought.value), + display: { + title: "Research II", + description: "Trees give 25% more logs, and unlock repeatable purchases" + } + })); + const row2Upgrades = [ + manualCutUpgrade2, + manualPlantUpgrade2, + manualCutUpgrade3, + manualPlantUpgrade3, + researchUpgrade2 + ]; + + const autoCuttingBuyable1 = createBuyable(() => ({ + resource: noPersist(logs), + 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); + if (Decimal.gte(v, 2e30)) v = Decimal.pow(v, 10).div(Decimal.pow(2e30, 9)); + v = Decimal.pow(0.95, paper.books.cuttersBook.totalAmount.value).times(v); + return Decimal.times(100, v).add(200); + }, + inverseCost(x: DecimalSource) { + let v = Decimal.sub(x, 200).div(100); + v = v.div(Decimal.pow(0.95, paper.books.cuttersBook.totalAmount.value)); + if (Decimal.gte(v, 2e30)) v = Decimal.mul(v, Decimal.pow(2e30, 9)).root(10); + 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: "Generic Cutters", + description: "Each cutter cuts down 1 tree/s" + }, + visibility: () => showIf(researchUpgrade2.bought.value) + })) as ElfBuyable & { display: { title: string }; resource: Resource }; + const autoPlantingBuyable1 = createBuyable(() => ({ + resource: noPersist(logs), + 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); + 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) { + cost = Decimal.div(cost, 10); + } + return cost; + }, + inverseCost(x: DecimalSource) { + 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); + 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: "Generic Planters", + description: "Each planter plants 0.5 trees/s" + }, + visibility: () => showIf(researchUpgrade2.bought.value) + })) as ElfBuyable & { display: { title: string }; resource: Resource }; + const expandingForestBuyable = createBuyable(() => ({ + resource: noPersist(logs), + cost() { + 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.totalAmount.value).times(v); + return Decimal.pow(Decimal.add(v, 1), 1.5).times(500); + }, + inverseCost(x: DecimalSource) { + let v = Decimal.div(x, 500).root(1.5).sub(1); + v = v.div(Decimal.pow(0.95, paper.books.expandersBook.totalAmount.value)); + if (Decimal.gte(v, 1e15)) v = Decimal.mul(v, 1e135).root(10); + if (Decimal.gte(v, 1e5)) v = Decimal.mul(v, 1e5).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: { + title: "Expand Forest", + description: "Add 10 trees to the forest" + }, + visibility: () => showIf(researchUpgrade2.bought.value) + })) as ElfBuyable & { display: { title: string }; resource: Resource }; + const row1Buyables = [autoCuttingBuyable1, autoPlantingBuyable1, expandingForestBuyable]; + + const manualCuttingAmount = createSequentialModifier(() => [ + createAdditiveModifier(() => ({ + addend: 1, + description: "Wooden Fingers", + enabled: manualCutUpgrade1.bought + })), + createAdditiveModifier(() => ({ + addend: computedAutoCuttingAmount, + description: "Smart Knives", + enabled: manualCutUpgrade3.bought + })) + ]); + const computedManualCuttingAmount = computed(() => manualCuttingAmount.apply(1)); + const manualCuttingCooldown = createSequentialModifier(() => [ + createMultiplicativeModifier(() => ({ + multiplier: 0.5, + description: "Sharper Fingers", + enabled: manualCutUpgrade2.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: () => Decimal.pow(0.5, elves.totalElves.value), + description: "1 Elf Trained", + enabled: elves.milestones[0].earned + })) + ]); + const computedManualCuttingCooldown = computed(() => manualCuttingCooldown.apply(1)); + + const autoCuttingAmount = createSequentialModifier(() => [ + createAdditiveModifier(() => ({ + addend: 1, + description: "Automated Knives", + enabled: autoCutUpgrade1.bought + })), + createAdditiveModifier(() => ({ + addend: autoCuttingBuyable1.amount, + description: "Generic Cutters", + enabled: researchUpgrade2.bought + })), + createAdditiveModifier(() => ({ + addend: () => Decimal.div(workshop.foundationProgress.value, 5).floor(), + description: "10% Foundation Completed", + enabled: workshop.milestones.autoCutMilestone1.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "30% Foundation Completed", + enabled: workshop.milestones.autoCutMilestone2.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Warmer Cutters", + enabled: coal.warmerCutters.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: coal.computedHeatedCutterEffect, + description: "Heated Cutters", + enabled: () => Decimal.gt(coal.heatedCutters.amount.value, 0) + })), + createMultiplicativeModifier(() => ({ + 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(lastAutoPlantedAmount.value, lastAutoCuttingAmount.value).max(0), + description: "Ivy Level 5", + enabled: management.elfTraining.planterElfTraining.milestones[4].earned + })) + ]) as WithRequired; + const computedAutoCuttingAmount = computed(() => autoCuttingAmount.apply(0)); + + const manualPlantingAmount = createSequentialModifier(() => [ + createAdditiveModifier(() => ({ + addend: 1, + description: "Leafy Fingers", + enabled: manualPlantUpgrade1.bought + })), + createAdditiveModifier(() => ({ + addend: computedAutoPlantingAmount, + description: "Smart Spades", + enabled: manualPlantUpgrade3.bought + })) + ]); + const computedManualPlantingAmount = computed(() => manualPlantingAmount.apply(1)); + const manualPlantingCooldown = createSequentialModifier(() => [ + createMultiplicativeModifier(() => ({ + multiplier: 0.5, + description: "Greener Fingers", + enabled: manualPlantUpgrade2.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: () => Decimal.pow(0.5, elves.totalElves.value), + description: "1 Elf Trained", + enabled: elves.milestones[0].earned + })) + ]); + const computedManualPlantingCooldown = computed(() => manualPlantingCooldown.apply(1)); + + const autoPlantingAmount = createSequentialModifier(() => [ + createAdditiveModifier(() => ({ + addend: 1, + description: "Automated Spade", + enabled: autoPlantUpgrade1.bought + })), + createAdditiveModifier(() => ({ + addend: () => Decimal.div(autoPlantingBuyable1.amount.value, 2), + description: "Generic Planters", + enabled: researchUpgrade2.bought + })), + createAdditiveModifier(() => ({ + addend: () => Decimal.div(workshop.foundationProgress.value, 10).floor(), + description: "20% Foundation Completed", + enabled: workshop.milestones.autoPlantMilestone1.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "40% Foundation Completed", + enabled: workshop.milestones.autoPlantMilestone2.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Warmer Planters", + enabled: coal.warmerPlanters.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: coal.computedHeatedPlanterEffect, + description: "Heated Planters", + enabled: () => Decimal.gt(coal.heatedPlanters.amount.value, 0) + })), + createMultiplicativeModifier(() => ({ + multiplier: 4, + description: "Lumberjack Plaid", + enabled: cloth.treesUpgrades.treesUpgrade3.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Ivy Level 1", + enabled: management.elfTraining.planterElfTraining.milestones[0].earned + })), + 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 + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Mary Level 4", + enabled: management.elfTraining.heatedPlanterElfTraining.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 computedAutoPlantingAmount = computed(() => autoPlantingAmount.apply(0)); + + const logGain = createSequentialModifier(() => [ + createMultiplicativeModifier(() => ({ + multiplier: 1.25, + description: "Research I", + enabled: researchUpgrade1.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: 1.25, + description: "Research II", + enabled: researchUpgrade2.bought + })), + createMultiplicativeModifier(() => ({ + 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 + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "50% Foundation Completed", + enabled: workshop.milestones.logGainMilestone2.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 1.25, + description: "Ashy Soil", + enabled: coal.basicFertilizer.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: coal.computedFertilizerEffect, + description: "Fertilized Soil", + enabled: () => Decimal.gt(coal.moreFertilizer.amount.value, 0) + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "4 Elves Trained", + enabled: elves.milestones[3].earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Carry logs in boxes", + enabled: boxes.upgrades.logsUpgrade.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: () => Decimal.div(boxes.buyables.logBoxesBuyable.amount.value, 2).add(1), + description: "Carry more logs", + enabled: boxes.upgrades.logsUpgrade.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: 10, + description: "Felt-Gripped Axe", + enabled: cloth.treesUpgrades.treesUpgrade4.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: computed(() => + Decimal.add(computedAutoCuttingAmount.value, 1).log10().plus(1) + ), + description: "Is Blue Dye just Water?", + enabled: dyes.upgrades.blueDyeUpg.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: computed(() => Decimal.add(computedAutoCuttingAmount.value, 1).root(9)), + description: "Holly Level 1", + enabled: management.elfTraining.cutterElfTraining.milestones[0].earned + })), + createMultiplicativeModifier(() => ({ + multiplier: () => Decimal.sqrt(management.totalElfLevels.value), + description: "Noel Level 1", + enabled: management.elfTraining.fertilizerElfTraining.milestones[0].earned + })), + createMultiplicativeModifier(() => ({ + multiplier: wrappingPaper.boosts.christmas1, + description: "Christmas Wrapping Paper", + enabled: computed(() => Decimal.gt(wrappingPaper.boosts.christmas1.value, 1)) + })), + createExponentialModifier(() => ({ + exponent: 1.2, + description: "100% Foundation Completed", + enabled: workshop.milestones.logGainMilestone3.earned + })), + createExponentialModifier(() => ({ + exponent: 1.05, + description: "Un-Processing", + enabled: paper.upgrades2.treeUpgrade.bought + })) + ]); + + const manualCutProgress = persistent(0); + const manualCutProgressBar = createBar(() => ({ + direction: Direction.Right, + width: 100, + height: 10, + style: "margin-top: 8px", + baseStyle: "margin-top: -1px", + fillStyle: "margin-top: -1px; transition-duration: 0s", + progress: () => Decimal.div(manualCutProgress.value, computedManualCuttingCooldown.value) + })); + + const cutTree = createClickable(() => ({ + display: { + title: "Cut trees", + description: jsx(() => ( + <> + Cut down up to {formatWhole(Decimal.floor(computedManualCuttingAmount.value))}{" "} + tree + {Decimal.eq(computedManualCuttingAmount.value, 1) ? "" : "s"} at once! +
+ {render(manualCutProgressBar)} + + )) + }, + style: { + minHeight: "80px" + }, + canClick: () => + Decimal.gte(trees.value, 1) && + Decimal.gte(manualCutProgress.value, computedManualCuttingCooldown.value), + onClick() { + if (Decimal.lt(manualCutProgress.value, computedManualCuttingCooldown.value)) { + return; + } + const amount = Decimal.floor( + Decimal.min( + trees.value, + Decimal.times( + computedManualCuttingAmount.value, + Decimal.div( + manualCutProgress.value, + computedManualCuttingCooldown.value + ).floor() + ) + ) + ); + logs.value = Decimal.add(logs.value, Decimal.times(logGain.apply(1), amount)); + saplings.value = Decimal.add(saplings.value, amount); + manualCutProgress.value = 0; + } + })); + + const manualPlantProgress = persistent(0); + const manualPlantProgressBar = createBar(() => ({ + direction: Direction.Right, + width: 100, + height: 10, + style: "margin-top: 8px", + baseStyle: "margin-top: -1px", + fillStyle: "margin-top: -1px; transition-duration: 0s", + progress: () => Decimal.div(manualPlantProgress.value, computedManualPlantingCooldown.value) + })); + const plantTree = createClickable(() => ({ + display: { + title: "Plant trees", + description: jsx(() => ( + <> + Plant up to {formatWhole(Decimal.floor(computedManualPlantingAmount.value))}{" "} + tree + {Decimal.eq(computedManualPlantingAmount.value, 1) ? "" : "s"} at once! +
+ {render(manualPlantProgressBar)} + + )) + }, + style: { + minHeight: "80px" + }, + canClick: () => + Decimal.gte(saplings.value, 1) && + Decimal.gte(manualPlantProgress.value, computedManualPlantingCooldown.value), + onClick() { + if (Decimal.lt(manualPlantProgress.value, computedManualPlantingCooldown.value)) { + return; + } + const amount = Decimal.floor( + Decimal.min( + saplings.value, + Decimal.times( + computedManualPlantingAmount.value, + Decimal.div( + manualPlantProgress.value, + computedManualPlantingCooldown.value + ).floor() + ) + ) + ); + saplings.value = Decimal.sub(saplings.value, amount); + manualPlantProgress.value = 0; + } + })); + + const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [ + { + title: "Logs per Tree", + modifier: logGain, + base: 1, + visible: researchUpgrade1.bought + }, + { + title: "Manual Cutting Amount", + modifier: manualCuttingAmount, + base: 1, + visible: manualCutUpgrade1.bought, + unit: "/click" + }, + { + title: "Manual Cutting Cooldown", + modifier: manualCuttingCooldown, + base: 1, + visible: manualCutUpgrade1.bought, + unit: "s" + }, + { + title: "Manual Planting Amount", + modifier: manualPlantingAmount, + base: 1, + visible: manualPlantUpgrade1.bought, + unit: "/click" + }, + { + title: "Manual Planting Cooldown", + modifier: manualPlantingCooldown, + base: 1, + visible: manualPlantUpgrade1.bought, + unit: "s" + }, + { + title: `Auto Cutting Amount`, + modifier: autoCuttingAmount, + base: 0, + visible: autoCutUpgrade1.bought, + unit: "/s" + }, + { + title: `Auto Planting Amount`, + modifier: autoPlantingAmount, + base: 0, + visible: autoPlantUpgrade1.bought, + unit: "/s" + }, + { + title: `Forest Size`, + modifier: totalTrees, + base: 10, + visible: researchUpgrade2.bought + } + ]); + const showModifiersModal = ref(false); + const modifiersModal = jsx(() => ( + (showModifiersModal.value = value)} + v-slots={{ + header: () =>

{name} Modifiers

, + body: generalTab + }} + /> + )); + + globalBus.on("update", diff => { + if (Decimal.lt(main.day.value, day)) { + return; + } + + if (Decimal.gte(manualCutProgress.value, computedManualCuttingCooldown.value)) { + manualCutProgress.value = computedManualCuttingCooldown.value; + } else { + manualCutProgress.value = Decimal.add(manualCutProgress.value, diff); + if (cutTree.isHolding.value) { + cutTree.onClick(); + } + } + if (Decimal.gte(manualPlantProgress.value, computedManualPlantingCooldown.value)) { + manualPlantProgress.value = computedManualPlantingCooldown.value; + } else { + manualPlantProgress.value = Decimal.add(manualPlantProgress.value, diff); + if (plantTree.isHolding.value) { + plantTree.onClick(); + } + } + + const plantingAmount = Decimal.sub( + computedAutoPlantingAmount.value, + Decimal.sub(lastAutoCuttingAmount.value, lastAutoPlantedAmount.value).max(0) + ); + const cuttingAmount = Decimal.sub( + computedAutoCuttingAmount.value, + Decimal.sub(lastAutoPlantedAmount.value, lastAutoCuttingAmount.value).max(0) + ); + lastAutoPlantedAmount.value = Decimal.isNaN(plantingAmount) ? 0 : plantingAmount; + lastAutoCuttingAmount.value = Decimal.isNaN(cuttingAmount) ? 0 : cuttingAmount; + + const amountCut = Decimal.min( + trees.value, + Decimal.times(computedAutoCuttingAmount.value, diff) + ); + const logsGained = Decimal.mul(logGain.apply(1), amountCut); + + const effectiveLogsGained = Decimal.div(logsGained, diff); + 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); + + const amountPlanted = Decimal.min( + saplings.value, + Decimal.times(computedAutoPlantingAmount.value, diff) + ); + saplings.value = Decimal.sub(saplings.value, amountPlanted); + }); + + const netSaplingGain = computed(() => + Decimal.sub(computedAutoCuttingAmount.value, computedAutoPlantingAmount.value) + ); + const netTreeGain = computed(() => + Decimal.sub(computedAutoPlantingAmount.value, computedAutoCuttingAmount.value) + ); + + const cutTreeHK = createHotkey(() => ({ + key: "c", + description: 'Press the "Cut trees" button.', + onPress: () => { + if (cutTree.canClick.value) cutTree.onClick(); + } + })); + const plantTreeHK = createHotkey(() => ({ + key: "p", + description: 'Press the "Plant trees" button.', + onPress: () => { + if (plantTree.canClick.value) plantTree.onClick(); + } + })); + + const { total: totalLogs, trackerDisplay } = setUpDailyProgressTracker({ + resource: logs, + goal: 1e4, + name, + day, + color: colorDark, + modal: { + show: showModifiersModal, + display: modifiersModal + } + }); + + return { + name, + color: colorBright, + logs, + totalLogs, + trees, + saplings, + cutTree, + plantTree, + cutTreeHK, + plantTreeHK, + row1Upgrades, + row2Upgrades, + row1Buyables, + manualCutProgress, + manualPlantProgress, + generalTabCollapsed, + computedAutoCuttingAmount, + minWidth: 700, + display: jsx(() => ( + <> + {render(trackerDisplay)} + + equilibrium: +${formatLimit( + [ + [computedAutoCuttingAmount.value, "cutting speed"], + [computedAutoPlantingAmount.value, "planting speed"], + [Decimal.mul(computedTotalTrees.value, 20), "forest cap"] + ], + "/s", + logGain.apply(1) + )}` + : undefined + } + /> + + + + {renderRow(cutTree, plantTree)} +
Tip: You can hold down on actions to perform them automatically
+ + {renderGrid(row1Upgrades, row2Upgrades)} + + {renderRow(...row1Buyables)} + + )), + minimizedDisplay: jsx(() => ( +
+ {name} - {format(logs.value)} {logs.displayName} +
+ )) + }; +}); + +export default layer; From 46eb86fd4847a0d51a5a8f109e0a32ca111b916f Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 16 Dec 2022 00:13:44 +0000 Subject: [PATCH 009/124] do toy stuff? --- src/data/layers/toys.tsx | 765 ++------------------------------------- 1 file changed, 22 insertions(+), 743 deletions(-) diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index 81d5805..1beb8ab 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -48,654 +48,19 @@ const layer = createLayer(id, function (this: BaseLayer) { const colorBright = "#4BDC13"; const colorDark = "green"; - const logs = createResource(0, "logs"); - // Think of saplings as spent trees - const saplings = createResource(0, "saplings"); - - const ema = ref(0); - - const lastAutoCuttingAmount = ref(0); - const lastAutoPlantedAmount = ref(0); - - const totalTrees = createSequentialModifier(() => [ - createAdditiveModifier(() => ({ - addend: () => Decimal.times(expandingForestBuyable.amount.value, 10), - description: "Expand Forest", - enabled: researchUpgrade2.bought - })), - createAdditiveModifier(() => ({ - addend: () => Decimal.div(workshop.foundationProgress.value, 2), - description: "75% Foundation Completed", - enabled: workshop.milestones.morePlantsMilestone1.earned - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "5 Elves Trained", - enabled: elves.milestones[4].earned - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "8 Elves Trained", - enabled: elves.milestones[7].earned - })), - createMultiplicativeModifier(() => ({ - multiplier: 4, - description: "Lumberjack Boots", - enabled: cloth.treesUpgrades.treesUpgrade1.bought - })), - createAdditiveModifier(() => ({ - 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( - computed(() => Decimal.sub(totalTrees.apply(10), saplings.value)), - "trees" - ); - const computedTotalTrees = computed(() => totalTrees.apply(10)); - - const manualCutUpgrade1 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 10, - display: { - title: "Wooden Fingers", - description: "Cut down an additional tree per click" - } - })); - const manualPlantUpgrade1 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 10, - display: { - title: "Leafy Fingers", - description: "Plant an additional tree per click" - } - })); - const autoCutUpgrade1 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 25, - display: { - title: "Automated Knives", - description: "Cut down a tree every second" - } - })); - const autoPlantUpgrade1 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 25, - display: { - title: "Automated Spade", - description: "Plant a tree every second" - } - })); - const researchUpgrade1 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 40, - display: { - title: "Research I", - description: "Trees give 25% more logs, and unlock more upgrades" - } - })); - const row1Upgrades = [ - manualCutUpgrade1, - manualPlantUpgrade1, - autoCutUpgrade1, - autoPlantUpgrade1, - researchUpgrade1 - ]; - - const manualCutUpgrade2 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 50, - visibility: () => showIf(researchUpgrade1.bought.value), - display: { - title: "Sharper Fingers", - description: "Manually cut trees twice as often" - } - })); - const manualPlantUpgrade2 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 50, - visibility: () => showIf(researchUpgrade1.bought.value), - display: { - title: "Greener Fingers", - description: "Manually Plant trees twice as often" - } - })); - const manualCutUpgrade3 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 150, - visibility: () => showIf(researchUpgrade1.bought.value), - display: { - title: "Smart Knives", - description: - "Each time you manually chop trees, gain 1s of automatic tree chopping production" - } - })); - const manualPlantUpgrade3 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 150, - visibility: () => showIf(researchUpgrade1.bought.value), - display: { - title: "Smart Spades", - description: - "Each time you manually plant trees, gain 1s of automatic tree planting production" - } - })); - const researchUpgrade2 = createUpgrade(() => ({ - resource: noPersist(logs), - cost: 300, - visibility: () => showIf(researchUpgrade1.bought.value), - display: { - title: "Research II", - description: "Trees give 25% more logs, and unlock repeatable purchases" - } - })); - const row2Upgrades = [ - manualCutUpgrade2, - manualPlantUpgrade2, - manualCutUpgrade3, - manualPlantUpgrade3, - researchUpgrade2 - ]; - - const autoCuttingBuyable1 = createBuyable(() => ({ - resource: noPersist(logs), - 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); - if (Decimal.gte(v, 2e30)) v = Decimal.pow(v, 10).div(Decimal.pow(2e30, 9)); - v = Decimal.pow(0.95, paper.books.cuttersBook.totalAmount.value).times(v); - return Decimal.times(100, v).add(200); - }, - inverseCost(x: DecimalSource) { - let v = Decimal.sub(x, 200).div(100); - v = v.div(Decimal.pow(0.95, paper.books.cuttersBook.totalAmount.value)); - if (Decimal.gte(v, 2e30)) v = Decimal.mul(v, Decimal.pow(2e30, 9)).root(10); - 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: "Generic Cutters", - description: "Each cutter cuts down 1 tree/s" - }, - visibility: () => showIf(researchUpgrade2.bought.value) - })) as ElfBuyable & { display: { title: string }; resource: Resource }; - const autoPlantingBuyable1 = createBuyable(() => ({ - resource: noPersist(logs), - 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); - 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) { - cost = Decimal.div(cost, 10); - } - return cost; - }, - inverseCost(x: DecimalSource) { - 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); - 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: "Generic Planters", - description: "Each planter plants 0.5 trees/s" - }, - visibility: () => showIf(researchUpgrade2.bought.value) - })) as ElfBuyable & { display: { title: string }; resource: Resource }; - const expandingForestBuyable = createBuyable(() => ({ - resource: noPersist(logs), - cost() { - 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.totalAmount.value).times(v); - return Decimal.pow(Decimal.add(v, 1), 1.5).times(500); - }, - inverseCost(x: DecimalSource) { - let v = Decimal.div(x, 500).root(1.5).sub(1); - v = v.div(Decimal.pow(0.95, paper.books.expandersBook.totalAmount.value)); - if (Decimal.gte(v, 1e15)) v = Decimal.mul(v, 1e135).root(10); - if (Decimal.gte(v, 1e5)) v = Decimal.mul(v, 1e5).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: { - title: "Expand Forest", - description: "Add 10 trees to the forest" - }, - visibility: () => showIf(researchUpgrade2.bought.value) - })) as ElfBuyable & { display: { title: string }; resource: Resource }; - const row1Buyables = [autoCuttingBuyable1, autoPlantingBuyable1, expandingForestBuyable]; - - const manualCuttingAmount = createSequentialModifier(() => [ - createAdditiveModifier(() => ({ - addend: 1, - description: "Wooden Fingers", - enabled: manualCutUpgrade1.bought - })), - createAdditiveModifier(() => ({ - addend: computedAutoCuttingAmount, - description: "Smart Knives", - enabled: manualCutUpgrade3.bought - })) + const toys = createResource(0, "toys"); + const toys2 = createResource(0, "toys2"); + const toys3 = createResource(0, "toys3"); + const toyGain = createSequentialModifier(() => [ + ]); - const computedManualCuttingAmount = computed(() => manualCuttingAmount.apply(1)); - const manualCuttingCooldown = createSequentialModifier(() => [ - createMultiplicativeModifier(() => ({ - multiplier: 0.5, - description: "Sharper Fingers", - enabled: manualCutUpgrade2.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: () => Decimal.pow(0.5, elves.totalElves.value), - description: "1 Elf Trained", - enabled: elves.milestones[0].earned - })) - ]); - const computedManualCuttingCooldown = computed(() => manualCuttingCooldown.apply(1)); - - const autoCuttingAmount = createSequentialModifier(() => [ - createAdditiveModifier(() => ({ - addend: 1, - description: "Automated Knives", - enabled: autoCutUpgrade1.bought - })), - createAdditiveModifier(() => ({ - addend: autoCuttingBuyable1.amount, - description: "Generic Cutters", - enabled: researchUpgrade2.bought - })), - createAdditiveModifier(() => ({ - addend: () => Decimal.div(workshop.foundationProgress.value, 5).floor(), - description: "10% Foundation Completed", - enabled: workshop.milestones.autoCutMilestone1.earned - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "30% Foundation Completed", - enabled: workshop.milestones.autoCutMilestone2.earned - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "Warmer Cutters", - enabled: coal.warmerCutters.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: coal.computedHeatedCutterEffect, - description: "Heated Cutters", - enabled: () => Decimal.gt(coal.heatedCutters.amount.value, 0) - })), - createMultiplicativeModifier(() => ({ - 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(lastAutoPlantedAmount.value, lastAutoCuttingAmount.value).max(0), - description: "Ivy Level 5", - enabled: management.elfTraining.planterElfTraining.milestones[4].earned - })) - ]) as WithRequired; - const computedAutoCuttingAmount = computed(() => autoCuttingAmount.apply(0)); - - const manualPlantingAmount = createSequentialModifier(() => [ - createAdditiveModifier(() => ({ - addend: 1, - description: "Leafy Fingers", - enabled: manualPlantUpgrade1.bought - })), - createAdditiveModifier(() => ({ - addend: computedAutoPlantingAmount, - description: "Smart Spades", - enabled: manualPlantUpgrade3.bought - })) - ]); - const computedManualPlantingAmount = computed(() => manualPlantingAmount.apply(1)); - const manualPlantingCooldown = createSequentialModifier(() => [ - createMultiplicativeModifier(() => ({ - multiplier: 0.5, - description: "Greener Fingers", - enabled: manualPlantUpgrade2.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: () => Decimal.pow(0.5, elves.totalElves.value), - description: "1 Elf Trained", - enabled: elves.milestones[0].earned - })) - ]); - const computedManualPlantingCooldown = computed(() => manualPlantingCooldown.apply(1)); - - const autoPlantingAmount = createSequentialModifier(() => [ - createAdditiveModifier(() => ({ - addend: 1, - description: "Automated Spade", - enabled: autoPlantUpgrade1.bought - })), - createAdditiveModifier(() => ({ - addend: () => Decimal.div(autoPlantingBuyable1.amount.value, 2), - description: "Generic Planters", - enabled: researchUpgrade2.bought - })), - createAdditiveModifier(() => ({ - addend: () => Decimal.div(workshop.foundationProgress.value, 10).floor(), - description: "20% Foundation Completed", - enabled: workshop.milestones.autoPlantMilestone1.earned - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "40% Foundation Completed", - enabled: workshop.milestones.autoPlantMilestone2.earned - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "Warmer Planters", - enabled: coal.warmerPlanters.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: coal.computedHeatedPlanterEffect, - description: "Heated Planters", - enabled: () => Decimal.gt(coal.heatedPlanters.amount.value, 0) - })), - createMultiplicativeModifier(() => ({ - multiplier: 4, - description: "Lumberjack Plaid", - enabled: cloth.treesUpgrades.treesUpgrade3.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "Ivy Level 1", - enabled: management.elfTraining.planterElfTraining.milestones[0].earned - })), - 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 - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "Mary Level 4", - enabled: management.elfTraining.heatedPlanterElfTraining.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 computedAutoPlantingAmount = computed(() => autoPlantingAmount.apply(0)); - - const logGain = createSequentialModifier(() => [ - createMultiplicativeModifier(() => ({ - multiplier: 1.25, - description: "Research I", - enabled: researchUpgrade1.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: 1.25, - description: "Research II", - enabled: researchUpgrade2.bought - })), - createMultiplicativeModifier(() => ({ - 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 - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "50% Foundation Completed", - enabled: workshop.milestones.logGainMilestone2.earned - })), - createMultiplicativeModifier(() => ({ - multiplier: 1.25, - description: "Ashy Soil", - enabled: coal.basicFertilizer.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: coal.computedFertilizerEffect, - description: "Fertilized Soil", - enabled: () => Decimal.gt(coal.moreFertilizer.amount.value, 0) - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "4 Elves Trained", - enabled: elves.milestones[3].earned - })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "Carry logs in boxes", - enabled: boxes.upgrades.logsUpgrade.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: () => Decimal.div(boxes.buyables.logBoxesBuyable.amount.value, 2).add(1), - description: "Carry more logs", - enabled: boxes.upgrades.logsUpgrade.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: 10, - description: "Felt-Gripped Axe", - enabled: cloth.treesUpgrades.treesUpgrade4.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: computed(() => - Decimal.add(computedAutoCuttingAmount.value, 1).log10().plus(1) - ), - description: "Is Blue Dye just Water?", - enabled: dyes.upgrades.blueDyeUpg.bought - })), - createMultiplicativeModifier(() => ({ - multiplier: computed(() => Decimal.add(computedAutoCuttingAmount.value, 1).root(9)), - description: "Holly Level 1", - enabled: management.elfTraining.cutterElfTraining.milestones[0].earned - })), - createMultiplicativeModifier(() => ({ - multiplier: () => Decimal.sqrt(management.totalElfLevels.value), - description: "Noel Level 1", - enabled: management.elfTraining.fertilizerElfTraining.milestones[0].earned - })), - createMultiplicativeModifier(() => ({ - multiplier: wrappingPaper.boosts.christmas1, - description: "Christmas Wrapping Paper", - enabled: computed(() => Decimal.gt(wrappingPaper.boosts.christmas1.value, 1)) - })), - createExponentialModifier(() => ({ - exponent: 1.2, - description: "100% Foundation Completed", - enabled: workshop.milestones.logGainMilestone3.earned - })), - createExponentialModifier(() => ({ - exponent: 1.05, - description: "Un-Processing", - enabled: paper.upgrades2.treeUpgrade.bought - })) - ]); - - const manualCutProgress = persistent(0); - const manualCutProgressBar = createBar(() => ({ - direction: Direction.Right, - width: 100, - height: 10, - style: "margin-top: 8px", - baseStyle: "margin-top: -1px", - fillStyle: "margin-top: -1px; transition-duration: 0s", - progress: () => Decimal.div(manualCutProgress.value, computedManualCuttingCooldown.value) - })); - - const cutTree = createClickable(() => ({ - display: { - title: "Cut trees", - description: jsx(() => ( - <> - Cut down up to {formatWhole(Decimal.floor(computedManualCuttingAmount.value))}{" "} - tree - {Decimal.eq(computedManualCuttingAmount.value, 1) ? "" : "s"} at once! -
- {render(manualCutProgressBar)} - - )) - }, - style: { - minHeight: "80px" - }, - canClick: () => - Decimal.gte(trees.value, 1) && - Decimal.gte(manualCutProgress.value, computedManualCuttingCooldown.value), - onClick() { - if (Decimal.lt(manualCutProgress.value, computedManualCuttingCooldown.value)) { - return; - } - const amount = Decimal.floor( - Decimal.min( - trees.value, - Decimal.times( - computedManualCuttingAmount.value, - Decimal.div( - manualCutProgress.value, - computedManualCuttingCooldown.value - ).floor() - ) - ) - ); - logs.value = Decimal.add(logs.value, Decimal.times(logGain.apply(1), amount)); - saplings.value = Decimal.add(saplings.value, amount); - manualCutProgress.value = 0; - } - })); - - const manualPlantProgress = persistent(0); - const manualPlantProgressBar = createBar(() => ({ - direction: Direction.Right, - width: 100, - height: 10, - style: "margin-top: 8px", - baseStyle: "margin-top: -1px", - fillStyle: "margin-top: -1px; transition-duration: 0s", - progress: () => Decimal.div(manualPlantProgress.value, computedManualPlantingCooldown.value) - })); - const plantTree = createClickable(() => ({ - display: { - title: "Plant trees", - description: jsx(() => ( - <> - Plant up to {formatWhole(Decimal.floor(computedManualPlantingAmount.value))}{" "} - tree - {Decimal.eq(computedManualPlantingAmount.value, 1) ? "" : "s"} at once! -
- {render(manualPlantProgressBar)} - - )) - }, - style: { - minHeight: "80px" - }, - canClick: () => - Decimal.gte(saplings.value, 1) && - Decimal.gte(manualPlantProgress.value, computedManualPlantingCooldown.value), - onClick() { - if (Decimal.lt(manualPlantProgress.value, computedManualPlantingCooldown.value)) { - return; - } - const amount = Decimal.floor( - Decimal.min( - saplings.value, - Decimal.times( - computedManualPlantingAmount.value, - Decimal.div( - manualPlantProgress.value, - computedManualPlantingCooldown.value - ).floor() - ) - ) - ); - saplings.value = Decimal.sub(saplings.value, amount); - manualPlantProgress.value = 0; - } - })); const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [ - { - title: "Logs per Tree", - modifier: logGain, + { + title: `Toy Gain`, + modifier: toyGain, base: 1, - visible: researchUpgrade1.bought - }, - { - title: "Manual Cutting Amount", - modifier: manualCuttingAmount, - base: 1, - visible: manualCutUpgrade1.bought, - unit: "/click" - }, - { - title: "Manual Cutting Cooldown", - modifier: manualCuttingCooldown, - base: 1, - visible: manualCutUpgrade1.bought, - unit: "s" - }, - { - title: "Manual Planting Amount", - modifier: manualPlantingAmount, - base: 1, - visible: manualPlantUpgrade1.bought, - unit: "/click" - }, - { - title: "Manual Planting Cooldown", - modifier: manualPlantingCooldown, - base: 1, - visible: manualPlantUpgrade1.bought, - unit: "s" - }, - { - title: `Auto Cutting Amount`, - modifier: autoCuttingAmount, - base: 0, - visible: autoCutUpgrade1.bought, - unit: "/s" - }, - { - title: `Auto Planting Amount`, - modifier: autoPlantingAmount, - base: 0, - visible: autoPlantUpgrade1.bought, - unit: "/s" - }, - { - title: `Forest Size`, - modifier: totalTrees, - base: 10, - visible: researchUpgrade2.bought + visible: true } ]); const showModifiersModal = ref(false); @@ -715,79 +80,12 @@ const layer = createLayer(id, function (this: BaseLayer) { return; } - if (Decimal.gte(manualCutProgress.value, computedManualCuttingCooldown.value)) { - manualCutProgress.value = computedManualCuttingCooldown.value; - } else { - manualCutProgress.value = Decimal.add(manualCutProgress.value, diff); - if (cutTree.isHolding.value) { - cutTree.onClick(); - } - } - if (Decimal.gte(manualPlantProgress.value, computedManualPlantingCooldown.value)) { - manualPlantProgress.value = computedManualPlantingCooldown.value; - } else { - manualPlantProgress.value = Decimal.add(manualPlantProgress.value, diff); - if (plantTree.isHolding.value) { - plantTree.onClick(); - } - } - - const plantingAmount = Decimal.sub( - computedAutoPlantingAmount.value, - Decimal.sub(lastAutoCuttingAmount.value, lastAutoPlantedAmount.value).max(0) - ); - const cuttingAmount = Decimal.sub( - computedAutoCuttingAmount.value, - Decimal.sub(lastAutoPlantedAmount.value, lastAutoCuttingAmount.value).max(0) - ); - lastAutoPlantedAmount.value = Decimal.isNaN(plantingAmount) ? 0 : plantingAmount; - lastAutoCuttingAmount.value = Decimal.isNaN(cuttingAmount) ? 0 : cuttingAmount; - - const amountCut = Decimal.min( - trees.value, - Decimal.times(computedAutoCuttingAmount.value, diff) - ); - const logsGained = Decimal.mul(logGain.apply(1), amountCut); - - const effectiveLogsGained = Decimal.div(logsGained, diff); - 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); - - const amountPlanted = Decimal.min( - saplings.value, - Decimal.times(computedAutoPlantingAmount.value, diff) - ); - saplings.value = Decimal.sub(saplings.value, amountPlanted); + }); - const netSaplingGain = computed(() => - Decimal.sub(computedAutoCuttingAmount.value, computedAutoPlantingAmount.value) - ); - const netTreeGain = computed(() => - Decimal.sub(computedAutoPlantingAmount.value, computedAutoCuttingAmount.value) - ); - const cutTreeHK = createHotkey(() => ({ - key: "c", - description: 'Press the "Cut trees" button.', - onPress: () => { - if (cutTree.canClick.value) cutTree.onClick(); - } - })); - const plantTreeHK = createHotkey(() => ({ - key: "p", - description: 'Press the "Plant trees" button.', - onPress: () => { - if (plantTree.canClick.value) plantTree.onClick(); - } - })); - - const { total: totalLogs, trackerDisplay } = setUpDailyProgressTracker({ - resource: logs, + const { total: totalToys, trackerDisplay } = setUpDailyProgressTracker({ + resource: toys, goal: 1e4, name, day, @@ -801,32 +99,20 @@ const layer = createLayer(id, function (this: BaseLayer) { return { name, color: colorBright, - logs, - totalLogs, - trees, - saplings, - cutTree, - plantTree, - cutTreeHK, - plantTreeHK, - row1Upgrades, - row2Upgrades, - row1Buyables, - manualCutProgress, - manualPlantProgress, + toys, + totalToys, generalTabCollapsed, - computedAutoCuttingAmount, minWidth: 700, display: jsx(() => ( <> {render(trackerDisplay)} equilibrium: +${formatLimit( [ [computedAutoCuttingAmount.value, "cutting speed"], @@ -836,33 +122,26 @@ const layer = createLayer(id, function (this: BaseLayer) { "/s", logGain.apply(1) )}` - : undefined + : */undefined } /> - - {renderRow(cutTree, plantTree)} -
Tip: You can hold down on actions to perform them automatically
- - {renderGrid(row1Upgrades, row2Upgrades)} - - {renderRow(...row1Buyables)} )), minimizedDisplay: jsx(() => (
- {name} - {format(logs.value)} {logs.displayName} + {name} - {format(toys.value)} {toys.displayName}
)) }; From 6bc0a53ce3148895621b1825bbcd48606da69b3d Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 16 Dec 2022 00:17:18 +0000 Subject: [PATCH 010/124] add toys to advent --- src/data/layers/toys.tsx | 3 --- src/data/projEntry.tsx | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index 1beb8ab..f73457c 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -40,9 +40,6 @@ import wrappingPaper from "./wrapping-paper"; const id = "toys"; const day = 17; -// how much to prioritize this' income -// vs the previous ones -const SMOOTHING_FACTOR = 0.1; const layer = createLayer(id, function (this: BaseLayer) { const name = "Toys"; const colorBright = "#4BDC13"; diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index a7a5bba..8ccc0fe 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -311,7 +311,7 @@ export const main = createLayer("main", function (this: BaseLayer) { createDay(() => ({ day: 17, shouldNotify: false, - layer: null, // "toys 1" + layer: "toys 1", // "toys 1" symbol: "", story: "", completedStory: "" From 6217b521b6f8e97172b718eb6b64b006cd45d390 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 16 Dec 2022 00:43:22 +0000 Subject: [PATCH 011/124] fix toy thing --- src/data/layers/toys.tsx | 2 +- src/data/projEntry.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index f73457c..e60c0d3 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -41,7 +41,7 @@ const id = "toys"; const day = 17; const layer = createLayer(id, function (this: BaseLayer) { - const name = "Toys"; + const name = "toys"; const colorBright = "#4BDC13"; const colorDark = "green"; diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index 8ccc0fe..0c7fa36 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -311,7 +311,7 @@ export const main = createLayer("main", function (this: BaseLayer) { createDay(() => ({ day: 17, shouldNotify: false, - layer: "toys 1", // "toys 1" + layer: "toys", // "toys1" symbol: "", story: "", completedStory: "" @@ -319,7 +319,7 @@ export const main = createLayer("main", function (this: BaseLayer) { createDay(() => ({ day: 18, shouldNotify: false, - layer: null, // "toys 2" + layer: null, // "toys2" symbol: "", story: "", completedStory: "" @@ -327,7 +327,7 @@ export const main = createLayer("main", function (this: BaseLayer) { createDay(() => ({ day: 19, shouldNotify: false, - layer: null, // "toys 3" + layer: null, // "toys3" symbol: "", story: "", completedStory: "" From c629b7794630eaae01c97b1513c255f05df3fa21 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 16 Dec 2022 01:10:07 +0000 Subject: [PATCH 012/124] fix toy sum --- src/data/layers/toys.tsx | 26 ++++++++++++++------------ src/data/projEntry.tsx | 4 +++- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index e60c0d3..77ecec7 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -41,17 +41,17 @@ const id = "toys"; const day = 17; const layer = createLayer(id, function (this: BaseLayer) { - const name = "toys"; + const name = "Toys"; const colorBright = "#4BDC13"; const colorDark = "green"; - const toys = createResource(0, "toys"); - const toys2 = createResource(0, "toys2"); - const toys3 = createResource(0, "toys3"); + const clothes = createResource(0, "clothes"); + const teddybears = createResource(0, " teddy bears"); + const trains = createResource(0, "trains"); const toyGain = createSequentialModifier(() => [ - - ]); + ]); + const toySum = createResource(computed(() => Decimal.add(clothes.value, teddybears.value).add(trains.value)), "toy sum") const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [ { title: `Toy Gain`, @@ -82,7 +82,7 @@ const layer = createLayer(id, function (this: BaseLayer) { const { total: totalToys, trackerDisplay } = setUpDailyProgressTracker({ - resource: toys, + resource: toySum, goal: 1e4, name, day, @@ -95,8 +95,10 @@ const layer = createLayer(id, function (this: BaseLayer) { return { name, + day, color: colorBright, - toys, + clothes, + teddybears, totalToys, generalTabCollapsed, minWidth: 700, @@ -105,7 +107,7 @@ const layer = createLayer(id, function (this: BaseLayer) { {render(trackerDisplay)} (
- {name} - {format(toys.value)} {toys.displayName} + {name} - {format(toySum.value)} {"total toys"}
)) }; diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index 0c7fa36..5d68d71 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -33,6 +33,7 @@ import plastic from "./layers/plastic"; import trees from "./layers/trees"; import workshop from "./layers/workshop"; import wrappingPaper from "./layers/wrapping-paper"; +import toys from "./layers/toys"; import boxesSymbol from "./symbols/cardboardBox.png"; import clothSymbol from "./symbols/cloth.png"; import coalSymbol from "./symbols/coal.png"; @@ -447,7 +448,8 @@ export const getInitialLayers = ( dyes, wrappingPaper, management, - letters + letters, + toys, ]; /** From b9ac4ee40e40c445a78629a0acfe0287f4244dff Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 16 Dec 2022 01:14:51 +0000 Subject: [PATCH 013/124] rename teddy bears and trains --- src/data/layers/toys.tsx | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index 77ecec7..9f62fdb 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -46,12 +46,12 @@ const layer = createLayer(id, function (this: BaseLayer) { const colorDark = "green"; const clothes = createResource(0, "clothes"); - const teddybears = createResource(0, " teddy bears"); - const trains = createResource(0, "trains"); + const woodenBlocks = createResource(0, " wooden blocks"); + const trucks = createResource(0, "trucks"); const toyGain = createSequentialModifier(() => [ ]); - const toySum = createResource(computed(() => Decimal.add(clothes.value, teddybears.value).add(trains.value)), "toy sum") + const toySum = createResource(computed(() => Decimal.add(clothes.value, woodenBlocks.value).add(trucks.value)), "toy sum") const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [ { title: `Toy Gain`, @@ -83,7 +83,7 @@ const layer = createLayer(id, function (this: BaseLayer) { const { total: totalToys, trackerDisplay } = setUpDailyProgressTracker({ resource: toySum, - goal: 1e4, + goal: 8e9, name, day, color: colorDark, @@ -98,7 +98,7 @@ const layer = createLayer(id, function (this: BaseLayer) { day, color: colorBright, clothes, - teddybears, + woodenBlocks, totalToys, generalTabCollapsed, minWidth: 700, @@ -110,28 +110,16 @@ const layer = createLayer(id, function (this: BaseLayer) { resource={clothes} color={colorBright} style="margin-bottom: 0" - productionDisplay={ - /*Decimal.gt(computedAutoCuttingAmount.value, 0) - ? `+${format(ema.value)}/s average
equilibrium: +${formatLimit( - [ - [computedAutoCuttingAmount.value, "cutting speed"], - [computedAutoPlantingAmount.value, "planting speed"], - [Decimal.mul(computedTotalTrees.value, 20), "forest cap"] - ], - "/s", - logGain.apply(1) - )}` - : */undefined - } + productionDisplay={undefined} /> Date: Fri, 16 Dec 2022 01:51:10 +0000 Subject: [PATCH 014/124] add buyable costs --- src/data/layers/toys.tsx | 117 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 110 insertions(+), 7 deletions(-) diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index 9f62fdb..3c49feb 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -28,15 +28,12 @@ import Decimal, { DecimalSource, format, formatGain, formatLimit, formatWhole } import { Direction, WithRequired } from "util/common"; import { render, renderGrid, renderRow } from "util/vue"; import { computed, ref } from "vue"; -import boxes from "./boxes"; +import metal from "./metal"; +import plastic from "./plastic"; import cloth from "./cloth"; -import coal from "./coal"; +import trees from "./trees"; import dyes from "./dyes"; -import elves, { ElfBuyable } from "./elves"; -import management from "./management"; import paper from "./paper"; -import workshop from "./workshop"; -import wrappingPaper from "./wrapping-paper"; const id = "toys"; const day = 17; @@ -51,7 +48,108 @@ const layer = createLayer(id, function (this: BaseLayer) { const toyGain = createSequentialModifier(() => [ ]); - const toySum = createResource(computed(() => Decimal.add(clothes.value, woodenBlocks.value).add(trucks.value)), "toy sum") + const toySum = createResource(computed(() => Decimal.add(clothes.value, woodenBlocks.value).add(trucks.value)), "toys"); + + const clothesCost = computed(() => { + const clothFactor = Decimal.add(1,clothesBuyable.amount.value); + return { + cloth: clothFactor.mul(1e8), + dye: clothFactor.mul(1e6) + }; + }); + const clothesBuyable = createBuyable(() => ({ + display: jsx(() => ( + <> +

Make Clothes

+ +
+ Click this buyable to make some clothes! +
+ +
+ You have {formatWhole(clothes.value)} clothes. +
+ +
+ Costs {format(clothesCost.value.cloth)} cloth and requires {format(clothesCost.value.dye)} of red, yellow, and + blue dye +
+ + )), + canPurchase(): boolean { + return ( + clothesCost.value.cloth.lte(cloth.cloth.value) && + clothesCost.value.dye.lte(dyes.dyes.blue.amount.value) && + clothesCost.value.dye.lte(dyes.dyes.red.amount.value) && + clothesCost.value.dye.lte(dyes.dyes.yellow.amount.value) + ); + }, + })) as GenericBuyable; + const woodenBlocksCost = computed(() => { + const woodFactor = Decimal.add(1,woodenBlocksBuyable.amount.value).pow(5); + return { + wood: woodFactor.mul(1e40) + }; + }); + const woodenBlocksBuyable = createBuyable(() => ({ + display: jsx(() => ( + <> +

Make Wooden Blocks

+ +
+ Click this buyable to make some wooden blocks! +
+ +
+ You have {formatWhole(woodenBlocks.value)} wooden blocks. +
+ +
+ Costs {format(woodenBlocksCost.value.wood)} logs +
+ + )), + canPurchase(): boolean { + return ( + woodenBlocksCost.value.wood.lte(trees.logs.value) + ); + }, + })) as GenericBuyable; + const trucksCost = computed(() => { + const factor = Decimal.add(1,trucksBuyable.amount.value).pow(3); + const plasticFactor = Decimal.add(1,trucksBuyable.amount.value); + return { + metal: factor.mul(1e25), + plastic: plasticFactor.mul(1e10) + + }; + }); + const trucksBuyable = createBuyable(() => ({ + display: jsx(() => ( + <> +

Make Trucks

+ +
+ Click this buyable to make some trucks! +
+ +
+ You have {formatWhole(woodenBlocks.value)} wooden blocks. +
+ +
+ Costs {format(trucksCost.value.metal)} metal and {format(trucksCost.value.plastic)} plastic +
+ + )), + canPurchase(): boolean { + return ( + trucksCost.value.metal.lte(metal.metal.value) && + trucksCost.value.plastic.lte(plastic.plastic.value) + ); + }, + })) as GenericBuyable; + const buyables = [ clothesBuyable, woodenBlocksBuyable, trucksBuyable ]; const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [ { title: `Toy Gain`, @@ -99,7 +197,10 @@ const layer = createLayer(id, function (this: BaseLayer) { color: colorBright, clothes, woodenBlocks, + trucks, + toySum, totalToys, + buyables, generalTabCollapsed, minWidth: 700, display: jsx(() => ( @@ -124,6 +225,8 @@ const layer = createLayer(id, function (this: BaseLayer) { style="margin-bottom: 0" productionDisplay={undefined} /> + + {renderRow(...buyables)} )), minimizedDisplay: jsx(() => ( From 6b9ec5f3c57504cc9c5cba1f2e4ee2054bdc321f Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 16 Dec 2022 02:07:19 +0000 Subject: [PATCH 015/124] milestone --- src/data/layers/toys.tsx | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index 3c49feb..3fb5825 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -4,14 +4,19 @@ */ import Spacer from "components/layout/Spacer.vue"; import Modal from "components/Modal.vue"; -import { createCollapsibleModifierSections, setUpDailyProgressTracker } from "data/common"; import { main } from "data/projEntry"; import { createBar } from "features/bars/bar"; +import { + createCollapsibleMilestones, + createCollapsibleModifierSections, + setUpDailyProgressTracker +} from "data/common"; import { createBuyable, GenericBuyable } from "features/buyable"; import { createClickable } from "features/clickables/clickable"; import { jsx, showIf } from "features/feature"; import { createHotkey } from "features/hotkey"; import MainDisplay from "features/resources/MainDisplay.vue"; +import { createMilestone } from "features/milestones/milestone"; import { createResource, Resource } from "features/resources/resource"; import { createUpgrade } from "features/upgrades/upgrade"; import { globalBus } from "game/events"; @@ -84,6 +89,11 @@ const layer = createLayer(id, function (this: BaseLayer) { clothesCost.value.dye.lte(dyes.dyes.yellow.amount.value) ); }, + onPurchase() { + cloth.cloth.value = Decimal.sub(cloth.cloth.value, clothesCost.value.cloth); + this.amount.value = Decimal.add(this.amount.value, 1); + clothes.value = this.amount.value + }, })) as GenericBuyable; const woodenBlocksCost = computed(() => { const woodFactor = Decimal.add(1,woodenBlocksBuyable.amount.value).pow(5); @@ -114,6 +124,11 @@ const layer = createLayer(id, function (this: BaseLayer) { woodenBlocksCost.value.wood.lte(trees.logs.value) ); }, + onPurchase() { + trees.logs.value = Decimal.sub(trees.logs.value, woodenBlocksCost.value.wood); + this.amount.value = Decimal.add(this.amount.value, 1); + woodenBlocks.value = this.amount.value + }, })) as GenericBuyable; const trucksCost = computed(() => { const factor = Decimal.add(1,trucksBuyable.amount.value).pow(3); @@ -148,8 +163,25 @@ const layer = createLayer(id, function (this: BaseLayer) { trucksCost.value.plastic.lte(plastic.plastic.value) ); }, + onPurchase() { + metal.metal.value = Decimal.sub(metal.metal.value, trucksCost.value.metal); + plastic.plastic.value = Decimal.sub(plastic.plastic.value, trucksCost.value.plastic); + this.amount.value = Decimal.add(this.amount.value, 1); + trucks.value = this.amount.value + }, })) as GenericBuyable; const buyables = [ clothesBuyable, woodenBlocksBuyable, trucksBuyable ]; + const milestone1 = createMilestone(() => ({ + display: { + requirement: "10 toys", + effectDisplay: "The number of complete workshops you have divides the cost to make toys." + }, + shouldEarn: () => Decimal.gte(toySum.value, 10) + })); +const milestones = {milestone1} +const { collapseMilestones, display: milestonesDisplay } = + createCollapsibleMilestones(milestones); + const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [ { title: `Toy Gain`, @@ -201,7 +233,9 @@ const layer = createLayer(id, function (this: BaseLayer) { toySum, totalToys, buyables, + milestones, generalTabCollapsed, + collapseMilestones, minWidth: 700, display: jsx(() => ( <> @@ -227,6 +261,8 @@ const layer = createLayer(id, function (this: BaseLayer) { /> {renderRow(...buyables)} + + {milestonesDisplay()} )), minimizedDisplay: jsx(() => ( From 47c48747465fee679308343e6347d12ba54ad314 Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Fri, 16 Dec 2022 02:37:36 +0000 Subject: [PATCH 016/124] maybe this works? just maybe... --- src/data/layers/boxes.tsx | 2 +- src/data/layers/cloth.tsx | 12 +- src/data/layers/coal.tsx | 625 +++++++++++++++++++++++++++++++---- src/data/layers/dyes.tsx | 5 +- src/data/layers/metal.tsx | 18 +- src/data/layers/oil.tsx | 10 +- src/data/layers/paper.tsx | 2 +- src/data/layers/plastic.tsx | 2 +- src/data/layers/trees.tsx | 115 ++++--- src/data/layers/workshop.tsx | 220 +++++++++++- 10 files changed, 857 insertions(+), 154 deletions(-) diff --git a/src/data/layers/boxes.tsx b/src/data/layers/boxes.tsx index 4fb0f35..68bceef 100644 --- a/src/data/layers/boxes.tsx +++ b/src/data/layers/boxes.tsx @@ -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; diff --git a/src/data/layers/cloth.tsx b/src/data/layers/cloth.tsx index a430a49..bb46ba3 100644 --- a/src/data/layers/cloth.tsx +++ b/src/data/layers/cloth.tsx @@ -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, diff --git a/src/data/layers/coal.tsx b/src/data/layers/coal.tsx index b09edb4..1b93139 100644 --- a/src/data/layers/coal.tsx +++ b/src/data/layers/coal.tsx @@ -83,10 +83,10 @@ const layer = createLayer(id, function (this: BaseLayer) { const ash = createResource(0, "ash"); const activeFires = persistent(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(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(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(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; 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(0); + const activeBonfires = persistent(0); + const activeKilns = persistent(0); + + const coal = createResource(0); + const ash = createResource(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(() => ( + <> +

Small Fire

+
+ Burn 1000 logs for 0.1 coal and 50 ash +
+
+ Currently: +
-{format(fireLogs.value)} logs/sec +
+{format(fireCoal.value)} coal/sec +
+{format(fireAsh.value)} ash/sec +
+
+ 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(() => ( + <> +

Bonfire

+
+ Burn 10,000 logs for 10 coal and 1000 ash +
+
+ Currently: +
-{format(bonfireLogs.value)} logs/sec +
+{format(bonfireCoal.value)} coal/sec +
+{format(bonfireAsh.value)} ash/sec +
+
+ 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(() => ( + <> +

Charcoal Kiln

+
+ Burn 1,000,000 logs for 10,000 coal and 10,000 ash +
+
+ Currently: +
-{format(kilnLogs.value)} logs/sec +
+{format(kilnCoal.value)} coal/sec +
+{format(kilnAsh.value)} ash/sec +
+
+ 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 = 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(() => ( + <> +

Mulched Soil

+
+ Double the bonus from Fertilized Soil +
+
+ Cost: {formatWhole(1e5)} {trees.logs.displayName} +
+ {formatWhole(1e5)} {ash.displayName} + + )), + style: { color: colorText }, + visibility: () => showIf(unlockBonfire.bought.value) + })); + + const unlockKiln: Upgrade = 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 = 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(() => ( + <> +

Coal Drill

+
+ Dig through the ground to find 50,000,000 coal +
+
+ Currently: +
+{format(drillCoal.value)} coal/sec +
+
+ 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(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)} - {render(buildFire)} + {render(main.isMastery.value ? mastery.buildFire : buildFire)}
- {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))}
- {renderRow(minFire, removeFire, addFire, maxFire)} + {renderRow(... main.isMastery.value ? [mastery.minFire, mastery.removeFire, mastery.addFire, mastery.maxFire] : [minFire, removeFire, addFire, maxFire])}
- {unlockBonfire.bought.value ? ( + {(main.isMastery.value ? mastery.unlockBonfire.bought.value : unlockBonfire.bought.value) ? ( <> {render(buildBonfire)}
- {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)}
- {renderRow(minBonfire, removeBonfire, addBonfire, maxBonfire)} + {renderRow(...main.isMastery.value ? [mastery.minBonfire, mastery.removeBonfire, mastery.addBonfire, mastery.maxBonfire] : [minBonfire, removeBonfire, addBonfire, maxBonfire] )}
) : undefined} - {unlockKiln.bought.value ? ( + {(main.isMastery.value ? mastery.unlockKiln.bought.value : unlockKiln.bought.value) ? ( <> - {render(buildKiln)} + {render(main.isMastery.value ? mastery.buildKiln : buildKiln)}
- {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)}
- {renderRow(minKiln, removeKiln, addKiln, maxKiln)} + {renderRow(...main.isMastery.value ? [mastery.minKiln, mastery.removeKiln, mastery.addKiln, mastery.maxKiln] : [minKiln, removeKiln, addKiln, maxKiln])}
) : undefined} @@ -1089,24 +1572,24 @@ const layer = createLayer(id, function (this: BaseLayer) { <> - {render(buildDrill)} + {render(main.isMastery.value ? mastery.buildDrill : buildDrill)}
- {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)}
- {renderRow(minDrill, removeDrill, addDrill, maxDrill)} + {renderRow(...main.isMastery.value ? [mastery.minDrill, mastery.removeDrill, mastery.addDrill, mastery.maxDrill] : [minDrill, removeDrill, addDrill, maxDrill])}
) : undefined}
- {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(() => (
- {name} - {format(coal.value)} {coal.displayName} + {name} - {format(main.isMastery.value ? mastery.coal.value : coal.value)} {coal.displayName}
)) }; diff --git a/src/data/layers/dyes.tsx b/src/data/layers/dyes.tsx index 4d7a5b6..bb3fb7d 100644 --- a/src/data/layers/dyes.tsx +++ b/src/data/layers/dyes.tsx @@ -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( diff --git a/src/data/layers/metal.tsx b/src/data/layers/metal.tsx index b73348f..f836993 100644 --- a/src/data/layers/metal.tsx +++ b/src/data/layers/metal.tsx @@ -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)); diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index 64a0ad4..a887c26 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -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; const computedOilSpeed = computed(() => oilSpeed.apply(0)); diff --git a/src/data/layers/paper.tsx b/src/data/layers/paper.tsx index caea52d..26eb341 100644 --- a/src/data/layers/paper.tsx +++ b/src/data/layers/paper.tsx @@ -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; const computedAshCost = computed(() => ashCost.apply(1e6)); diff --git a/src/data/layers/plastic.tsx b/src/data/layers/plastic.tsx index f6131cf..51526c1 100644 --- a/src/data/layers/plastic.tsx +++ b/src/data/layers/plastic.tsx @@ -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)); diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx index 9618822..77828ac 100644 --- a/src/data/layers/trees.tsx +++ b/src/data/layers/trees.tsx @@ -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; 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; 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; 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)} /> (false); const foundationProgress = createResource(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(() => ( <> - Build {formatWhole(foundationConversion.actualGain.value)}% of the foundation + Build {formatWhole((main.isMastery.value ? mastery.foundationConversion : foundationConversion).actualGain.value)}% of the foundation

- 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} @@ -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(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(() => ( <>
@@ -313,7 +507,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
The foundation is

- {formatWhole(foundationProgress.value)} + {formatWhole(main.isMastery.value ? mastery.foundationProgress.value : foundationProgress.value)}

% completed
@@ -323,7 +517,7 @@ const layer = createLayer(id, function (this: BaseLayer) { ) : null} {render(buildFoundation)} - {milestonesDisplay()} + {(main.isMastery.value ? mastery.milestonesDisplay : milestonesDisplay)()} )), minimizedDisplay: jsx(() => ( From 7f0301b3e1341016fbfa4f09cb6030b77bbb81d0 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 16 Dec 2022 02:37:37 +0000 Subject: [PATCH 017/124] Implement milestone 1 --- src/data/layers/toys.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index 3fb5825..0c5a202 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -39,6 +39,7 @@ import cloth from "./cloth"; import trees from "./trees"; import dyes from "./dyes"; import paper from "./paper"; +import workshop from "./workshop"; const id = "toys"; const day = 17; @@ -56,7 +57,10 @@ const layer = createLayer(id, function (this: BaseLayer) { const toySum = createResource(computed(() => Decimal.add(clothes.value, woodenBlocks.value).add(trucks.value)), "toys"); const clothesCost = computed(() => { - const clothFactor = Decimal.add(1,clothesBuyable.amount.value); + var clothFactor = Decimal.add(1,clothesBuyable.amount.value); + if(milestones.milestone1.earned){ + clothFactor=clothFactor.div(Decimal.div(workshop.foundationProgress.value,100).floor()) + } return { cloth: clothFactor.mul(1e8), dye: clothFactor.mul(1e6) @@ -96,7 +100,10 @@ const layer = createLayer(id, function (this: BaseLayer) { }, })) as GenericBuyable; const woodenBlocksCost = computed(() => { - const woodFactor = Decimal.add(1,woodenBlocksBuyable.amount.value).pow(5); + var woodFactor = Decimal.add(1,woodenBlocksBuyable.amount.value).pow(5); + if(milestones.milestone1.earned){ + woodFactor=woodFactor.div(Decimal.div(workshop.foundationProgress.value,100).floor()) + } return { wood: woodFactor.mul(1e40) }; @@ -131,8 +138,12 @@ const layer = createLayer(id, function (this: BaseLayer) { }, })) as GenericBuyable; const trucksCost = computed(() => { - const factor = Decimal.add(1,trucksBuyable.amount.value).pow(3); - const plasticFactor = Decimal.add(1,trucksBuyable.amount.value); + var factor = Decimal.add(1,trucksBuyable.amount.value).pow(3); + var plasticFactor = Decimal.add(1,trucksBuyable.amount.value); + if(milestones.milestone1.earned){ + factor=factor.div(Decimal.div(workshop.foundationProgress.value,100).floor()) + plasticFactor=plasticFactor.div(Decimal.div(workshop.foundationProgress.value,100).floor()) + } return { metal: factor.mul(1e25), plastic: plasticFactor.mul(1e10) From 09a6817b3f8b26d4566b89ae3e96939b5b8fdd2e Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Fri, 16 Dec 2022 02:40:25 +0000 Subject: [PATCH 018/124] this compiles so it's fine --- src/data/layers/coal.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/data/layers/coal.tsx b/src/data/layers/coal.tsx index 1b93139..d4d8119 100644 --- a/src/data/layers/coal.tsx +++ b/src/data/layers/coal.tsx @@ -993,11 +993,11 @@ const layer = createLayer(id, function (this: BaseLayer) { const activeBonfires = persistent(0); const activeKilns = persistent(0); - const coal = createResource(0); - const ash = createResource(0); + const coal = createResource(0,"coal"); + const ash = createResource(0,"ash"); const buildFire = createBuyable(() => ({ - resource: trees.logs, + resource: trees.mastery.logs, cost() { let v = Decimal.times(buildBonfire.amount.value, unref(buildBonfire.cost!)).plus( this.amount.value @@ -1048,6 +1048,7 @@ const layer = createLayer(id, function (this: BaseLayer) { active: activeFires, buyable: buildFire }); + const fireResource = createResource(buildFire.amount, "small fires"); const buildBonfire = createBuyable(() => ({ resource: fireResource, @@ -1097,7 +1098,7 @@ const layer = createLayer(id, function (this: BaseLayer) { }); const buildKiln = createBuyable(() => ({ - resource: trees.logs, + resource: trees.mastery.logs, cost() { let v = this.amount.value; if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100); From 23041e3a0ddb6b0d3000a2cc617401cba434c8da Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Fri, 16 Dec 2022 02:50:57 +0000 Subject: [PATCH 019/124] cleanup and finger crossing --- src/data/layers/coal.tsx | 16 ++++++++++++---- src/data/layers/workshop.tsx | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/data/layers/coal.tsx b/src/data/layers/coal.tsx index d4d8119..140e6e2 100644 --- a/src/data/layers/coal.tsx +++ b/src/data/layers/coal.tsx @@ -970,10 +970,17 @@ const layer = createLayer(id, function (this: BaseLayer) { if (Decimal.times(diff, computedLogConsumption.value).negate().gt(trees.logs.value)) { return; } - trees.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(trees.logs.value); - coal.value = Decimal.times(diff, computedCoalGain.value).plus(coal.value); - ash.value = Decimal.times(diff, computedAshGain.value).plus(ash.value); - activeFires.value = Decimal.max(activeFires.value, 0); + if (main.isMastery.value) { + trees.mastery.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(trees.mastery.logs.value); + mastery.coal.value = Decimal.times(diff, computedCoalGain.value).plus(mastery.coal.value); + mastery.ash.value = Decimal.times(diff, computedAshGain.value).plus(mastery.ash.value); + mastery.activeFires.value = Decimal.max(mastery.activeFires.value, 0); + } else { + trees.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(trees.logs.value); + coal.value = Decimal.times(diff, computedCoalGain.value).plus(coal.value); + ash.value = Decimal.times(diff, computedAshGain.value).plus(ash.value); + activeFires.value = Decimal.max(activeFires.value, 0); + } }); const { total: totalCoal, trackerDisplay } = setUpDailyProgressTracker({ @@ -1507,6 +1514,7 @@ const layer = createLayer(id, function (this: BaseLayer) { computedFertilizerEffect, generalTabCollapsed, minWidth: 700, + mastery, display: jsx(() => ( <> {render(trackerDisplay)} diff --git a/src/data/layers/workshop.tsx b/src/data/layers/workshop.tsx index be438da..d3314fa 100644 --- a/src/data/layers/workshop.tsx +++ b/src/data/layers/workshop.tsx @@ -495,6 +495,7 @@ const layer = createLayer(id, function (this: BaseLayer) { minWidth: 700, buildFoundationHK, mastery, + mastered, display: jsx(() => ( <>
From 44f940d3a16a0daf617bb12f9f93bac52f13fd7c Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Fri, 16 Dec 2022 02:55:26 +0000 Subject: [PATCH 020/124] Fixed persistent refs (volar is magic) --- src/data/layers/coal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/layers/coal.tsx b/src/data/layers/coal.tsx index 140e6e2..bacfe26 100644 --- a/src/data/layers/coal.tsx +++ b/src/data/layers/coal.tsx @@ -1004,7 +1004,7 @@ const layer = createLayer(id, function (this: BaseLayer) { const ash = createResource(0,"ash"); const buildFire = createBuyable(() => ({ - resource: trees.mastery.logs, + resource: noPersist(trees.mastery.logs), // apparently necessary cost() { let v = Decimal.times(buildBonfire.amount.value, unref(buildBonfire.cost!)).plus( this.amount.value @@ -1105,7 +1105,7 @@ const layer = createLayer(id, function (this: BaseLayer) { }); const buildKiln = createBuyable(() => ({ - resource: trees.mastery.logs, + resource: noPersist(trees.mastery.logs), cost() { let v = this.amount.value; if (Decimal.gte(v, 100)) v = Decimal.pow(v, 2).div(100); From 80a74c13a2e13fc1fa46d45bd3844b961ae9c603 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 15 Dec 2022 21:07:19 -0600 Subject: [PATCH 021/124] Merge branch 'main' into days-15-16 --- index.html | 1 + saves/Day 13 Complete.txt | 1 + src/components/Layer.vue | 30 +++- src/components/Options.vue | 18 +- src/data/Scene.vue | 7 + src/data/layers/coal.tsx | 2 +- src/data/layers/dyes.tsx | 43 +++-- src/data/layers/elves.tsx | 2 +- src/data/layers/letters.tsx | 292 +++++++++++++++++++++++++++++++++ src/data/layers/management.tsx | 53 ++++-- src/data/layers/metal.tsx | 57 ++++--- src/data/layers/oil.tsx | 17 +- src/data/layers/paper.tsx | 22 +-- src/data/layers/plastic.tsx | 5 + src/data/layers/trees.tsx | 5 + src/data/layers/workshop.tsx | 125 ++++++++++---- src/data/projEntry.tsx | 30 +++- src/util/save.ts | 11 +- 18 files changed, 607 insertions(+), 114 deletions(-) create mode 100644 saves/Day 13 Complete.txt create mode 100644 src/data/layers/letters.tsx diff --git a/index.html b/index.html index f986505..b0cf092 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@ + Advent Incremental diff --git a/saves/Day 13 Complete.txt b/saves/Day 13 Complete.txt new file mode 100644 index 0000000..577e30c --- /dev/null +++ b/saves/Day 13 Complete.txt @@ -0,0 +1 @@ +eyJpZCI6ImFkdmVudC1pbmNyZW1lbnRhbC0xIiwiZGV2U3BlZWQiOjAsIm5hbWUiOiJEZWZhdWx0IFNhdmUiLCJ0YWJzIjpbIm1haW4iLCJkeWVzIl0sInRpbWUiOjE2NzEwODMzMjMzNDUsImF1dG9zYXZlIjp0cnVlLCJvZmZsaW5lUHJvZCI6ZmFsc2UsIm9mZmxpbmVUaW1lIjpudWxsLCJ0aW1lUGxheWVkIjo5NzIyOS4yMzEwMDAwNzA5Mywia2VlcEdvaW5nIjpmYWxzZSwibW9kSUQiOiJhZHZlbnQtaW5jcmVtZW50YWwiLCJtb2RWZXJzaW9uIjoiMC41IiwibGF5ZXJzIjp7Im1haW4iOnsibWluaW1pemVkIjpmYWxzZSwiZGF5cyI6eyIwIjp7Im9wZW5lZCI6dHJ1ZSwicmVjZW50bHlVcGRhdGVkIjpmYWxzZX0sIjEiOnsib3BlbmVkIjp0cnVlLCJyZ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UJvb3N0Ijp7ImVhcm5lZCI6ZmFsc2V9LCJidXlNYXhQcmltYXJ5Ijp7ImVhcm5lZCI6ZmFsc2V9LCJzZWNvbmRhcnlOb1Jlc2V0Ijp7ImVhcm5lZCI6ZmFsc2V9LCJidXlNYXhTZWNvbmRhcnkiOnsiZWFybmVkIjpmYWxzZX0sInVubG9ja0R5ZUVsZiI6eyJlYXJuZWQiOmZhbHNlfX0sImNvbGxhcHNlTWlsZXN0b25lcyI6dHJ1ZX19LCJhdXRvUGF1c2UiOnRydWUsInVzaW5nTG9nIjp0cnVlfQ== \ No newline at end of file diff --git a/src/components/Layer.vue b/src/components/Layer.vue index 62cca55..20cdf27 100644 --- a/src/components/Layer.vue +++ b/src/components/Layer.vue @@ -1,7 +1,8 @@