From 6357d66ba22260b0f69ce1b32ee8b4fcef1f0c01 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 22 Dec 2022 21:03:22 -0600 Subject: [PATCH 01/18] Fix subtabs not scrolling --- src/features/tabs/TabFamily.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/features/tabs/TabFamily.vue b/src/features/tabs/TabFamily.vue index 1ae9007..e899549 100644 --- a/src/features/tabs/TabFamily.vue +++ b/src/features/tabs/TabFamily.vue @@ -135,10 +135,12 @@ export default defineComponent({ position: relative; border: solid 4px; border-color: var(--outline); + overflow-y: auto; } .layer-tab > .tab-family-container:first-child { margin: -4px -11px var(--feature-margin) -11px; + padding-bottom: 50px; } .layer-tab > .tab-family-container:first-child:nth-last-child(3) { From c9667ee249d74fcd1972c581d573b4b4dc624fa1 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:05:06 +0000 Subject: [PATCH 02/18] upgrade #8 also changed scalings --- src/data/layers/factory.tsx | 53 ++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 60c9e53..7f90a2d 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1010,7 +1010,7 @@ const factory = createLayer(id, () => { const oilFuel = createBuyable(() => ({ resource: oil.oil, cost() { - return Decimal.pow(10, this.amount.value).times(1e24); + return Decimal.pow(10, this.amount.value).times(1e23); }, display: { title: "Oil Fuel", @@ -1058,7 +1058,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: toys.trucks, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(1.25, upgradeAmount.value).mul(1000), display: { title: "Haul wood in trucks", description: "Trucks multiply wood gain" @@ -1076,7 +1076,43 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: toys.woodenBlocks, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(1.25, upgradeAmount.value).mul(1000), + display: { + title: "Larger wood pieces", + description: "Wooden block producers produce 3x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: dyes.dyes.red.amount, + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), + display: { + title: "Colorful clothes", + description: "Dye producers produce 4x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: plastic.plastic, + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), + display: { + title: "Improved plastic producers", + description: "Plastic producers produce 4x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: oil.oil, + cost: () =>Decimal.pow(4, upgradeAmount.value).mul(1e23), + display: { + title: "Capitalism", + description: "Console production is tripled" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + }))], + /*[createUpgrade(() => ({ + resource: coal.coal, + cost: () =>Decimal.pow(15, upgradeAmount.value).mul(1000), display: { title: "Larger wood pieces", description: "Wooden block producers produce 3x as much" @@ -1100,7 +1136,16 @@ const factory = createLayer(id, () => { description: "Plastic producers produce 4x as much" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) - }))], + })), + createUpgrade(() => ({ + resource: oil.oil, + cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e23), + display: { + title: "Capitalism", + description: "Console production is tripled" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + }))],*/ ] // pixi From b958da2b6991b8f69ffc605cdf7530a27d47a783 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:09:58 +0000 Subject: [PATCH 03/18] 4 new upgrades --- src/data/layers/factory.tsx | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 7f90a2d..841c383 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1110,42 +1110,42 @@ const factory = createLayer(id, () => { }, visible: () => showIf(main.days[advancedDay - 1].opened.value) }))], - /*[createUpgrade(() => ({ + [createUpgrade(() => ({ resource: coal.coal, - cost: () =>Decimal.pow(15, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(100, upgradeAmount.value).mul(1e136), display: { - title: "Larger wood pieces", - description: "Wooden block producers produce 3x as much" + title: "Brighter work rooms", + description: "Unused electricity % makes ticks faster up to 2x" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ - resource: dyes.dyes.red.amount, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e17), + resource: dyes.dyes.blue.amount, + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), display: { - title: "Colorful clothes", - description: "Dye producers produce 4x as much" + title: "Colorful teddy bears", + description: "Teddy bears produce 2x as much" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ - resource: plastic.plastic, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e17), + resource: dyes.dyes.black.amount, + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e6), display: { - title: "Improved plastic producers", - description: "Plastic producers produce 4x as much" + title: "New Colors", + description: "Unlock white dye" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ - resource: oil.oil, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e23), + resource: boxes.boxes, + cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80), display: { - title: "Capitalism", - description: "Console production is tripled" + title: "Carry ticks in boxes", + description: "Tick speed x1.5" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) - }))],*/ + }))], ] // pixi From e462a2ae61a34fdd68c047c394d5af46fd1b887d Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:19:44 +0000 Subject: [PATCH 04/18] first row upg effects --- src/data/layers/factory.tsx | 14 ++++++++++---- src/data/layers/oil.tsx | 7 +++++++ src/data/layers/trees.tsx | 6 ++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 66aaa72..3a2d8e8 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -189,7 +189,13 @@ const factory = createLayer(id, () => { multiplier: energyEfficiency, description: "Energy Consumption", enabled: () => Decimal.gt(energyConsumption.value, computedEnergy.value) + })), + createMultiplicativeModifier(() => ({ + multiplier: Decimal.add(paper.paper.value, 1).log10().div(100).add(1), + description: "News Ticker", + enabled: () => upgrades[0][1].bought.value })) + ]); const computedTickRate = computed(() => tickRate.apply(1)); const factorySize = createSequentialModifier(() => [ @@ -395,12 +401,12 @@ const factory = createLayer(id, () => { tick: 1, inputs: { wood: { - amount: 1 + amount: computed(() => (upgrades[0][0].bought.value ? 2 : 1)) } }, outputs: { plank: { - amount: 1 + amount: computed(() => (upgrades[0][0].bought.value ? 2 : 1)) } } } as FactoryComponentDeclaration, @@ -1038,7 +1044,7 @@ const factory = createLayer(id, () => { cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80), display: { title: "Sawmill Efficiency", - description: "Metal increases sawmill consumption and production by *log(metal)/10" + description: "Double sawmill consumption and production and metal supplier efficiency" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), @@ -1047,7 +1053,7 @@ const factory = createLayer(id, () => { cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e94), display: { title: "News Ticker", - description: "Paper boosts tick speed" // formula: *1+log(x)/100 + description: "Paper boosts tick speed" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index a047ba9..9b1d346 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -25,6 +25,7 @@ import { createSequentialModifier, createAdditiveModifier, createMultiplicativeModifier, + createExponentialModifier, Modifier } from "game/modifiers"; import { main } from "data/projEntry"; @@ -41,6 +42,7 @@ import workshop from "./workshop"; import { WithRequired } from "util/common"; import { ElfBuyable } from "./elves"; import toys from "./toys"; +import factory from "./factory"; const id = "oil"; const day = 9; @@ -889,6 +891,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: dyes.boosts.red2, description: "Red Dye", enabled: dyes.masteryEffectActive + })), + createExponentialModifier(() => ({ + exponent: 1.2, + description: "Diamond-tipped drills", + enabled: factory.upgrades[0][3].bought.value })) ]); const computedDrillPower = computed(() => drillPower.apply(0)); diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx index 51a799a..034fdf3 100644 --- a/src/data/layers/trees.tsx +++ b/src/data/layers/trees.tsx @@ -39,6 +39,7 @@ import paper from "./paper"; import workshop from "./workshop"; import wrappingPaper from "./wrapping-paper"; import toys from "./toys"; +import factory from "./factory"; const id = "trees"; const day = 1; @@ -551,6 +552,11 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "3000 Toys", enabled: toys.milestones.milestone7.earned })), + createMultiplicativeModifier(() => ({ + multiplier: () => Decimal.add(toys.trucks.value, 1), + description: "Haul wood in trucks", + enabled: factory.upgrades[0][2].bought + })), createExponentialModifier(() => ({ exponent: 1.2, description: "100% Foundation Completed", From 59d5c46b748f1c9fb9cde70ff2c886029620e31c Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:22:38 +0000 Subject: [PATCH 05/18] upg row 2 effects --- src/data/layers/factory.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 3a2d8e8..2d7c2a5 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -357,7 +357,7 @@ const factory = createLayer(id, () => { tick: 1, outputs: { dye: { - amount: 1 + amount: computed(() => (upgrades[1][1].bought.value ? 4 : 1)) } } } as FactoryComponentDeclaration, @@ -387,7 +387,7 @@ const factory = createLayer(id, () => { tick: 1, outputs: { plastic: { - amount: 1 + amount: computed(() => (upgrades[1][2].bought.value ? 4 : 1)) } } } as FactoryComponentDeclaration, @@ -572,7 +572,7 @@ const factory = createLayer(id, () => { }, outputs: { block: { - amount: 1, + amount: computed(() => (upgrades[1][0].bought.value ? 3 : 1)), resource: toys.woodenBlocks } } @@ -703,7 +703,7 @@ const factory = createLayer(id, () => { }, outputs: { console: { - amount: 1, + amount: computed(() => (upgrades[1][1].bought.value ? 3 : 1)), resource: consoles } }, From 3b386f590988a4fa88c27cb049664829ce712ffb Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:32:05 +0000 Subject: [PATCH 06/18] implement row 3 upg effects --- src/data/layers/dyes.tsx | 33 ++++++++++++++++++++++++++++++++- src/data/layers/factory.tsx | 19 ++++++++++++++----- src/data/layers/plastic.tsx | 4 ++++ 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/data/layers/dyes.tsx b/src/data/layers/dyes.tsx index 6d94dff..e2d7f25 100644 --- a/src/data/layers/dyes.tsx +++ b/src/data/layers/dyes.tsx @@ -36,6 +36,7 @@ import oil from "./oil"; import paper from "./paper"; import trees from "./trees"; import toys from "./toys"; +import factory from "./factory"; interface Dye { name: string; @@ -56,7 +57,7 @@ type DyeUpg = | "blueDyeUpg2" | "coalUpg"; -export type enumColor = "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "black"; +export type enumColor = "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "black" | "white"; const id = "dyes"; const day = 11; @@ -520,6 +521,31 @@ const layer = createLayer(id, function (this: BaseLayer) { dyesToReset: [], visibility: () => showIf(toys.milestones.milestone2.earned.value) }), + white: createDye({ + name: "White Dye", + color: "white", + key: "q", + costs: () => [ + { + base: "1e60", + root: 5, + res: trees.logs + }, + { + base: computed(() => (upgrades.yellowDyeUpg2.bought.value ? "1e17" : "2e17")), + root: 2, + res: oil.oil + } + ], + listedBoosts: [ + { + visible: true, + desc: computed(() => `*${format(boosts.white1.value)} plastic gain.`) + } + ], + dyesToReset: [], + visibility: () => showIf(factory.upgrades[2][3].bought.value) + }), orange: createDye({ name: "Orange Dye", color: "orange", @@ -702,6 +728,11 @@ const layer = createLayer(id, function (this: BaseLayer) { Decimal.pow(2, Decimal.add(dyes.black.amount.value, 1).log2().sqrt()) .pow(upgrades.coalUpg.bought.value ? 1.2 : 1) .pow(management.elfTraining.clothElfTraining.milestones[3].earned.value ? 1.1 : 1) + ), + white1: computed(() => + Decimal.pow(2, Decimal.add(dyes.white.amount.value, 1).log2().sqrt()) + .pow(upgrades.coalUpg.bought.value ? 1.2 : 1) + .pow(management.elfTraining.clothElfTraining.milestones[3].earned.value ? 1.1 : 1) ) }; diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 2d7c2a5..6e3774a 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -194,8 +194,17 @@ const factory = createLayer(id, () => { multiplier: Decimal.add(paper.paper.value, 1).log10().div(100).add(1), description: "News Ticker", enabled: () => upgrades[0][1].bought.value - })) - + })), + createMultiplicativeModifier(() => ({ + multiplier: Decimal.lt(energyEfficiency.value, 1)?1:Decimal.sub(2, Decimal.div(energyConsumption.value, computedEnergy.value)), + description: "Brighter work rooms", + enabled: () => upgrades[2][1].bought.value + })), + createMultiplicativeModifier(() => ({ + multiplier: 1.5, + description: "Carry ticks in boxes", + enabled: () => upgrades[2][3].bought.value + })), ]); const computedTickRate = computed(() => tickRate.apply(1)); const factorySize = createSequentialModifier(() => [ @@ -651,7 +660,7 @@ const factory = createLayer(id, () => { }, outputs: { bear: { - amount: 1, + amount: computed(() => (upgrades[1][3].bought.value ? 2 : 1)), resource: bears } }, @@ -703,7 +712,7 @@ const factory = createLayer(id, () => { }, outputs: { console: { - amount: computed(() => (upgrades[1][1].bought.value ? 3 : 1)), + amount: computed(() => (upgrades[1][3].bought.value ? 3 : 1)), resource: consoles } }, @@ -1116,7 +1125,7 @@ const factory = createLayer(id, () => { cost: () =>Decimal.pow(100, upgradeAmount.value).mul(1e136), display: { title: "Brighter work rooms", - description: "Unused electricity % makes ticks faster up to 2x" + description: "Unused electricity makes ticks faster" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), diff --git a/src/data/layers/plastic.tsx b/src/data/layers/plastic.tsx index b79c0b7..cf7cc2a 100644 --- a/src/data/layers/plastic.tsx +++ b/src/data/layers/plastic.tsx @@ -379,6 +379,10 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: 50, description: "350 toys", enabled: toys.milestones.milestone4.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: () => dyes.boosts.white1.value, + description: "White Dye Boost" })) ]); const computedPlasticGain = computed(() => plasticGain.apply(0)); From 96a211aa646326c2fb16aa7a0872ebd24d2b22ec Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:47:26 +0000 Subject: [PATCH 07/18] reduce scalings by a lot --- src/data/layers/dyes.tsx | 12 +++++++++--- src/data/layers/factory.tsx | 16 ++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/data/layers/dyes.tsx b/src/data/layers/dyes.tsx index e2d7f25..d81551c 100644 --- a/src/data/layers/dyes.tsx +++ b/src/data/layers/dyes.tsx @@ -215,6 +215,7 @@ const layer = createLayer(id, function (this: BaseLayer) { case "yellow": case "blue": case "black": + case "white": dyeBook = paper.books.primaryDyeBook; break; case "orange": @@ -544,7 +545,7 @@ const layer = createLayer(id, function (this: BaseLayer) { } ], dyesToReset: [], - visibility: () => showIf(factory.upgrades[2][3].bought.value) + visibility: () => showIf(factory.upgrades[2][2].bought.value) }), orange: createDye({ name: "Orange Dye", @@ -757,6 +758,11 @@ const layer = createLayer(id, function (this: BaseLayer) { modifier: dyes.black.toGenerate, base: 0 }, + { + title: "White Dye Creation", + modifier: dyes.white.toGenerate, + base: 0 + }, { title: "Orange Dye Creation", modifier: dyes.orange.toGenerate, @@ -987,8 +993,8 @@ const layer = createLayer(id, function (this: BaseLayer) { ) : null}
- {renderRow(dyes.black.display)} - {renderRow(dyes.black.buyable)} + {renderRow(dyes.black.display, dyes.white.display)} + {renderRow(dyes.black.buyable, dyes.white.buyable)} {renderRow(dyes.red.display, dyes.yellow.display, dyes.blue.display)} {renderRow(dyes.red.buyable, dyes.yellow.buyable, dyes.blue.buyable)} diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 6e3774a..b612a59 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1050,7 +1050,7 @@ const factory = createLayer(id, () => { const factoryBuyables = { expandFactory, oilFuel, carryToys }; const upgrades = [[createUpgrade(() => ({ resource: trees.logs, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e80), display: { title: "Sawmill Efficiency", description: "Double sawmill consumption and production and metal supplier efficiency" @@ -1077,7 +1077,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: metal.metal, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e55), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e55), display: { title: "Diamond-tipped drills", description: "Drill power ^1.2" @@ -1095,7 +1095,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: dyes.dyes.red.amount, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), + cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(4e16), display: { title: "Colorful clothes", description: "Dye producers produce 4x as much" @@ -1113,7 +1113,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: oil.oil, - cost: () =>Decimal.pow(4, upgradeAmount.value).mul(1e23), + cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e23), display: { title: "Capitalism", description: "Console production is tripled" @@ -1122,7 +1122,7 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: coal.coal, - cost: () =>Decimal.pow(100, upgradeAmount.value).mul(1e136), + cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e136), display: { title: "Brighter work rooms", description: "Unused electricity makes ticks faster" @@ -1131,7 +1131,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: dyes.dyes.blue.amount, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), + cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(4e16), display: { title: "Colorful teddy bears", description: "Teddy bears produce 2x as much" @@ -1140,7 +1140,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: dyes.dyes.black.amount, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e6), + cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(1e6), display: { title: "New Colors", description: "Unlock white dye" @@ -1149,7 +1149,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: boxes.boxes, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e80), display: { title: "Carry ticks in boxes", description: "Tick speed x1.5" From b8f61a1e7ab38f54b11b85635e9b6fa2f08cde6c Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:06:57 +0000 Subject: [PATCH 08/18] reduce scaling more --- src/data/layers/factory.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index b612a59..10056dd 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1050,7 +1050,7 @@ const factory = createLayer(id, () => { const factoryBuyables = { expandFactory, oilFuel, carryToys }; const upgrades = [[createUpgrade(() => ({ resource: trees.logs, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e80), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e75), display: { title: "Sawmill Efficiency", description: "Double sawmill consumption and production and metal supplier efficiency" @@ -1059,7 +1059,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: paper.paper, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e94), + cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e90), display: { title: "News Ticker", description: "Paper boosts tick speed" @@ -1077,7 +1077,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: metal.metal, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e55), + cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e55), display: { title: "Diamond-tipped drills", description: "Drill power ^1.2" @@ -1113,7 +1113,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: oil.oil, - cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e23), + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e23), display: { title: "Capitalism", description: "Console production is tripled" @@ -1122,7 +1122,7 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: coal.coal, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e136), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e136), display: { title: "Brighter work rooms", description: "Unused electricity makes ticks faster" @@ -1131,7 +1131,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: dyes.dyes.blue.amount, - cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(4e16), + cost: () =>Decimal.pow(1.4, upgradeAmount.value).mul(1e15), display: { title: "Colorful teddy bears", description: "Teddy bears produce 2x as much" @@ -1149,7 +1149,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: boxes.boxes, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e80), + cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e80), display: { title: "Carry ticks in boxes", description: "Tick speed x1.5" From 32709cfd78e6ebf0e41278434a36c03a22da862a Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:17:59 +0000 Subject: [PATCH 09/18] remove the .value --- src/data/layers/factory.tsx | 6 +++--- src/data/layers/oil.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 10056dd..e127681 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1077,7 +1077,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: metal.metal, - cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e55), + cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e53), display: { title: "Diamond-tipped drills", description: "Drill power ^1.2" @@ -1113,7 +1113,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: oil.oil, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e23), + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e22), display: { title: "Capitalism", description: "Console production is tripled" @@ -1122,7 +1122,7 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: coal.coal, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e136), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e130), display: { title: "Brighter work rooms", description: "Unused electricity makes ticks faster" diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index 9b1d346..5d8e692 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -895,7 +895,7 @@ const layer = createLayer(id, function (this: BaseLayer) { createExponentialModifier(() => ({ exponent: 1.2, description: "Diamond-tipped drills", - enabled: factory.upgrades[0][3].bought.value + enabled: factory.upgrades[0][3].bought })) ]); const computedDrillPower = computed(() => drillPower.apply(0)); From 17aa5b1c592b09d2a75ff48cb9599fe993149f0e Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:32:32 +0000 Subject: [PATCH 10/18] fix bucket --- src/data/layers/factory.tsx | 15 ++++++++++----- src/data/layers/toys.tsx | 12 +++++++++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index e127681..0cdb359 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -162,7 +162,12 @@ const factory = createLayer(id, () => { })), createMultiplicativeModifier(() => ({ multiplier: 1.4, - description: "2000 toys", + description: "1500 toys", + enabled: toys.milestones.milestone6.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 1.4, + description: "6000 toys", enabled: toys.milestones.milestone6.earned })) ]); @@ -537,7 +542,7 @@ const factory = createLayer(id, () => { } }, outputs: { - shovel: { + bucket: { amount: 1 } }, @@ -1059,7 +1064,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: paper.paper, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e90), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e90), display: { title: "News Ticker", description: "Paper boosts tick speed" @@ -1068,7 +1073,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: toys.trucks, - cost: () =>Decimal.pow(1.25, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(1.2, upgradeAmount.value).mul(1000), display: { title: "Haul wood in trucks", description: "Trucks multiply wood gain" @@ -1086,7 +1091,7 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: toys.woodenBlocks, - cost: () =>Decimal.pow(1.25, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(1.2, upgradeAmount.value).mul(2000), display: { title: "Larger wood pieces", description: "Wooden block producers produce 3x as much" diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index 83c6417..370f43f 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -288,6 +288,15 @@ const layer = createLayer(id, function (this: BaseLayer) { visibility: () => showIf(milestone6.earned.value && main.days[factory.advancedDay - 1].opened.value) })) as GenericMilestone; + const milestone8 = createMilestone(() => ({ + display: { + requirement: "6000 toys", + effectDisplay: "Running out of energy? Let's increase the limit! Multiply energy capacity by 1.4" + }, + shouldEarn: () => Decimal.gte(toySum.value, 6000), + visibility: () => + showIf(milestone6.earned.value && main.days[factory.advancedDay - 1].opened.value) + })) as GenericMilestone; const milestones = { milestone1, milestone2, @@ -295,7 +304,8 @@ const layer = createLayer(id, function (this: BaseLayer) { milestone4, milestone5, milestone6, - milestone7 + milestone7, + milestone8 }; const { collapseMilestones, display: milestonesDisplay } = createCollapsibleMilestones(milestones); From 64022416b6679ce4c24ffe216c74084eb4f12487 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 22 Dec 2022 22:32:25 -0600 Subject: [PATCH 11/18] Fixed offsets on even factory sizes --- src/data/layers/factory.tsx | 86 +++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 0cdb359..943dc1c 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -100,13 +100,6 @@ const advancedToyGoal = 2000; function roundDownTo(num: number, multiple: number) { return Math.floor((num + multiple / 2) / multiple) * multiple; } -function getRelativeCoords(e: MouseEvent) { - const rect = (e.target as HTMLElement).getBoundingClientRect(); - return { - x: e.clientX - rect.left, - y: e.clientY - rect.top - }; -} function rotateDir(dir: Direction, relative = Direction.Right) { const directions = [Direction.Up, Direction.Right, Direction.Down, Direction.Left]; let index = directions.indexOf(dir); @@ -145,6 +138,15 @@ const factory = createLayer(id, () => { const bucketAndShovels = createResource(0, "shovel and pails"); const consoles = createResource(0, "consoles"); + function getRelativeCoords(e: MouseEvent) { + const rect = (e.target as HTMLElement).getBoundingClientRect(); + const offset = computedFactorySize.value % 2 === 0 ? -blockSize / 2 : 0; + return { + x: e.clientX - rect.left + offset, + y: e.clientY - rect.top + offset + }; + } + const energy = createSequentialModifier(() => [ createAdditiveModifier(() => ({ addend: () => Decimal.add(1, coal.coal.value).log10(), @@ -198,18 +200,20 @@ const factory = createLayer(id, () => { createMultiplicativeModifier(() => ({ multiplier: Decimal.add(paper.paper.value, 1).log10().div(100).add(1), description: "News Ticker", - enabled: () => upgrades[0][1].bought.value + enabled: () => upgrades[0][1].bought.value })), createMultiplicativeModifier(() => ({ - multiplier: Decimal.lt(energyEfficiency.value, 1)?1:Decimal.sub(2, Decimal.div(energyConsumption.value, computedEnergy.value)), + multiplier: Decimal.lt(energyEfficiency.value, 1) + ? 1 + : Decimal.sub(2, Decimal.div(energyConsumption.value, computedEnergy.value)), description: "Brighter work rooms", - enabled: () => upgrades[2][1].bought.value + enabled: () => upgrades[2][1].bought.value })), createMultiplicativeModifier(() => ({ multiplier: 1.5, description: "Carry ticks in boxes", - enabled: () => upgrades[2][3].bought.value - })), + enabled: () => upgrades[2][3].bought.value + })) ]); const computedTickRate = computed(() => tickRate.apply(1)); const factorySize = createSequentialModifier(() => [ @@ -1164,7 +1168,9 @@ const factory = createLayer(id, () => { ] // pixi - const upgradeAmount = computed(() => upgrades.flat().filter(u => u.bought.value).length) as ComputedRef + const upgradeAmount = computed( + () => upgrades.flat().filter(u => u.bought.value).length + ) as ComputedRef; // load every sprite here so pixi doesn't complain about loading multiple times const assetsLoading = Promise.all([ Assets.load(Object.values(FACTORY_COMPONENTS).map(x => x.imageSrc)), @@ -1231,8 +1237,6 @@ const factory = createLayer(id, () => { } } - updateGraphics(); - loaded = true; watchEffect(updateGraphics); }); @@ -1564,19 +1568,20 @@ const factory = createLayer(id, () => { graphicContainer.removeChild(hoverSprite); if (isMouseHoverShown.value && compSelected.value !== "cursor") { + // Offset half a block if factory size is even + const factorySizeOffset = computedFactorySize.value % 2 === 0 ? blockSize / 2 : 0; const { tx, ty } = spriteContainer.localTransform; + const x = + roundDownTo(mouseCoords.x - tx, blockSize) + factorySizeOffset + tx - blockSize / 2; + const y = + roundDownTo(mouseCoords.y - ty, blockSize) + factorySizeOffset + ty - blockSize / 2; graphicContainer.lineStyle(4, 0x808080, 1); - graphicContainer.drawRect( - roundDownTo(mouseCoords.x - tx, blockSize) + tx - blockSize / 2, - roundDownTo(mouseCoords.y - ty, blockSize) + ty - blockSize / 2, - blockSize, - blockSize - ); + graphicContainer.drawRect(x, y, blockSize, blockSize); const factoryBaseData = FACTORY_COMPONENTS[compSelected.value]; const sheet = Assets.get(factoryBaseData.imageSrc); hoverSprite = new Sprite(sheet); - hoverSprite.x = roundDownTo(mouseCoords.x - tx, blockSize) + tx - blockSize / 2; - hoverSprite.y = roundDownTo(mouseCoords.y - ty, blockSize) + ty - blockSize / 2; + hoverSprite.x = x; + hoverSprite.y = y; hoverSprite.width = blockSize; hoverSprite.height = blockSize; hoverSprite.alpha = 0.5; @@ -1744,7 +1749,6 @@ const factory = createLayer(id, () => { const hovered = ref(false); const componentsList = jsx(() => { return ( -
{ ); } - const hoveredComponent = jsx(() => - compHovered.value !== undefined ? ( + const hoveredComponent = jsx(() => { + if (compHovered.value == null) { + return ""; + } + const factorySizeOffset = computedFactorySize.value % 2 === 0 ? blockSize / 2 : 0; + const x = mouseCoords.x + factorySizeOffset; + const y = mouseCoords.y + factorySizeOffset; + const onRight = + x + (document.getElementById("factory-info")?.clientWidth ?? 0) > app.view.width - 30; + const onTop = + y + (document.getElementById("factory-info")?.clientHeight ?? 0) > app.view.height - 30; + return (
- app.view.width - 30 - ? { right: app.view.width - mouseCoords.x + "px" } - : { left: mouseCoords.x + 148 + "px" }), - ...(mouseCoords.y + - (document.getElementById("factory-info")?.clientHeight ?? 0) > - app.view.height - 30 - ? { bottom: app.view.height - mouseCoords.y + "px" } - : { top: mouseCoords.y + "px" }) + ...(onRight ? { right: app.view.width - x + "px" } : { left: x + 148 + "px" }), + ...(onTop ? { bottom: app.view.height - y + "px" } : { top: y + "px" }) }} >

{FACTORY_COMPONENTS[compHovered.value.type].name}

@@ -1864,10 +1870,8 @@ const factory = createLayer(id, () => { ) : undefined}
- ) : ( - "" - ) - ); + ); + }); const tabs = createTabFamily( { @@ -1930,7 +1934,7 @@ const factory = createLayer(id, () => { {renderRow(...Object.values(factoryBuyables))} - {renderGrid(...upgrades as VueFeature[][])} + {renderGrid(...(upgrades as VueFeature[][]))} )) })), From 4fb2e4dc2203dfac2302ee9a1978ee480273d6d8 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 22 Dec 2022 22:40:36 -0600 Subject: [PATCH 12/18] Fixed typo for hotkeys --- src/features/hotkey.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/hotkey.tsx b/src/features/hotkey.tsx index 65e9ae3..cdb9ab3 100644 --- a/src/features/hotkey.tsx +++ b/src/features/hotkey.tsx @@ -44,7 +44,7 @@ export type GenericHotkey = Replace< } >; -const uppercaseNumbers = [")", "!", "@", "#", "$", "5", "^", "&", "*", "("]; +const uppercaseNumbers = [")", "!", "@", "#", "$", "%", "^", "&", "*", "("]; export function createHotkey( optionsFunc: OptionsFunc From b102e720d5297c86b3aaf98137b3c46db71df564 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:42:26 +0000 Subject: [PATCH 13/18] balance --- src/data/layers/factory.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 943dc1c..34c3500 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1122,7 +1122,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: oil.oil, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e22), + cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(1e22), display: { title: "Capitalism", description: "Console production is tripled" From 957658d72a36dffd063746bb0b48440ae3048dc5 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:44:22 +0000 Subject: [PATCH 14/18] finish balancing --- src/data/layers/factory.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 34c3500..46384b4 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -92,7 +92,7 @@ const advancedDay = 19; const presentsDay = 20; const toyGoal = 750; -const advancedToyGoal = 2000; +const advancedToyGoal = 1500; // 20x20 block size // TODO: unhardcode stuff From c4abf0cd5a567f4ccc15b16fff4684141374dfa7 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 22 Dec 2022 22:54:02 -0600 Subject: [PATCH 15/18] Fix typing cycle --- src/data/layers/factory.tsx | 261 ++++++++++++++++++----------------- src/data/layers/workshop.tsx | 7 +- 2 files changed, 139 insertions(+), 129 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 46384b4..5b31144 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -18,17 +18,18 @@ import { createResource, Resource } from "features/resources/resource"; import { createTab } from "features/tabs/tab"; import { createTabFamily } from "features/tabs/tabFamily"; import Tooltip from "features/tooltips/Tooltip.vue"; +import { createUpgrade } from "features/upgrades/upgrade"; import { globalBus } from "game/events"; import { createLayer } from "game/layers"; -import { createUpgrade, GenericUpgrade } from "features/upgrades/upgrade"; import { createAdditiveModifier, createMultiplicativeModifier, - createSequentialModifier + createSequentialModifier, + Modifier } from "game/modifiers"; import { noPersist, Persistent, persistent, State } from "game/persistence"; import Decimal, { DecimalSource, format, formatWhole } from "util/bignum"; -import { Direction } from "util/common"; +import { Direction, WithRequired } from "util/common"; import { ProcessedComputable } from "util/computed"; import { render, renderGrid, renderRow, VueFeature } from "util/vue"; import { computed, ComputedRef, reactive, ref, unref, watchEffect } from "vue"; @@ -38,22 +39,23 @@ import _metal from "../symbols/metal.png"; import _plastic from "../symbols/plastic.png"; import boxes from "./boxes"; import coal from "./coal"; +import dyes from "./dyes"; import _bear from "./factory-components/bear.svg"; import _bearMaker from "./factory-components/bearmaker.svg"; -import _stuffing from "./factory-components/stuffing.svg"; -import _console from "./factory-components/console.svg"; -import _circuitBoard from "./factory-components/circuit.svg"; -import _stuffingMaker from "./factory-components/stuffingmaker.svg"; -import _consoleMaker from "./factory-components/consolemaker.svg"; -import _circuitBoardMaker from "./factory-components/circuitmaker.svg"; import _block from "./factory-components/block.svg"; import _blockMaker from "./factory-components/blockmaker.svg"; import _bucket from "./factory-components/bucket.svg"; import _bucketMaker from "./factory-components/bucketmaker.svg"; import _bucketShovel from "./factory-components/bucketshovel.svg"; import _bucketShovelMaker from "./factory-components/bucketshovelmaker.svg"; +import _button from "./factory-components/button.svg"; +import _buttonMaker from "./factory-components/buttonmaker.svg"; +import _circuitBoard from "./factory-components/circuit.svg"; +import _circuitBoardMaker from "./factory-components/circuitmaker.svg"; import _clothes from "./factory-components/clothes.svg"; import _clothesMaker from "./factory-components/clothesmaker.svg"; +import _console from "./factory-components/console.svg"; +import _consoleMaker from "./factory-components/consolemaker.svg"; import _conveyor from "./factory-components/conveyor.png"; import _cursor from "./factory-components/cursor.svg"; import _delete from "./factory-components/delete.svg"; @@ -63,10 +65,10 @@ import _rotateLeft from "./factory-components/rotateLeft.svg"; import _rotateRight from "./factory-components/rotateRight.svg"; import _plankMaker from "./factory-components/sawmill.svg"; import _shed from "./factory-components/shed.svg"; -import _button from "./factory-components/button.svg"; import _shovel from "./factory-components/shovel.svg"; import _shovelMaker from "./factory-components/shovelmaker.svg"; -import _buttonMaker from "./factory-components/buttonmaker.svg"; +import _stuffing from "./factory-components/stuffing.svg"; +import _stuffingMaker from "./factory-components/stuffingmaker.svg"; import _thread from "./factory-components/thread.svg"; import _threadMaker from "./factory-components/threadmaker.svg"; import _truck from "./factory-components/truck.svg"; @@ -74,16 +76,15 @@ import _truckMaker from "./factory-components/truckmaker.svg"; import _wheel from "./factory-components/wheel.svg"; import _wheelMaker from "./factory-components/wheelmaker.svg"; import Factory from "./Factory.vue"; +import metal from "./metal"; import oil from "./oil"; +import paper from "./paper"; +import plastic from "./plastic"; import "./styles/factory.css"; import Toy from "./Toy.vue"; import toys from "./toys"; import trees from "./trees"; import workshop from "./workshop"; -import paper from "./paper"; -import metal from "./metal"; -import dyes from "./dyes"; -import plastic from "./plastic"; const id = "factory"; @@ -172,7 +173,7 @@ const factory = createLayer(id, () => { description: "6000 toys", enabled: toys.milestones.milestone6.earned })) - ]); + ]) as WithRequired; const computedEnergy = computed(() => energy.apply(0)); const energyConsumption = computed(() => Object.values(components.value) @@ -1057,116 +1058,124 @@ const factory = createLayer(id, () => { visible: () => showIf(main.days[advancedDay - 1].opened.value) })) as GenericBuyable; const factoryBuyables = { expandFactory, oilFuel, carryToys }; - const upgrades = [[createUpgrade(() => ({ - resource: trees.logs, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e75), - display: { - title: "Sawmill Efficiency", - description: "Double sawmill consumption and production and metal supplier efficiency" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - })), - createUpgrade(() => ({ - resource: paper.paper, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e90), - display: { - title: "News Ticker", - description: "Paper boosts tick speed" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - })), - createUpgrade(() => ({ - resource: toys.trucks, - cost: () =>Decimal.pow(1.2, upgradeAmount.value).mul(1000), - display: { - title: "Haul wood in trucks", - description: "Trucks multiply wood gain" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - })), - createUpgrade(() => ({ - resource: metal.metal, - cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e53), - display: { - title: "Diamond-tipped drills", - description: "Drill power ^1.2" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - }))], - [createUpgrade(() => ({ - resource: toys.woodenBlocks, - cost: () =>Decimal.pow(1.2, upgradeAmount.value).mul(2000), - display: { - title: "Larger wood pieces", - description: "Wooden block producers produce 3x as much" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - })), - createUpgrade(() => ({ - resource: dyes.dyes.red.amount, - cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(4e16), - display: { - title: "Colorful clothes", - description: "Dye producers produce 4x as much" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - })), - createUpgrade(() => ({ - resource: plastic.plastic, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), - display: { - title: "Improved plastic producers", - description: "Plastic producers produce 4x as much" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - })), - createUpgrade(() => ({ - resource: oil.oil, - cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(1e22), - display: { - title: "Capitalism", - description: "Console production is tripled" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - }))], - [createUpgrade(() => ({ - resource: coal.coal, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e130), - display: { - title: "Brighter work rooms", - description: "Unused electricity makes ticks faster" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - })), - createUpgrade(() => ({ - resource: dyes.dyes.blue.amount, - cost: () =>Decimal.pow(1.4, upgradeAmount.value).mul(1e15), - display: { - title: "Colorful teddy bears", - description: "Teddy bears produce 2x as much" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - })), - createUpgrade(() => ({ - resource: dyes.dyes.black.amount, - cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(1e6), - display: { - title: "New Colors", - description: "Unlock white dye" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - })), - createUpgrade(() => ({ - resource: boxes.boxes, - cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e80), - display: { - title: "Carry ticks in boxes", - description: "Tick speed x1.5" - }, - visible: () => showIf(main.days[advancedDay - 1].opened.value) - }))], - ] - + const upgrades = [ + [ + createUpgrade(() => ({ + resource: trees.logs, + cost: () => Decimal.pow(5, upgradeAmount.value).mul(1e75), + display: { + title: "Sawmill Efficiency", + description: + "Double sawmill consumption and production and metal supplier efficiency" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: paper.paper, + cost: () => Decimal.pow(5, upgradeAmount.value).mul(1e90), + display: { + title: "News Ticker", + description: "Paper boosts tick speed" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: toys.trucks, + cost: () => Decimal.pow(1.2, upgradeAmount.value).mul(1000), + display: { + title: "Haul wood in trucks", + description: "Trucks multiply wood gain" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: metal.metal, + cost: () => Decimal.pow(3, upgradeAmount.value).mul(1e53), + display: { + title: "Diamond-tipped drills", + description: "Drill power ^1.2" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })) + ], + [ + createUpgrade(() => ({ + resource: toys.woodenBlocks, + cost: () => Decimal.pow(1.2, upgradeAmount.value).mul(2000), + display: { + title: "Larger wood pieces", + description: "Wooden block producers produce 3x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: dyes.dyes.red.amount, + cost: () => Decimal.pow(1.5, upgradeAmount.value).mul(4e16), + display: { + title: "Colorful clothes", + description: "Dye producers produce 4x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: plastic.plastic, + cost: () => Decimal.pow(2, upgradeAmount.value).mul(1e17), + display: { + title: "Improved plastic producers", + description: "Plastic producers produce 4x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: oil.oil, + cost: () => Decimal.pow(1.5, upgradeAmount.value).mul(1e22), + display: { + title: "Capitalism", + description: "Console production is tripled" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })) + ], + [ + createUpgrade(() => ({ + resource: coal.coal, + cost: () => Decimal.pow(5, upgradeAmount.value).mul(1e130), + display: { + title: "Brighter work rooms", + description: "Unused electricity makes ticks faster" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: dyes.dyes.blue.amount, + cost: () => Decimal.pow(1.4, upgradeAmount.value).mul(1e15), + display: { + title: "Colorful teddy bears", + description: "Teddy bears produce 2x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: dyes.dyes.black.amount, + cost: () => Decimal.pow(1.5, upgradeAmount.value).mul(1e6), + display: { + title: "New Colors", + description: "Unlock white dye" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: boxes.boxes, + cost: () => Decimal.pow(3, upgradeAmount.value).mul(1e80), + display: { + title: "Carry ticks in boxes", + description: "Tick speed x1.5" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })) + ] + ]; + // pixi const upgradeAmount = computed( () => upgrades.flat().filter(u => u.bought.value).length diff --git a/src/data/layers/workshop.tsx b/src/data/layers/workshop.tsx index 584bd43..831761c 100644 --- a/src/data/layers/workshop.tsx +++ b/src/data/layers/workshop.tsx @@ -24,11 +24,12 @@ import { createAdditiveModifier, createExponentialModifier, createMultiplicativeModifier, - createSequentialModifier + createSequentialModifier, + Modifier } from "game/modifiers"; import { noPersist, persistent } from "game/persistence"; import Decimal, { DecimalSource, formatWhole } from "util/bignum"; -import { Direction } from "util/common"; +import { Direction, WithRequired } from "util/common"; import { render } from "util/vue"; import { computed, ref, unref, watchEffect } from "vue"; import elves from "./elves"; @@ -63,7 +64,7 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "Expand Factory", enabled: () => Decimal.gt(factory.factoryBuyables.expandFactory.amount.value, 0) })) - ]); + ]) as WithRequired; const computedMaxFoundation = computed(() => maxFoundation.apply(100)); const foundationConversion = createIndependentConversion(() => ({ From 135b7b151b436ced0fe7d4959ad55ef99a1075a1 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Thu, 22 Dec 2022 21:31:20 -0800 Subject: [PATCH 16/18] no day 20 yet --- 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 97ffcd9..349bac1 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -464,7 +464,7 @@ export const main = createLayer("main", function (this: BaseLayer) { createDay(() => ({ day: 20, shouldNotify: false, - layer: "factory", // "presents" + layer: null, // "presents" symbol: wrappingPaperSymbol, story: "", completedStory: "", From 83bf790945084fb277b6594f83cfb386a796acd6 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 22 Dec 2022 23:38:31 -0600 Subject: [PATCH 17/18] Ribbons can't cost white dye --- src/data/layers/ribbon.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/layers/ribbon.tsx b/src/data/layers/ribbon.tsx index 9874705..0932a76 100644 --- a/src/data/layers/ribbon.tsx +++ b/src/data/layers/ribbon.tsx @@ -42,7 +42,7 @@ const layer = createLayer(id, () => { ); const currentDyeType = computed( () => - Object.values(dyes.dyes).filter(d => d !== dyes.dyes.black)[ + Object.values(dyes.dyes).filter(d => d !== dyes.dyes.black && d !== dyes.dyes.white)[ new Decimal(ribbon.value).toNumber() % 6 ] ); From 64394c7f7c6db63131def1d3c9971eb396d31d00 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 22 Dec 2022 23:41:35 -0600 Subject: [PATCH 18/18] Fix sprites being offset on even amounts of factory size --- src/data/layers/factory.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 5b31144..2e6cde0 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1436,10 +1436,13 @@ const factory = createLayer(id, () => { // if X is being moved, then we don't need to adjust x // however it needs to be aligned if Y is being moved // vice-versa + const factorySizeOffset = computedFactorySize.value % 2 === 0 ? blockSize / 2 : 0; sprite.x = - (x + xInc * 0.3 + (xInc == 0 ? Math.random() * 0.4 - 0.2 : 0)) * blockSize; + (x + xInc * 0.3 + (xInc == 0 ? Math.random() * 0.4 - 0.2 : 0)) * blockSize + + factorySizeOffset; sprite.y = - (y + yInc * 0.3 + (yInc == 0 ? Math.random() * 0.4 - 0.2 : 0)) * blockSize; + (y + yInc * 0.3 + (yInc == 0 ? Math.random() * 0.4 - 0.2 : 0)) * blockSize + + factorySizeOffset; sprite.anchor.set(0.5); sprite.width = blockSize / 2.5; sprite.height = blockSize / 2.5;