mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-04-01 13:31:01 +00:00
Make workshop use cost modifier method again
This commit is contained in:
parent
172233328e
commit
02967bb0e1
2 changed files with 17 additions and 26 deletions
|
@ -42,33 +42,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
|
|
||||||
const foundationProgress = createResource<DecimalSource>(0, "foundation progress");
|
const foundationProgress = createResource<DecimalSource>(0, "foundation progress");
|
||||||
|
|
||||||
const costDecrease = createSequentialModifier(() => [
|
|
||||||
createMultiplicativeModifier(() => ({
|
|
||||||
multiplier: computed(() => Decimal.recip(wrappingPaper.boosts.beach1.value)),
|
|
||||||
description: "Beach Wrapping Paper",
|
|
||||||
enabled: computed(() => Decimal.gt(wrappingPaper.boosts.beach1.value, 1))
|
|
||||||
})),
|
|
||||||
createExponentialModifier(() => ({
|
|
||||||
exponent: 0.99,
|
|
||||||
description: "Holly Level 5",
|
|
||||||
enabled: management.elfTraining.cutterElfTraining.milestones[4].earned
|
|
||||||
}))
|
|
||||||
]);
|
|
||||||
|
|
||||||
const addScaling = (value: DecimalSource) => computed(() => costDecrease.apply(value));
|
|
||||||
|
|
||||||
const foundationConversion = createIndependentConversion(() => ({
|
const foundationConversion = createIndependentConversion(() => ({
|
||||||
// note: 5423 is a magic number. Don't touch this or it'll self-destruct.
|
// note: 5423 is a magic number. Don't touch this or it'll self-destruct.
|
||||||
scaling: addHardcap(
|
scaling: addHardcap(
|
||||||
addSoftcap(
|
addSoftcap(addSoftcap(createPolynomialScaling(250, 1.5), 5423, 1 / 1e10), 1e20, 3e8),
|
||||||
addSoftcap(
|
|
||||||
createPolynomialScaling(addScaling(250), 1.5),
|
|
||||||
addScaling(5423),
|
|
||||||
1 / 1e10
|
|
||||||
),
|
|
||||||
addScaling(1e20),
|
|
||||||
3e8
|
|
||||||
),
|
|
||||||
computed(() =>
|
computed(() =>
|
||||||
management.elfTraining.expandersElfTraining.milestones[2].earned.value ? 1000 : 100
|
management.elfTraining.expandersElfTraining.milestones[2].earned.value ? 1000 : 100
|
||||||
)
|
)
|
||||||
|
@ -80,7 +57,19 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
spend(gain, spent) {
|
spend(gain, spent) {
|
||||||
if (masteryEffectActive.value) return;
|
if (masteryEffectActive.value) return;
|
||||||
trees.logs.value = Decimal.sub(trees.logs.value, spent);
|
trees.logs.value = Decimal.sub(trees.logs.value, spent);
|
||||||
}
|
},
|
||||||
|
costModifier: createSequentialModifier(() => [
|
||||||
|
createMultiplicativeModifier(() => ({
|
||||||
|
multiplier: wrappingPaper.boosts.beach1,
|
||||||
|
description: "Beach Wrapping Paper",
|
||||||
|
enabled: computed(() => Decimal.gt(wrappingPaper.boosts.beach1.value, 1))
|
||||||
|
})),
|
||||||
|
createExponentialModifier(() => ({
|
||||||
|
exponent: 1 / 0.99,
|
||||||
|
description: "Holly Level 5",
|
||||||
|
enabled: management.elfTraining.cutterElfTraining.milestones[4].earned
|
||||||
|
}))
|
||||||
|
])
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const buildFoundation = createClickable(() => ({
|
const buildFoundation = createClickable(() => ({
|
||||||
|
|
|
@ -269,7 +269,9 @@ const layer = createLayer(id, () => {
|
||||||
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)
|
||||||
),
|
),
|
||||||
beach1: computed(() =>
|
beach1: computed(() =>
|
||||||
main.isMastery.value ? 1 : Decimal.add(wrappingPaper.beach.buyable.amount.value, 1)
|
main.isMastery.value
|
||||||
|
? 1
|
||||||
|
: Decimal.add(wrappingPaper.beach.buyable.amount.value, 1).log10().add(1)
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
const wrappingPaperSum = createResource(
|
const wrappingPaperSum = createResource(
|
||||||
|
|
Loading…
Add table
Reference in a new issue