diff --git a/src/data/layers/boxes.tsx b/src/data/layers/boxes.tsx index f7f8c30..23eff15 100644 --- a/src/data/layers/boxes.tsx +++ b/src/data/layers/boxes.tsx @@ -36,6 +36,7 @@ import reindeer from "./reindeer"; import trees from "./trees"; import workshop from "./workshop"; import wrappingPaper from "./wrapping-paper"; +import packing from "./packing"; export type BoxesBuyable = ElfBuyable & { resource: Resource; @@ -58,11 +59,17 @@ const layer = createLayer(id, function (this: BaseLayer) { enabled: workshop.milestones.extraExpansionMilestone5.earned })), reindeer.reindeer.vixen.modifier, + createMultiplicativeModifier(() => ({ + multiplier: 1.1, + description: "120 Presents Packed", + enabled: packing.packingMilestones.boxBoost.earned + })), createExponentialModifier(() => ({ exponent: 1.1, description: "Bell Level 2", enabled: management.elfTraining.boxElfTraining.milestones[1].earned - })) + })), + ]) as WithRequired; const boxesConversion = createCumulativeConversion(() => ({ diff --git a/src/data/layers/cloth.tsx b/src/data/layers/cloth.tsx index 7ef24dc..bff3bf6 100644 --- a/src/data/layers/cloth.tsx +++ b/src/data/layers/cloth.tsx @@ -40,6 +40,7 @@ import plastic from "./plastic"; import reindeer from "./reindeer"; import trees from "./trees"; import workshop from "./workshop"; +import packing from "./packing" const id = "cloth"; const day = 8; @@ -498,6 +499,11 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "Yellow Dye", enabled: dyes.masteryEffectActive })), + createMultiplicativeModifier(() => ({ + multiplier: 10, + description: "600 Presents Packed", + enabled: packing.packingMilestones.clothBoost.earned + })), reindeer.reindeer.cupid.modifier ]) as WithRequired; const computedShearingAmount = computed(() => shearingAmount.apply(1)); diff --git a/src/data/layers/coal.tsx b/src/data/layers/coal.tsx index 002b704..a6afd6a 100644 --- a/src/data/layers/coal.tsx +++ b/src/data/layers/coal.tsx @@ -44,6 +44,7 @@ import plastic from "./plastic"; import reindeer from "./reindeer"; import trees from "./trees"; import wrappingPaper from "./wrapping-paper"; +import packing from "./packing"; interface BetterFertilizerUpgOptions { canAfford: () => boolean; @@ -237,10 +238,10 @@ const layer = createLayer(id, function (this: BaseLayer) { 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); + return Decimal.pow(packing.packingMilestones.coalBoost.earned.value ? 1.05 : 1.1, v).times(1e7); }, inverseCost(x: DecimalSource) { - let v = Decimal.div(x, 1e7).log(1.1); + let v = Decimal.div(x, 1e7).log(packing.packingMilestones.coalBoost.earned.value ? 1.05 : 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); @@ -299,7 +300,7 @@ const layer = createLayer(id, function (this: BaseLayer) { 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); + let cost = Decimal.pow(packing.packingMilestones.coalBoost.earned.value ? 1.075 : 1.15, v).times(10); if (management.elfTraining.fertilizerElfTraining.milestones[2].earned.value) { cost = cost.div(Decimal.add(trees.totalLogs.value, Math.E).ln()); } @@ -315,7 +316,7 @@ const layer = createLayer(id, function (this: BaseLayer) { 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); + let v = Decimal.div(x, 10).log(packing.packingMilestones.coalBoost.earned.value ? 1.075 : 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); diff --git a/src/data/layers/dyes.tsx b/src/data/layers/dyes.tsx index f646216..ea9cb42 100644 --- a/src/data/layers/dyes.tsx +++ b/src/data/layers/dyes.tsx @@ -38,6 +38,7 @@ import trees from "./trees"; import toys from "./toys"; import factory from "./factory"; import reindeer from "./reindeer"; +import packing from "./packing" interface Dye { name: string; @@ -162,20 +163,21 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: 2, description: "Wetter Dyes", enabled: upgrades.yellowDyeUpg.bought - })) - ); - modifiers.push( + })), createMultiplicativeModifier(() => ({ multiplier: () => Decimal.add(cloth.cloth.value, Math.E).ln(), description: "Gingersnap Level 1", enabled: management.elfTraining.clothElfTraining.milestones[0].earned - })) - ); - modifiers.push( + })), createMultiplicativeModifier(() => ({ multiplier: 2, description: "Carol Level 1", enabled: management.elfTraining.dyeElfTraining.milestones[0].earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 5, + description: "977,000,000 Presents Packed", + enabled: packing.packingMilestones.primaryDyeBoost.earned })) ); } @@ -708,6 +710,7 @@ const layer = createLayer(id, function (this: BaseLayer) { Decimal.add(dyes.orange.amount.value, 1) .log2() .plus(1) + .mul(packing.packingMilestones.secondaryDyeBoost.earned.value ? 2 : 1) .pow(oil.row3Upgrades[1].bought.value ? 2.5 : 1) ), green1: computed(() => @@ -719,6 +722,7 @@ const layer = createLayer(id, function (this: BaseLayer) { Decimal.add(dyes.green.amount.value, 1) .log2() .plus(1) + .mul(packing.packingMilestones.secondaryDyeBoost.earned.value ? 2 : 1) .pow(upgrades.coalUpg.bought.value ? 2 : 1) ), purple1: computed(() => @@ -726,7 +730,7 @@ const layer = createLayer(id, function (this: BaseLayer) { .pow(upgrades.coalUpg.bought.value ? 1.2 : 1) .pow(management.elfTraining.clothElfTraining.milestones[3].earned.value ? 1.1 : 1) ), - purple2: computed(() => Decimal.add(dyes.purple.amount.value, 1).log2().plus(1)), + purple2: computed(() => Decimal.add(dyes.purple.amount.value, 1).log2().plus(1).mul(packing.packingMilestones.secondaryDyeBoost.earned.value ? 2 : 1)), black1: computed(() => Decimal.pow(2, Decimal.add(dyes.black.amount.value, 1).log2().sqrt()) .pow(upgrades.coalUpg.bought.value ? 1.2 : 1) diff --git a/src/data/layers/elves.tsx b/src/data/layers/elves.tsx index 2242b25..5d3c702 100644 --- a/src/data/layers/elves.tsx +++ b/src/data/layers/elves.tsx @@ -757,7 +757,7 @@ const layer = createLayer(id, function (this: BaseLayer) { onPurchase() { options.onPurchase?.(); if ( - !["Peppermint", "Twinkle", "Cocoa", "Frosty", "Carol"].includes( + !["Peppermint", "Twinkle", "Cocoa", "Frosty", "Carol", "Jingle"].includes( options.name ) ) { diff --git a/src/data/layers/metal.tsx b/src/data/layers/metal.tsx index e74aeb1..a20d318 100644 --- a/src/data/layers/metal.tsx +++ b/src/data/layers/metal.tsx @@ -39,6 +39,7 @@ import wrappingPaper from "./wrapping-paper"; import toys from "./toys"; import reindeer from "./reindeer"; import sleigh from "./sleigh"; +import packing from "./packing" const id = "metal"; const day = 7; @@ -117,6 +118,11 @@ const layer = createLayer(id, function (this: BaseLayer) { exponent: 1.2, description: "100% Sleigh Fixed", enabled: sleigh.milestones.milestone8.earned + })), + createExponentialModifier(() => ({ + exponent: 1.5, + description: "69,200 Presents Packed", + enabled: packing.packingMilestones.metalBoost.earned })) ]); const computedOrePurity = computed(() => orePurity.apply(0.1)); @@ -375,6 +381,11 @@ const layer = createLayer(id, function (this: BaseLayer) { })), createMultiplicativeModifier(() => ({ multiplier: computedOreSpeed + })), + createMultiplicativeModifier(() => ({ + multiplier: computedOreSpeed, + description: "1,670,000 Presents Packed", + enabled: packing.packingMilestones.oreBoost.earned })) ]); const computedOreGain = computed(() => oreGain.apply(0)); diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index 5242aec..cafcb39 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -44,6 +44,7 @@ import { ElfBuyable } from "./elves"; import toys from "./toys"; import factory from "./factory"; import reindeer from "./reindeer"; +import packing from "./packing" const id = "oil"; const day = 9; @@ -923,6 +924,11 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "Red Dye", enabled: dyes.masteryEffectActive })), + createMultiplicativeModifier(() => ({ + multiplier: 3, + description: "2,800 Presents Packaged", + enabled: packing.packingMilestones.oilBoost.earned + })), createExponentialModifier(() => ({ exponent: 1.2, description: "Diamond-tipped drills", diff --git a/src/data/layers/packing.tsx b/src/data/layers/packing.tsx index ea8f0ab..016da8c 100644 --- a/src/data/layers/packing.tsx +++ b/src/data/layers/packing.tsx @@ -219,7 +219,10 @@ const layer = createLayer(id, function (this: BaseLayer) { resource: totalPresentsResource, style: { width: "200px" - } + }/*, + onPurchase () { + main.days[3].recentlyUpdated.value = true; + }*/ })), loaderUnlock: createUpgrade(() => ({ display: { @@ -245,7 +248,7 @@ const layer = createLayer(id, function (this: BaseLayer) { boxBoost: createMilestone(() => ({ display: { requirement: `120 ${packedPresents.displayName}`, - effectDisplay: "Boxes are 10% bigger" + effectDisplay: "Create 10% more boxes" }, shouldEarn: () => Decimal.gte(packedPresents.value, 120), visibility: () => showIf(packingMilestones.logBoost.earned.value) @@ -301,7 +304,7 @@ const layer = createLayer(id, function (this: BaseLayer) { ribbonBoost: createMilestone(() => ({ display: { requirement: `8,230,000 ${packedPresents.displayName}`, - effectDisplay: "Ribbons are 90% cheaper" + effectDisplay: "Halve ribbon cost" }, shouldEarn: () => Decimal.gte(packedPresents.value, 8230000), visibility: () => showIf(packingMilestones.oreBoost.earned.value) @@ -330,102 +333,7 @@ const layer = createLayer(id, function (this: BaseLayer) { shouldEarn: () => Decimal.gte(packedPresents.value, 977000000), visibility: () => showIf(packingMilestones.paperBoost.earned.value) })), - wrappingPaperBoost2: createMilestone(() => ({ - display: { - requirement: `664,000 ${packedPresents.displayName}`, - effectDisplay: "Double the strength of wrapping paper bonuses, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 664000) && packingResets.value >= 1, - visibility: () => showIf(packingResets.value >= 1) - })), - coalBoost2: createMilestone(() => ({ - display: { - requirement: `6,360,000 ${packedPresents.displayName}`, - effectDisplay: "Coal producers grow half as fast, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 6360000) && packingResets.value >= 1, - visibility: () => showIf(packingMilestones.wrappingPaperBoost2.earned.value) - })), - oreBoost2: createMilestone(() => ({ - display: { - requirement: `60,900,000 ${packedPresents.displayName}`, - effectDisplay: "Ore mining speed multiplies ore gain, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 60900000) && packingResets.value >= 1, - visibility: () => showIf(packingMilestones.coalBoost2.earned.value) - })), - primaryDyeBoost2: createMilestone(() => ({ - display: { - requirement: `584,000,000 ${packedPresents.displayName}`, - effectDisplay: "Quintuple primary dye gain, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 584000000) && packingResets.value >= 1, - visibility: () => showIf(packingMilestones.oreBoost2.earned.value) - })), - ribbonBoost2: createMilestone(() => ({ - display: { - requirement: `734,000 ${packedPresents.displayName}`, - effectDisplay: "Ribbons are 90% cheaper, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 734000) && packingResets.value >= 2, - visibility: () => showIf(packingMilestones.primaryDyeBoost2.earned.value) - })), - boxesBoost2: createMilestone(() => ({ - display: { - requirement: `7,200,000 ${packedPresents.displayName}`, - effectDisplay: "Boxes are 10% bigger, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 7200000) && packingResets.value >= 2, - visibility: () => showIf(packingMilestones.ribbonBoost2.earned.value) - })), - secondaryDyeBoost2: createMilestone(() => ({ - display: { - requirement: `70,700,000 ${packedPresents.displayName}`, - effectDisplay: "Double the second effect of each secondary dye, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 70700000) && packingResets.value >= 2, - visibility: () => showIf(packingMilestones.boxesBoost2.earned.value) - })), - paperBoost2: createMilestone(() => ({ - display: { - requirement: `693,000,000 ${packedPresents.displayName}`, - effectDisplay: "Produce another 10x as much paper" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 693000000) && packingResets.value >= 2, - visibility: () => showIf(packingMilestones.secondaryDyeBoost2.earned.value) - })), - oilBoost2: createMilestone(() => ({ - display: { - requirement: `820,000 ${packedPresents.displayName}`, - effectDisplay: "Triple drill power, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 820000) && packingResets.value >= 3, - visibility: () => showIf(packingMilestones.paperBoost2.earned.value) - })), - clothBoost2: createMilestone(() => ({ - display: { - requirement: `8,150,000 ${packedPresents.displayName}`, - effectDisplay: "Sheep grow 10x as much wool, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 8150000) && packingResets.value >= 3, - visibility: () => showIf(packingMilestones.oilBoost2.earned.value) - })), - logsBoost2: createMilestone(() => ({ - display: { - requirement: `81,000,000 ${packedPresents.displayName}`, - effectDisplay: "Raise tree size to the 1.25th power, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 81000000) && packingResets.value >= 3, - visibility: () => showIf(packingMilestones.clothBoost2.earned.value) - })), - metalBoost2: createMilestone(() => ({ - display: { - requirement: `800,000,000 ${packedPresents.displayName}`, - effectDisplay: "Raise ore purity to the 1.5th power, again" - }, - shouldEarn: () => Decimal.gte(packedPresents.value, 800000000) && packingResets.value >= 3, - visibility: () => showIf(packingMilestones.logsBoost2.earned.value) - })) + // todo: something }; const { collapseMilestones, display: milestonesDisplay } = createCollapsibleMilestones(packingMilestones); diff --git a/src/data/layers/paper.tsx b/src/data/layers/paper.tsx index 39f80ec..ef7a18c 100644 --- a/src/data/layers/paper.tsx +++ b/src/data/layers/paper.tsx @@ -439,6 +439,11 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "Sunshine Wrapping Paper", enabled: () => Decimal.gte(wrappingPaper.boosts.sunshine1.value, 2) })), + createMultiplicativeModifier(() => ({ + multiplier: 10, + description: "199,000,000 Presents Packed", + enabled: packing.packingMilestones.paperBoost.earned + })), reindeer.reindeer.prancer.modifier ]) as WithRequired; const ashCost = createSequentialModifier(() => [ diff --git a/src/data/layers/ribbon.tsx b/src/data/layers/ribbon.tsx index 0c091dc..17631eb 100644 --- a/src/data/layers/ribbon.tsx +++ b/src/data/layers/ribbon.tsx @@ -22,6 +22,7 @@ import { main } from "../projEntry"; import cloth from "./cloth"; import dyes from "./dyes"; import elves from "./elves"; +import packing from "./packing" const id = "ribbon"; const day = 16; @@ -38,7 +39,7 @@ const layer = createLayer(id, () => { [dyes.dyes.orange, dyes.dyes.green, dyes.dyes.purple].includes(currentDyeType.value) ? 2e6 : 1e13 - ) + ).mul(packing.packingMilestones.ribbonBoost.earned.value ? 0.5 : 1) ); const currentDyeType = computed( () => diff --git a/src/data/layers/routing.tsx b/src/data/layers/routing.tsx index 8729561..879860f 100644 --- a/src/data/layers/routing.tsx +++ b/src/data/layers/routing.tsx @@ -674,6 +674,7 @@ const layer = createLayer(id, function (this: BaseLayer) { if (Decimal.lt(main.day.value, day)) { return; } + if (citiesCompleted.value >= 100) return; if (Decimal.gte(newCityProgress.value, 10)) { newCityProgress.value = 10; diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx index a0cdfed..6650945 100644 --- a/src/data/layers/trees.tsx +++ b/src/data/layers/trees.tsx @@ -42,6 +42,7 @@ import toys from "./toys"; import factory from "./factory"; import reindeer from "./reindeer"; import sleigh from "./sleigh"; +import packing from "./packing"; const id = "trees"; const day = 1; @@ -579,6 +580,11 @@ const layer = createLayer(id, function (this: BaseLayer) { exponent: 1.05, description: "Un-Processing", enabled: paper.upgrades2.treeUpgrade.bought + })), + createExponentialModifier(() => ({ + exponent: 1.25, + description: "25 Presents Packed", + enabled: packing.packingMilestones.logBoost.earned })) ]); diff --git a/src/data/layers/wrapping-paper.tsx b/src/data/layers/wrapping-paper.tsx index 5aa998c..c267294 100644 --- a/src/data/layers/wrapping-paper.tsx +++ b/src/data/layers/wrapping-paper.tsx @@ -17,6 +17,7 @@ import { main } from "../projEntry"; import { default as dyes, type enumColor } from "./dyes"; import elves from "./elves"; import toys from "./toys"; +import packing from "./packing" const id = "wrappingPaper"; const day = 15; @@ -259,21 +260,22 @@ const layer = createLayer(id, () => { ] }) }; + const packingBoost = computed(() => packing.packingMilestones.wrappingPaperBoost.earned.value ? 2 : 1) const boosts = { christmas1: computed(() => - main.isMastery.value ? 1 : Decimal.add(wrappingPaper.christmas.buyable.amount.value, 1) + main.isMastery.value ? 1 : Decimal.add(wrappingPaper.christmas.buyable.amount.value, 1).mul(packingBoost.value) ), // Probably not the best way to do this, but it works rainbow1: computed(() => - main.isMastery.value ? 1 : Decimal.pow(2, wrappingPaper.rainbow.buyable.amount.value) + main.isMastery.value ? 1 : Decimal.pow(2, wrappingPaper.rainbow.buyable.amount.value).mul(packingBoost.value) ), jazzy1: computed(() => - main.isMastery.value ? 1 : Decimal.add(wrappingPaper.jazzy.buyable.amount.value, 1) + main.isMastery.value ? 1 : Decimal.add(wrappingPaper.jazzy.buyable.amount.value, 1).mul(packingBoost.value) ), sunshine1: computed(() => - main.isMastery.value ? 1 : Decimal.add(wrappingPaper.sunshine.buyable.amount.value, 1) + main.isMastery.value ? 1 : Decimal.add(wrappingPaper.sunshine.buyable.amount.value, 1).mul(packingBoost.value) ), ocean1: computed(() => - main.isMastery.value ? 1 : Decimal.pow(1.5, wrappingPaper.ocean.buyable.amount.value) + main.isMastery.value ? 1 : Decimal.pow(1.5, wrappingPaper.ocean.buyable.amount.value).mul(packingBoost.value) ), beach1: computed(() => main.isMastery.value @@ -281,6 +283,7 @@ const layer = createLayer(id, () => { : Decimal.add(wrappingPaper.beach.buyable.amount.value, 1) .log10() .add(1) + .mul(packingBoost.value) .pow(toys.milestones.milestone3.earned.value ? 1.6 : 1) ) };