Add each reindeer's modifier

This commit is contained in:
thepaperpilot 2022-12-22 21:53:51 -06:00
parent 1a857411ee
commit 3d64b03905
10 changed files with 41 additions and 11 deletions

View file

@ -31,6 +31,7 @@ import elves, { ElfBuyable } from "./elves";
import management from "./management"; import management from "./management";
import paper from "./paper"; import paper from "./paper";
import plastic from "./plastic"; import plastic from "./plastic";
import reindeer from "./reindeer";
import trees from "./trees"; import trees from "./trees";
import workshop from "./workshop"; import workshop from "./workshop";
import wrappingPaper from "./wrapping-paper"; import wrappingPaper from "./wrapping-paper";
@ -55,6 +56,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
description: "1000% Foundation Completed", description: "1000% Foundation Completed",
enabled: workshop.milestones.extraExpansionMilestone5.earned enabled: workshop.milestones.extraExpansionMilestone5.earned
})), })),
reindeer.reindeer.vixen.modifier,
createExponentialModifier(() => ({ createExponentialModifier(() => ({
exponent: 1.1, exponent: 1.1,
description: "Bell Level 2", description: "Bell Level 2",

View file

@ -36,6 +36,7 @@ import management from "./management";
import metal from "./metal"; import metal from "./metal";
import paper from "./paper"; import paper from "./paper";
import plastic from "./plastic"; import plastic from "./plastic";
import reindeer from "./reindeer";
import trees from "./trees"; import trees from "./trees";
import workshop from "./workshop"; import workshop from "./workshop";
@ -449,7 +450,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: dyes.boosts.yellow2, multiplier: dyes.boosts.yellow2,
description: "Yellow Dye", description: "Yellow Dye",
enabled: dyes.masteryEffectActive enabled: dyes.masteryEffectActive
})) })),
reindeer.reindeer.cupid.modifier
]); ]);
const computedSheepGain = computed(() => sheepGain.apply(1)); const computedSheepGain = computed(() => sheepGain.apply(1));
const breedingCooldown = createSequentialModifier(() => []); const breedingCooldown = createSequentialModifier(() => []);
@ -494,7 +496,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: dyes.boosts.yellow2, multiplier: dyes.boosts.yellow2,
description: "Yellow Dye", description: "Yellow Dye",
enabled: dyes.masteryEffectActive enabled: dyes.masteryEffectActive
})) })),
reindeer.reindeer.cupid.modifier
]); ]);
const computedShearingAmount = computed(() => shearingAmount.apply(1)); const computedShearingAmount = computed(() => shearingAmount.apply(1));
const shearingCooldown = createSequentialModifier(() => []); const shearingCooldown = createSequentialModifier(() => []);
@ -539,7 +542,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: dyes.boosts.yellow2, multiplier: dyes.boosts.yellow2,
description: "Yellow Dye", description: "Yellow Dye",
enabled: dyes.masteryEffectActive enabled: dyes.masteryEffectActive
})) })),
reindeer.reindeer.cupid.modifier
]); ]);
const computedSpinningAmount = computed(() => spinningAmount.apply(1)); const computedSpinningAmount = computed(() => spinningAmount.apply(1));
const spinningCooldown = createSequentialModifier(() => []); const spinningCooldown = createSequentialModifier(() => []);

View file

@ -40,6 +40,7 @@ import metal from "./metal";
import oil from "./oil"; import oil from "./oil";
import paper from "./paper"; import paper from "./paper";
import plastic from "./plastic"; import plastic from "./plastic";
import reindeer from "./reindeer";
import trees from "./trees"; import trees from "./trees";
import wrappingPaper from "./wrapping-paper"; import wrappingPaper from "./wrapping-paper";
@ -785,6 +786,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
description: "Refined Coal", description: "Refined Coal",
enabled: refinedCoal.bought enabled: refinedCoal.bought
})), })),
reindeer.reindeer.dancer.modifier,
createExponentialModifier(() => ({ createExponentialModifier(() => ({
exponent: 1.05, exponent: 1.05,
description: "Jack Level 2", description: "Jack Level 2",

View file

@ -36,6 +36,7 @@ import oil from "./oil";
import paper from "./paper"; import paper from "./paper";
import trees from "./trees"; import trees from "./trees";
import toys from "./toys"; import toys from "./toys";
import reindeer from "./reindeer";
interface Dye { interface Dye {
name: string; name: string;
@ -200,6 +201,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
enabled: boxes.row3Upgrades.dyeUpgrade.bought enabled: boxes.row3Upgrades.dyeUpgrade.bought
})) }))
); );
modifiers.push(reindeer.reindeer.rudolph.modifier);
return modifiers; return modifiers;
}) as WithRequired<Modifier, "description" | "revert">; }) as WithRequired<Modifier, "description" | "revert">;
const computedToGenerate = computed(() => toGenerate.apply(0)); const computedToGenerate = computed(() => toGenerate.apply(0));

View file

@ -37,6 +37,7 @@ import plastic from "./plastic";
import workshop from "./workshop"; import workshop from "./workshop";
import wrappingPaper from "./wrapping-paper"; import wrappingPaper from "./wrapping-paper";
import toys from "./toys"; import toys from "./toys";
import reindeer from "./reindeer";
const id = "metal"; const id = "metal";
const day = 7; const day = 7;
@ -105,6 +106,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
description: "Twinkle Level 1", description: "Twinkle Level 1",
enabled: management.elfTraining.metalElfTraining.milestones[0].earned enabled: management.elfTraining.metalElfTraining.milestones[0].earned
})), })),
reindeer.reindeer.comet.modifier,
createExponentialModifier(() => ({ createExponentialModifier(() => ({
exponent: 1.1, exponent: 1.1,
description: "Mary Level 2", description: "Mary Level 2",

View file

@ -41,6 +41,7 @@ import workshop from "./workshop";
import { WithRequired } from "util/common"; import { WithRequired } from "util/common";
import { ElfBuyable } from "./elves"; import { ElfBuyable } from "./elves";
import toys from "./toys"; import toys from "./toys";
import reindeer from "./reindeer";
const id = "oil"; const id = "oil";
const day = 9; const day = 9;
@ -957,7 +958,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: 50, multiplier: 50,
description: "350 toys", description: "350 toys",
enabled: toys.milestones.milestone4.earned enabled: toys.milestones.milestone4.earned
})) })),
reindeer.reindeer.donner.modifier
]) as WithRequired<Modifier, "description" | "revert">; ]) as WithRequired<Modifier, "description" | "revert">;
const computedOilSpeed = computed(() => oilSpeed.apply(0)); const computedOilSpeed = computed(() => oilSpeed.apply(0));

View file

@ -27,6 +27,7 @@ import dyes from "./dyes";
import elves, { ElfBuyable } from "./elves"; import elves, { ElfBuyable } from "./elves";
import management from "./management"; import management from "./management";
import plastic from "./plastic"; import plastic from "./plastic";
import reindeer from "./reindeer";
import ribbon from "./ribbon"; import ribbon from "./ribbon";
import trees from "./trees"; import trees from "./trees";
import workshop from "./workshop"; import workshop from "./workshop";
@ -423,7 +424,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: wrappingPaper.boosts.sunshine1, multiplier: wrappingPaper.boosts.sunshine1,
description: "Sunshine Wrapping Paper", description: "Sunshine Wrapping Paper",
enabled: () => Decimal.gte(wrappingPaper.boosts.sunshine1.value, 2) enabled: () => Decimal.gte(wrappingPaper.boosts.sunshine1.value, 2)
})) })),
reindeer.reindeer.prancer.modifier
]) as WithRequired<Modifier, "description" | "revert">; ]) as WithRequired<Modifier, "description" | "revert">;
const ashCost = createSequentialModifier(() => [ const ashCost = createSequentialModifier(() => [
createMultiplicativeModifier(() => ({ createMultiplicativeModifier(() => ({

View file

@ -37,6 +37,7 @@ import oil from "./oil";
import paper from "./paper"; import paper from "./paper";
import workshop from "./workshop"; import workshop from "./workshop";
import toys from "./toys"; import toys from "./toys";
import reindeer from "./reindeer";
const id = "plastic"; const id = "plastic";
const day = 10; const day = 10;
@ -379,7 +380,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
multiplier: 50, multiplier: 50,
description: "350 toys", description: "350 toys",
enabled: toys.milestones.milestone4.earned enabled: toys.milestones.milestone4.earned
})) })),
reindeer.reindeer.blitzen.modifier
]); ]);
const computedPlasticGain = computed(() => plasticGain.apply(0)); const computedPlasticGain = computed(() => plasticGain.apply(0));

View file

@ -5,16 +5,15 @@
import HotkeyVue from "components/Hotkey.vue"; import HotkeyVue from "components/Hotkey.vue";
import Spacer from "components/layout/Spacer.vue"; import Spacer from "components/layout/Spacer.vue";
import Modal from "components/Modal.vue"; import Modal from "components/Modal.vue";
import { createCollapsibleModifierSections, setUpDailyProgressTracker } from "data/common"; import { createCollapsibleModifierSections } from "data/common";
import { main } from "data/projEntry"; import { main } from "data/projEntry";
import { createBar, GenericBar } from "features/bars/bar"; import { createBar, GenericBar } from "features/bars/bar";
import { createClickable } from "features/clickables/clickable"; import { createClickable } from "features/clickables/clickable";
import { jsx } from "features/feature"; import { jsx } from "features/feature";
import { createHotkey, GenericHotkey } from "features/hotkey"; 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 { globalBus } from "game/events";
import { BaseLayer, createLayer } from "game/layers"; import { BaseLayer, createLayer } from "game/layers";
import { createMultiplicativeModifier } from "game/modifiers";
import { persistent } from "game/persistence"; import { persistent } from "game/persistence";
import Decimal, { DecimalSource, format, formatWhole } from "util/bignum"; import Decimal, { DecimalSource, format, formatWhole } from "util/bignum";
import { Direction } from "util/common"; import { Direction } from "util/common";
@ -61,11 +60,23 @@ const layer = createLayer(id, function (this: BaseLayer) {
progress: () => Decimal.div(progress.value, computedCooldown.value) 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 { return {
...options, ...options,
hotkey, hotkey,
timesFed, timesFed,
progress, progress,
effect,
modifier,
display: { display: {
title: jsx(() => ( title: jsx(() => (
<h3> <h3>
@ -78,7 +89,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
Each time you feed {options.name} will increase your{" "} Each time you feed {options.name} will increase your{" "}
{options.boostDescription} by +{format(options.boostAmount)}x {options.boostDescription} by +{format(options.boostAmount)}x
<Spacer /> <Spacer />
Currently {format(Decimal.pow(options.boostAmount, timesFed.value))}x Currently {format(effect.value)}x
<br /> <br />
{render(progressBar)} {render(progressBar)}
</> </>
@ -100,7 +111,6 @@ const layer = createLayer(id, function (this: BaseLayer) {
progress.value = 0; progress.value = 0;
}, },
update(diff: number) { update(diff: number) {
console.log(progress.value, computedCooldown.value, diff);
if (Decimal.gte(progress.value, computedCooldown.value)) { if (Decimal.gte(progress.value, computedCooldown.value)) {
progress.value = computedCooldown.value; progress.value = computedCooldown.value;
} else { } else {

View file

@ -39,6 +39,7 @@ import paper from "./paper";
import workshop from "./workshop"; import workshop from "./workshop";
import wrappingPaper from "./wrapping-paper"; import wrappingPaper from "./wrapping-paper";
import toys from "./toys"; import toys from "./toys";
import reindeer from "./reindeer";
const id = "trees"; const id = "trees";
const day = 1; const day = 1;
@ -551,6 +552,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
description: "3000 Toys", description: "3000 Toys",
enabled: toys.milestones.milestone7.earned enabled: toys.milestones.milestone7.earned
})), })),
reindeer.reindeer.dasher.modifier,
createExponentialModifier(() => ({ createExponentialModifier(() => ({
exponent: 1.2, exponent: 1.2,
description: "100% Foundation Completed", description: "100% Foundation Completed",