mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-03-14 01:51:40 +00:00
Implemented Hope lv1-3
This commit is contained in:
parent
5f7c3f0ab3
commit
880b977263
5 changed files with 19 additions and 11 deletions
|
@ -651,7 +651,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
exponent: 1.05,
|
||||
description: "Jack Level 2",
|
||||
enabled: management.elfTraining.heatedCutterElfTraining.milestones[1].earned
|
||||
})
|
||||
}))
|
||||
]) as WithRequired<Modifier, "description" | "revert">;
|
||||
const computedCoalGain = computed(() => coalGain.apply(0));
|
||||
|
||||
|
|
|
@ -546,7 +546,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description:
|
||||
"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",
|
||||
buyable: trees.row1Buyables[2],
|
||||
cooldownModifier: expanderCooldown
|
||||
cooldownModifier: expanderCooldown,
|
||||
buyMax: () => management.elfTraining.expandersElfTraining.milestones[1].earned.value
|
||||
});
|
||||
const treesElves = [cuttersElf, plantersElf, expandersElf];
|
||||
const heatedCuttersElf = createElf({
|
||||
|
|
|
@ -301,7 +301,7 @@ const layer = createLayer(id, () => {
|
|||
createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "Hope Level 1",
|
||||
effectDisplay: "Planting speed boosts forest size"
|
||||
effectDisplay: "Forest size grows by trees planted per second raised to ^0.99"
|
||||
},
|
||||
shouldEarn: () => expandersElfTraining.level.value >= 1
|
||||
})),
|
||||
|
@ -316,7 +316,7 @@ const layer = createLayer(id, () => {
|
|||
createMilestone(() => ({
|
||||
display: {
|
||||
requirement: "Hope Level 3",
|
||||
effectDisplay: "The workshop can be expanded past 100%, but costs scale faster."
|
||||
effectDisplay: "The workshop can be expanded past 100%, but costs scale faster. It also buys max now."
|
||||
},
|
||||
visibility: () => showIf(expanderElfMilestones[1].earned.value),
|
||||
shouldEarn: () => expandersElfTraining.level.value >= 3
|
||||
|
|
|
@ -83,6 +83,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
addend: dyes.boosts.blue1,
|
||||
description: "Blue Dye Boost 1",
|
||||
enabled: () => Decimal.gte(dyes.dyes.blue.amount.value, 1)
|
||||
})),
|
||||
createAdditiveModifier(() => ({
|
||||
addend: () => Decimal.pow(computedManualCuttingAmount.value, 0.99),
|
||||
description: "Hope Level 1",
|
||||
enabled: management.elfTraining.expandersElfTraining.milestones[0].earned
|
||||
}))
|
||||
]) as WithRequired<Modifier, "description" | "revert">;
|
||||
const trees = createResource(
|
||||
|
|
|
@ -8,6 +8,7 @@ import { main } from "data/projEntry";
|
|||
import { createBar } from "features/bars/bar";
|
||||
import { createClickable } from "features/clickables/clickable";
|
||||
import {
|
||||
addSoftcap,
|
||||
Conversion,
|
||||
createIndependentConversion,
|
||||
createPolynomialScaling,
|
||||
|
@ -21,18 +22,19 @@ import { BaseLayer, createLayer } from "game/layers";
|
|||
import { noPersist } from "game/persistence";
|
||||
import Decimal, { DecimalSource, formatWhole } from "util/bignum";
|
||||
import { Direction } from "util/common";
|
||||
import { Computable } from "util/computed";
|
||||
import { render } from "util/vue";
|
||||
import { computed, unref, watchEffect } from "vue";
|
||||
import elves from "./elves";
|
||||
import trees from "./trees";
|
||||
import management from "./management";
|
||||
import trees from "./trees";
|
||||
|
||||
interface FoundationConversionOptions {
|
||||
scaling: ScalingFunction;
|
||||
baseResource: Resource;
|
||||
gainResource: Resource;
|
||||
roundUpCost: boolean;
|
||||
buyMax: boolean;
|
||||
buyMax: Computable<boolean>;
|
||||
spend: (gain: DecimalSource, spent: DecimalSource) => void;
|
||||
}
|
||||
|
||||
|
@ -47,11 +49,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
const foundationConversion: Conversion<FoundationConversionOptions> =
|
||||
createIndependentConversion(() => ({
|
||||
scaling: createPolynomialScaling(250, 1.5),
|
||||
scaling: addSoftcap(addSoftcap(createPolynomialScaling(250, 1.5), 100, 1/5), 1000, 1/10),
|
||||
baseResource: trees.logs,
|
||||
gainResource: noPersist(foundationProgress),
|
||||
roundUpCost: true,
|
||||
buyMax: false,
|
||||
buyMax: management.elfTraining.heatedCutterElfTraining.milestones[2].earned,
|
||||
spend(gain, spent) {
|
||||
trees.logs.value = Decimal.sub(trees.logs.value, spent);
|
||||
}
|
||||
|
@ -75,10 +77,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
</span>
|
||||
</>
|
||||
)),
|
||||
visibility: () => showIf(Decimal.lt(foundationProgress.value, 100)),
|
||||
visibility: () => showIf(Decimal.lt(foundationProgress.value, 100) || management.elfTraining.expandersElfTraining.milestones[2].earned.value),
|
||||
canClick: () =>
|
||||
Decimal.gte(foundationConversion.actualGain.value, 1) &&
|
||||
Decimal.lt(foundationProgress.value, 100),
|
||||
(Decimal.lt(foundationProgress.value, 100) || management.elfTraining.expandersElfTraining.milestones[2].earned.value),
|
||||
onClick() {
|
||||
if (!unref(this.canClick)) {
|
||||
return;
|
||||
|
@ -280,7 +282,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
</h2>
|
||||
% completed
|
||||
</div>
|
||||
{Decimal.lt(foundationProgress.value, 100) ? <Spacer /> : null}
|
||||
{Decimal.lt(foundationProgress.value, 100) || management.elfTraining.expandersElfTraining.milestones[2].earned.value ? <Spacer /> : null}
|
||||
{render(buildFoundation)}
|
||||
<Spacer />
|
||||
{milestonesDisplay()}
|
||||
|
|
Loading…
Add table
Reference in a new issue