mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-28 19:11:39 +00:00
Fixed some layers not including day
This commit is contained in:
parent
808b6d9900
commit
7b92fd9bee
7 changed files with 251 additions and 148 deletions
|
@ -375,12 +375,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createMultiplicativeModifier(() => ({
|
||||
multiplier: gingersnapEffect,
|
||||
description: "Gingersnap Level 2",
|
||||
enabled: () => management.elfTraining.clothElfTraining.milestones[1].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.clothElfTraining.milestones[1].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: hollyEffect,
|
||||
description: "Holly Level 3",
|
||||
enabled: () => management.elfTraining.cutterElfTraining.milestones[2].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.cutterElfTraining.milestones[2].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: 2,
|
||||
|
@ -415,12 +419,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createMultiplicativeModifier(() => ({
|
||||
multiplier: gingersnapEffect,
|
||||
description: "Gingersnap Level 2",
|
||||
enabled: () => management.elfTraining.clothElfTraining.milestones[1].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.clothElfTraining.milestones[1].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: hollyEffect,
|
||||
description: "Holly Level 3",
|
||||
enabled: () => management.elfTraining.cutterElfTraining.milestones[2].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.cutterElfTraining.milestones[2].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: 2,
|
||||
|
@ -455,12 +463,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createMultiplicativeModifier(() => ({
|
||||
multiplier: gingersnapEffect,
|
||||
description: "Gingersnap Level 2",
|
||||
enabled: () => management.elfTraining.clothElfTraining.milestones[1].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.clothElfTraining.milestones[1].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: hollyEffect,
|
||||
description: "Holly Level 3",
|
||||
enabled: () => management.elfTraining.cutterElfTraining.milestones[2].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.cutterElfTraining.milestones[2].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: 2,
|
||||
|
@ -604,6 +616,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
return {
|
||||
name,
|
||||
day,
|
||||
color,
|
||||
cloth,
|
||||
totalCloth,
|
||||
|
@ -640,7 +653,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
</Row>
|
||||
</>
|
||||
)),
|
||||
minimizedDisplay: jsx(() => (<div>{name} - {format(cloth.value)} {cloth.displayName}</div>)),
|
||||
minimizedDisplay: jsx(() => (
|
||||
<div>
|
||||
{name} - {format(cloth.value)} {cloth.displayName}
|
||||
</div>
|
||||
)),
|
||||
mastery,
|
||||
mastered
|
||||
};
|
||||
|
|
|
@ -773,7 +773,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createMultiplicativeModifier(() => ({
|
||||
multiplier: Decimal.add(coal.value, 1).log10().add(1).sqrt(),
|
||||
description: "Peppermint Level 2",
|
||||
enabled: () => management.elfTraining.coalDrillElfTraining.milestones[1].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.coalDrillElfTraining.milestones[1].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: Decimal.add(plastic.buildRefinery.amount.value, 1).sqrt(),
|
||||
|
@ -783,7 +785,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createExponentialModifier(() => ({
|
||||
exponent: 1.05,
|
||||
description: "Jack Level 2",
|
||||
enabled: () => management.elfTraining.heatedCutterElfTraining.milestones[1].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.heatedCutterElfTraining.milestones[1].earned.value &&
|
||||
!main.isMastery.value
|
||||
}))
|
||||
]) as WithRequired<Modifier, "description" | "revert">;
|
||||
const computedCoalGain = computed(() => coalGain.apply(0));
|
||||
|
@ -861,17 +865,23 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createExponentialModifier(() => ({
|
||||
exponent: 1.1,
|
||||
description: "Joy Level 2",
|
||||
enabled: () => management.elfTraining.smallfireElfTraining.milestones[1].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.smallfireElfTraining.milestones[1].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createExponentialModifier(() => ({
|
||||
exponent: 1.1,
|
||||
description: "Faith Level 2",
|
||||
enabled: () => management.elfTraining.bonfireElfTraining.milestones[1].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.bonfireElfTraining.milestones[1].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createExponentialModifier(() => ({
|
||||
exponent: 1.1,
|
||||
description: "Snowball Level 2",
|
||||
enabled: () => management.elfTraining.kilnElfTraining.milestones[1].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.kilnElfTraining.milestones[1].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createAdditiveModifier(() => ({
|
||||
addend: paper.paper,
|
||||
|
@ -971,12 +981,18 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
return;
|
||||
}
|
||||
if (main.isMastery.value) {
|
||||
trees.mastery.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(trees.mastery.logs.value);
|
||||
mastery.coal.value = Decimal.times(diff, computedCoalGain.value).plus(mastery.coal.value);
|
||||
trees.mastery.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(
|
||||
trees.mastery.logs.value
|
||||
);
|
||||
mastery.coal.value = Decimal.times(diff, computedCoalGain.value).plus(
|
||||
mastery.coal.value
|
||||
);
|
||||
mastery.ash.value = Decimal.times(diff, computedAshGain.value).plus(mastery.ash.value);
|
||||
mastery.activeFires.value = Decimal.max(mastery.activeFires.value, 0);
|
||||
} else {
|
||||
trees.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(trees.logs.value);
|
||||
trees.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(
|
||||
trees.logs.value
|
||||
);
|
||||
coal.value = Decimal.times(diff, computedCoalGain.value).plus(coal.value);
|
||||
ash.value = Decimal.times(diff, computedAshGain.value).plus(ash.value);
|
||||
activeFires.value = Decimal.max(activeFires.value, 0);
|
||||
|
@ -1027,6 +1043,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
return {
|
||||
name,
|
||||
day,
|
||||
color: colorCoal,
|
||||
coal,
|
||||
totalCoal,
|
||||
|
@ -1091,12 +1108,23 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
<Column>
|
||||
{render(buildFire)}
|
||||
<div>
|
||||
{formatWhole(Decimal.floor(main.isMastery ? mastery.activeFires.value : activeFires.value))}/
|
||||
{formatWhole(Decimal.floor(main.isMastery ? mastery.buildFire.amount.value : buildFire.amount.value))}
|
||||
{formatWhole(
|
||||
Decimal.floor(
|
||||
main.isMastery ? mastery.activeFires.value : activeFires.value
|
||||
)
|
||||
)}
|
||||
/
|
||||
{formatWhole(
|
||||
Decimal.floor(
|
||||
main.isMastery
|
||||
? mastery.buildFire.amount.value
|
||||
: buildFire.amount.value
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
{renderRow(minFire, removeFire, addFire, maxFire)}
|
||||
</Column>
|
||||
{(unlockBonfire.bought.value) ? (
|
||||
{unlockBonfire.bought.value ? (
|
||||
<>
|
||||
<Spacer />
|
||||
<Column>
|
||||
|
@ -1109,7 +1137,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
</Column>
|
||||
</>
|
||||
) : undefined}
|
||||
{(unlockKiln.bought.value) ? (
|
||||
{unlockKiln.bought.value ? (
|
||||
<>
|
||||
<Spacer />
|
||||
<Column>
|
||||
|
@ -1141,7 +1169,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
{renderRow(...row3buyables)}
|
||||
</>
|
||||
)),
|
||||
minimizedDisplay: jsx(() => (<div>{name} - {format(coal.value)} {coal.displayName}</div>)),
|
||||
minimizedDisplay: jsx(() => (
|
||||
<div>
|
||||
{name} - {format(coal.value)} {coal.displayName}
|
||||
</div>
|
||||
)),
|
||||
mastery,
|
||||
mastered
|
||||
};
|
||||
|
|
|
@ -33,7 +33,7 @@ import wrappingPaper from "./wrapping-paper";
|
|||
import paper from "./paper";
|
||||
import boxes from "./boxes";
|
||||
import { ElfBuyable } from "./elves";
|
||||
import { main } from "../projEntry"
|
||||
import { main } from "../projEntry";
|
||||
|
||||
interface Dye {
|
||||
name: string;
|
||||
|
@ -148,7 +148,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => Decimal.add(cloth.cloth.value, Math.E).ln(),
|
||||
description: "Gingersnap Level 1",
|
||||
enabled: () => management.elfTraining.clothElfTraining.milestones[0].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.clothElfTraining.milestones[0].earned.value &&
|
||||
!main.isMastery.value
|
||||
}))
|
||||
);
|
||||
modifiers.push(
|
||||
|
@ -176,7 +178,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createMultiplicativeModifier(() => ({
|
||||
multiplier: 2,
|
||||
description: "Gingersnap Level 3",
|
||||
enabled: () => management.elfTraining.clothElfTraining.milestones[2].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.clothElfTraining.milestones[2].earned.value &&
|
||||
!main.isMastery.value
|
||||
}))
|
||||
);
|
||||
modifiers.push(
|
||||
|
@ -821,6 +825,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
return {
|
||||
name,
|
||||
day,
|
||||
color,
|
||||
dyes,
|
||||
dyeSum,
|
||||
|
|
|
@ -1185,13 +1185,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
{ earned: persistent<boolean>(false) },
|
||||
{ earned: persistent<boolean>(false) },
|
||||
{ earned: persistent<boolean>(false) },
|
||||
{ earned: persistent<boolean>(false) },
|
||||
{ earned: persistent<boolean>(false) }
|
||||
]
|
||||
};
|
||||
const mastered = persistent<boolean>(false);
|
||||
|
||||
return {
|
||||
name,
|
||||
day,
|
||||
color: colorBright,
|
||||
elves,
|
||||
totalElves,
|
||||
|
|
|
@ -280,7 +280,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => Decimal.add(oil.buildExtractor.amount.value, 1).pow(1.25),
|
||||
description: "Snowball Level 4",
|
||||
enabled: () => management.elfTraining.kilnElfTraining.milestones[3].earned.value && !main.isMastery.value
|
||||
enabled: () =>
|
||||
management.elfTraining.kilnElfTraining.milestones[3].earned.value &&
|
||||
!main.isMastery.value
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => Decimal.add(dyes.secondaryDyeSum.value, 1).cbrt(),
|
||||
|
@ -336,6 +338,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
return {
|
||||
name,
|
||||
day,
|
||||
color,
|
||||
plastic,
|
||||
totalPlastic,
|
||||
|
@ -377,7 +380,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
</Row>
|
||||
</>
|
||||
)),
|
||||
minimizedDisplay: jsx(() => (<div>{name} - {format(plastic.value)} {plastic.displayName}</div>)),
|
||||
minimizedDisplay: jsx(() => (
|
||||
<div>
|
||||
{name} - {format(plastic.value)} {plastic.displayName}
|
||||
</div>
|
||||
)),
|
||||
mastery,
|
||||
mastered
|
||||
};
|
||||
|
|
|
@ -399,10 +399,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
enabled: autoPlantUpgrade1.bought.value
|
||||
})),
|
||||
createAdditiveModifier(() => ({
|
||||
addend: () => Decimal.div(
|
||||
autoPlantingBuyable1.amount.value,
|
||||
2
|
||||
),
|
||||
addend: () => Decimal.div(autoPlantingBuyable1.amount.value, 2),
|
||||
description: "Generic Planters",
|
||||
enabled: researchUpgrade2.bought
|
||||
})),
|
||||
|
@ -447,7 +444,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
enabled: management.elfTraining.heatedPlanterElfTraining.milestones[3].earned
|
||||
})),
|
||||
createAdditiveModifier(() => ({
|
||||
addend: () => Decimal.sub(lastAutoCuttingAmount.value, lastAutoPlantedAmount.value).max(0),
|
||||
addend: () =>
|
||||
Decimal.sub(lastAutoCuttingAmount.value, lastAutoPlantedAmount.value).max(0),
|
||||
description: "Ivy Level 5",
|
||||
enabled: management.elfTraining.planterElfTraining.milestones[4].earned
|
||||
}))
|
||||
|
@ -594,7 +592,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
)
|
||||
);
|
||||
logs.value = Decimal.add(logs.value, Decimal.times(logGain.apply(1), amount));
|
||||
saplings.value = Decimal.add(saplings.value, amount.times((main.isMastery.value || mastered.value) ? 2 : 1));
|
||||
saplings.value = Decimal.add(
|
||||
saplings.value,
|
||||
amount.times(main.isMastery.value || mastered.value ? 2 : 1)
|
||||
);
|
||||
manualCutProgress.value = 0;
|
||||
}
|
||||
}));
|
||||
|
@ -761,7 +762,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
Decimal.mul(averageLogGain.value, Decimal.dOne.sub(SMOOTHING_FACTOR))
|
||||
);
|
||||
logs.value = Decimal.add(logs.value, logsGained);
|
||||
saplings.value = Decimal.add(Decimal.mul(saplings.value, (main.isMastery.value || mastered.value) ? 2 : 1), amountCut);
|
||||
saplings.value = Decimal.add(
|
||||
Decimal.mul(saplings.value, main.isMastery.value || mastered.value ? 2 : 1),
|
||||
amountCut
|
||||
);
|
||||
const amountPlanted = Decimal.min(
|
||||
saplings.value,
|
||||
Decimal.times(computedAutoPlantingAmount.value, diff)
|
||||
|
@ -831,6 +835,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
return {
|
||||
name,
|
||||
day,
|
||||
color: colorBright,
|
||||
logs,
|
||||
totalLogs,
|
||||
|
@ -858,7 +863,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
style="margin-bottom: 0"
|
||||
productionDisplay={
|
||||
Decimal.gt(computedAutoCuttingAmount.value, 0)
|
||||
? `+${format(averageLogGain.value)}/s average<br/>equilibrium: +${formatLimit(
|
||||
? `+${format(
|
||||
averageLogGain.value
|
||||
)}/s average<br/>equilibrium: +${formatLimit(
|
||||
[
|
||||
[computedAutoCuttingAmount.value, "cutting speed"],
|
||||
[computedAutoPlantingAmount.value, "planting speed"],
|
||||
|
@ -891,9 +898,13 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
{renderRow(...row1Buyables)}
|
||||
</>
|
||||
)),
|
||||
minimizedDisplay: jsx(() => (<div>{name} - {format(logs.value)} {logs.displayName}</div>)),
|
||||
minimizedDisplay: jsx(() => (
|
||||
<div>
|
||||
{name} - {format(logs.value)} {logs.displayName}
|
||||
</div>
|
||||
)),
|
||||
mastery,
|
||||
mastered,
|
||||
mastered
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -6,12 +6,16 @@ import { noPersist, persistent } from "game/persistence";
|
|||
import Decimal, { DecimalSource } from "util/bignum";
|
||||
import MainDisplay from "features/resources/MainDisplay.vue";
|
||||
import { render, renderRow } from "util/vue";
|
||||
import { default as dyes, type enumColor } from "./dyes"
|
||||
import { BaseTransition, computed, Ref, ref, unref } from "vue"
|
||||
import { default as dyes, type enumColor } from "./dyes";
|
||||
import { BaseTransition, computed, Ref, ref, unref } from "vue";
|
||||
import Spacer from "components/layout/Spacer.vue";
|
||||
import { Computable } from "util/computed";
|
||||
import { format } from "util/bignum";
|
||||
import { createCollapsibleModifierSections, setUpDailyProgressTracker, createCollapsibleMilestones } from "data/common";
|
||||
import {
|
||||
createCollapsibleModifierSections,
|
||||
setUpDailyProgressTracker,
|
||||
createCollapsibleMilestones
|
||||
} from "data/common";
|
||||
import Modal from "components/Modal.vue";
|
||||
import { createMilestone } from "features/milestones/milestone";
|
||||
import { createClickable } from "features/clickables/clickable";
|
||||
|
@ -39,13 +43,13 @@ interface Scaling {
|
|||
interface WrappingPaperOptions {
|
||||
ratio: {
|
||||
[key in enumColor]?: Scaling;
|
||||
},
|
||||
};
|
||||
name: string;
|
||||
id: string;
|
||||
background: string;
|
||||
listedBoosts: {
|
||||
desc: Ref<string>;
|
||||
}[]
|
||||
}[];
|
||||
}
|
||||
|
||||
const layer = createLayer(id, () => {
|
||||
|
@ -53,25 +57,28 @@ const layer = createLayer (id, () => {
|
|||
const color = "gold"; // todo: change
|
||||
|
||||
const createWrappingPaper = (options: WrappingPaperOptions & Partial<BuyableOptions>) => {
|
||||
const getCost: Computable<{
|
||||
const getCost: Computable<
|
||||
{
|
||||
resource: Resource;
|
||||
cost: DecimalSource;
|
||||
}[]> = computed(() => {
|
||||
}[]
|
||||
> = computed(() => {
|
||||
const dyeCosts = [];
|
||||
for (const [color, ratio] of Object.entries(options.ratio)) {
|
||||
dyeCosts.push({
|
||||
resource: dyes.dyes[color as enumColor].amount,
|
||||
cost: Decimal.mul(ratio.base, Decimal.pow(ratio.exponent, buyable.amount.value)),
|
||||
cost: Decimal.mul(ratio.base, Decimal.pow(ratio.exponent, buyable.amount.value))
|
||||
});
|
||||
}
|
||||
return dyeCosts;
|
||||
})
|
||||
});
|
||||
const buyable: GenericBuyable = createBuyable(() => {
|
||||
return {
|
||||
style: () => ({
|
||||
background: unref(buyable.canPurchase) ? options.background : "#545454",
|
||||
minWidth: "200px",
|
||||
boxShadow: "0 3px 0 #00000022 inset, 3px 0 0 #00000022 inset, 0 0 3px #00000022 inset, 0 0 0 3px #00000022 inset",
|
||||
boxShadow:
|
||||
"0 3px 0 #00000022 inset, 3px 0 0 #00000022 inset, 0 0 3px #00000022 inset, 0 0 0 3px #00000022 inset",
|
||||
border: "none"
|
||||
}),
|
||||
display: jsx(() => {
|
||||
|
@ -81,31 +88,26 @@ const layer = createLayer (id, () => {
|
|||
<br />
|
||||
Create {options.name}.
|
||||
<br />
|
||||
Requirement:{" "}{
|
||||
getCost.value.map(({ resource, cost }) => {
|
||||
return render(jsx(() => (
|
||||
Requirement:{" "}
|
||||
{getCost.value.map(({ resource, cost }) => {
|
||||
return render(
|
||||
jsx(() => (
|
||||
<div>
|
||||
{format(cost)} {resource.displayName} <br />
|
||||
</div>
|
||||
)))
|
||||
})
|
||||
}
|
||||
))
|
||||
);
|
||||
})}
|
||||
<br />
|
||||
Currently:{" "}
|
||||
{
|
||||
options.listedBoosts.map(({desc}) => {
|
||||
return render(jsx(() => (
|
||||
<div>
|
||||
{unref(desc)}
|
||||
</div>
|
||||
)))
|
||||
})
|
||||
}
|
||||
{options.listedBoosts.map(({ desc }) => {
|
||||
return render(jsx(() => <div>{unref(desc)}</div>));
|
||||
})}
|
||||
</span>
|
||||
)
|
||||
);
|
||||
}),
|
||||
canPurchase() {
|
||||
for (let {resource, cost} of getCost.value) {
|
||||
for (const { resource, cost } of getCost.value) {
|
||||
if (Decimal.lt(resource.value, cost)) return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -114,9 +116,9 @@ const layer = createLayer (id, () => {
|
|||
buyable.amount.value = Decimal.add(buyable.amount.value, 1);
|
||||
// todo: stuff
|
||||
}
|
||||
}
|
||||
})
|
||||
const resource = createResource(buyable.amount, options.name)
|
||||
};
|
||||
});
|
||||
const resource = createResource(buyable.amount, options.name);
|
||||
return {
|
||||
resource,
|
||||
buyable,
|
||||
|
@ -128,25 +130,27 @@ const layer = createLayer (id, () => {
|
|||
style="margin: 0; width: 200px; width: 180px; padding: 10px;"
|
||||
sticky={false}
|
||||
/>
|
||||
|
||||
)
|
||||
);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
const wrappingPaper: Record<string, WrappingPaper> = {
|
||||
christmas: createWrappingPaper({
|
||||
name: "Christmas Wrapping Paper",
|
||||
id: "christmas",
|
||||
ratio: {
|
||||
red: { base: basePrimaryCost * 3, exponent: basePrimaryRatio },
|
||||
green: {base: baseSecondaryCost * 3, exponent: baseSecondaryRatio},
|
||||
green: { base: baseSecondaryCost * 3, exponent: baseSecondaryRatio }
|
||||
},
|
||||
background: "linear-gradient(225deg, rgba(255,76,76,1) 10.8%, rgba(255,255,255,1) 11.1%, rgba(255,255,255,1) 21.9%, rgba(65,255,95,1) 22.2%, rgba(65,255,95,1) 33.0%, rgba(255,255,255,1) 33.3%, rgba(255,255,255,1) 44.1%, rgba(255,76,76,1) 44.4%, rgba(255,76,76,1) 55.2%, rgba(255,255,255,1) 55.5%, rgba(255,255,255,1) 66.3%, rgba(65,255,95,1) 66.6%, rgba(65,255,95,1) 77.4%, rgba(255,255,255,1) 77.7%, rgba(255,255,255,1) 88.5%, rgba(255,76,76,1) 88.8%)",
|
||||
background:
|
||||
"linear-gradient(225deg, rgba(255,76,76,1) 10.8%, rgba(255,255,255,1) 11.1%, rgba(255,255,255,1) 21.9%, rgba(65,255,95,1) 22.2%, rgba(65,255,95,1) 33.0%, rgba(255,255,255,1) 33.3%, rgba(255,255,255,1) 44.1%, rgba(255,76,76,1) 44.4%, rgba(255,76,76,1) 55.2%, rgba(255,255,255,1) 55.5%, rgba(255,255,255,1) 66.3%, rgba(65,255,95,1) 66.6%, rgba(65,255,95,1) 77.4%, rgba(255,255,255,1) 77.7%, rgba(255,255,255,1) 88.5%, rgba(255,76,76,1) 88.8%)",
|
||||
listedBoosts: [
|
||||
{
|
||||
desc: computed(() => `
|
||||
desc: computed(
|
||||
() => `
|
||||
x${format(unref(boosts.christmas1))} to wood production
|
||||
`)
|
||||
`
|
||||
)
|
||||
}
|
||||
]
|
||||
}),
|
||||
|
@ -159,14 +163,17 @@ const layer = createLayer (id, () => {
|
|||
blue: { base: basePrimaryCost, exponent: basePrimaryRatio + 0.2 },
|
||||
yellow: { base: basePrimaryCost, exponent: basePrimaryRatio + 0.2 },
|
||||
purple: { base: baseSecondaryCost, exponent: baseSecondaryRatio + 0.1 },
|
||||
orange: {base: baseSecondaryCost, exponent: baseSecondaryRatio + 0.1},
|
||||
orange: { base: baseSecondaryCost, exponent: baseSecondaryRatio + 0.1 }
|
||||
},
|
||||
background: "linear-gradient(135deg, rgba(255,0,0,1) 0%, rgba(255,0,0,1) 2%, rgba(255,155,0,1) 14%, rgba(255,155,0,1) 18%, rgba(255,254,0,1) 31%, rgba(255,254,0,1) 35%, rgba(100,244,61,1) 48%, rgba(100,244,61,1) 52%, rgba(70,218,234,1) 64%, rgba(70,218,234,1) 68%, rgba(205,0,210,1) 81%, rgba(205,0,210,1) 85%, rgba(255,0,0,1) 98%, rgba(255,0,0,1) 100%)",
|
||||
background:
|
||||
"linear-gradient(135deg, rgba(255,0,0,1) 0%, rgba(255,0,0,1) 2%, rgba(255,155,0,1) 14%, rgba(255,155,0,1) 18%, rgba(255,254,0,1) 31%, rgba(255,254,0,1) 35%, rgba(100,244,61,1) 48%, rgba(100,244,61,1) 52%, rgba(70,218,234,1) 64%, rgba(70,218,234,1) 68%, rgba(205,0,210,1) 81%, rgba(205,0,210,1) 85%, rgba(255,0,0,1) 98%, rgba(255,0,0,1) 100%)",
|
||||
listedBoosts: [
|
||||
{
|
||||
desc: computed(() => `
|
||||
desc: computed(
|
||||
() => `
|
||||
/${format(unref(boosts.rainbow1))} to coal buyable cost
|
||||
`)
|
||||
`
|
||||
)
|
||||
}
|
||||
]
|
||||
}),
|
||||
|
@ -175,14 +182,17 @@ const layer = createLayer (id, () => {
|
|||
id: "jazzy",
|
||||
ratio: {
|
||||
purple: { base: baseSecondaryCost * 3, exponent: baseSecondaryRatio },
|
||||
orange: {base: baseSecondaryCost * 3, exponent: baseSecondaryRatio},
|
||||
orange: { base: baseSecondaryCost * 3, exponent: baseSecondaryRatio }
|
||||
},
|
||||
background: "linear-gradient(90deg, rgba(255,177,0,1) 10.8%, rgba(189,69,255,1) 11.1%, rgba(189,69,255,1) 21.9%, rgba(255,177,0,1) 22.2%, rgba(255,177,0,1) 33.0%, rgba(189,69,255,1) 33.3%, rgba(189,69,255,1) 44.1%, rgba(255,177,0,1) 44.4%, rgba(255,177,0,1) 55.2%, rgba(189,69,255,1) 55.5%, rgba(189,69,255,1) 66.3%, rgba(255,177,0,1) 66.6%, rgba(255,177,0,1) 77.4%, rgba(189,69,255,1) 77.7%, rgba(189,69,255,1) 88.5%, rgba(255,177,0,1) 88.8%)",
|
||||
background:
|
||||
"linear-gradient(90deg, rgba(255,177,0,1) 10.8%, rgba(189,69,255,1) 11.1%, rgba(189,69,255,1) 21.9%, rgba(255,177,0,1) 22.2%, rgba(255,177,0,1) 33.0%, rgba(189,69,255,1) 33.3%, rgba(189,69,255,1) 44.1%, rgba(255,177,0,1) 44.4%, rgba(255,177,0,1) 55.2%, rgba(189,69,255,1) 55.5%, rgba(189,69,255,1) 66.3%, rgba(255,177,0,1) 66.6%, rgba(255,177,0,1) 77.4%, rgba(189,69,255,1) 77.7%, rgba(189,69,255,1) 88.5%, rgba(255,177,0,1) 88.8%)",
|
||||
listedBoosts: [
|
||||
{
|
||||
desc: computed(() => `
|
||||
desc: computed(
|
||||
() => `
|
||||
-${format(unref(boosts.jazzy1))} to elf cost scaling
|
||||
`)
|
||||
`
|
||||
)
|
||||
}
|
||||
]
|
||||
}),
|
||||
|
@ -190,16 +200,19 @@ const layer = createLayer (id, () => {
|
|||
name: "Sunshine Wrapping Paper",
|
||||
id: "sunshine",
|
||||
ratio: {
|
||||
red: {base: basePrimaryCost * 2, exponent: basePrimaryRatio + .1},
|
||||
yellow: {base: basePrimaryCost * 2, exponent: basePrimaryRatio + .1},
|
||||
orange: {base: baseSecondaryCost * 2, exponent: baseSecondaryRatio + .05},
|
||||
red: { base: basePrimaryCost * 2, exponent: basePrimaryRatio + 0.1 },
|
||||
yellow: { base: basePrimaryCost * 2, exponent: basePrimaryRatio + 0.1 },
|
||||
orange: { base: baseSecondaryCost * 2, exponent: baseSecondaryRatio + 0.05 }
|
||||
},
|
||||
background: "radial-gradient(circle, rgba(238,250,0,1) 16%, rgba(250,157,0,1) 50%, rgba(255,76,76,1) 83%)",
|
||||
background:
|
||||
"radial-gradient(circle, rgba(238,250,0,1) 16%, rgba(250,157,0,1) 50%, rgba(255,76,76,1) 83%)",
|
||||
listedBoosts: [
|
||||
{
|
||||
desc: computed(() => `
|
||||
desc: computed(
|
||||
() => `
|
||||
x${format(unref(boosts.sunshine1))} to paper production
|
||||
`)
|
||||
`
|
||||
)
|
||||
}
|
||||
]
|
||||
}),
|
||||
|
@ -207,16 +220,19 @@ const layer = createLayer (id, () => {
|
|||
name: "Ocean Wrapping Paper",
|
||||
id: "ocean",
|
||||
ratio: {
|
||||
blue: {base: basePrimaryCost * 2, exponent: basePrimaryRatio + .1},
|
||||
green: {base: baseSecondaryCost * 2, exponent: baseSecondaryRatio + .05},
|
||||
purple: {base: baseSecondaryCost * 2, exponent: baseSecondaryRatio + .05},
|
||||
blue: { base: basePrimaryCost * 2, exponent: basePrimaryRatio + 0.1 },
|
||||
green: { base: baseSecondaryCost * 2, exponent: baseSecondaryRatio + 0.05 },
|
||||
purple: { base: baseSecondaryCost * 2, exponent: baseSecondaryRatio + 0.05 }
|
||||
},
|
||||
background: "linear-gradient(20deg, rgba(0,183,250,0.6) 8%, rgba(0,223,62,0.6) 12%, rgba(0,183,250,0.6) 17%, rgba(0,183,250,0.6) 27%, rgba(124,109,230,0.6) 38%, rgba(0,183,250,0.6) 46%, rgba(0,183,250,0.6) 50%, rgba(0,223,62,0.6) 53%, rgba(0,183,250,0.6) 60%, rgba(124,109,230,0.6) 67%, rgba(0,183,250,0.6) 73%, rgba(0,183,250,0.6) 84%, rgba(0,223,62,0.6) 88%, rgba(0,183,250,0.6) 91%), linear-gradient(340deg, rgba(0,183,250,0.6) 8%, rgba(0,223,62,0.6) 12%, rgba(0,183,250,0.6) 17%, rgba(0,183,250,0.6) 27%, rgba(124,109,230,0.6) 38%, rgba(0,183,250,0.6) 46%, rgba(0,183,250,0.6) 50%, rgba(0,223,62,0.6) 53%, rgba(0,183,250,0.6) 60%, rgba(124,109,230,0.6) 67%, rgba(0,183,250,0.6) 73%, rgba(0,183,250,0.6) 84%, rgba(0,223,62,0.6) 88%, rgba(0,183,250,0.6) 91%)",
|
||||
background:
|
||||
"linear-gradient(20deg, rgba(0,183,250,0.6) 8%, rgba(0,223,62,0.6) 12%, rgba(0,183,250,0.6) 17%, rgba(0,183,250,0.6) 27%, rgba(124,109,230,0.6) 38%, rgba(0,183,250,0.6) 46%, rgba(0,183,250,0.6) 50%, rgba(0,223,62,0.6) 53%, rgba(0,183,250,0.6) 60%, rgba(124,109,230,0.6) 67%, rgba(0,183,250,0.6) 73%, rgba(0,183,250,0.6) 84%, rgba(0,223,62,0.6) 88%, rgba(0,183,250,0.6) 91%), linear-gradient(340deg, rgba(0,183,250,0.6) 8%, rgba(0,223,62,0.6) 12%, rgba(0,183,250,0.6) 17%, rgba(0,183,250,0.6) 27%, rgba(124,109,230,0.6) 38%, rgba(0,183,250,0.6) 46%, rgba(0,183,250,0.6) 50%, rgba(0,223,62,0.6) 53%, rgba(0,183,250,0.6) 60%, rgba(124,109,230,0.6) 67%, rgba(0,183,250,0.6) 73%, rgba(0,183,250,0.6) 84%, rgba(0,223,62,0.6) 88%, rgba(0,183,250,0.6) 91%)",
|
||||
listedBoosts: [
|
||||
{
|
||||
desc: computed(() => `
|
||||
desc: computed(
|
||||
() => `
|
||||
/${format(unref(boosts.ocean1))} to box buyable cost
|
||||
`)
|
||||
`
|
||||
)
|
||||
}
|
||||
]
|
||||
}),
|
||||
|
@ -225,38 +241,41 @@ const layer = createLayer (id, () => {
|
|||
id: "beach",
|
||||
ratio: {
|
||||
yellow: { base: basePrimaryCost * 3, exponent: basePrimaryRatio },
|
||||
blue: {base: basePrimaryCost * 3, exponent: basePrimaryRatio},
|
||||
blue: { base: basePrimaryCost * 3, exponent: basePrimaryRatio }
|
||||
},
|
||||
background: "radial-gradient(circle at 80% 10%, rgba(255,255,76,1) 8%, rgba(0,0,0,0) 21%), linear-gradient(180deg, rgba(0,255,246,1) 60%, rgba(0,255,246,0) 61%), linear-gradient(215deg, rgba(0,93,255,0) 0%, rgba(0,93,255,0) 66%, rgba(255,255,76,1) 68%), linear-gradient(180deg, rgba(0,0,0,0) 68%, rgba(0,93,255,1) 70%), linear-gradient(205deg, rgba(0,255,246,1) 0%, rgba(0,255,246,1) 100%)",
|
||||
background:
|
||||
"radial-gradient(circle at 80% 10%, rgba(255,255,76,1) 8%, rgba(0,0,0,0) 21%), linear-gradient(180deg, rgba(0,255,246,1) 60%, rgba(0,255,246,0) 61%), linear-gradient(215deg, rgba(0,93,255,0) 0%, rgba(0,93,255,0) 66%, rgba(255,255,76,1) 68%), linear-gradient(180deg, rgba(0,0,0,0) 68%, rgba(0,93,255,1) 70%), linear-gradient(205deg, rgba(0,255,246,1) 0%, rgba(0,255,246,1) 100%)",
|
||||
listedBoosts: [
|
||||
{
|
||||
desc: computed(() => `
|
||||
desc: computed(
|
||||
() => `
|
||||
/${format(unref(boosts.beach1))} to workshop cost
|
||||
`)
|
||||
`
|
||||
)
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
};
|
||||
const boosts = {
|
||||
christmas1: computed(() => Decimal.add(wrappingPaper.christmas.buyable.amount.value, 1)), // Probably not the best way to do this, but it works
|
||||
rainbow1: computed(() =>
|
||||
Decimal.pow(2, wrappingPaper.rainbow.buyable.amount.value)
|
||||
),
|
||||
rainbow1: computed(() => Decimal.pow(2, wrappingPaper.rainbow.buyable.amount.value)),
|
||||
jazzy1: computed(() =>
|
||||
Decimal.ln(
|
||||
Decimal.add(
|
||||
Decimal.ln(Decimal.add(wrappingPaper.jazzy.buyable.amount.value, 1)),
|
||||
1
|
||||
)
|
||||
Decimal.add(Decimal.ln(Decimal.add(wrappingPaper.jazzy.buyable.amount.value, 1)), 1)
|
||||
)
|
||||
),
|
||||
sunshine1: computed(() => Decimal.add(wrappingPaper.sunshine.buyable.amount.value, 1)),
|
||||
ocean1: computed(() =>
|
||||
Decimal.pow(1.5, wrappingPaper.ocean.buyable.amount.value)
|
||||
ocean1: computed(() => Decimal.pow(1.5, wrappingPaper.ocean.buyable.amount.value)),
|
||||
beach1: computed(() => Decimal.add(wrappingPaper.beach.buyable.amount.value, 1))
|
||||
};
|
||||
const wrappingPaperSum = createResource(
|
||||
computed(() =>
|
||||
Object.values(wrappingPaper)
|
||||
.map(paper => paper.buyable.amount.value)
|
||||
.reduce(Decimal.add, 0)
|
||||
),
|
||||
beach1: computed(() => Decimal.add(wrappingPaper.beach.buyable.amount.value, 1)),
|
||||
}
|
||||
const wrappingPaperSum = createResource(computed(() => Object.values(wrappingPaper).map(paper => paper.buyable.amount.value).reduce(Decimal.add, 0)), "Total Wrapping Paper")
|
||||
"Total Wrapping Paper"
|
||||
);
|
||||
const showModifiersModal = ref(false);
|
||||
const modifiersModal = jsx(() => (
|
||||
<Modal
|
||||
|
@ -269,8 +288,7 @@ const layer = createLayer (id, () => {
|
|||
/>
|
||||
));
|
||||
|
||||
const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [
|
||||
]);
|
||||
const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => []);
|
||||
|
||||
const { total: totalWrappingPaper, trackerDisplay } = setUpDailyProgressTracker({
|
||||
resource: wrappingPaperSum,
|
||||
|
@ -286,7 +304,7 @@ const layer = createLayer (id, () => {
|
|||
ignoreTotal: true
|
||||
});
|
||||
|
||||
const milestoneCosts = [6, 12, 18, 24, 30, 36] // change
|
||||
const milestoneCosts = [6, 12, 18, 24, 30, 36]; // change
|
||||
|
||||
const primaryBoostMilestone = createMilestone(() => ({
|
||||
display: {
|
||||
|
@ -344,18 +362,14 @@ const layer = createLayer (id, () => {
|
|||
secondaryNoReset: secondaryNoResetMilestone,
|
||||
buyMaxSecondary: buyMaxSecondaryMilestone,
|
||||
unlockDyeElf: unlockDyeElfMilestone
|
||||
}
|
||||
};
|
||||
|
||||
const { collapseMilestones, display: milestonesDisplay } =
|
||||
createCollapsibleMilestones(milestones);
|
||||
|
||||
const enterMasteryButton = createClickable(() => ({
|
||||
display: jsx(() => {
|
||||
return (
|
||||
<>{
|
||||
main.isMastery.value ? "Stop Decorating" : "Begin Decoration"
|
||||
}</>
|
||||
)
|
||||
return <>{main.isMastery.value ? "Stop Decorating" : "Begin Decoration"}</>;
|
||||
}),
|
||||
onClick() {
|
||||
main.toggleMastery();
|
||||
|
@ -363,27 +377,43 @@ const layer = createLayer (id, () => {
|
|||
style: {
|
||||
backgroundColor: "gold"
|
||||
}
|
||||
}))
|
||||
|
||||
}));
|
||||
|
||||
return {
|
||||
name,
|
||||
day,
|
||||
display: jsx(() => {
|
||||
return (
|
||||
<div style="width: 620px">
|
||||
{render(trackerDisplay)}
|
||||
<MainDisplay resource={wrappingPaperSum} />
|
||||
{renderRow(wrappingPaper.christmas.display, wrappingPaper.rainbow.display, wrappingPaper.jazzy.display)}
|
||||
{renderRow(wrappingPaper.christmas.buyable, wrappingPaper.rainbow.buyable, wrappingPaper.jazzy.buyable)}
|
||||
{renderRow(
|
||||
wrappingPaper.christmas.display,
|
||||
wrappingPaper.rainbow.display,
|
||||
wrappingPaper.jazzy.display
|
||||
)}
|
||||
{renderRow(
|
||||
wrappingPaper.christmas.buyable,
|
||||
wrappingPaper.rainbow.buyable,
|
||||
wrappingPaper.jazzy.buyable
|
||||
)}
|
||||
<Spacer />
|
||||
{renderRow(wrappingPaper.sunshine.display, wrappingPaper.ocean.display, wrappingPaper.beach.display)}
|
||||
{renderRow(wrappingPaper.sunshine.buyable, wrappingPaper.ocean.buyable, wrappingPaper.beach.buyable)}
|
||||
{renderRow(
|
||||
wrappingPaper.sunshine.display,
|
||||
wrappingPaper.ocean.display,
|
||||
wrappingPaper.beach.display
|
||||
)}
|
||||
{renderRow(
|
||||
wrappingPaper.sunshine.buyable,
|
||||
wrappingPaper.ocean.buyable,
|
||||
wrappingPaper.beach.buyable
|
||||
)}
|
||||
<Spacer />
|
||||
{render(enterMasteryButton)}
|
||||
<Spacer />
|
||||
{milestonesDisplay()}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}),
|
||||
wrappingPaper,
|
||||
totalWrappingPaper,
|
||||
|
@ -392,7 +422,7 @@ const layer = createLayer (id, () => {
|
|||
milestones,
|
||||
collapseMilestones,
|
||||
minWidth: 700
|
||||
}
|
||||
})
|
||||
};
|
||||
});
|
||||
|
||||
export default layer;
|
Loading…
Reference in a new issue