From 08c9fe78df97172ca297d1950f7b1cda4e24c278 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Tue, 13 Dec 2022 22:19:24 -0600 Subject: [PATCH] Implement bell lv5 upgrades --- src/data/layers/boxes.tsx | 11 ++++++++++- src/data/layers/cloth.tsx | 16 ++++++++++++++++ src/data/layers/dyes.tsx | 8 ++++++++ src/data/layers/management.tsx | 8 +++++++- 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/data/layers/boxes.tsx b/src/data/layers/boxes.tsx index d318634..8a1f27c 100644 --- a/src/data/layers/boxes.tsx +++ b/src/data/layers/boxes.tsx @@ -179,6 +179,12 @@ const layer = createLayer(id, function (this: BaseLayer) { display: { title: "Carry dye in boxes", description: "Double all dye gain" + }, + onPurchase() { + (["red", "yellow", "blue", "orange", "green", "purple"] as const).forEach(dyeColor => { + dyes.dyes[dyeColor].amount.value = 0; + dyes.dyes[dyeColor].buyable.amount.value = 0; + }); } })) as GenericUpgrade; const xpUpgrade = createUpgrade(() => ({ @@ -356,7 +362,10 @@ const layer = createLayer(id, function (this: BaseLayer) { if (management.elfTraining.boxElfTraining.milestones[2].earned.value) { scaling--; } - return Decimal.pow(scaling, v).times(1e25).div(dyes.boosts.orange2.value).div(wrappingPaper.boosts.ocean1.value); + return Decimal.pow(scaling, v) + .times(1e25) + .div(dyes.boosts.orange2.value) + .div(wrappingPaper.boosts.ocean1.value); }, visibility: () => showIf(management.elfTraining.boxElfTraining.milestones[3].earned.value), freeLevels: computed(() => diff --git a/src/data/layers/cloth.tsx b/src/data/layers/cloth.tsx index dab4aa7..6fdbf41 100644 --- a/src/data/layers/cloth.tsx +++ b/src/data/layers/cloth.tsx @@ -28,6 +28,7 @@ import { formatWhole } from "util/break_eternity"; import { Direction } from "util/common"; import { render, renderCol, renderRow } from "util/vue"; import { computed, ref } from "vue"; +import boxes from "./boxes"; import dyes from "./dyes"; import management from "./management"; import metal from "./metal"; @@ -366,6 +367,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: 2, description: "1000% Foundation Completed", enabled: workshop.milestones.extraExpansionMilestone5.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Carry cloth in boxes", + enabled: boxes.row3Upgrades.clothUpgrade.bought })) ]); const computedSheepGain = computed(() => sheepGain.apply(1)); @@ -401,6 +407,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: 2, description: "1000% Foundation Completed", enabled: workshop.milestones.extraExpansionMilestone5.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Carry cloth in boxes", + enabled: boxes.row3Upgrades.clothUpgrade.bought })) ]); const computedShearingAmount = computed(() => shearingAmount.apply(1)); @@ -436,6 +447,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: 2, description: "1000% Foundation Completed", enabled: workshop.milestones.extraExpansionMilestone5.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Carry cloth in boxes", + enabled: boxes.row3Upgrades.clothUpgrade.bought })) ]); const computedSpinningAmount = computed(() => spinningAmount.apply(1)); diff --git a/src/data/layers/dyes.tsx b/src/data/layers/dyes.tsx index 26f740c..fa56269 100644 --- a/src/data/layers/dyes.tsx +++ b/src/data/layers/dyes.tsx @@ -31,6 +31,7 @@ import oil from "./oil"; import trees from "./trees"; import wrappingPaper from "./wrapping-paper"; import paper from "./paper"; +import boxes from "./boxes"; interface Dye { name: string; @@ -156,6 +157,13 @@ const layer = createLayer(id, function (this: BaseLayer) { enabled: management.elfTraining.clothElfTraining.milestones[2].earned })) ); + modifiers.push( + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Carry dye in boxes", + enabled: boxes.row3Upgrades.dyeUpgrade.bought + })) + ); return modifiers; }) as WithRequired; const computedToGenerate = computed(() => toGenerate.apply(0)); diff --git a/src/data/layers/management.tsx b/src/data/layers/management.tsx index f0c1525..9561348 100644 --- a/src/data/layers/management.tsx +++ b/src/data/layers/management.tsx @@ -117,6 +117,11 @@ const layer = createLayer(id, () => { multiplier: classroomEffect, description: "Classroom Effect", enabled: classroomUpgrade.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Carry experience in boxes???", + enabled: boxes.row3Upgrades.xpUpgrade.bought })) ]); const globalXPModifierComputed = computed(() => globalXPModifier.apply(1)); @@ -1277,7 +1282,8 @@ const layer = createLayer(id, () => { const focusUpgrade5 = createUpgrade(() => ({ display: { title: "Focus Focuser", - description: "The bar moves slower when it's closer to the right and faster when it's closer to the left" + description: + "The bar moves slower when it's closer to the right and faster when it's closer to the left" }, resource: trees.logs, visibility: () => showIf(elfTraining.metalElfTraining.milestones[4].earned.value),