mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-03-14 01:51:40 +00:00
Implemented Twinkle milestones
This commit is contained in:
parent
3646be388b
commit
b588d5a637
3 changed files with 48 additions and 20 deletions
|
@ -888,7 +888,7 @@ const layer = createLayer(id, () => {
|
|||
createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "Twinkle Level 3",
|
||||
effectDisplay: "Auto smelting purity is tripled."
|
||||
effectDisplay: "Auto smelting multi is tripled."
|
||||
},
|
||||
visibility: () => showIf(metalElfMilestones[1].earned.value),
|
||||
shouldEarn: () => metalElfTraining.level.value >= 3
|
||||
|
@ -896,7 +896,7 @@ const layer = createLayer(id, () => {
|
|||
createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "Twinkle Level 4",
|
||||
effectDisplay: "All metal buyables are cheaper"
|
||||
effectDisplay: "All metal machines are 10x cheaper"
|
||||
},
|
||||
visibility: () => showIf(metalElfMilestones[2].earned.value && main.day.value >= 13),
|
||||
shouldEarn: () => metalElfTraining.level.value >= 4
|
||||
|
@ -1129,13 +1129,12 @@ const layer = createLayer(id, () => {
|
|||
|
||||
if (Decimal.eq(focusTime.value, 0)) {
|
||||
focusTargets.value = {};
|
||||
focusMulti.value = Decimal.pow(
|
||||
focusMaxMulti.value,
|
||||
Decimal.pow(
|
||||
1 - Math.abs(Math.sin((Date.now() / 1000) * 2)),
|
||||
focusUpgrade4.bought ? 0.5 : 1
|
||||
)
|
||||
);
|
||||
const speed = focusUpgrade5.bought.value ? 2000 : 1000;
|
||||
let stoppedAt = 1 - Math.abs(Math.sin((Date.now() / speed) * 2));
|
||||
if (focusUpgrade4.bought.value) {
|
||||
stoppedAt = 1 - (1 - stoppedAt) ** 2;
|
||||
}
|
||||
focusMulti.value = Decimal.pow(focusMaxMulti.value, stoppedAt);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1286,7 +1285,8 @@ const layer = createLayer(id, () => {
|
|||
const focusUpgrade4 = createUpgrade(() => ({
|
||||
display: {
|
||||
title: "Focus Improver",
|
||||
description: "Square root the focus multiplier exponent"
|
||||
description:
|
||||
"The bar moves slower when it's closer to the right and faster when it's closer to the left"
|
||||
},
|
||||
resource: trees.logs,
|
||||
visibility: () => showIf(elfTraining.metalElfTraining.milestones[4].earned.value),
|
||||
|
@ -1295,8 +1295,7 @@ const layer = createLayer(id, () => {
|
|||
const focusUpgrade5 = createUpgrade(() => ({
|
||||
display: {
|
||||
title: "Focus Focuser",
|
||||
description:
|
||||
"The bar moves slower when it's closer to the right and faster when it's closer to the left"
|
||||
description: "The bar moves 2x slower"
|
||||
},
|
||||
resource: trees.logs,
|
||||
visibility: () => showIf(elfTraining.metalElfTraining.milestones[4].earned.value),
|
||||
|
|
|
@ -94,6 +94,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Joy Level 4",
|
||||
enabled: management.elfTraining.smallfireElfTraining.milestones[3].earned
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => Decimal.add(management.schools.amount.value, 1),
|
||||
description: "Twinkle Level 1",
|
||||
enabled: management.elfTraining.metalElfTraining.milestones[0].earned
|
||||
})),
|
||||
createExponentialModifier(() => ({
|
||||
exponent: 1.1,
|
||||
description: "Mary Level 2",
|
||||
|
@ -149,6 +154,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Mary Level 5",
|
||||
enabled: management.elfTraining.heatedPlanterElfTraining.milestones[4].earned
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () =>
|
||||
Decimal.pow(1.25, management.elfTraining.metalElfTraining.level.value),
|
||||
description: "Twinkle Level 2",
|
||||
enabled: management.elfTraining.metalElfTraining.milestones[1].earned
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => Decimal.add(dyes.dyes.red.amount, dyes.dyes.blue.amount).add(dyes.dyes.yellow.amount).add(1).log10(),
|
||||
description: "The Ultimate Metal Dye",
|
||||
|
@ -167,6 +178,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
Decimal.add(oil.activeBurner.value, 1).mul(oil.oilEffectiveness.value),
|
||||
description: "Blaster Burner",
|
||||
enabled: oil.row2Upgrades[2].bought
|
||||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: 3,
|
||||
description: "Twinkle Level 3",
|
||||
enabled: management.elfTraining.metalElfTraining.milestones[2].earned
|
||||
}))
|
||||
]);
|
||||
const computedAutoSmeltMulti = computed(() => autoSmeltMulti.apply(1));
|
||||
|
@ -390,6 +406,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
if (management.elfTraining.clothElfTraining.milestones[4].earned.value) {
|
||||
cost = Decimal.div(cost, Decimal.add(oil.depth.value, 1).sqrt());
|
||||
}
|
||||
if (management.elfTraining.metalElfTraining.milestones[3].earned.value) {
|
||||
cost = Decimal.div(cost, 10);
|
||||
}
|
||||
return cost;
|
||||
},
|
||||
display: {
|
||||
|
@ -420,6 +439,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
if (management.elfTraining.clothElfTraining.milestones[4].earned.value) {
|
||||
cost = Decimal.div(cost, Decimal.add(oil.depth.value, 1).sqrt());
|
||||
}
|
||||
if (management.elfTraining.metalElfTraining.milestones[3].earned.value) {
|
||||
cost = Decimal.div(cost, 10);
|
||||
}
|
||||
return cost;
|
||||
},
|
||||
display: {
|
||||
|
@ -450,6 +472,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
if (management.elfTraining.clothElfTraining.milestones[4].earned.value) {
|
||||
cost = Decimal.div(cost, Decimal.add(oil.depth.value, 1).sqrt());
|
||||
}
|
||||
if (management.elfTraining.metalElfTraining.milestones[3].earned.value) {
|
||||
cost = Decimal.div(cost, 10);
|
||||
}
|
||||
return cost;
|
||||
},
|
||||
display: {
|
||||
|
|
|
@ -611,7 +611,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
cost: 1500,
|
||||
display: {
|
||||
title: "Blaster Burner",
|
||||
description: "The Oil Burner can now increase your metal gain."
|
||||
description: "The Oil Burner can now increase your auto smelting multi."
|
||||
},
|
||||
style: { color: colorText }
|
||||
})),
|
||||
|
@ -647,7 +647,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
title: "Dye Synergy I",
|
||||
description: "Red dye boosts yellow dye gain *(log(x)^0.75)"
|
||||
},
|
||||
visibility: () => showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
style: { color: colorText }
|
||||
})),
|
||||
createUpgrade(() => ({
|
||||
|
@ -655,10 +656,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
cost: 1e12,
|
||||
display: {
|
||||
title: "Orange-colored boxes",
|
||||
description:
|
||||
"Orange dye's 2nd effect is raised to the 2.5"
|
||||
description: "Orange dye's 2nd effect is raised to the 2.5"
|
||||
},
|
||||
visibility: () => showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
style: { color: colorText }
|
||||
})),
|
||||
createUpgrade(() => ({
|
||||
|
@ -668,7 +669,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
title: "Colorful Focus",
|
||||
description: "Sum of secondary dyes increases max focus multiplier by cbrt(x)"
|
||||
},
|
||||
visibility: () => showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
style: { color: colorText }
|
||||
})),
|
||||
createUpgrade(() => ({
|
||||
|
@ -678,7 +680,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
title: "Dye Synergy II",
|
||||
description: "Blue dye boosts red dye gain *log(x)"
|
||||
},
|
||||
visibility: () => showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
style: { color: colorText }
|
||||
})),
|
||||
createUpgrade(() => ({
|
||||
|
@ -688,7 +691,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
title: "The Ultimate Metal Dye",
|
||||
description: "Sum of primary dyes boosts auto smelt speed"
|
||||
},
|
||||
visibility: () => showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
visibility: () =>
|
||||
showIf(management.elfTraining.oilElfTraining.milestones[4].earned.value),
|
||||
style: { color: colorText }
|
||||
}))
|
||||
];
|
||||
|
|
Loading…
Add table
Reference in a new issue