mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-01-18 19:51:27 +00:00
finish balancing toys layer
This commit is contained in:
parent
d412b09c2a
commit
2115a8ea78
7 changed files with 165 additions and 10 deletions
|
@ -34,7 +34,13 @@ import { ElfBuyable } from "./elves";
|
|||
import management from "./management";
|
||||
import oil from "./oil";
|
||||
import paper from "./paper";
|
||||
<<<<<<< HEAD
|
||||
import trees from "./trees";
|
||||
=======
|
||||
import boxes from "./boxes";
|
||||
import { ElfBuyable } from "./elves";
|
||||
import toys from "./toys"
|
||||
>>>>>>> finish balancing toys layer
|
||||
|
||||
interface Dye {
|
||||
name: string;
|
||||
|
@ -55,7 +61,11 @@ type DyeUpg =
|
|||
| "blueDyeUpg2"
|
||||
| "coalUpg";
|
||||
|
||||
<<<<<<< HEAD
|
||||
export type enumColor = "blue" | "red" | "green" | "yellow" | "purple" | "orange";
|
||||
=======
|
||||
export type enumColor = "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "black";
|
||||
>>>>>>> finish balancing toys layer
|
||||
|
||||
const id = "dyes";
|
||||
const day = 11;
|
||||
|
@ -487,6 +497,34 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
],
|
||||
dyesToReset: []
|
||||
}),
|
||||
black: createDye({
|
||||
name: "Black Dye",
|
||||
color: "black",
|
||||
costs: () => [
|
||||
{
|
||||
base: "1e42",
|
||||
root: 5,
|
||||
res: trees.logs
|
||||
},
|
||||
{
|
||||
base: computed(() => (upgrades.yellowDyeUpg2.bought.value ? "1e15" : "2e15")),
|
||||
root: 2,
|
||||
res: oil.oil
|
||||
}
|
||||
],
|
||||
listedBoosts: [
|
||||
{
|
||||
visible: true,
|
||||
desc: computed(
|
||||
() =>
|
||||
`*${format(
|
||||
boosts.black1.value
|
||||
)} letters processed.`
|
||||
)
|
||||
}
|
||||
],
|
||||
dyesToReset: []
|
||||
}),
|
||||
orange: createDye({
|
||||
name: "Orange Dye",
|
||||
color: "orange",
|
||||
|
@ -664,7 +702,12 @@ 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)),
|
||||
black1: computed(() =>
|
||||
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)
|
||||
)
|
||||
};
|
||||
|
||||
const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [
|
||||
|
@ -683,6 +726,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
modifier: dyes.blue.toGenerate,
|
||||
base: 0
|
||||
},
|
||||
{
|
||||
title: "Black Dye Creation",
|
||||
modifier: dyes.black.toGenerate,
|
||||
base: 0
|
||||
},
|
||||
{
|
||||
title: "Orange Dye Creation",
|
||||
modifier: dyes.orange.toGenerate,
|
||||
|
@ -913,6 +961,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
</>
|
||||
) : null}
|
||||
<div style="width: 620px">
|
||||
{renderRow(dyes.black.display)}
|
||||
{renderRow(dyes.black.buyable)}
|
||||
<Spacer />
|
||||
{renderRow(dyes.red.display, dyes.yellow.display, dyes.blue.display)}
|
||||
{renderRow(dyes.red.buyable, dyes.yellow.buyable, dyes.blue.buyable)}
|
||||
<Spacer />
|
||||
|
|
|
@ -24,6 +24,7 @@ import { createBuyable, GenericBuyable } from "features/buyable";
|
|||
import metal from "./metal";
|
||||
import plastic from "./plastic";
|
||||
import paper from "./paper";
|
||||
import dyes from "./dyes";
|
||||
import SqrtVue from "components/math/Sqrt.vue";
|
||||
import { globalBus } from "game/events";
|
||||
import { main } from "data/projEntry";
|
||||
|
@ -214,7 +215,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => Decimal.div(paperBuyable.amount.value, 2).add(1),
|
||||
description: "Printed Labels"
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => dyes.boosts.black1.value,
|
||||
description: "Black Dye Boost"
|
||||
}))
|
||||
|
||||
]);
|
||||
const computedLettersGain = computed(() => lettersGain.apply(1));
|
||||
const processingCooldown = createSequentialModifier(() => [
|
||||
|
|
|
@ -35,7 +35,11 @@ import oil from "./oil";
|
|||
import paper from "./paper";
|
||||
import plastic from "./plastic";
|
||||
import workshop from "./workshop";
|
||||
<<<<<<< HEAD
|
||||
import wrappingPaper from "./wrapping-paper";
|
||||
=======
|
||||
import toys from "./toys";
|
||||
>>>>>>> finish balancing toys layer
|
||||
|
||||
const id = "metal";
|
||||
const day = 7;
|
||||
|
@ -207,6 +211,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
multiplier: () => Decimal.add(industrialCrucible.amount.value, 1).sqrt(),
|
||||
description: "100,000 Letters Processed",
|
||||
enabled: letters.milestones.industrialCrucibleMilestone.earned
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => Decimal.add(toys.clothes.value, 1),
|
||||
description: "Give elves clothes to wear",
|
||||
enabled: toys.row1Upgrades[1].bought
|
||||
}))
|
||||
]);
|
||||
const computedAutoSmeltMulti = computed(() => autoSmeltMulti.apply(1));
|
||||
|
@ -282,7 +291,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
multiplier: () => Decimal.add(dyes.dyes.blue.amount.value, 1).sqrt(),
|
||||
description: "1000 Letters Processed",
|
||||
enabled: letters.milestones.miningMilestone.earned
|
||||
}))
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => Decimal.add(toys.clothes.value, 1),
|
||||
description: "Give elves clothes to wear",
|
||||
enabled: toys.row1Upgrades[1].bought
|
||||
})),
|
||||
]);
|
||||
const computedOreAmount = computed(() => oreAmount.apply(1));
|
||||
const oreSpeed = createSequentialModifier(() => [
|
||||
|
|
|
@ -874,6 +874,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Cocoa Level 3",
|
||||
enabled: management.elfTraining.oilElfTraining.milestones[2].earned
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: 4,
|
||||
description: "Workshop 1200%",
|
||||
enabled: workshop.milestones.extraExpansionMilestone6.earned
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => coalEffectiveness.value,
|
||||
description: "Effectiveness",
|
||||
|
|
|
@ -160,7 +160,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
</div>
|
||||
|
||||
<div>
|
||||
You have {formatWhole(woodenBlocks.value)} wooden blocks.
|
||||
You have {formatWhole(trucks.value)} trucks.
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@ -182,14 +182,51 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
},
|
||||
})) as GenericBuyable;
|
||||
const buyables = [ clothesBuyable, woodenBlocksBuyable, trucksBuyable ];
|
||||
const trucksUpgrade1 = createUpgrade(() => ({
|
||||
resource: noPersist(trucks),
|
||||
cost: 10,
|
||||
display: {
|
||||
title: "Load logs onto trucks",
|
||||
description: "Log gain is doubled."
|
||||
}
|
||||
}))
|
||||
const clothesUpgrade1 = createUpgrade(() => ({
|
||||
resource: noPersist(clothes),
|
||||
cost: 30,
|
||||
display: {
|
||||
title: "Give elves clothes to wear",
|
||||
description: "Multiply ore per mining operation and auto-smelt purity by the number of clothes you have."
|
||||
}
|
||||
}))
|
||||
|
||||
const woodenBlocksUpgrade1 = createUpgrade(() => ({
|
||||
resource: noPersist(woodenBlocks),
|
||||
cost: 15,
|
||||
display: {
|
||||
title: "Build wooden towers",
|
||||
description: "You can now build 2 extra tall workshops!"
|
||||
}
|
||||
}))
|
||||
const row1Upgrades = [
|
||||
trucksUpgrade1,
|
||||
clothesUpgrade1,
|
||||
woodenBlocksUpgrade1
|
||||
];
|
||||
const milestone1 = createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "10 toys",
|
||||
effectDisplay: "The number of complete workshops you have divides the cost to make toys."
|
||||
effectDisplay: "The cost of making toys is divided by the number of complete workshops you have."
|
||||
},
|
||||
shouldEarn: () => Decimal.gte(toySum.value, 10)
|
||||
}));
|
||||
const milestones = {milestone1}
|
||||
const milestone2 = createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "100 toys",
|
||||
effectDisplay: "Unlock black dyes."
|
||||
},
|
||||
shouldEarn: () => Decimal.gte(toySum.value, 100)
|
||||
}));
|
||||
const milestones = {milestone1, milestone2}
|
||||
const { collapseMilestones, display: milestonesDisplay } =
|
||||
createCollapsibleMilestones(milestones);
|
||||
|
||||
|
@ -217,14 +254,22 @@ const { collapseMilestones, display: milestonesDisplay } =
|
|||
if (Decimal.lt(main.day.value, day)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Decimal.lt(clothes.value, clothesBuyable.amount.value)){
|
||||
clothesBuyable.amount.value = clothes.value
|
||||
}
|
||||
if (Decimal.lt(woodenBlocks.value, woodenBlocksBuyable.amount.value)){
|
||||
woodenBlocksBuyable.amount.value = woodenBlocks.value
|
||||
}
|
||||
if (Decimal.lt(trucks.value, trucksBuyable.amount.value)){
|
||||
trucksBuyable.amount.value = trucks.value
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
const { total: totalToys, trackerDisplay } = setUpDailyProgressTracker({
|
||||
resource: toySum,
|
||||
goal: 8e9,
|
||||
goal: 200,
|
||||
name,
|
||||
day,
|
||||
color: colorDark,
|
||||
|
@ -244,6 +289,7 @@ const { collapseMilestones, display: milestonesDisplay } =
|
|||
toySum,
|
||||
totalToys,
|
||||
buyables,
|
||||
row1Upgrades,
|
||||
milestones,
|
||||
generalTabCollapsed,
|
||||
collapseMilestones,
|
||||
|
@ -273,6 +319,8 @@ const { collapseMilestones, display: milestonesDisplay } =
|
|||
<Spacer />
|
||||
{renderRow(...buyables)}
|
||||
<Spacer />
|
||||
{renderGrid(row1Upgrades)}
|
||||
<Spacer />
|
||||
{milestonesDisplay()}
|
||||
</>
|
||||
)),
|
||||
|
|
|
@ -38,6 +38,7 @@ import management from "./management";
|
|||
import paper from "./paper";
|
||||
import workshop from "./workshop";
|
||||
import wrappingPaper from "./wrapping-paper";
|
||||
import toys from "./toys";
|
||||
const id = "trees";
|
||||
const day = 1;
|
||||
|
||||
|
@ -536,9 +537,15 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
enabled: computed(() => Decimal.gt(wrappingPaper.boosts.christmas1.value, 1))
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
<<<<<<< HEAD
|
||||
multiplier: () => Decimal.add(computedTotalTrees.value, 1).log10(),
|
||||
description: "Trees Decoration",
|
||||
enabled: masteryEffectActive
|
||||
=======
|
||||
multiplier: 2,
|
||||
description: "Load logs onto trucks",
|
||||
enabled: toys.row1Upgrades[0].bought
|
||||
>>>>>>> finish balancing toys layer
|
||||
})),
|
||||
createExponentialModifier(() => ({
|
||||
exponent: 1.2,
|
||||
|
|
|
@ -33,6 +33,7 @@ import elves from "./elves";
|
|||
import management from "./management";
|
||||
import trees from "./trees";
|
||||
import wrappingPaper from "./wrapping-paper";
|
||||
import toys from "./toys"
|
||||
|
||||
const id = "workshop";
|
||||
const day = 2;
|
||||
|
@ -48,7 +49,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
scaling: addHardcap(
|
||||
addSoftcap(addSoftcap(createPolynomialScaling(250, 1.5), 5423, 1 / 1e10), 1e20, 3e8),
|
||||
computed(() =>
|
||||
management.elfTraining.expandersElfTraining.milestones[2].earned.value ? 1000 : 100
|
||||
toys.row1Upgrades[2].bought ? 1200 : management.elfTraining.expandersElfTraining.milestones[2].earned.value ? 1000 : 100
|
||||
)
|
||||
),
|
||||
baseResource: trees.logs,
|
||||
|
@ -98,11 +99,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
showIf(
|
||||
Decimal.lt(
|
||||
foundationProgress.value,
|
||||
management.elfTraining.expandersElfTraining.milestones[2].earned.value
|
||||
toys.row1Upgrades[2].bought.value ? 1200 : management.elfTraining.expandersElfTraining.milestones[2].earned.value
|
||||
? 1000
|
||||
: 100
|
||||
)
|
||||
),
|
||||
<<<<<<< HEAD
|
||||
canClick: () => {
|
||||
if (Decimal.lt(trees.logs.value, foundationConversion.nextAt.value)) {
|
||||
return false;
|
||||
|
@ -122,6 +124,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
}
|
||||
return true;
|
||||
},
|
||||
=======
|
||||
canClick: () =>
|
||||
Decimal.gte(trees.logs.value, foundationConversion.nextAt.value) &&
|
||||
Decimal.lt(
|
||||
foundationProgress.value,
|
||||
toys.row1Upgrades[2].bought.value ? 1200 : management.elfTraining.expandersElfTraining.milestones[2].earned.value ? 1000 : 100
|
||||
),
|
||||
>>>>>>> finish balancing toys layer
|
||||
onClick() {
|
||||
if (!unref(this.canClick)) {
|
||||
return;
|
||||
|
@ -278,6 +288,19 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
),
|
||||
showPopups: shouldShowPopups
|
||||
}));
|
||||
const extraExpansionMilestone6 = createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "1200% Foundation Completed",
|
||||
effectDisplay: "Quadruple oil gain"
|
||||
},
|
||||
shouldEarn: () => Decimal.gte(foundationProgress.value, 1200),
|
||||
visibility: () =>
|
||||
showIf(
|
||||
extraExpansionMilestone5.earned.value &&
|
||||
toys.row1Upgrades[2].bought.value
|
||||
),
|
||||
showPopups: shouldShowPopups
|
||||
}));
|
||||
const milestones = {
|
||||
logGainMilestone1,
|
||||
autoCutMilestone1,
|
||||
|
@ -291,7 +314,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
extraExpansionMilestone2,
|
||||
extraExpansionMilestone3,
|
||||
extraExpansionMilestone4,
|
||||
extraExpansionMilestone5
|
||||
extraExpansionMilestone5,
|
||||
extraExpansionMilestone6
|
||||
};
|
||||
const { collapseMilestones, display: milestonesDisplay } =
|
||||
createCollapsibleMilestones(milestones);
|
||||
|
|
Loading…
Add table
Reference in a new issue