From f01b7e139caef8c71fe6926619d78a6055b40625 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Tue, 13 Dec 2022 01:44:47 -0600 Subject: [PATCH] balances and tweaks and fixes --- src/data/layers/boxes.tsx | 13 +++++++++++- src/data/layers/cloth.tsx | 18 ++++++++++++++++- src/data/layers/management.tsx | 36 ++++++++++++++++++++-------------- src/data/layers/metal.tsx | 11 +++++++++-- src/data/layers/oil.tsx | 7 +++++++ src/data/layers/paper.tsx | 6 ++++++ src/data/layers/plastic.tsx | 7 +++++++ src/data/layers/trees.tsx | 15 ++++++++------ src/data/layers/workshop.tsx | 35 ++++++++++++++++++++++++--------- 9 files changed, 114 insertions(+), 34 deletions(-) diff --git a/src/data/layers/boxes.tsx b/src/data/layers/boxes.tsx index b87f77c..d896205 100644 --- a/src/data/layers/boxes.tsx +++ b/src/data/layers/boxes.tsx @@ -15,7 +15,12 @@ import { createResource, displayResource, Resource } from "features/resources/re import { createUpgrade, GenericUpgrade } from "features/upgrades/upgrade"; import { globalBus } from "game/events"; import { BaseLayer, createLayer } from "game/layers"; -import { createExponentialModifier, createSequentialModifier, Modifier } from "game/modifiers"; +import { + createExponentialModifier, + createMultiplicativeModifier, + createSequentialModifier, + Modifier +} from "game/modifiers"; import { noPersist } from "game/persistence"; import Decimal, { DecimalSource, format, formatWhole } from "util/bignum"; import { WithRequired } from "util/common"; @@ -26,6 +31,7 @@ import management from "./management"; import paper from "./paper"; import plastic from "./plastic"; import trees from "./trees"; +import workshop from "./workshop"; export type BoxesBuyable = GenericBuyable & { resource: Resource; @@ -42,6 +48,11 @@ const layer = createLayer(id, function (this: BaseLayer) { const boxes = createResource(0, "boxes"); const boxGain = createSequentialModifier(() => [ + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "1000% Foundation Completed", + enabled: workshop.milestones.extraExpansionMilestone5.earned + })), createExponentialModifier(() => ({ exponent: 1.1, description: "Bell Level 2", diff --git a/src/data/layers/cloth.tsx b/src/data/layers/cloth.tsx index a2947c5..3f28d96 100644 --- a/src/data/layers/cloth.tsx +++ b/src/data/layers/cloth.tsx @@ -34,6 +34,7 @@ import metal from "./metal"; import paper from "./paper"; import plastic from "./plastic"; import trees from "./trees"; +import workshop from "./workshop"; const id = "cloth"; const day = 8; @@ -332,7 +333,7 @@ const layer = createLayer(id, function (this: BaseLayer) { const paperUpgrades = { paperUpgrade4, paperUpgrade3, paperUpgrade2, paperUpgrade1 }; const hollyEffect = computed(() => - Decimal.add(trees.computedAutoCuttingAmount.value, 1).root(3) + Decimal.add(trees.computedAutoCuttingAmount.value, 1).root(9) ); const gingersnapEffect = computed(() => Decimal.add(dyes.dyeSum.value, 10).log10()); @@ -360,6 +361,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: hollyEffect, description: "Holly Level 3", enabled: management.elfTraining.cutterElfTraining.milestones[2].earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "1000% Foundation Completed", + enabled: workshop.milestones.extraExpansionMilestone5.earned })) ]); const computedSheepGain = computed(() => sheepGain.apply(1)); @@ -390,6 +396,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: hollyEffect, description: "Holly Level 3", enabled: management.elfTraining.cutterElfTraining.milestones[2].earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "1000% Foundation Completed", + enabled: workshop.milestones.extraExpansionMilestone5.earned })) ]); const computedShearingAmount = computed(() => shearingAmount.apply(1)); @@ -420,6 +431,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: hollyEffect, description: "Holly Level 3", enabled: management.elfTraining.cutterElfTraining.milestones[2].earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "1000% Foundation Completed", + enabled: workshop.milestones.extraExpansionMilestone5.earned })) ]); const computedSpinningAmount = computed(() => spinningAmount.apply(1)); diff --git a/src/data/layers/management.tsx b/src/data/layers/management.tsx index 6c0a59f..b317d14 100644 --- a/src/data/layers/management.tsx +++ b/src/data/layers/management.tsx @@ -22,7 +22,7 @@ import { persistent } from "game/persistence"; import Decimal, { DecimalSource, format, formatTime, formatWhole } from "util/bignum"; import { Direction } from "util/common"; import { render, renderCol, renderGrid } from "util/vue"; -import { computed, ComputedRef, ref, Ref, unref } from "vue"; +import { computed, ComputedRef, ref, Ref, unref, watch } from "vue"; import elves from "./elves"; import trees from "./trees"; import paper from "./paper"; @@ -151,12 +151,15 @@ const layer = createLayer(id, () => { ); const level = computed(() => Decimal.min( - Decimal.mul(9, exp.value).div(4000).div(costMulti).add(1).log(5).floor(), + Decimal.affordGeometricSeries(exp.value, Decimal.mul(4000, costMulti), 5, 0), schools.amount.value ).toNumber() ); const expToNextLevel = computed(() => - Decimal.sub(exp.value, Decimal.pow(5, level.value).sub(1).div(9).mul(4000)) + Decimal.sub( + exp.value, + Decimal.sumGeometricSeries(level.value, Decimal.mul(4000, costMulti), 5, 0) + ) ); const bar = createBar(() => ({ direction: Direction.Right, @@ -275,8 +278,7 @@ const layer = createLayer(id, () => { requirement: "Holly Level 3", effectDisplay: jsx(() => ( <> - Multiply all cloth actions' effectiveness by 9 - Cutter amount. + Multiply all cloth actions' effectiveness by log10Cutter amount. )) }, @@ -449,7 +451,7 @@ const layer = createLayer(id, () => { createMilestone(() => ({ display: { requirement: "Mary Level 2", - effectDisplay: "Double automatic tree planting speed" + effectDisplay: "Metal gain is raised to the 1.1." }, visibility: () => showIf(heatedPlanterElfMilestones[0].earned.value), shouldEarn: () => heatedPlanterElfTraining.level.value >= 2 @@ -465,7 +467,7 @@ const layer = createLayer(id, () => { createMilestone(() => ({ display: { requirement: "Mary Level 4", - effectDisplay: "Metal gain is raised to the 1.1." + effectDisplay: "Double automatic tree planting speed" }, visibility: () => showIf(heatedPlanterElfMilestones[2].earned.value && main.day.value >= 13), @@ -938,6 +940,7 @@ const layer = createLayer(id, () => { focusTime.value = Decimal.sub(focusTime.value, diff).max(0); focusCooldown.value = Decimal.sub(focusCooldown.value, diff).max(0); if (Decimal.eq(focusTime.value, 0)) { + focusTargets.value = {}; focusMulti.value = Decimal.pow( focusMaxMulti.value, 1 - Math.abs(Math.sin((Date.now() / 1000) * 2)) @@ -1040,7 +1043,7 @@ const layer = createLayer(id, () => { description: "Multiplies the maximum experience multiplier from focus by 2" }, resource: trees.logs, - cost: 1e30 + cost: 1e25 })); const focusUpgrade2 = createUpgrade(() => ({ display: { @@ -1048,7 +1051,7 @@ const layer = createLayer(id, () => { description: "Increase elves affected by focus by 1" }, resource: trees.logs, - cost: 1e40 + cost: 1e30 })); const focusUpgrade3 = createUpgrade(() => ({ display: { @@ -1056,23 +1059,24 @@ const layer = createLayer(id, () => { description: "Focus can now be rerolled every 10 seconds" }, resource: trees.logs, - cost: 1e50 + cost: 1e35 })); const upgrades = [focusUpgrade1, focusUpgrade2, focusUpgrade3]; // ------------------------------------------------------------------------------- Schools const schoolCost = computed(() => { const schoolFactor = Decimal.pow(10, schools.amount.value); - const woodFactor = Decimal.pow(2e4, schools.amount.value); + const nerfedSchoolFactor = Decimal.pow(5, schools.amount.value); + const woodFactor = Decimal.pow(1e4, schools.amount.value); const coalFactor = Decimal.pow(2000, schools.amount.value); return { wood: woodFactor.mul(1e21), coal: coalFactor.mul(1e32), paper: coalFactor.mul(1e18), boxes: woodFactor.mul(1e13), - metalIngots: schoolFactor.mul(1e12), + metalIngots: nerfedSchoolFactor.mul(1e12), cloth: schoolFactor.mul(1e4), - plastic: schoolFactor.mul(1e6), + plastic: nerfedSchoolFactor.mul(1e6), dye: Decimal.add(schools.amount.value, 1).mul(10000) }; }); @@ -1139,7 +1143,7 @@ const layer = createLayer(id, () => { }); const classroomEffect = computed(() => { - return Decimal.add(classrooms.amount.value, 1).sqrt(); + return Decimal.add(classrooms.amount.value, 1).pow(0.9); }); const classrooms = createBuyable(() => ({ @@ -1332,7 +1336,9 @@ const layer = createLayer(id, () => { {render(modifiersModal)} {render(dayProgress)}
- {renderCol(schools, classrooms)} {renderGrid([teaching, classroomUpgrade])}{" "} + {renderCol(schools, classrooms)} + {renderGrid([teaching, classroomUpgrade])} + {renderGrid(upgrades)} {Decimal.gt(schools.amount.value, 0) ? ( <> diff --git a/src/data/layers/metal.tsx b/src/data/layers/metal.tsx index 0d7d430..586deea 100644 --- a/src/data/layers/metal.tsx +++ b/src/data/layers/metal.tsx @@ -32,6 +32,7 @@ import cloth from "./cloth"; import plastic from "./plastic"; import dyes from "./dyes"; import management from "./management"; +import workshop from "./workshop"; const id = "metal"; const day = 7; @@ -81,10 +82,16 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "Glistening Paint", enabled: dyes.upgrades.redDyeUpg.bought })), + createMultiplicativeModifier(() => ({ + multiplier: () => + Decimal.div(workshop.foundationProgress.value, 10).floor().div(10).add(1), + description: "400% Foundation Completed", + enabled: workshop.milestones.extraExpansionMilestone2.earned + })), createExponentialModifier(() => ({ exponent: 1.1, - description: "Mary Level 4", - enabled: management.elfTraining.heatedPlanterElfTraining.milestones[3].earned + description: "Mary Level 2", + enabled: management.elfTraining.heatedPlanterElfTraining.milestones[1].earned })) ]); const computedOrePurity = computed(() => orePurity.apply(0.1)); diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index ce378b0..ef5ea76 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -36,6 +36,7 @@ import plastic from "./plastic"; import paper from "./paper"; import dyes from "./dyes"; import management from "./management"; +import workshop from "./workshop"; const id = "oil"; const day = 9; @@ -720,6 +721,12 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "Effectiveness", enabled: () => Decimal.lt(coalEffectiveness.value, 1) })), + createMultiplicativeModifier(() => ({ + multiplier: () => + Decimal.div(workshop.foundationProgress.value, 10).floor().div(10).add(1), + description: "600% Foundation Completed", + enabled: workshop.milestones.extraExpansionMilestone3.earned + })), createMultiplicativeModifier(() => ({ multiplier: () => Decimal.sqrt(management.totalElfLevels.value), description: "Jack Level 4", diff --git a/src/data/layers/paper.tsx b/src/data/layers/paper.tsx index 01eb85b..06d0223 100644 --- a/src/data/layers/paper.tsx +++ b/src/data/layers/paper.tsx @@ -28,6 +28,7 @@ import plastic from "./plastic"; import trees from "./trees"; import dyes from "./dyes"; import management from "./management"; +import workshop from "./workshop"; const id = "paper"; const day = 5; @@ -300,6 +301,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: dyes.boosts.yellow1, description: "Yellow Dye Boost 1", enabled: () => Decimal.gte(dyes.dyes.yellow.amount.value, 1) + })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "1000% Foundation Completed", + enabled: workshop.milestones.extraExpansionMilestone5.earned })) ]) as WithRequired; const ashCost = createSequentialModifier(() => [ diff --git a/src/data/layers/plastic.tsx b/src/data/layers/plastic.tsx index 1527123..917f24c 100644 --- a/src/data/layers/plastic.tsx +++ b/src/data/layers/plastic.tsx @@ -33,6 +33,7 @@ import metal from "./metal"; import oil from "./oil"; import dyes from "./dyes"; import management from "./management"; +import workshop from "./workshop"; const id = "plastic"; const day = 10; @@ -262,6 +263,12 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: dyes.boosts.yellow1, description: "Yellow Dye Boost 1", enabled: () => Decimal.gte(dyes.dyes.yellow.amount.value, 1) + })), + createMultiplicativeModifier(() => ({ + multiplier: () => + Decimal.div(workshop.foundationProgress.value, 10).floor().div(10).add(1), + description: "800% Foundation Completed", + enabled: workshop.milestones.extraExpansionMilestone4.earned })) ]); const computedPlasticGain = computed(() => plasticGain.apply(0)); diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx index 321db3a..241085d 100644 --- a/src/data/layers/trees.tsx +++ b/src/data/layers/trees.tsx @@ -292,7 +292,10 @@ const layer = createLayer(id, function (this: BaseLayer) { enabled: researchUpgrade2.bought })), createAdditiveModifier(() => ({ - addend: () => Decimal.div(workshop.foundationProgress.value, 5).floor(), + addend: () => + workshop.milestones.extraExpansionMilestone1.earned + ? Decimal.pow(1.02, workshop.foundationProgress.value) + : Decimal.div(workshop.foundationProgress.value, 5).floor(), description: "10% Foundation Completed", enabled: workshop.milestones.autoCutMilestone1.earned })), @@ -406,16 +409,16 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "Ivy Level 1", enabled: management.elfTraining.planterElfTraining.milestones[0].earned })), - createMultiplicativeModifier(() => ({ - multiplier: 2, - description: "Mary Level 2", - enabled: management.elfTraining.heatedPlanterElfTraining.milestones[1].earned - })), createMultiplicativeModifier(() => ({ multiplier: () => Decimal.pow(trees.value, 0.2).log10().pow_base(2), description: "Ivy Level 3", enabled: management.elfTraining.planterElfTraining.milestones[2].earned })), + createMultiplicativeModifier(() => ({ + multiplier: 2, + description: "Mary Level 4", + enabled: management.elfTraining.heatedPlanterElfTraining.milestones[3].earned + })), createAdditiveModifier(() => ({ addend: () => Decimal.sub(lastAutoPlantedAmount.value, lastAutoCuttingAmount.value).max(0), diff --git a/src/data/layers/workshop.tsx b/src/data/layers/workshop.tsx index c5ff649..e6f5e3a 100644 --- a/src/data/layers/workshop.tsx +++ b/src/data/layers/workshop.tsx @@ -40,12 +40,12 @@ const layer = createLayer(id, function (this: BaseLayer) { scaling: addSoftcap( addSoftcap(createPolynomialScaling(250, 1.5), 5387, 1 / 1e10), 1e20, - 1e9 + 3e8 ), baseResource: trees.logs, gainResource: noPersist(foundationProgress), roundUpCost: true, - buyMax: management.elfTraining.heatedCutterElfTraining.milestones[2].earned, + // buyMax: management.elfTraining.expandersElfTraining.milestones[2].earned, spend(gain, spent) { trees.logs.value = Decimal.sub(trees.logs.value, spent); }, @@ -61,7 +61,9 @@ const layer = createLayer(id, function (this: BaseLayer) { const buildFoundation = createClickable(() => ({ display: jsx(() => ( <> - Build part of the foundation + + Build {formatWhole(foundationConversion.actualGain.value)}% of the foundation +

@@ -82,7 +84,7 @@ const layer = createLayer(id, function (this: BaseLayer) { management.elfTraining.expandersElfTraining.milestones[2].earned.value ), canClick: () => - Decimal.gte(foundationConversion.actualGain.value, 1) && + Decimal.gte(trees.logs.value, foundationConversion.currentAt.value) && (Decimal.lt(foundationProgress.value, 100) || management.elfTraining.expandersElfTraining.milestones[2].earned.value), onClick() { @@ -182,7 +184,10 @@ const layer = createLayer(id, function (this: BaseLayer) { }, shouldEarn: () => Decimal.gte(foundationProgress.value, 200), visibility: () => - showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value), + showIf( + logGainMilestone3.earned.value && + management.elfTraining.expandersElfTraining.milestones[2].earned.value + ), showPopups: shouldShowPopups })); const extraExpansionMilestone2 = createMilestone(() => ({ @@ -192,7 +197,10 @@ const layer = createLayer(id, function (this: BaseLayer) { }, shouldEarn: () => Decimal.gte(foundationProgress.value, 400), visibility: () => - showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value), + showIf( + extraExpansionMilestone1.earned.value && + management.elfTraining.expandersElfTraining.milestones[2].earned.value + ), showPopups: shouldShowPopups })); const extraExpansionMilestone3 = createMilestone(() => ({ @@ -202,7 +210,10 @@ const layer = createLayer(id, function (this: BaseLayer) { }, shouldEarn: () => Decimal.gte(foundationProgress.value, 600), visibility: () => - showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value), + showIf( + extraExpansionMilestone2.earned.value && + management.elfTraining.expandersElfTraining.milestones[2].earned.value + ), showPopups: shouldShowPopups })); const extraExpansionMilestone4 = createMilestone(() => ({ @@ -212,7 +223,10 @@ const layer = createLayer(id, function (this: BaseLayer) { }, shouldEarn: () => Decimal.gte(foundationProgress.value, 800), visibility: () => - showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value), + showIf( + extraExpansionMilestone3.earned.value && + management.elfTraining.expandersElfTraining.milestones[2].earned.value + ), showPopups: shouldShowPopups })); const extraExpansionMilestone5 = createMilestone(() => ({ @@ -222,7 +236,10 @@ const layer = createLayer(id, function (this: BaseLayer) { }, shouldEarn: () => Decimal.gte(foundationProgress.value, 1000), visibility: () => - showIf(management.elfTraining.expandersElfTraining.milestones[2].earned.value), + showIf( + extraExpansionMilestone4.earned.value && + management.elfTraining.expandersElfTraining.milestones[2].earned.value + ), showPopups: shouldShowPopups })); const milestones = {