mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-21 08:12:41 +00:00
Merge pull request #12 from someoneWasTaken94/day-20-factory
Day 20 Factory
This commit is contained in:
commit
24c00d7e42
5 changed files with 402 additions and 355 deletions
1
saves/Day 19 Complete.txt
Normal file
1
saves/Day 19 Complete.txt
Normal file
File diff suppressed because one or more lines are too long
|
@ -28,6 +28,7 @@ import { render, renderGrid } from "util/vue";
|
|||
import { computed, ComputedRef, ref, unref } from "vue";
|
||||
import dyes from "./dyes";
|
||||
import elves, { ElfBuyable } from "./elves";
|
||||
import factory from "./factory";
|
||||
import management from "./management";
|
||||
import paper from "./paper";
|
||||
import plastic from "./plastic";
|
||||
|
@ -587,7 +588,36 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
Decimal.add(plasticBoxesBuyable.amount.value, plasticBoxesBuyable.freeLevels.value)
|
||||
)
|
||||
})) as BoxesBuyable;
|
||||
const presentBuyable = createBuyable(() => ({
|
||||
display: {
|
||||
title: "Carry presents in boxes",
|
||||
description: jsx(() => (
|
||||
<>
|
||||
Use boxes to carry presents, boosting its gain
|
||||
<br />
|
||||
<br />
|
||||
<div>Amount: {formatWhole(presentBuyable.amount.value)} boxes</div>
|
||||
</>
|
||||
)),
|
||||
effectDisplay: jsx(() => (
|
||||
<>{format(Decimal.div(presentBuyable.amount.value, 10).add(1).pow(2))}x</>
|
||||
)),
|
||||
showAmount: false
|
||||
},
|
||||
resource: noPersist(boxes),
|
||||
cost() {
|
||||
return Decimal.pow(2, presentBuyable.amount.value).mul(1e87);
|
||||
},
|
||||
inverseCost(x: DecimalSource) {
|
||||
const amt = Decimal.div(x, 1e87).log2();
|
||||
return Decimal.isNaN(amt) ? Decimal.dZero : amt.floor().max(0);
|
||||
},
|
||||
freeLevels: computed(() => 0),
|
||||
totalAmount: computed(() => presentBuyable.amount.value),
|
||||
visibility: () => showIf(factory.upgrades[3][3].bought.value)
|
||||
})) as BoxesBuyable;
|
||||
const buyables2 = { oreBoxesBuyable, metalBoxesBuyable, plasticBoxesBuyable };
|
||||
const buyables3 = { presentBuyable };
|
||||
globalBus.on("update", diff => {
|
||||
if (Decimal.lt(main.day.value, day)) {
|
||||
return;
|
||||
|
@ -677,6 +707,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
row3Upgrades,
|
||||
buyables,
|
||||
buyables2,
|
||||
buyables3,
|
||||
minWidth: 700,
|
||||
generalTabCollapsed,
|
||||
display: jsx(() => (
|
||||
|
@ -703,7 +734,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
Object.values(row3Upgrades)
|
||||
)}
|
||||
<Spacer />
|
||||
{renderGrid(Object.values(buyables), Object.values(buyables2))}
|
||||
{renderGrid(
|
||||
Object.values(buyables),
|
||||
Object.values(buyables2),
|
||||
Object.values(buyables3)
|
||||
)}
|
||||
</>
|
||||
)),
|
||||
minimizedDisplay: jsx(() => (
|
||||
|
|
|
@ -876,7 +876,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
name: "Bell",
|
||||
description:
|
||||
"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",
|
||||
buyable: [...Object.values(boxes.buyables), ...Object.values(boxes.buyables2)],
|
||||
buyable: [
|
||||
...Object.values(boxes.buyables),
|
||||
...Object.values(boxes.buyables2),
|
||||
...Object.values(boxes.buyables3)
|
||||
],
|
||||
cooldownModifier: boxCooldown,
|
||||
visibility: () => showIf(plastic.elfUpgrades.boxElf.bought.value)
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -464,9 +464,9 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
createDay(() => ({
|
||||
day: 20,
|
||||
shouldNotify: false,
|
||||
layer: null, // "presents"
|
||||
layer: "factory", // "presents"
|
||||
symbol: wrappingPaperSymbol,
|
||||
story: "",
|
||||
story: "Santa comes by again, and tells you that just toys may not be appealing enough. He tells you that you should probably wrap them in some wrapping paper so that it's more of a surprise. You try to argue that you've already done too much for him and deserve a day off, but Santa argues that it's for the benefit of everyone and that you'll get your vacation soon. Oh well, time to get back to the factory and expand it even more. Here we go again!",
|
||||
completedStory: "",
|
||||
masteredStory: ""
|
||||
})),
|
||||
|
|
Loading…
Reference in a new issue