finish balancing toys layer

This commit is contained in:
unsoftcapped3 2022-12-16 03:32:47 +00:00
parent 7f0301b3e1
commit 19d58d575e
7 changed files with 145 additions and 12 deletions

View file

@ -33,6 +33,7 @@ import wrappingPaper from "./wrapping-paper";
import paper from "./paper";
import boxes from "./boxes";
import { ElfBuyable } from "./elves";
import toys from "./toys"
interface Dye {
name: string;
@ -53,7 +54,7 @@ type DyeUpg =
| "blueDyeUpg2"
| "coalUpg";
export type enumColor = "red" | "green" | "blue" | "yellow" | "purple" | "orange";
export type enumColor = "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "black";
const id = "dyes";
const day = 11;
@ -393,6 +394,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",
@ -565,7 +594,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(() => [
@ -584,6 +618,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,
@ -795,6 +834,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
{render(trackerDisplay)}
<Spacer />
<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 />

View file

@ -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";
@ -190,7 +191,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(() => [

View file

@ -35,6 +35,7 @@ import oil from "./oil";
import paper from "./paper";
import plastic from "./plastic";
import workshop from "./workshop";
import toys from "./toys";
const id = "metal";
const day = 7;
@ -193,6 +194,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));
@ -268,7 +274,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(() => [

View file

@ -861,6 +861,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",

View file

@ -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()}
</>
)),

View file

@ -37,6 +37,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;
@ -528,6 +529,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
description: "Christmas Wrapping Paper",
enabled: computed(() => Decimal.gt(wrappingPaper.boosts.christmas1.value, 1))
})),
createMultiplicativeModifier(() => ({
multiplier: 2,
description: "Load logs onto trucks",
enabled: toys.row1Upgrades[0].bought
})),
createExponentialModifier(() => ({
exponent: 1.2,
description: "100% Foundation Completed",

View file

@ -32,6 +32,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;
@ -47,7 +48,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,
@ -95,7 +96,7 @@ 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
)
@ -104,7 +105,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
Decimal.gte(trees.logs.value, foundationConversion.nextAt.value) &&
Decimal.lt(
foundationProgress.value,
management.elfTraining.expandersElfTraining.milestones[2].earned.value ? 1000 : 100
toys.row1Upgrades[2].bought.value ? 1200 : management.elfTraining.expandersElfTraining.milestones[2].earned.value ? 1000 : 100
),
onClick() {
if (!unref(this.canClick)) {
@ -261,6 +262,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,
@ -274,7 +288,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
extraExpansionMilestone2,
extraExpansionMilestone3,
extraExpansionMilestone4,
extraExpansionMilestone5
extraExpansionMilestone5,
extraExpansionMilestone6
};
const { collapseMilestones, display: milestonesDisplay } =
createCollapsibleMilestones(milestones);