mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-21 16:13:57 +00:00
Add each reindeer's modifier
This commit is contained in:
parent
1a857411ee
commit
3d64b03905
10 changed files with 41 additions and 11 deletions
|
@ -31,6 +31,7 @@ import elves, { ElfBuyable } from "./elves";
|
|||
import management from "./management";
|
||||
import paper from "./paper";
|
||||
import plastic from "./plastic";
|
||||
import reindeer from "./reindeer";
|
||||
import trees from "./trees";
|
||||
import workshop from "./workshop";
|
||||
import wrappingPaper from "./wrapping-paper";
|
||||
|
@ -55,6 +56,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "1000% Foundation Completed",
|
||||
enabled: workshop.milestones.extraExpansionMilestone5.earned
|
||||
})),
|
||||
reindeer.reindeer.vixen.modifier,
|
||||
createExponentialModifier(() => ({
|
||||
exponent: 1.1,
|
||||
description: "Bell Level 2",
|
||||
|
|
|
@ -36,6 +36,7 @@ import management from "./management";
|
|||
import metal from "./metal";
|
||||
import paper from "./paper";
|
||||
import plastic from "./plastic";
|
||||
import reindeer from "./reindeer";
|
||||
import trees from "./trees";
|
||||
import workshop from "./workshop";
|
||||
|
||||
|
@ -449,7 +450,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
multiplier: dyes.boosts.yellow2,
|
||||
description: "Yellow Dye",
|
||||
enabled: dyes.masteryEffectActive
|
||||
}))
|
||||
})),
|
||||
reindeer.reindeer.cupid.modifier
|
||||
]);
|
||||
const computedSheepGain = computed(() => sheepGain.apply(1));
|
||||
const breedingCooldown = createSequentialModifier(() => []);
|
||||
|
@ -494,7 +496,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
multiplier: dyes.boosts.yellow2,
|
||||
description: "Yellow Dye",
|
||||
enabled: dyes.masteryEffectActive
|
||||
}))
|
||||
})),
|
||||
reindeer.reindeer.cupid.modifier
|
||||
]);
|
||||
const computedShearingAmount = computed(() => shearingAmount.apply(1));
|
||||
const shearingCooldown = createSequentialModifier(() => []);
|
||||
|
@ -539,7 +542,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
multiplier: dyes.boosts.yellow2,
|
||||
description: "Yellow Dye",
|
||||
enabled: dyes.masteryEffectActive
|
||||
}))
|
||||
})),
|
||||
reindeer.reindeer.cupid.modifier
|
||||
]);
|
||||
const computedSpinningAmount = computed(() => spinningAmount.apply(1));
|
||||
const spinningCooldown = createSequentialModifier(() => []);
|
||||
|
|
|
@ -40,6 +40,7 @@ import metal from "./metal";
|
|||
import oil from "./oil";
|
||||
import paper from "./paper";
|
||||
import plastic from "./plastic";
|
||||
import reindeer from "./reindeer";
|
||||
import trees from "./trees";
|
||||
import wrappingPaper from "./wrapping-paper";
|
||||
|
||||
|
@ -785,6 +786,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Refined Coal",
|
||||
enabled: refinedCoal.bought
|
||||
})),
|
||||
reindeer.reindeer.dancer.modifier,
|
||||
createExponentialModifier(() => ({
|
||||
exponent: 1.05,
|
||||
description: "Jack Level 2",
|
||||
|
|
|
@ -36,6 +36,7 @@ import oil from "./oil";
|
|||
import paper from "./paper";
|
||||
import trees from "./trees";
|
||||
import toys from "./toys";
|
||||
import reindeer from "./reindeer";
|
||||
|
||||
interface Dye {
|
||||
name: string;
|
||||
|
@ -200,6 +201,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
enabled: boxes.row3Upgrades.dyeUpgrade.bought
|
||||
}))
|
||||
);
|
||||
modifiers.push(reindeer.reindeer.rudolph.modifier);
|
||||
return modifiers;
|
||||
}) as WithRequired<Modifier, "description" | "revert">;
|
||||
const computedToGenerate = computed(() => toGenerate.apply(0));
|
||||
|
|
|
@ -37,6 +37,7 @@ import plastic from "./plastic";
|
|||
import workshop from "./workshop";
|
||||
import wrappingPaper from "./wrapping-paper";
|
||||
import toys from "./toys";
|
||||
import reindeer from "./reindeer";
|
||||
|
||||
const id = "metal";
|
||||
const day = 7;
|
||||
|
@ -105,6 +106,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Twinkle Level 1",
|
||||
enabled: management.elfTraining.metalElfTraining.milestones[0].earned
|
||||
})),
|
||||
reindeer.reindeer.comet.modifier,
|
||||
createExponentialModifier(() => ({
|
||||
exponent: 1.1,
|
||||
description: "Mary Level 2",
|
||||
|
|
|
@ -41,6 +41,7 @@ import workshop from "./workshop";
|
|||
import { WithRequired } from "util/common";
|
||||
import { ElfBuyable } from "./elves";
|
||||
import toys from "./toys";
|
||||
import reindeer from "./reindeer";
|
||||
|
||||
const id = "oil";
|
||||
const day = 9;
|
||||
|
@ -957,7 +958,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
multiplier: 50,
|
||||
description: "350 toys",
|
||||
enabled: toys.milestones.milestone4.earned
|
||||
}))
|
||||
})),
|
||||
reindeer.reindeer.donner.modifier
|
||||
]) as WithRequired<Modifier, "description" | "revert">;
|
||||
const computedOilSpeed = computed(() => oilSpeed.apply(0));
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ import dyes from "./dyes";
|
|||
import elves, { ElfBuyable } from "./elves";
|
||||
import management from "./management";
|
||||
import plastic from "./plastic";
|
||||
import reindeer from "./reindeer";
|
||||
import ribbon from "./ribbon";
|
||||
import trees from "./trees";
|
||||
import workshop from "./workshop";
|
||||
|
@ -423,7 +424,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
multiplier: wrappingPaper.boosts.sunshine1,
|
||||
description: "Sunshine Wrapping Paper",
|
||||
enabled: () => Decimal.gte(wrappingPaper.boosts.sunshine1.value, 2)
|
||||
}))
|
||||
})),
|
||||
reindeer.reindeer.prancer.modifier
|
||||
]) as WithRequired<Modifier, "description" | "revert">;
|
||||
const ashCost = createSequentialModifier(() => [
|
||||
createMultiplicativeModifier(() => ({
|
||||
|
|
|
@ -37,6 +37,7 @@ import oil from "./oil";
|
|||
import paper from "./paper";
|
||||
import workshop from "./workshop";
|
||||
import toys from "./toys";
|
||||
import reindeer from "./reindeer";
|
||||
|
||||
const id = "plastic";
|
||||
const day = 10;
|
||||
|
@ -379,7 +380,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
multiplier: 50,
|
||||
description: "350 toys",
|
||||
enabled: toys.milestones.milestone4.earned
|
||||
}))
|
||||
})),
|
||||
reindeer.reindeer.blitzen.modifier
|
||||
]);
|
||||
const computedPlasticGain = computed(() => plasticGain.apply(0));
|
||||
|
||||
|
|
|
@ -5,16 +5,15 @@
|
|||
import HotkeyVue from "components/Hotkey.vue";
|
||||
import Spacer from "components/layout/Spacer.vue";
|
||||
import Modal from "components/Modal.vue";
|
||||
import { createCollapsibleModifierSections, setUpDailyProgressTracker } from "data/common";
|
||||
import { createCollapsibleModifierSections } from "data/common";
|
||||
import { main } from "data/projEntry";
|
||||
import { createBar, GenericBar } from "features/bars/bar";
|
||||
import { createClickable } from "features/clickables/clickable";
|
||||
import { jsx } from "features/feature";
|
||||
import { createHotkey, GenericHotkey } from "features/hotkey";
|
||||
import MainDisplay from "features/resources/MainDisplay.vue";
|
||||
import { createResource, Resource } from "features/resources/resource";
|
||||
import { globalBus } from "game/events";
|
||||
import { BaseLayer, createLayer } from "game/layers";
|
||||
import { createMultiplicativeModifier } from "game/modifiers";
|
||||
import { persistent } from "game/persistence";
|
||||
import Decimal, { DecimalSource, format, formatWhole } from "util/bignum";
|
||||
import { Direction } from "util/common";
|
||||
|
@ -61,11 +60,23 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
progress: () => Decimal.div(progress.value, computedCooldown.value)
|
||||
}));
|
||||
|
||||
const modifier = createMultiplicativeModifier(() => ({
|
||||
multiplier: effect,
|
||||
description: options.name,
|
||||
enabled: () => Decimal.gt(timesFed.value, 0)
|
||||
}));
|
||||
|
||||
const effect = computed(() =>
|
||||
Decimal.times(options.boostAmount, timesFed.value).add(1)
|
||||
);
|
||||
|
||||
return {
|
||||
...options,
|
||||
hotkey,
|
||||
timesFed,
|
||||
progress,
|
||||
effect,
|
||||
modifier,
|
||||
display: {
|
||||
title: jsx(() => (
|
||||
<h3>
|
||||
|
@ -78,7 +89,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
Each time you feed {options.name} will increase your{" "}
|
||||
{options.boostDescription} by +{format(options.boostAmount)}x
|
||||
<Spacer />
|
||||
Currently {format(Decimal.pow(options.boostAmount, timesFed.value))}x
|
||||
Currently {format(effect.value)}x
|
||||
<br />
|
||||
{render(progressBar)}
|
||||
</>
|
||||
|
@ -100,7 +111,6 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
progress.value = 0;
|
||||
},
|
||||
update(diff: number) {
|
||||
console.log(progress.value, computedCooldown.value, diff);
|
||||
if (Decimal.gte(progress.value, computedCooldown.value)) {
|
||||
progress.value = computedCooldown.value;
|
||||
} else {
|
||||
|
|
|
@ -39,6 +39,7 @@ import paper from "./paper";
|
|||
import workshop from "./workshop";
|
||||
import wrappingPaper from "./wrapping-paper";
|
||||
import toys from "./toys";
|
||||
import reindeer from "./reindeer";
|
||||
const id = "trees";
|
||||
const day = 1;
|
||||
|
||||
|
@ -551,6 +552,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "3000 Toys",
|
||||
enabled: toys.milestones.milestone7.earned
|
||||
})),
|
||||
reindeer.reindeer.dasher.modifier,
|
||||
createExponentialModifier(() => ({
|
||||
exponent: 1.2,
|
||||
description: "100% Foundation Completed",
|
||||
|
|
Loading…
Reference in a new issue