mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-21 16:13:57 +00:00
Tweaking
This commit is contained in:
parent
ad00101b8d
commit
8e6ba89928
1 changed files with 114 additions and 121 deletions
|
@ -21,7 +21,7 @@ import oil from "./oil";
|
||||||
import { createCollapsibleMilestones } from "data/common";
|
import { createCollapsibleMilestones } from "data/common";
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import { createUpgrade } from "features/upgrades/upgrade";
|
import { createUpgrade } from "features/upgrades/upgrade";
|
||||||
import { ElfBuyable } from "./elves";
|
import elves, { ElfBuyable } from "./elves";
|
||||||
import management from "./management";
|
import management from "./management";
|
||||||
import paper from "./paper";
|
import paper from "./paper";
|
||||||
import ModalVue from "components/Modal.vue";
|
import ModalVue from "components/Modal.vue";
|
||||||
|
@ -77,6 +77,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
</>
|
</>
|
||||||
))
|
))
|
||||||
},
|
},
|
||||||
|
style: "min-height: 40px",
|
||||||
visibility: () => showIf(Decimal.gt(remainingSize.value, 0)),
|
visibility: () => showIf(Decimal.gt(remainingSize.value, 0)),
|
||||||
canClick: () => Decimal.gte(packingProgress.value, 1),
|
canClick: () => Decimal.gte(packingProgress.value, 1),
|
||||||
onClick() {
|
onClick() {
|
||||||
|
@ -102,11 +103,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
});
|
});
|
||||||
|
|
||||||
const packedPresentsSize = computed(() =>
|
const packedPresentsSize = computed(() =>
|
||||||
Decimal.times(packedPresents.value, 0.008).dividedBy(packingDensity.value)
|
Decimal.div(packedPresents.value, packingDensity.value)
|
||||||
);
|
|
||||||
const currentMaxPresents = computed(() =>
|
|
||||||
Decimal.times(sledSpace, packingDensity.value).div(0.008)
|
|
||||||
);
|
);
|
||||||
|
const currentMaxPresents = computed(() => Decimal.times(sledSpace, packingDensity.value));
|
||||||
const remainingSize = computed(() => Decimal.sub(sledSpace, packedPresentsSize.value));
|
const remainingSize = computed(() => Decimal.sub(sledSpace, packedPresentsSize.value));
|
||||||
|
|
||||||
const elfPackingSpeed = createSequentialModifier(() => [
|
const elfPackingSpeed = createSequentialModifier(() => [
|
||||||
|
@ -163,8 +162,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
}))
|
}))
|
||||||
]);
|
]);
|
||||||
const computedLoaderPackingSpeed = computed(() => loaderPackingSpeed.apply(1000));
|
const computedLoaderPackingSpeed = computed(() => loaderPackingSpeed.apply(1000));
|
||||||
const helpers = {
|
const elf = createBuyable(() => ({
|
||||||
elf: createBuyable(() => ({
|
|
||||||
visibility: () => showIf(Decimal.gte(totalPresents.value, 10)),
|
visibility: () => showIf(Decimal.gte(totalPresents.value, 10)),
|
||||||
cost() {
|
cost() {
|
||||||
let v = this.amount.value;
|
let v = this.amount.value;
|
||||||
|
@ -204,8 +202,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
style: {
|
style: {
|
||||||
width: "200px"
|
width: "200px"
|
||||||
}
|
}
|
||||||
})),
|
})) as ElfBuyable;
|
||||||
loader: createBuyable(() => ({
|
const loader = createBuyable(() => ({
|
||||||
visibility: () => showIf(upgrades.loaderUnlock.bought.value),
|
visibility: () => showIf(upgrades.loaderUnlock.bought.value),
|
||||||
metalCost: computed(() => Decimal.pow(1.2, helpers.loader.amount.value).times(1e70)),
|
metalCost: computed(() => Decimal.pow(1.2, helpers.loader.amount.value).times(1e70)),
|
||||||
oilCost: computed(() => Decimal.pow(1.2, helpers.loader.amount.value).times(1e25)),
|
oilCost: computed(() => Decimal.pow(1.2, helpers.loader.amount.value).times(1e25)),
|
||||||
|
@ -245,10 +243,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
<br />
|
<br />
|
||||||
Currently packing{" "}
|
Currently packing{" "}
|
||||||
{format(
|
{format(
|
||||||
Decimal.times(
|
Decimal.times(helpers.loader.amount.value, computedLoaderPackingSpeed.value)
|
||||||
helpers.loader.amount.value,
|
|
||||||
computedLoaderPackingSpeed.value
|
|
||||||
)
|
|
||||||
)}{" "}
|
)}{" "}
|
||||||
persents per second
|
persents per second
|
||||||
</div>
|
</div>
|
||||||
|
@ -266,27 +261,28 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
style: {
|
style: {
|
||||||
width: "200px"
|
width: "200px"
|
||||||
}
|
}
|
||||||
}))
|
})) as ElfBuyable & {
|
||||||
} as {
|
|
||||||
elf: ElfBuyable;
|
|
||||||
loader: ElfBuyable & {
|
|
||||||
metalCost: ComputedRef<DecimalSource>;
|
metalCost: ComputedRef<DecimalSource>;
|
||||||
oilCost: ComputedRef<DecimalSource>;
|
oilCost: ComputedRef<DecimalSource>;
|
||||||
};
|
};
|
||||||
};
|
const helpers = { elf, loader };
|
||||||
|
|
||||||
const upgrades = {
|
const upgrades = {
|
||||||
packingElf: createUpgrade(() => ({
|
packingElf: createUpgrade(() => ({
|
||||||
display: {
|
display: {
|
||||||
title: "An Elf's Elf",
|
title: "An Elf's Elf",
|
||||||
description: "Hire an Elf to help you hire more Elves."
|
description: "Train an Elf to help you hire more Elves."
|
||||||
},
|
},
|
||||||
cost: 1000,
|
cost: 1000,
|
||||||
resource: totalPresentsResource,
|
resource: totalPresentsResource,
|
||||||
style: {
|
style: {
|
||||||
width: "200px"
|
width: "200px"
|
||||||
},
|
},
|
||||||
visibility: () => showIf(Decimal.gte(helpers.elf.amount.value, 10))
|
visibility: () => showIf(Decimal.gte(helpers.elf.amount.value, 10)),
|
||||||
|
onPurchase() {
|
||||||
|
main.days[3].recentlyUpdated.value = true;
|
||||||
|
elves.elves.packingElf.bought.value = true;
|
||||||
|
}
|
||||||
})),
|
})),
|
||||||
loaderUnlock: createUpgrade(() => ({
|
loaderUnlock: createUpgrade(() => ({
|
||||||
display: {
|
display: {
|
||||||
|
@ -303,10 +299,6 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
}))
|
}))
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetButton = createClickable(() => ({
|
|
||||||
display: jsx(() => <>Oh no! You've run out of room for presents! You'll need to take</>)
|
|
||||||
}));
|
|
||||||
|
|
||||||
const packingMilestones: Record<string, GenericMilestone> = {
|
const packingMilestones: Record<string, GenericMilestone> = {
|
||||||
logBoost: createMilestone(() => ({
|
logBoost: createMilestone(() => ({
|
||||||
display: {
|
display: {
|
||||||
|
@ -382,7 +374,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
ribbonBoost: createMilestone(() => ({
|
ribbonBoost: createMilestone(() => ({
|
||||||
display: {
|
display: {
|
||||||
requirement: `8,230,000 ${packedPresents.displayName}`,
|
requirement: `8,230,000 ${packedPresents.displayName}`,
|
||||||
effectDisplay: "Halve ribbon cost"
|
effectDisplay: "Halve ribbon's dye cost"
|
||||||
},
|
},
|
||||||
shouldEarn: () => Decimal.gte(packedPresents.value, 8230000),
|
shouldEarn: () => Decimal.gte(packedPresents.value, 8230000),
|
||||||
visibility: () => showIf(packingMilestones.oreBoost.earned.value)
|
visibility: () => showIf(packingMilestones.oreBoost.earned.value)
|
||||||
|
@ -499,6 +491,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
packingMilestones,
|
packingMilestones,
|
||||||
collapseMilestones,
|
collapseMilestones,
|
||||||
generalTabCollapsed,
|
generalTabCollapsed,
|
||||||
|
minWidth: 700,
|
||||||
display: jsx(() => (
|
display: jsx(() => (
|
||||||
<>
|
<>
|
||||||
{render(trackerDisplay)}
|
{render(trackerDisplay)}
|
||||||
|
|
Loading…
Reference in a new issue