From e181b2b533da83f64578638352cf6a7bd6893fc5 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Mon, 12 Dec 2022 21:15:42 -0600 Subject: [PATCH] Jack and Mary lv4-5 and Noel lv4 --- src/data/layers/management.tsx | 19 ++++++++++++++----- src/data/layers/metal.tsx | 12 ++++++++++++ src/data/layers/oil.tsx | 10 ++++++++-- src/data/layers/plastic.tsx | 16 +++++++++++++--- 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/src/data/layers/management.tsx b/src/data/layers/management.tsx index 9b2359e..d4e7eb5 100644 --- a/src/data/layers/management.tsx +++ b/src/data/layers/management.tsx @@ -75,6 +75,9 @@ const layer = createLayer(id, () => { } return elfLevel; }); + const totalElfExp = computed(() => + Object.values(elfTraining).reduce((acc, curr) => acc.add(curr.exp.value), new Decimal(0)) + ); // ------------------------------------------------------------------------------- Upgrades @@ -169,7 +172,8 @@ const layer = createLayer(id, () => { createMultiplicativeModifier(() => ({ multiplier: focusMulti, description: "Focus Multiplier", - enabled: () => Decimal.gt(focusTime.value, 0) && focusTargets.value[elf.name] == true + enabled: () => + Decimal.gt(focusTime.value, 0) && focusTargets.value[elf.name] == true })), ...modifiers ]); @@ -390,7 +394,11 @@ const layer = createLayer(id, () => { createMilestone(() => ({ display: { requirement: "Jack Level 4", - effectDisplay: "Oil gain is multiplied based on total elf levels." + effectDisplay: jsx(() => ( + <> + Oil gain is multiplied by total elf levels. + + )) }, visibility: () => showIf(heatedCutterElfMilestones[2].earned.value && main.day.value >= 13), @@ -903,8 +911,8 @@ const layer = createLayer(id, () => { ); } } - focusTime.value = Decimal.sub(focusTime.value, diff).max(0) - focusCooldown.value = Decimal.sub(focusCooldown.value, diff).max(0) + focusTime.value = Decimal.sub(focusTime.value, diff).max(0); + focusCooldown.value = Decimal.sub(focusCooldown.value, diff).max(0); if (Decimal.eq(focusTime.value, 0)) { focusMulti.value = Decimal.pow( focusMaxMulti.value, @@ -993,7 +1001,7 @@ const layer = createLayer(id, () => { function rerollFocusTargets(range: number, count: DecimalSource) { let x = 0; focusTargets.value = {}; - const newCount = Decimal.min(count, range) + const newCount = Decimal.min(count, range); while (newCount.gte(x)) { const roll = Object.values(elfTraining)[Math.floor(Math.random() * range)]?.name ?? ""; if (!focusTargets.value[roll]) { @@ -1267,6 +1275,7 @@ const layer = createLayer(id, () => { elfTraining, totalElfLevels, + totalElfExp, currentShown, generalTabCollapsed, diff --git a/src/data/layers/metal.tsx b/src/data/layers/metal.tsx index c0c06cd..81d0166 100644 --- a/src/data/layers/metal.tsx +++ b/src/data/layers/metal.tsx @@ -12,6 +12,7 @@ import { persistent } from "game/persistence"; import { globalBus } from "game/events"; import { createAdditiveModifier, + createExponentialModifier, createMultiplicativeModifier, createSequentialModifier } from "game/modifiers"; @@ -30,6 +31,7 @@ import boxes from "./boxes"; import cloth from "./cloth"; import plastic from "./plastic"; import dyes from "./dyes"; +import management from "./management"; const id = "metal"; const day = 7; @@ -78,6 +80,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: () => Decimal.add(cloth.cloth.value, 1).log10().plus(1), description: "Glistening Paint", enabled: dyes.upgrades.redDyeUpg.bought + })), + createExponentialModifier(() => ({ + exponent: 1.1, + description: "Mary Level 4", + enabled: management.elfTraining.heatedPlanterElfTraining.milestones[3].earned })) ]); const computedOrePurity = computed(() => orePurity.apply(0.1)); @@ -108,6 +115,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: () => Decimal.add(plastic.activeRefinery.value, 1).sqrt(), description: "De Louvre", enabled: dyes.upgrades.redDyeUpg2.bought + })), + createMultiplicativeModifier(() => ({ + multiplier: () => Decimal.div(management.totalElfExp.value, 1000).add(1).sqrt(), + description: "Mary Level 5", + enabled: management.elfTraining.heatedPlanterElfTraining.milestones[4].earned })) ]); const computedAutoSmeltSpeed = computed(() => autoSmeltSpeed.apply(0)); diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index aa7a515..f4636ba 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -35,6 +35,7 @@ import { formatGain } from "util/bignum"; import plastic from "./plastic"; import paper from "./paper"; import dyes from "./dyes"; +import management from "./management"; const id = "oil"; const day = 9; @@ -247,8 +248,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
Pump that oil from the ground.
- Gain oil based on the number of Heavy buildings active and well - depth, but coal usage is multiplied by {row2Upgrades[3].bought.value ? 4 : 5}×. + Gain oil based on the number of Heavy buildings active and well depth, but coal + usage is multiplied by {row2Upgrades[3].bought.value ? 4 : 5}×.

Currently: @@ -718,6 +719,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: () => coalEffectiveness.value, description: "Effectiveness", enabled: () => Decimal.lt(coalEffectiveness.value, 1) + })), + createMultiplicativeModifier(() => ({ + multiplier: () => Decimal.sqrt(management.totalElfLevels.value), + description: "Jack Level 4", + enabled: management.elfTraining.heatedCutterElfTraining.milestones[3].earned })) ]); const computedOilSpeed = computed(() => oilSpeed.apply(0)); diff --git a/src/data/layers/plastic.tsx b/src/data/layers/plastic.tsx index 3e3717e..ddaf7a5 100644 --- a/src/data/layers/plastic.tsx +++ b/src/data/layers/plastic.tsx @@ -32,6 +32,7 @@ import boxes from "./boxes"; import metal from "./metal"; import oil from "./oil"; import dyes from "./dyes"; +import management from "./management"; const id = "plastic"; const day = 10; @@ -66,7 +67,11 @@ const layer = createLayer(id, function (this: BaseLayer) { resource: metal.metal, cost() { const v = new Decimal(this.amount.value); - return Decimal.pow(1.2, v).times(1e7); + let cost = Decimal.pow(1.2, v).times(1e7); + if (management.elfTraining.fertilizerElfTraining.milestones[3].earned.value) { + cost = Decimal.sub(cost, Decimal.pow(plastic.value, 2)).max(0); + } + return cost; }, display: jsx(() => ( <> @@ -299,11 +304,16 @@ const layer = createLayer(id, function (this: BaseLayer) { <> {render(trackerDisplay)} - + } + /> {render(buildRefinery)}