import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import Crystal from "shared/items/excavation/Crystal";
import Gold from "shared/items/excavation/Gold";
import Iron from "shared/items/excavation/Iron";

export = new Item(script.Name)
    .setName("Gilded Staircase")
    .setDescription(
        "Provides your droplets a fun ride up to the sky level all confined within this 9x9 space! Also provides a %mul% boost to droplets.",
    )
    .setDifficulty(Difficulty.AutomaticJoyful)
    .setPrice(new CurrencyBundle().set("Skill", 1500000), 1)
    .setRequiredItemAmount(Gold, 30)
    .setRequiredItemAmount(Iron, 50)
    .setRequiredItemAmount(Crystal, 100)
    .setCreator("sanjay2133")
    .addPlaceableArea("BarrenIslands", "SlamoVillage", "SkyPavilion")
    .soldAt(MagicalCraftingTable)
    .persists()

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Skill", 1.5))

    .trait(Conveyor)
    .setSpeed(7)

    .exit();


import Difficulty from "@rbxts/ejt";
import Furnace from "shared/item/traits/Furnace";
import Item from "shared/item/Item";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Formula from "shared/currency/Formula";
import { Server } from "shared/api/APIExpose";
import Class0Shop from "shared/items/0/Class0Shop";

const mul = new CurrencyBundle();

export = new Item(script.Name)
    .setName("Glistening Furnace")
    .setDescription(
        "The far successor to the Energised Furnace. Was that nostalgic? Boosts Skill with Power, maxes out at %cap%.",
    )
    .setDifficulty(Difficulty.AutomaticJoyful)
    .setPrice(new CurrencyBundle().set("Power", 4e21).set("Skill", 6000), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .setFormula(new Formula().div(1e18).add(10).pow(0.12))
    .setFormulaX("power")
    .setFormulaXCap(new CurrencyBundle().set("Power", 1e27))

    .trait(Furnace)
    .applyFormula(
        (v, item) => item.setMul(mul.set("Skill", v)),
        () => Server.Currency.get("Power"),
    )

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Dropper from "shared/item/traits/dropper/Dropper";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Octuple Coin Miner")
    .setDescription("Produces %val% droplets per second. We love Bitcoin.")
    .setDifficulty(Difficulty.AutomaticJoyful)
    .setPrice(new CurrencyBundle().set("Funds", 30e36).set("Skill", 2000).set("Bitcoin", 20000000), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Dropper)
    .setDroplet(Droplet.OctupleCoin)
    .setDropRate(1)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Dropper from "shared/item/traits/dropper/Dropper";
import Item from "shared/item/Item";

export = new Item(script.Name)
    .setName("Studded Dropper")
    .setDescription(
        "Not sure how it's still in good shape, but drops pretty healthy droplets at %val% every 3 seconds.",
    )
    .setDifficulty(Difficulty.AutomaticJoyful)
    .setPrice(new CurrencyBundle().set("Funds", 2e36).set("Skill", 1200).set("Power", 6e12), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .persists("Skillification")

    .trait(Dropper)
    .setDroplet(Droplet.StuddedDroplet)
    .setDropRate(3)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Droplet from "shared/item/Droplet";
import Dropper from "shared/item/traits/dropper/Dropper";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Basic Skill Factory")
    .setDescription("Start producing Skill passively, with a Factory producing %val% droplets every 2 seconds.")
    .setDifficulty(Difficulty.Blessing)
    .setPrice(new CurrencyBundle().set("Power", 1e15).set("Skill", 8), 1)
    .setPrice(new CurrencyBundle().set("Power", 2e15).set("Skill", 10), 2)
    .setCreator("CoPKaDT")
    .addPlaceableArea("SlamoVillage")
    .soldAt(Class0Shop)

    .trait(Dropper)
    .setDroplet(Droplet.SkillDroplet)
    .setDropRate(0.5)

    .trait(Conveyor)
    .setSpeed(4)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Blessed Conveyor")
    .setDescription(
        "A conveyor you can place in Barren Islands and Slamo Village! Droplets gain %mul% value as a bonus for touching the center.",
    )
    .setDifficulty(Difficulty.Blessing)
    .setPrice(new CurrencyBundle().set("Bitcoin", 1000), 1, 5)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Funds", 1.04))

    .trait(Conveyor)
    .setSpeed(4)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Dropper from "shared/item/traits/dropper/Dropper";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Double Coin Miner")
    .setDescription(
        "Produces %val% droplets per second. It's getting less and less desirable to skillificate now, huh?",
    )
    .setDifficulty(Difficulty.Blessing)
    .setPrice(new CurrencyBundle().set("Funds", 20e27).set("Skill", 5), 1)

    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Dropper)
    .setDroplet(Droplet.DoubleCoin)
    .setDropRate(1)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Damager from "shared/item/traits/upgrader/Damager";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Heartful Spray")
    .setDescription("Made with love <3 Restores %hp_add% to droplets.")
    .setDifficulty(Difficulty.Blessing)
    .setPrice(new CurrencyBundle().set("Skill", 5).set("Power", 5e15).set("Funds", 10e27), 1)
    .setPrice(new CurrencyBundle().set("Skill", 8).set("Power", 8e15).set("Funds", 40e27), 2)
    .setPrice(new CurrencyBundle().set("Skill", 11).set("Power", 20e15).set("Funds", 90e27), 3)
    .setPrice(new CurrencyBundle().set("Skill", 18).set("Power", 60e15).set("Funds", 250e27), 4)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Upgrader)

    .trait(Damager)
    .setDamage(-20)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import Gold from "shared/items/excavation/Gold";
import WhiteGem from "shared/items/excavation/WhiteGem";
import WIPUpgrader from "shared/items/negative/felixthea/WIPUpgrader";

export = new Item(script.Name)
    .setName("Heavy Foundry")
    .setDescription(
        "A large furnace that's less of a furnace and more like an oven. Has a %mul% boost, but reduces 0.1 for each blocked vent.",
    )
    .setDifficulty(Difficulty.Blessing)
    .setRequiredItemAmount(WIPUpgrader, 1)
    .setRequiredItemAmount(WhiteGem, 20)
    .setRequiredItemAmount(Gold, 1)
    .setPrice(new CurrencyBundle().set("Funds", 10e27), 1)
    .placeableEverywhere()
    .soldAt(MagicalCraftingTable)
    .setCreator("simple13579")
    .persists()

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Funds", 1.2))

    .trait(Conveyor)
    .setSpeed(3)
    .exit()

    .onLoad((model, item) => {
        const upgrader = item.trait(Upgrader);

        const vents = new Array<BasePart>();
        for (const vent of model.GetChildren()) {
            if (vent.Name !== "VentHitbox" || !vent.IsA("BasePart")) continue;
            vent.CanTouch = true;
            vent.Touched.Connect(() => {});
            vents.push(vent);
        }
        item.repeat(
            model,
            () => {
                let touchingCount = 0;
                for (const vent of vents) {
                    const touchingParts = vent.GetTouchingParts();
                    for (const touchingPart of touchingParts)
                        if (touchingPart.Name === "Hitbox") {
                            ++touchingCount;
                            continue;
                        }
                }
                upgrader.setMul(new CurrencyBundle().set("Funds", 1.2 - touchingCount * 0.1));
            },
            1,
        );
    });


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Generator from "shared/item/traits/generator/Generator";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import WhiteGem from "shared/items/excavation/WhiteGem";

export = new Item(script.Name)
    .setName("Lost Heaven")
    .setDescription(
        "Everything around you unbelievably serene, an elysian realm the only thing you imagine in this world. Produces %gain%.",
    )
    .setDifficulty(Difficulty.Blessing)
    .setPrice(new CurrencyBundle().set("Skill", 40).set("Dark Matter", 200000))
    .setRequiredItemAmount(WhiteGem, 100)
    .setCreator("CoPKaDT")
    .addPlaceableArea("SlamoVillage")
    .soldAt(MagicalCraftingTable)
    .persists()

    .trait(Generator)
    .setPassiveGain(new CurrencyBundle().set("Dark Matter", 4510000))

    .exit();


import Difficulty from "@rbxts/ejt";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Item from "shared/item/Item";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Raised Funnel")
    .setDescription("Funnels droplets into the center of a 3x3 grid area. Maybe you could find a use for this somehow?")
    .setDifficulty(Difficulty.Blessing)
    .setPrice(new CurrencyBundle().set("Skill", 1), 1, 5)
    .setPrice(new CurrencyBundle().set("Skill", 2), 6, 10)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Conveyor)
    .setSpeed(4)

    .exit();


import Difficulty from "@rbxts/ejt";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Skill Easer")
    .setDescription("%add% value to droplets. You need to ease up a little. Everything will get faster...")
    .setDifficulty(Difficulty.Blessing)
    .setPrice(new CurrencyBundle().set("Skill", 16), 1)
    .setCreator("goog_als")
    .addPlaceableArea("SlamoVillage")
    .soldAt(Class0Shop)

    .trait(Upgrader)
    .setAdd(new CurrencyBundle().set("Skill", 0.02))

    .trait(Conveyor)
    .setSpeed(5)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import InclinedRefiner from "shared/items/0/win/InclinedRefiner";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("The Amplifier")
    .setDescription(
        "%mul% boost to droplets. This is technically a trade-off for the additive Funds boost the Inclined Refiner gives.",
    )
    .setDifficulty(Difficulty.Blessing)
    .setPrice(new CurrencyBundle().set("Skill", 30), 1)
    .setRequiredItemAmount(InclinedRefiner, 1)
    .setCreator("butterman_toast")
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Bitcoin", 2).set("Power", 1.25))

    .trait(Conveyor)
    .setSpeed(5)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Damager from "shared/item/traits/upgrader/Damager";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Arbiters' Killbricks")
    .setDescription(
        "The ultimate balance, with 4 killbrick upgraders boosting droplets by %mul% but dealing %hp_add% each.",
    )
    .setDifficulty(Difficulty.DoNothing)
    .setPrice(new CurrencyBundle().set("Funds", 24.5e24).set("Bitcoin", 90), 1)
    .setPrice(new CurrencyBundle().set("Funds", 42.5e24).set("Bitcoin", 180), 2)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Bitcoin", 1.15).set("Power", 1.15))

    .trait(Damager)
    .setDamage(10)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Formula from "shared/currency/Formula";
import { Server } from "shared/api/APIExpose";
import Class0Shop from "shared/items/0/Class0Shop";

const mul = new CurrencyBundle().set("Bitcoin", 0);

export = new Item(script.Name)
    .setName("Coin Refiner")
    .setDescription("Boosts Bitcoin gain, with that multiplier increasing by Bitcoin.")
    .setDifficulty(Difficulty.DoNothing)
    .setPrice(new CurrencyBundle().set("Funds", 70e24).set("Bitcoin", 360), 1)
    .setPrice(new CurrencyBundle().set("Funds", 620e24).set("Bitcoin", 1200), 2)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .setCreator("CoPKaDT")
    .persists("Skillification")

    .setFormula(new Formula().add(1).pow(0.1).add(1))
    .setFormulaX("bitcoin")

    .trait(Upgrader)
    .applyFormula(
        (v, upgrader) => upgrader.setMul(mul.set("Bitcoin", v)),
        () => Server.Currency.get("Bitcoin"),
    )

    .exit();


import { getAllInstanceInfo } from "@antivivi/vrldk";
import Difficulty from "@rbxts/ejt";
import { Workspace } from "@rbxts/services";
import { Server } from "shared/api/APIExpose";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import { CURRENCY_CATEGORIES, CURRENCY_DETAILS } from "shared/currency/CurrencyDetails";
import { getAllPlayerCharacters } from "shared/hamster/getPlayerCharacter";
import Item from "shared/item/Item";
import Generator from "shared/item/traits/generator/Generator";
import Class0Shop from "shared/items/0/Class0Shop";

const rng = new Random();

export = new Item(script.Name)
    .setName("Division By Two")
    .setDescription(
        "Stand on the button and do absolutely nothing. Grants a bit of something per second while idle on the button.",
    )
    .setDifficulty(Difficulty.DoNothing)
    .setPrice(new CurrencyBundle().set("Bitcoin", 1000), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Generator)
    .setPassiveGain(new CurrencyBundle())
    .beforeGain((_, generator) => {
        const all = Server.Currency.getOfflineRevenue();
        const main = new CurrencyBundle();
        for (const [currency, amount] of all.amountPerCurrency) {
            if (CURRENCY_DETAILS[currency].page === CURRENCY_CATEGORIES.Main) {
                main.set(currency, amount);
            }
        }

        const one = new CurrencyBundle();
        const index = rng.NextInteger(0, main.amountPerCurrency.size() - 1);
        let i = 0;
        for (const [currency, amount] of main.amountPerCurrency) {
            if (i === index) {
                one.set(currency, amount.div(2));
                break;
            }
            i++;
        }
        generator.setPassiveGain(one);
    })
    .exit()

    .onLoad((model, item) => {
        const modelInfo = getAllInstanceInfo(model);
        const button = model.WaitForChild("Button") as BasePart;
        const cframe = button.CFrame.add(new Vector3(0, 4.5, 0));
        const size = button.Size.add(new Vector3(0, 9, 0));
        const overlapParams = new OverlapParams();
        overlapParams.FilterType = Enum.RaycastFilterType.Include;

        const characterStillness = new Map<Model, { position: Vector3; timestamp: number }>();
        const REQUIRED_STILL_TIME = 2; // seconds
        const MOVEMENT_THRESHOLD = 0.5; // studs

        modelInfo.maintained = false;
        item.repeat(
            model,
            () => {
                const characters = new Array<Model>();
                const filterDescendantsInstances = new Array<Instance>();
                for (const character of getAllPlayerCharacters()) {
                    filterDescendantsInstances.push(character);
                    characters.push(character);
                }

                overlapParams.FilterDescendantsInstances = filterDescendantsInstances;
                const parts = Workspace.GetPartBoundsInBox(cframe, size, overlapParams);

                let anyPlayerStillEnough = false;
                const currentTime = os.clock();

                // Check each player on the button
                for (const character of characters) {
                    const humanoidRootPart = character.FindFirstChild("HumanoidRootPart") as BasePart | undefined;

                    if (humanoidRootPart && parts.includes(humanoidRootPart)) {
                        const currentPosition = humanoidRootPart.Position;
                        const stillnessData = characterStillness.get(character);

                        if (stillnessData) {
                            const distance = currentPosition.sub(stillnessData.position).Magnitude;
                            if (distance < MOVEMENT_THRESHOLD) {
                                // Player is still, check if enough time has passed
                                if (currentTime - stillnessData.timestamp >= REQUIRED_STILL_TIME) {
                                    anyPlayerStillEnough = true;
                                }
                            } else {
                                // Player moved, reset their timer
                                characterStillness.set(character, {
                                    position: currentPosition,
                                    timestamp: currentTime,
                                });
                            }
                        } else {
                            // First time seeing this character on the button
                            characterStillness.set(character, { position: currentPosition, timestamp: currentTime });
                        }
                    } else {
                        // Character is not on the button, remove from tracking
                        characterStillness.delete(character);
                    }
                }

                modelInfo.maintained = anyPlayerStillEnough;
            },
            0.5,
        );
    });


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import ExcavationStone from "shared/items/excavation/ExcavationStone";
import WhiteGem from "shared/items/excavation/WhiteGem";

export = new Item(script.Name)
    .setName("Sorting Conveyor")
    .setDescription("Sorts stuff... I don't know how this works either.")
    .setDifficulty(Difficulty.DoNothing)
    .setPrice(new CurrencyBundle().set("Funds", 8.2e27), 1)
    .setRequiredItemAmount(WhiteGem, 40)
    .setRequiredItemAmount(ExcavationStone, 20)
    .setCreator("CoPKaDT")
    .addPlaceableArea("BarrenIslands")
    .soldAt(MagicalCraftingTable)
    .persists()

    .trait(Conveyor)
    .setSpeed(5)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Charger from "shared/item/traits/generator/Charger";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Tesseract Booster")
    .setDescription("Does what it says, boosting Dark Matter gain of tesseracts in a 12 stud radius by x2.")
    .setDifficulty(Difficulty.DoNothing)
    .setPrice(new CurrencyBundle().set("Bitcoin", 2600), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")
    .setCreator("emoronq2k")

    .trait(Charger)
    .setRadius(12)
    .setMul(new CurrencyBundle().set("Dark Matter", 2))

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import UpgradeBoard from "shared/item/traits/UpgradeBoard";
import NamedUpgrades from "shared/namedupgrade/NamedUpgrades";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Upgrade Board II")
    .setDescription("You need more money. Use this upgrade board to help you.")
    .setDifficulty(Difficulty.DoNothing)
    .setPrice(new CurrencyBundle().set("Bitcoin", 30), 1)
    .addPlaceableArea("SlamoVillage")
    .soldAt(Class0Shop)

    .trait(UpgradeBoard)
    .addUpgrade(NamedUpgrades.CryptographicFunds)
    .addUpgrade(NamedUpgrades.CryptographicPower)
    .addUpgrade(NamedUpgrades.SkilledMining)
    .addUpgrade(NamedUpgrades.LandReclaimationII)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Abnormal Reactor")
    .setDescription(
        `This reactor has two entrances, each giving a %mul% boost.
It is said that this machine was made solely to piss off its users... but anything for that sweet, sweet Skill, right?`,
    )
    .setDifficulty(Difficulty.Frivolous)
    .setPrice(new CurrencyBundle().set("Skill", 370000), 1)
    .addPlaceableArea("SlamoVillage")
    .soldAt(Class0Shop)
    .setCreator("butterman_toast")

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Skill", 2.6))

    .trait(Conveyor)
    .setSpeed(5)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import LaserFan from "shared/item/traits/other/LaserFan";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Droplet Turbine")
    .setDescription(`A small item attachable next to conveyors that pushes droplets in its direction.`)
    .setDifficulty(Difficulty.Frivolous)
    .setPrice(new CurrencyBundle().set("Power", 20e21), 1, 5)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .setCreator("superGirlygamer8o")

    .trait(Conveyor)
    .setSpeed(20)
    .exit()

    .trait(LaserFan)
    .setSpeed(80)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Ablaze from "shared/item/traits/status/Ablaze";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Flamethrower Upgrader")
    .setDescription(
        "Applies %ablaze% to droplets hit by the flamethrower, providing a flat x2 boost to ALL currencies. Deals damage over time.",
    )
    .setDifficulty(Difficulty.Frivolous)
    .setPrice(new CurrencyBundle().set("Purifier Clicks", 1e24), 1)
    .setPrice(new CurrencyBundle().set("Purifier Clicks", 1e27), 2)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .trait(Upgrader)
    .trait(Ablaze)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Ablaze from "shared/item/traits/status/Ablaze";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import Quartz from "shared/items/excavation/Quartz";
import WhiteGem from "shared/items/excavation/WhiteGem";

export = new Item(script.Name)
    .setName("Flaming Conveyor")
    .setDescription(
        "A conveyor that burns with a fiery intensity. Applies %add% to %ablaze% droplets that pass over it.",
    )
    .setPrice(new CurrencyBundle().set("Purifier Clicks", 1000000).set("Dark Matter", 10000))
    .setRequiredItemAmount(WhiteGem, 5)
    .setRequiredItemAmount(Quartz, 1)
    .setDifficulty(Difficulty.Frivolous)
    .setCreator("GIDS214")
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(MagicalCraftingTable)
    .persists()

    .trait(Conveyor)
    .setSpeed(4)

    .trait(Upgrader)
    .setAdd(new CurrencyBundle().set("Purifier Clicks", 2).set("Dark Matter", 0.05))
    .setRequirement((dropletInfo) => dropletInfo.upgrades?.has("Ablaze") ?? false)
    .setSky(true)

    .trait(Ablaze)
    .setActive(false)

    .exit();


import { getAllInstanceInfo } from "@antivivi/vrldk";
import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Item from "shared/item/Item";
import HandCrank from "shared/item/traits/action/HandCrank";
import Boostable from "shared/item/traits/boost/Boostable";
import Dropper from "shared/item/traits/dropper/Dropper";
import Class0Shop from "shared/items/0/Class0Shop";

const key = "HandCrank";

export = new Item(script.Name)
    .setName("Hand Crank Coin Miner")
    .setDescription("Click the hand crank to triple drop rate. Produces %val% droplets per second in its normal state.")
    .setDifficulty(Difficulty.Frivolous)
    .setPrice(new CurrencyBundle().set("Bitcoin", 1e6), 1)
    .setPrice(new CurrencyBundle().set("Bitcoin", 5e6), 2)
    .setPrice(new CurrencyBundle().set("Bitcoin", 25e6), 3)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)

    .onLoad((model) => {
        const drop = model.WaitForChild("Drop");
        const instanceInfo = getAllInstanceInfo(drop);
        Boostable.addBoost(instanceInfo, key, { ignoresLimitations: false });
    })

    .trait(Dropper)
    .setDroplet(Droplet.HandCrankedCoin)
    .setDropRate(1)
    .exit()

    .trait(HandCrank)
    .setCallback((t, model) => {
        const drop = model.WaitForChild("Drop");
        const dropInfo = getAllInstanceInfo(drop);

        const modifier = dropInfo.boosts?.get(key);
        if (modifier === undefined) return;

        modifier.dropRateMul = t < 5 ? 3 : 1;
    })

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import OverheadUpgrader from "shared/items/0/win/OverheadUpgrader";
import CorruptedGrass from "shared/items/0/happylike/CorruptedGrass";

export = new Item(script.Name)
    .setName("OverOverhead Upgrader")
    .setDescription(
        "A sequel to the Overhead Upgrader. Stacks on top of the original for even more value! %mul% value to droplets.",
    )
    .setDifficulty(Difficulty.Frivolous)
    .setPrice(new CurrencyBundle().set("Skill", 1000), 1)
    .setRequiredItemAmount(OverheadUpgrader, 2)
    .setRequiredItemAmount(CorruptedGrass, 1)
    .setCreator("welshredbird")
    .addPlaceableArea("SlamoVillage")
    .soldAt(MagicalCraftingTable)
    .persists()

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Skill", 9))

    .trait(Conveyor)
    .setSpeed(7)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Charger from "shared/item/traits/generator/Charger";
import MiniDropletSlayer from "shared/items/negative/relax/MiniDropletSlayer";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Radio Noob")
    .setDescription(
        "This noob chose to take command over other noobs, expertly practicing the fine craft that is proper spelling and grammar. Buffs nearby Noob Clickers by x200K, Noob Droplet Slayers are x2 faster and can hit twice.",
    )
    .setDifficulty(Difficulty.Frivolous)
    .setPrice(new CurrencyBundle().set("Funds", 50e39), 1)
    .setRequiredItemAmount(MiniDropletSlayer, 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)
    .setCreator("simple13579")

    .trait(Charger)
    .setRadius(12)
    .addToWhitelist("NoobClicker")
    .addToWhitelist("DropletSlayerMkII")
    .addToWhitelist("MiniDropletSlayer")
    .setBoost({
        clickValueMul: 200000,
        cooldownMul: 0.5,
    })

    .exit();


import Difficulty from "@rbxts/ejt";
import { packet } from "@rbxts/fletchette";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import perItemPacket from "shared/item/utils/perItemPacket";
import Class0Shop from "shared/items/0/Class0Shop";

const active = perItemPacket(packet<(placementId: string, on: boolean) => void>());

export = new Item(script.Name)
    .setName("Timewall")
    .setDescription("It stands in your way, merciless and unfeeling. %mul%, but is very, very, excruciatingly, slow.")
    .setDifficulty(Difficulty.Frivolous)
    .setPrice(new CurrencyBundle().set("Funds", 10e39).set("Bitcoin", 1e9).set("Dark Matter", 1e21), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .setCreator("simple13579")

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Funds", 3.5).set("Power", 3.5))

    .trait(Conveyor)
    .setSpeed(0.5)
    .exit()

    .onLoad((model, item) => {
        const laser = model.WaitForChild("Laser") as BasePart;
        let on = false;
        let count = 0;
        item.repeat(
            model,
            () => {
                if (on === false && ++count >= 2) {
                    count = 0;
                    on = true;
                } else {
                    on = false;
                }
                active.toAllClients(model, on);
                laser.CanCollide = on;
            },
            2,
        );
    })
    .onClientLoad((model) => {
        const laser = model.WaitForChild("Laser") as BasePart;
        active.fromServer(model, (on) => {
            laser.Transparency = on ? 0 : 0.7;
            laser.CanCollide = on;
        });
    });


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import EnchantedGrass from "shared/items/negative/tlg/EnchantedGrass";

export = new Item(script.Name)
    .setName("Corrupted Grass")
    .setDescription(
        "Corruption in the shape of grass. What in the world happened to it? Boosts Funds by %mul%, but doesn't stack with more of the same item.",
    )
    .setDifficulty(Difficulty.Happylike)
    .setPrice(new CurrencyBundle().set("Funds", 100000))
    .setRequiredItemAmount(EnchantedGrass, 25)
    .addPlaceableArea("BarrenIslands")
    .persists()

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Funds", 1.05))
    .stacks(false)

    .exit();


import Difficulty from "@rbxts/ejt";
import { Server } from "shared/api/APIExpose";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Dropper from "shared/item/traits/dropper/Dropper";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import Crystal from "shared/items/excavation/Crystal";
import WhiteGem from "shared/items/excavation/WhiteGem";

export = new Item(script.Name)
    .setName("Crystal Drill")
    .setDescription(
        "Mines some good Power with %val% droplets every second. Also has a small chance of dropping Crystal per droplet produced...",
    )
    .setDifficulty(Difficulty.Happylike)
    .setPrice(new CurrencyBundle().set("Funds", 56.5e30), 1)
    .setRequiredItemAmount(WhiteGem, 70)
    .setRequiredItemAmount(Crystal, 25)
    .setCreator("CoPKaDT")
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(MagicalCraftingTable)
    .persists()

    .trait(Dropper)
    .setDroplet(Droplet.CrystalDroplet)
    .setDropRate(1)
    .onDropletProduced(() => {
        const questMetadata = Server.empireData.questMetadata;
        let prevCount = (questMetadata.get("CrystalDrillCount") as number) ?? 0;
        prevCount += 1;
        if (math.random(1, 60 * math.pow(prevCount, 2)) === 1) {
            Server.Quest.giveQuestItem(Crystal, 1);
            questMetadata.set("CrystalDrillCount", prevCount);
        }
    })

    .trait(Conveyor)
    .setSpeed(6)

    .exit();


import Difficulty from "@rbxts/ejt";
import Furnace from "shared/item/traits/Furnace";
import Item from "shared/item/Item";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Endless Void")
    .setDescription(
        "Looking into the depths of that seemingly eternal space brings you a massive headache, but who cares? %mul% droplet value makes it all worth it.",
    )
    .setDifficulty(Difficulty.Happylike)
    .setPrice(new CurrencyBundle().set("Funds", 400e30).set("Power", 400e15), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")
    .setCreator("CoPKaDT")

    .trait(Furnace)
    .setMul(new CurrencyBundle().set("Funds", 1000).set("Skill", 1.5))

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Dropper from "shared/item/traits/dropper/Dropper";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("'Happy' Dropper")
    .setDescription(
        "Happy, fun times! Yay! Produces %val% droplets every 4 seconds!! Yes, Skill! What a great boost! You'll agree, right? RIGHT?",
    )
    .setDifficulty(Difficulty.Happylike)
    .setPrice(new CurrencyBundle().set("Funds", 600e30).set("Power", 1e18).set("Skill", 20), 1)
    .setPrice(new CurrencyBundle().set("Funds", 1.2e33).set("Power", 2e18).set("Skill", 40), 2)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Dropper)
    .setDroplet(Droplet.HappyDroplet)
    .setDropRate(0.25)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Generator from "shared/item/traits/generator/Generator";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("'Happy' Tesseract")
    .setDescription(
        "That smile... It has spiralled out of control. It's menacing. Trying to find any opening to catch you. Produces %gain%.",
    )
    .setDifficulty(Difficulty.Happylike)
    .setPrice(new CurrencyBundle().set("Funds", 1e33).set("Skill", 90), 1)
    .addPlaceableArea("SlamoVillage")
    .soldAt(Class0Shop)

    .trait(Generator)
    .setPassiveGain(new CurrencyBundle().set("Dark Matter", 11.4e9))

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Damager from "shared/item/traits/upgrader/Damager";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Injuring Upgrader")
    .setDescription(
        "I'm telling you, that smile is deceiving. It is out to kill you. Does %hp_add% to droplets, but gives a %mul% boost.",
    )
    .setDifficulty(Difficulty.Happylike)
    .setPrice(new CurrencyBundle().set("Funds", 2.5e33), 1)
    .setPrice(new CurrencyBundle().set("Funds", 6.5e33), 2)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Funds", 2.25).set("Skill", 2.25))

    .trait(Damager)
    .setDamage(70)

    .trait(Conveyor)
    .setSpeed(5)

    .exit();


import Difficulty from "@rbxts/ejt";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Formula from "shared/currency/Formula";
import { Server } from "shared/api/APIExpose";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Slamo Upgrader")
    .setDescription(
        "This slamo wants to be a manumatic purifier, but unfortunately it couldn't. It settled to boost Funds and Bitcoin by... Purifier Clicks?",
    )
    .setDifficulty(Difficulty.Happylike)
    .setPrice(new CurrencyBundle().set("Funds", 100e30), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .setCreator("CoPKaDT")
    .persists("Skillification")

    .setFormula(new Formula().div(1000000).add(10).log(7).pow(2).div(4).add(1))
    .setFormulaX("pclicks")

    .trait(Upgrader)
    .applyFormula(
        (v, item) => item.setMul(new CurrencyBundle().set("Funds", v).set("Bitcoin", v)),
        () => Server.Currency.get("Purifier Clicks"),
    )

    .trait(Conveyor)
    .setSpeed(8)

    .exit();


import Difficulty from "@rbxts/ejt";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Void Sky Upgrader")
    .setDescription(
        "Reaching the skies? That was only a dream until now. %mul% droplet value for a cherry on top. You can drop upgraded droplets into cauldrons now, but at a reduced value (1/250).",
    )
    .setDifficulty(Difficulty.Happylike)
    .setPrice(new CurrencyBundle().set("Funds", 35e30), 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)
    .setCreator("CoPKaDT")

    .trait(Upgrader)
    .setSky(true)
    .setMul(new CurrencyBundle().set("Funds", 1.75))

    .trait(Conveyor)
    .setSpeed(8)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Advanced Blank Essence")
    .setDescription(
        "Another. Each purchase of this item will raise the price of the next by 1000x Funds and 100x Power.",
    )
    .setDifficulty(Difficulty.Ifinitude)
    .setPrice(new CurrencyBundle().set("Funds", 1e30).set("Power", 100e15), 1)
    .setPrice(new CurrencyBundle().set("Funds", 1e33).set("Power", 10e18), 2)
    .setPrice(new CurrencyBundle().set("Funds", 1e36).set("Power", 1e21), 3)
    .setPrice(new CurrencyBundle().set("Funds", 1e39).set("Power", 100e21), 4)
    .setPrice(new CurrencyBundle().set("Funds", 1e42).set("Power", 10e24), 5)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop);


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import AdvancedBlankEssence from "shared/items/0/ifinitude/AdvancedBlankEssence";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Formula from "shared/currency/Formula";
import { Server } from "shared/api/APIExpose";
import Class0Shop from "shared/items/0/Class0Shop";

const mul = new CurrencyBundle();

export = new Item(script.Name)
    .setName("Chromatic Maze")
    .setDescription(
        "Boosts Funds and Power gain by Bitcoin! Pass droplets through each ring with an elevated conveyor to compound the boost. Though, this is easier said than done...",
    )
    .setDifficulty(Difficulty.Ifinitude)
    .setPrice(new CurrencyBundle().set("Bitcoin", 1e6).set("Skill", 15), 1)
    .setRequiredItemAmount(AdvancedBlankEssence, 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .setFormula(new Formula().pow(0.01))
    .setFormulaX("bitcoin")

    .trait(Upgrader)
    .applyFormula(
        (v, item) => item.setMul(mul.set("Funds", v).set("Power", v)),
        () => Server.Currency.get("Bitcoin"),
    )

    .exit();


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import AdvancedBlankEssence from "shared/items/0/ifinitude/AdvancedBlankEssence";
import AdvancedRefiner from "shared/items/negative/a/AdvancedRefiner";
import EffervescentDropletSpray from "shared/items/negative/exist/EffervescentDropletSpray";
import PurifiersRefiner from "shared/items/negative/exist/PurifiersRefiner";
import ShockingRefiner from "shared/items/negative/exist/ShockingRefiner";
import PrecisionRefiner from "shared/items/negative/relax/PrecisionRefiner";
import LaserTunnel from "shared/items/negative/skip/LaserTunnel";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Coalescent Refiner")
    .setDescription(
        "Raw stats. Combine your refiners into an extremely powerful refiner that boosts droplet value by %mul%.",
    )
    .setDifficulty(Difficulty.Ifinitude)
    .setPrice(new CurrencyBundle().set("Funds", 2e30), 1)
    .setRequiredItemAmount(AdvancedBlankEssence, 1)
    .setRequiredItemAmount(EffervescentDropletSpray, 1)
    .setRequiredItemAmount(ShockingRefiner, 2)
    .setRequiredItemAmount(AdvancedRefiner, 2)
    .setRequiredItemAmount(PurifiersRefiner, 1)
    .setRequiredItemAmount(PrecisionRefiner, 2)
    .setRequiredItemAmount(LaserTunnel, 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Funds", 2000000).set("Power", 3000))

    .exit();


import Difficulty from "@rbxts/ejt";
import { OnoeNum } from "@rbxts/serikanum";
import Generator from "shared/item/traits/generator/Generator";
import Item from "shared/item/Item";
import AdvancedBlankEssence from "shared/items/0/ifinitude/AdvancedBlankEssence";
import PassiveBonanza from "shared/items/negative/instantwin/PassiveBonanza";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Formula from "shared/currency/Formula";
import { Server } from "shared/api/APIExpose";
import Class0Shop from "shared/items/0/Class0Shop";

const amt = new OnoeNum(4e9);
const base = new CurrencyBundle().set("Power", amt);

export = new Item(script.Name)
    .setName("Corrupted Bonanza")
    .setDescription(
        "Extracting a descending shadow, you find yourself trembling in quiet fear. Produces %gain%, this amount increasing with Skill. Caps at %cap%.",
    )
    .setDifficulty(Difficulty.Ifinitude)
    .setRequiredItemAmount(AdvancedBlankEssence, 1)
    .setRequiredItemAmount(PassiveBonanza, 1)
    .setPrice(new CurrencyBundle().set("Skill", 30), 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .setFormula(new Formula().pow(0.75).div(3).add(1))
    .setFormulaX("skill")
    .setFormulaXCap(new CurrencyBundle().set("Skill", 1e6))

    .trait(Generator)
    .setPassiveGain(base)
    .applyFormula(
        (v, item) => item.setPassiveGain(base.set("Power", amt.mul(v))),
        () => Server.Currency.get("Skill"),
    )

    .exit();


import Difficulty from "@rbxts/ejt";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Furnace from "shared/item/traits/Furnace";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import AdvancedBlankEssence from "shared/items/0/ifinitude/AdvancedBlankEssence";
import DualDropper from "shared/items/negative/a/DualDropper";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Class0Shop from "shared/items/0/Class0Shop";

const mul = new CurrencyBundle().set("Bitcoin", 4);

export = new Item(script.Name)
    .setName("Diversity Furnace")
    .setDescription(
        `This amalgamation of an item is at least better than that ${DualDropper.name}... %mul% value to droplets for both the furnace and upgrader.`,
    )
    .setDifficulty(Difficulty.Ifinitude)
    .setRequiredItemAmount(AdvancedBlankEssence, 1)
    .setPrice(new CurrencyBundle().set("Power", 500e15).set("Skill", 20), 1)
    .setCreator("CoPKaDT")
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .trait(Furnace)
    .setMul(mul)

    .trait(Upgrader)
    .setMul(mul)

    .trait(Conveyor)
    .setSpeed(4)

    .exit();


import Difficulty from "@rbxts/ejt";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import AdvancedBlankEssence from "shared/items/0/ifinitude/AdvancedBlankEssence";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Mechanical Enhancer")
    .setDescription(
        "Built by a Chief Slamo with the assistance of a grey-and-yellow traveller; The result is a highly unstable machine of.. varying usefulness. %pow% gain to droplets, your very first exponential upgrader. When using this, you will need to sacrifice %drain%, however.",
    )
    .setDifficulty(Difficulty.Ifinitude)
    .setPrice(new CurrencyBundle().set("Funds", 5e33).set("Skill", 50), 1)
    .setRequiredItemAmount(AdvancedBlankEssence, 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .setDrain(new CurrencyBundle().set("Skill", 0.5))

    .trait(Upgrader)
    .setPow(new CurrencyBundle().set("Funds", 1.02))

    .trait(Conveyor)
    .setSpeed(4)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Furnace from "shared/item/traits/Furnace";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import Crystal from "shared/items/excavation/Crystal";

export = new Item(script.Name)
    .setName("Frost Snow")
    .setDescription("A perfect blue pit. %mul% droplet value.")
    .setDifficulty(Difficulty.JustAir)
    .setPrice(new CurrencyBundle().set("Funds", 1e30), 1)
    .setRequiredItemAmount(Crystal, 35)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(MagicalCraftingTable)
    .setCreator("CoPKaDT")

    .trait(Furnace)
    .setMul(new CurrencyBundle().set("Bitcoin", 5))

    .exit();


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";
import Clicker from "shared/item/traits/action/Clicker";
import SlamoClicker from "shared/items/0/millisecondless/SlamoClicker";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Hydrogen Bomb Prototype Slamo")
    .setDescription(
        "Slamo was sick of clicking and decided, 'I'm just going to make a nuclear fission hydrogen reactor inside myself so it can click for me!' And miraculously, it worked. Clicks at %cps%.",
    )
    .setDifficulty(Difficulty.JustAir)
    .setPrice(new CurrencyBundle().set("Funds", 20e30).set("Purifier Clicks", 1000000), 1)
    .setRequiredItemAmount(SlamoClicker, 2)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .trait(Clicker)
    .setClickRate(5)
    .setClickValue(15000)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Dropper from "shared/item/traits/dropper/Dropper";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Quadruple Coin Miner")
    .setDescription("Produces %val% droplets per second. You really like producing Bitcoin, huh?")
    .setDifficulty(Difficulty.JustAir)
    .setPrice(new CurrencyBundle().set("Funds", 8e30).set("Skill", 20), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Dropper)
    .setDroplet(Droplet.QuadrupleCoin)
    .setDropRate(1)

    .exit();


import Difficulty from "@rbxts/ejt";
import { OnoeNum } from "@rbxts/serikanum";
import { RESET_LAYERS } from "shared/currency/mechanics/ResetLayer";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Formula from "shared/currency/Formula";
import { Server } from "shared/api/APIExpose";
import Class0Shop from "shared/items/0/Class0Shop";

const mul = new CurrencyBundle().set("Skill", 0);

export = new Item(script.Name)
    .setName("Skill Normalizer")
    .setDescription(
        "Boosts Skill gain of droplets based on how much you would gain on skillification. There's no going back now...",
    )
    .setDifficulty(Difficulty.JustAir)
    .setPrice(new CurrencyBundle().set("Funds", 1.4e30).set("Power", 100e15).set("Skill", 10), 1)
    .addPlaceableArea("SlamoVillage")
    .soldAt(Class0Shop)

    .setFormula(new Formula().div(6).add(1))
    .setFormulaX("skillify")

    .trait(Upgrader)
    .applyFormula(
        (v, item) => item.setMul(mul.set("Skill", v)),
        () => {
            const amount = Server.Reset.getResetReward(RESET_LAYERS.Skillification)?.get("Skill");
            return amount === undefined ? new OnoeNum(1) : amount;
        },
    )

    .trait(Conveyor)
    .setSpeed(3)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Charger from "shared/item/traits/generator/Charger";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Strong Charger")
    .setDescription(
        "Boosts Power gain of generators within %radius% studs radius of this charger by %mul%. We need to charge.",
    )
    .setDifficulty(Difficulty.JustAir)
    .setPrice(new CurrencyBundle().set("Funds", 16e30).set("Power", 300e15), 1)
    .setPrice(new CurrencyBundle().set("Funds", 44e30).set("Power", 700e15), 2)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .trait(Charger)
    .setRadius(12)
    .setMul(new CurrencyBundle().set("Power", 6))

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import UpgradeBoard from "shared/item/traits/UpgradeBoard";
import NamedUpgrades from "shared/namedupgrade/NamedUpgrades";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Upgrade Board III")
    .setDescription(
        "This upgrade board will last you an eternity. Use it to obtain small, but necessary boosts for exorbitant prices.",
    )
    .setDifficulty(Difficulty.JustAir)
    .setPrice(new CurrencyBundle().set("Funds", 2.1e30).set("Bitcoin", 100000).set("Skill", 10), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)

    .trait(UpgradeBoard)
    .addUpgrade(NamedUpgrades.ArtOfPurification)
    .addUpgrade(NamedUpgrades.DarkerMatter)
    .addUpgrade(NamedUpgrades.SubsonicTreads)
    .addUpgrade(NamedUpgrades.EfficientLearning)

    .exit();


import Difficulty from "@rbxts/ejt";
import Accelerator from "shared/item/traits/conveyor/Accelerator";
import Item from "shared/item/Item";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Charger from "shared/item/traits/generator/Charger";

export = new Item(script.Name)
    .setName("Conveyor Overclocker")
    .setDescription("Speeds up unleashed conveyors within %radius% of this machinery.")
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Power", 1e18), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .persists()

    .trait(Charger)
    .setRadius(25)

    .trait(Accelerator)
    .setBoost(3)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import Crystal from "shared/items/excavation/Crystal";

export = new Item(script.Name)
    .setName("Leashed Conveyor")
    .setDescription(
        "Scientists have no idea why this conveyor is so fast. There seems to be some bumps in the center of the conveyor that push droplets to the side.",
    )
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Funds", 1e27), 1, 5)
    .setRequiredItemAmount(Crystal, 2)
    .soldAt(MagicalCraftingTable)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .persists()

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Anti-clockwise Conveyor Corner")
    .setDescription(
        "The OSC went a little crazy this time with the naming scheme. Tinted orange just for your anti-clockwise needs.",
    )
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Power", 4e15), 1, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Conversion Ramp")
    .setDescription("Bringing your droplets above ground has never been faster. May be slightly steeper, though.")
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Bitcoin", 10000), 1, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Conveyor")
    .setDescription("Gone berserk, this conveyor is running at max speed to ensure your droplets are moved quickly.")
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Funds", 1e30), 1, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Conveyor Corner")
    .setDescription(
        "An even more compact version of the original Conveyor Corner, re-invented by the Open Slamo Community (OSC). Blazingly fast!",
    )
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Power", 2e15), 1, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Elevated Anti-clockwise Conveyor Corner")
    .setDescription("Why is this a name? Who wrote this and thought this was a good idea?")
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Skill", 12), 1, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Elevated Conveyor")
    .setDescription("Racing above ground, bringing your droplets via. aerial means.")
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Skill", 3), 1, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Elevated Conveyor Corner")
    .setDescription("Don't you love conveyor corners? Keep your droplets elevated while turning them with ease.")
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Skill", 6), 1, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import UnleashedElevatedConveyor from "shared/items/0/locomotion/UnleashedElevatedConveyor";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import Crystal from "shared/items/excavation/Crystal";
import EnchantedGrass from "shared/items/negative/tlg/EnchantedGrass";

export = new Item(script.Name)
    .setName("Unleashed Elevated Mini Conveyor")
    .setDescription(`The junior to ${UnleashedElevatedConveyor.name}.`)
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Funds", 2e30), 1, 30)
    .setRequiredItemAmount(EnchantedGrass, 20)
    .setRequiredItemAmount(Crystal, 5)
    .soldAt(MagicalCraftingTable)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .setCreator("CoPKaDT")
    .persists()

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Mini Conveyor")
    .setDescription(`The junior to the Unleashed Conveyor. Not much use other than inflating item count.`)
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Funds", 2e30), 1, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Sky Ramp")
    .setDescription(
        "After the creation of the Void Sky Upgrader, scientists realised what they had to do. After running 20 million tests attempting to copy its exact characteristics, this was the fruition of their results.",
    )
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Skill", 6).set("Bitcoin", 20000), 1, 15)
    .setPrice(new CurrencyBundle().set("Skill", 12).set("Bitcoin", 60000), 16, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Upgrader)
    .setSky(true)

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import UnleashedConveyor from "shared/item/traits/conveyor/UnleashedConveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Unleashed Sky Conveyor")
    .setDescription("And now, a conveyor to convey your super-elevated droplets.")
    .setDifficulty(Difficulty.Locomotion)
    .setPrice(new CurrencyBundle().set("Skill", 12), 1, 15)
    .setPrice(new CurrencyBundle().set("Skill", 24), 16, 30)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")

    .trait(Upgrader)
    .setSky(true)

    .trait(Conveyor)
    .setSpeed(9)

    .trait(UnleashedConveyor)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Printer from "shared/item/traits/Printer";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Basic Printer")
    .setDescription(
        "Able to save placed items and their positions in Barren Islands, which can be loaded at any time. Any items that are not available when loading will be ignored.",
    )
    .setDifficulty(Difficulty.Millisecondless)
    .setPrice(new CurrencyBundle().set("Funds", 800e18), 1)
    .addPlaceableArea("SlamoVillage")
    .soldAt(Class0Shop)

    .trait(Printer)
    .setArea("BarrenIslands")

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Generator from "shared/item/traits/generator/Generator";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Basic Tesseract")
    .setDescription("A generator that produces %gain%. You'll need to skillify for this!")
    .setDifficulty(Difficulty.Millisecondless)
    .setPrice(new CurrencyBundle().set("Skill", 0.5), 1)
    .setPrice(new CurrencyBundle().set("Skill", 1), 2)
    .setPrice(new CurrencyBundle().set("Skill", 2), 3)
    .addPlaceableArea("SlamoVillage")
    .soldAt(Class0Shop)

    .trait(Generator)
    .setPassiveGain(new CurrencyBundle().set("Dark Matter", 1))

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import SlamoStore from "shared/items/0/millisecondless/SlamoStore";

export = new Item(script.Name)
    .setName("Glass")
    .setDescription("It didn't lie. This really is glass, costing quite the fortune.")
    .setDifficulty(Difficulty.Millisecondless)
    .addPlaceableArea("SlamoVillage")
    .soldAt(SlamoStore)
    .setPrice(new CurrencyBundle().set("Funds", 1e27).set("Power", 1e18));


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";

export = new Item(script.Name)
    .setName("Gravity Stabilizer")
    .setDescription("This thing keeps you grounded. Or un-grounded? Physics is fake anyway.")
    .setDifficulty(Difficulty.Millisecondless)
    .persists();


import { getAllInstanceInfo } from "@antivivi/vrldk";
import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Item from "shared/item/Item";
import HandCrank from "shared/item/traits/action/HandCrank";
import Boostable from "shared/item/traits/boost/Boostable";
import Dropper from "shared/item/traits/dropper/Dropper";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Hand Crank Dropper V2")
    .setDescription(
        "Increases drop rate to x3 when cranked, producing %val% droplets per second in its normal state. This item will reset on skillification, like other Barren Islands items!",
    )
    .setDifficulty(Difficulty.Millisecondless)
    .setPrice(new CurrencyBundle().set("Funds", 121e21), 1)
    .setPrice(new CurrencyBundle().set("Funds", 242e21), 2)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .onLoad((model) => {
        const drop = model.WaitForChild("Drop");
        Boostable.addBoost(getAllInstanceInfo(drop), "HandCrank", { ignoresLimitations: false });
    })

    .trait(Dropper)
    .setDroplet(Droplet.ManualV2Droplet)
    .setDropRate(1)

    .trait(HandCrank)
    .setCallback((t, model) => {
        const drop = model.WaitForChild("Drop");
        const dropInfo = getAllInstanceInfo(drop);

        const modifier = dropInfo.boosts?.get("HandCrank");
        if (modifier === undefined) return;

        modifier.dropRateMul = t < 5 ? 3 : 1;
    })

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Shop from "shared/item/traits/Shop";

export = new Item(script.Name)
    .setName("Magical Crafting Table")
    .setDifficulty(Difficulty.Millisecondless)
    .setDescription(
        "A variant of the Crafting Table with more latent power, allowing you to craft more powerful items.",
    )
    .setPrice(new CurrencyBundle().set("Funds", 10e63), 1)
    .placeableEverywhere()
    .persists()

    .trait(Shop)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Stone from "shared/items/0/millisecondless/Stone";
import Existenite from "shared/items/negative/exist/Existenite";
import DamascusSteelIngot from "shared/items/negative/relax/DamascusSteelIngot";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Millirite")
    .setDescription("The essence of milliseconds.")
    .setDifficulty(Difficulty.Millisecondless)
    .setPrice(new CurrencyBundle().set("Power", 1))
    .setRequiredItemAmount(Existenite, 1)
    .setRequiredItemAmount(DamascusSteelIngot, 1)
    .setRequiredItemAmount(Stone, 50)
    .placeableEverywhere()
    .persists();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import CompactReactor from "shared/items/negative/reversedperipherality/CompactReactor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Normal Reactor")
    .setDescription(
        "This reactor has two entrances, each giving a %mul% boost. I wish you the best of luck in configuring this.",
    )
    .setDifficulty(Difficulty.Millisecondless)
    .setPrice(new CurrencyBundle().set("Funds", 454e21), 1)
    .setRequiredItemAmount(CompactReactor, 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)
    .setCreator("simple13579")

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Funds", 3.5))

    .trait(Conveyor)
    .setSpeed(5)

    .exit();


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";

export = new Item(script.Name)
    .setName("Quantum Gear")
    .setDescription(
        "A mysterious gear that seems to phase in and out of reality. Probably important for elevator repairs... or time travel.",
    )
    .setDifficulty(Difficulty.Millisecondless)
    .persists();


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";

export = new Item(script.Name)
    .setName("Skill Pod")
    .setDescription(
        "A strange device that seems to resonate with your heart when held next to your chest. No idea what it does.",
    )
    .setDifficulty(Difficulty.Millisecondless)
    .persists();


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";

export = new Item(script.Name)
    .setName("Sky Crystal")
    .setDescription("A glowing crystal that hums with sky energy. It's literally too cool for ground level.")
    .setDifficulty(Difficulty.Millisecondless)
    .persists();


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";

export = new Item(script.Name)
    .setName("Sky Pass")
    .setDescription(
        "An exclusive pass to the Sky Pavilion. It's laminated and everything. Flex on the ground dwellers.",
    )
    .setDifficulty(Difficulty.Millisecondless)
    .persists();


import Difficulty from "@rbxts/ejt";
import { loadAnimation } from "@antivivi/vrldk";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Clicker from "shared/item/traits/action/Clicker";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Slamo Clicker")
    .setDescription("Slamos click pretty well at %cps%.")
    .setDifficulty(Difficulty.Millisecondless)
    .setPrice(new CurrencyBundle().set("Funds", 1.4e24).set("Purifier Clicks", 10000), 1)
    .setPrice(new CurrencyBundle().set("Funds", 2.9e24).set("Purifier Clicks", 30000), 2)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .trait(Clicker)
    .setClickRate(5)
    .setClickValue(16)
    .replicateClicks()
    .exit()

    .onClientLoad((model, item) => {
        const slamo = model.WaitForChild("Slamo") as Model;
        const animationController = slamo.FindFirstChildOfClass("AnimationController");
        if (animationController === undefined) return;
        const animTrack = loadAnimation(animationController, 17441475234);
        if (animTrack !== undefined) {
            item.trait(Clicker).fromServerClicked(model, () => animTrack.Play());
        }
    });


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";

export = new Item(script.Name)
    .setName("Slamo Statue")
    .setDescription("A beautiful representation of the Slamo species!")
    .setDifficulty(Difficulty.Millisecondless)
    .setBounds("LudicrousEscapeRing")
    .persists();


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";
import Shop from "shared/item/traits/Shop";

export = new Item(script.Name)
    .setName("Slamo Store")
    .setDifficulty(Difficulty.Millisecondless)

    .trait(Shop)
    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import SlamoStore from "shared/items/0/millisecondless/SlamoStore";

export = new Item(script.Name)
    .setName("jRock")
    .setDescription("What's better than jWood? jRock.")
    .setDifficulty(Difficulty.Millisecondless)
    .addPlaceableArea("SlamoVillage")
    .soldAt(SlamoStore)
    .setPrice(new CurrencyBundle().set("Power", 1e15))
    .persists();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Condenser from "shared/item/traits/dropper/Condenser";
import Droplet from "shared/item/Droplet";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Strong Condenser")
    .setDescription("Produces %val% droplets when %quota% of those values are processed through the attached furnace.")
    .setDifficulty(Difficulty.Millisecondless)
    .setPrice(new CurrencyBundle().set("Funds", 1.28e24), 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .trait(Condenser)
    .addDroplets(Droplet.LiquidestFundsDroplet, Droplet.LiquidestPowerDroplet)
    .setQuota(0.4)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import SlamoStore from "shared/items/0/millisecondless/SlamoStore";

export = new Item(script.Name)
    .setName("jWood")
    .setDescription("Joke wood. It's not real wood.")
    .setDifficulty(Difficulty.Millisecondless)
    .addPlaceableArea("SlamoVillage")
    .soldAt(SlamoStore)
    .setPrice(new CurrencyBundle().set("Funds", 1e24))
    .persists();


import { getAllInstanceInfo } from "@antivivi/vrldk";
import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Item from "shared/item/Item";
import Dropper from "shared/item/traits/dropper/Dropper";
import Furnace from "shared/item/traits/Furnace";
import Class0Shop from "shared/items/0/Class0Shop";
import Packets from "shared/Packets";

export = new Item(script.Name)
    .setName("Droplet Shatterer")
    .setDescription("Produces a %val% droplet every time a droplet is processed through the attached furnace.")
    .setDifficulty(Difficulty.ShatteredBabass)
    .setPrice(new CurrencyBundle().set("Power", 70e24), 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .trait(Dropper)
    .setDroplet(Droplet.ShatteredDroplet)

    .trait(Furnace)
    .calculatesFurnace(false)
    .exit()

    .onLoad((model) => {
        const modelInfo = getAllInstanceInfo(model);

        modelInfo.furnaceProcessed = (_result, droplet) => {
            const dropInfo = getAllInstanceInfo(model.WaitForChild("Drop"));

            dropInfo.instantiator?.();
            Packets.dropletBurnt.toAllClients(droplet.Name, new Map());
        };
    });


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Formula from "shared/currency/Formula";
import { Server } from "shared/api/APIExpose";
import Class0Shop from "shared/items/0/Class0Shop";

const mul = new CurrencyBundle().set("Funds", 0);

export = new Item(script.Name)
    .setName(Difficulty.ShatteredBabass.name!)
    .setDescription("Shattered Babass is here to charge up your setup. Boosts Funds with Power.")
    .setDifficulty(Difficulty.ShatteredBabass)
    .setPrice(new CurrencyBundle().set("Funds", 1.25e39).set("Power", 10e21).set("Skill", 220000), 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .setFormula(new Formula().div(1e21).add(1).log(10).pow(1.5).add(1))
    .setFormulaX("power")
    .setFormulaXCap(new CurrencyBundle().set("Power", 1e303))

    .trait(Upgrader)
    .applyFormula(
        (v, item) => item.setMul(mul.set("Funds", v)),
        () => Server.Currency.get("Power"),
    )

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Furnace from "shared/item/traits/Furnace";
import Item from "shared/item/Item";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Another World")
    .setDescription("Seems to utilise resources from another dimension to process droplets for %mul% value.")
    .setDifficulty(Difficulty.Sleepful)
    .setPrice(new CurrencyBundle().set("Funds", 2.1e27).set("Skill", 5), 1)
    .addPlaceableArea("SlamoVillage")
    .soldAt(Class0Shop)
    .setCreator("CoPKaDT")

    .trait(Furnace)
    .setMul(new CurrencyBundle().set("Funds", 50))

    .exit();


import Difficulty from "@rbxts/ejt";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Damager from "shared/item/traits/upgrader/Damager";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item("HeavenGarden")
    .setName("Heaven's Garden")
    .setDescription(
        "Hurts so bad... Droplets are dealt %hp_add%, but gain %mul% value. No idea why heaven is so cruel.",
    )
    .setDifficulty(Difficulty.Sleepful)
    .setPrice(new CurrencyBundle().set("Power", 1.2e15).set("Skill", 5), 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)
    .persists("Skillification")
    .setCreator("CoPKaDT")

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Power", 2.5).set("Bitcoin", 2))

    .trait(Damager)
    .setDamage(62.5)

    .trait(Conveyor)
    .setSpeed(4)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Grass from "shared/items/negative/tfd/Grass";
import CraftingTable from "shared/items/negative/tfd/CraftingTable";

export = new Item(script.Name)
    .setName("Hopeful Rose")
    .setDescription(
        "You waste your whole life, and for what purpose? This is your purpose. %mul%. Unstackable. But %mul%. Hope is here.",
    )
    .setDifficulty(Difficulty.Sleepful)
    .setPrice(new CurrencyBundle().set("Funds", 99))
    .setRequiredItemAmount(Grass, 100000)
    .addPlaceableArea("BarrenIslands")
    .soldAt(CraftingTable)

    .trait(Upgrader)
    .setMul(new CurrencyBundle().set("Funds", 1.1))
    .stacks(false)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import Glass from "shared/items/0/millisecondless/Glass";
import MagicalCraftingTable from "shared/items/0/millisecondless/MagicalCraftingTable";
import Gold from "shared/items/excavation/Gold";
import Iron from "shared/items/excavation/Iron";

export = new Item(script.Name)
    .setName("Sacred Baptism")
    .setDescription("That's right. You need to baptise your droplets to make them stronger. %add% droplet value.")
    .setDifficulty(Difficulty.Sleepful)
    .setPrice(new CurrencyBundle().set("Funds", 3e27).set("Skill", 10), 1)
    .setRequiredItemAmount(Glass, 1)
    .setRequiredItemAmount(Iron, 10)
    .setRequiredItemAmount(Gold, 1)
    .addPlaceableArea("SlamoVillage")
    .soldAt(MagicalCraftingTable)
    .setCreator("CoPKaDT")

    .trait(Upgrader)
    .setAdd(new CurrencyBundle().set("Funds", 250000))

    .trait(Conveyor)
    .setSpeed(4)

    .exit();


import Difficulty from "@rbxts/ejt";
import { OnoeNum } from "@rbxts/serikanum";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Formula from "shared/currency/Formula";
import Item from "shared/item/Item";
import { Server } from "shared/api/APIExpose";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import FormulaBundled from "shared/item/traits/FormulaBundled";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import CruelBlankEssence from "shared/items/0/spontaneous/CruelBlankEssence";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Ame")
    .setDescription(`<font color="rgb(255,0,0)" weight="heavy">The noise of rain.</font>\n`)
    .setDifficulty(Difficulty.Spontaneous)
    .setPrice(new CurrencyBundle().set("Purifier Clicks", 1e36), 1)
    .setRequiredItemAmount(CruelBlankEssence, 1)
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)

    .setFormula(new Formula().log(10).div(100).add(1))
    .setFormulaX("skill")
    .setFormulaXCap(new CurrencyBundle().set("Skill", OnoeNum.fromSerika(1, 3306)))

    .trait(Conveyor)
    .setSpeed(3)

    .trait(FormulaBundled)
    .setX(() => Server.Currency.get("Skill"))
    .setRatio("Power", 99.99)
    .setRatio("Bitcoin", 99.99)
    .apply(Upgrader)
    .setSky(true)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Generator from "shared/item/traits/generator/Generator";
import OctupleCoinMiner from "shared/items/0/automaticjoyful/OctupleCoinMiner";
import DoubleCoinMiner from "shared/items/0/blessing/DoubleCoinMiner";
import TesseractBooster from "shared/items/0/donothing/TesseractBooster";
import HappyTesseract from "shared/items/0/happylike/HappyTesseract";
import QuadrupleCoinMiner from "shared/items/0/justair/QuadrupleCoinMiner";
import BasicTesseract from "shared/items/0/millisecondless/BasicTesseract";
import ReinforcedTesseract from "shared/items/0/unlosable/ReinforcedTesseract";
import SexdecupleCoinMiner from "shared/items/0/unlosable/SexdecupleCoinMiner";
import AdvancedTesseract from "shared/items/0/vintage/AdvancedTesseract";
import ImprovedTesseract from "shared/items/0/win/ImprovedTesseract";
import BasicCoinMiner from "shared/items/0/winsome/BasicCoinMiner";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Cruel Blank Essence")
    .setDescription(
        `In the beginning, there was only function. The green-lit marvels of order, built by a civilization obsessed with optimization and purity. They believed that progress was linear: input, process, output. Nothing more. Nothing less.

But entropy doesn't like being ignored.

One stormy night, during a transfer between cores, something refused to render. Not just in the simulation. Like, in reality. The space it occupied... vanished. Not empty. Just blank. The devs joked it was "Blank Blank Essence." And they kept it.

They shouldn't have.

Each subsequent machine tried to patch, to correct, to fix the anomaly. Instead, the machines began mutating. Code started compiling with missing logic trees, producing structures that worked but shouldn't. Machines that ran on paradox. Logic gates built from anti-input.

The fifth construct tried to rewrite itself into purity. It failed. Consumed itself.

Then came the final one. The last attempt to extract meaning from the growing null. A backup of a backup, stitched from corrupted logs and ghost functions. They named it “Essence_vFINALFinal.” It didn't run. It didn't crash. It just was.

And then it started watching.

No user commands. No interface. Just a red orb flickering softly in the blackened ruin of the dev zone. Its name changed in the directory:
Cruel Blank Essence

Its only metadata:
"It remembers what you forgot."

People moved on. They destroyed the machines, the servers, the backups, rotting in some forgotten corner of the world.

But the Essence remained.
Watching.
Whispering,
return null;`,
    )
    .setTooltipDescription("It remembers what you forgot.")
    .setDifficulty(Difficulty.Spontaneous)
    .setPrice(
        new CurrencyBundle()
            .set("Funds", 1e51)
            .set("Power", 1e33)
            .set("Bitcoin", 1e15)
            .set("Skill", 1e9)
            .set("Purifier Clicks", 1e33)
            .set("Dark Matter", 1e33),
        1,
    )
    .setRequiredItemAmount(BasicCoinMiner, BasicCoinMiner.pricePerIteration.size())
    .setRequiredItemAmount(DoubleCoinMiner, DoubleCoinMiner.pricePerIteration.size())
    .setRequiredItemAmount(QuadrupleCoinMiner, QuadrupleCoinMiner.pricePerIteration.size())
    .setRequiredItemAmount(OctupleCoinMiner, OctupleCoinMiner.pricePerIteration.size())
    .setRequiredItemAmount(SexdecupleCoinMiner, SexdecupleCoinMiner.pricePerIteration.size())
    .setRequiredItemAmount(BasicTesseract, BasicTesseract.pricePerIteration.size())
    .setRequiredItemAmount(ImprovedTesseract, ImprovedTesseract.pricePerIteration.size())
    .setRequiredItemAmount(AdvancedTesseract, AdvancedTesseract.pricePerIteration.size())
    .setRequiredItemAmount(HappyTesseract, HappyTesseract.pricePerIteration.size())
    .setRequiredItemAmount(ReinforcedTesseract, ReinforcedTesseract.pricePerIteration.size())
    .setRequiredItemAmount(TesseractBooster, TesseractBooster.pricePerIteration.size())
    .addPlaceableArea("BarrenIslands", "SlamoVillage")
    .soldAt(Class0Shop)

    .trait(Generator)
    .setPassiveGain(new CurrencyBundle().set("Dark Matter", 999.99e21))

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Conveyor from "shared/item/traits/conveyor/Conveyor";
import Damager from "shared/item/traits/upgrader/Damager";
import Upgrader from "shared/item/traits/upgrader/Upgrader";
import ReinforcedReactor from "shared/items/0/automatic/ReinforcedReactor";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Emerald Reactor")
    .setDescription(
        `Welcome to the end of Class 0. Let me congratulate you on reaching this point; but also, let me warn you that clearing this point will not be easy.
Expect to spend a lot of time here, and good luck clearing Spontaneous.

The Emerald Reactor is a modified version of the ${ReinforcedReactor.name}, each entrance giving a %mul% boost but deals %hp_add% to droplets.`,
    )
    .setDifficulty(Difficulty.Spontaneous)
    .setPrice(new CurrencyBundle().set("Funds", 150e42).set("Power", 1e27), 1)
    .setRequiredItemAmount(ReinforcedReactor, 1)
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)
    .setCreator("sanjay2133")

    .trait(Upgrader)
    .setSky(true)
    .setMul(new CurrencyBundle().set("Funds", 7).set("Power", 2))

    .trait(Damager)
    .setDamage(20)

    .trait(Conveyor)
    .setSpeed(10)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Droplet from "shared/item/Droplet";
import Item from "shared/item/Item";
import Dropper from "shared/item/traits/dropper/Dropper";
import Class0Shop from "shared/items/0/Class0Shop";
import HandCrankDropperV2 from "shared/items/0/millisecondless/HandCrankDropperV2";
import StrongCondenser from "shared/items/0/millisecondless/StrongCondenser";
import LunaryDropper from "shared/items/0/vintage/LunaryDropper";
import HydratingDropper from "shared/items/0/win/HydratingDropper";
import DropDropper from "shared/items/negative/a/DropDropper";
import DualDropper from "shared/items/negative/a/DualDropper";
import EnergyPoweredDropper from "shared/items/negative/a/EnergyPoweredDropper";
import RapidDropper from "shared/items/negative/exist/RapidDropper";
import BasicCondenser from "shared/items/negative/felixthea/BasicCondenser";
import GrassDropper from "shared/items/negative/friendliness/GrassDropper";
import HandCrankDropper from "shared/items/negative/negativity/HandCrankDropper";
import HeavyweightDropper from "shared/items/negative/negativity/HeavyweightDropper";
import VitalizedDropper from "shared/items/negative/restful/VitalizedDropper";
import OverusedAmethystDropper from "shared/items/negative/reversedperipherality/OverusedAmethystDropper";
import TheFirstDropper from "shared/items/negative/tfd/TheFirstDropper";
import BulkyDropper from "shared/items/negative/tlg/BulkyDropper";
import VibrantDropper from "shared/items/negative/trueease/VibrantDropper";

export = new Item(script.Name)
    .setName("Focal Point")
    .setDescription(
        `The harnessed, harmonized energy of... a point. What point is it?
Scientists don't know. In fact, they don't even know how this item came to be.
The structure of the Focal Point is said to be the exoskeleton of what was once a powerful entity, now reduced to a mere point of energy.

Produces a %val% droplet every 4 seconds.`,
    )
    .setDifficulty(Difficulty.Spontaneous)
    .setPrice(new CurrencyBundle().set("Funds", 35e45).set("Skill", 60000000).set("Dark Matter", 1e30), 1)
    .setRequiredItemAmount(TheFirstDropper, TheFirstDropper.pricePerIteration.size())
    .setRequiredItemAmount(BulkyDropper, BulkyDropper.pricePerIteration.size())
    .setRequiredItemAmount(HeavyweightDropper, HeavyweightDropper.pricePerIteration.size())
    .setRequiredItemAmount(HandCrankDropper, HandCrankDropper.pricePerIteration.size())
    .setRequiredItemAmount(GrassDropper, GrassDropper.pricePerIteration.size())
    .setRequiredItemAmount(VibrantDropper, VibrantDropper.pricePerIteration.size())
    .setRequiredItemAmount(DropDropper, DropDropper.pricePerIteration.size())
    .setRequiredItemAmount(DualDropper, DualDropper.pricePerIteration.size())
    .setRequiredItemAmount(EnergyPoweredDropper, EnergyPoweredDropper.pricePerIteration.size())
    .setRequiredItemAmount(BasicCondenser, BasicCondenser.pricePerIteration.size())
    .setRequiredItemAmount(RapidDropper, RapidDropper.pricePerIteration.size())
    .setRequiredItemAmount(OverusedAmethystDropper, OverusedAmethystDropper.pricePerIteration.size())
    .setRequiredItemAmount(VitalizedDropper, VitalizedDropper.pricePerIteration.size())
    .setRequiredItemAmount(StrongCondenser, StrongCondenser.pricePerIteration.size())
    .setRequiredItemAmount(HandCrankDropperV2, HandCrankDropperV2.pricePerIteration.size())
    .setRequiredItemAmount(HydratingDropper, HydratingDropper.pricePerIteration.size())
    .setRequiredItemAmount(LunaryDropper, LunaryDropper.pricePerIteration.size())
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)

    .trait(Dropper)
    .setDroplet(Droplet.TotalityDroplet)
    .setDropRate(0.25)

    .exit();


import Difficulty from "@rbxts/ejt";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Item from "shared/item/Item";
import Furnace from "shared/item/traits/Furnace";
import AutomaticJoyfulFurnace from "shared/items/0/automaticjoyful/AutomaticJoyfulFurnace";
import RoboticCauldron from "shared/items/0/walkthrough/RoboticCauldron";
import PurifyingCauldron from "shared/items/0/winsome/PurifyingCauldron";
import ColorStrictFurnace from "shared/items/negative/exist/ColorStrictFurnace";
import EnergisedFurnace from "shared/items/negative/friendliness/EnergisedFurnace";
import IndustrialFurnace from "shared/items/negative/friendliness/IndustrialFurnace";
import MoltenAltar from "shared/items/negative/instantwin/MoltenAltar";
import AdvancedPowerHarvester from "shared/items/negative/relax/AdvancedPowerHarvester";
import TheFirstFurnace from "shared/items/negative/tfd/TheFirstFurnace";
import BasicCauldron from "shared/items/negative/tlg/BasicCauldron";
import ImprovedFurnace from "shared/items/negative/tlg/ImprovedFurnace";
import BasicPowerHarvester from "shared/items/negative/trueease/BasicPowerHarvester";
import ButtonFurnace from "shared/items/negative/unimpossible/ButtonFurnace";
import VolatileCauldron from "shared/items/negative/unimpossible/VolatileCauldron";
import Class0Shop from "shared/items/0/Class0Shop";

export = new Item(script.Name)
    .setName("Light of Attrition")
    .setDescription(
        `A self-sustaining light that only concerns itself with sucking the life out of anything it touches.

Processes droplets at %mul% value.`,
    )
    .setDifficulty(Difficulty.Spontaneous)
    .setPrice(new CurrencyBundle().set("Funds", 5e45).set("Bitcoin", 1e12), 1)
    .setRequiredItemAmount(TheFirstFurnace, TheFirstFurnace.pricePerIteration.size())
    .setRequiredItemAmount(ImprovedFurnace, ImprovedFurnace.pricePerIteration.size())
    .setRequiredItemAmount(BasicCauldron, BasicCauldron.pricePerIteration.size())
    .setRequiredItemAmount(VolatileCauldron, VolatileCauldron.pricePerIteration.size())
    .setRequiredItemAmount(ButtonFurnace, ButtonFurnace.pricePerIteration.size())
    .setRequiredItemAmount(IndustrialFurnace, IndustrialFurnace.pricePerIteration.size())
    .setRequiredItemAmount(EnergisedFurnace, EnergisedFurnace.pricePerIteration.size())
    .setRequiredItemAmount(BasicPowerHarvester, BasicPowerHarvester.pricePerIteration.size())
    .setRequiredItemAmount(ColorStrictFurnace, ColorStrictFurnace.pricePerIteration.size())
    .setRequiredItemAmount(AdvancedPowerHarvester, AdvancedPowerHarvester.pricePerIteration.size())
    .setRequiredItemAmount(MoltenAltar, MoltenAltar.pricePerIteration.size())
    .setRequiredItemAmount(PurifyingCauldron, PurifyingCauldron.pricePerIteration.size())
    .setRequiredItemAmount(RoboticCauldron, RoboticCauldron.pricePerIteration.size())
    .setRequiredItemAmount(AutomaticJoyfulFurnace, AutomaticJoyfulFurnace.pricePerIteration.size())
    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)
    .setCreator("sanjay2133")

    .trait(Furnace)
    .setIsCauldron(true)
    .setMul(new CurrencyBundle().set("Funds", 1e9).set("Power", 1e6).set("Skill", 1e3).set("Purifier Clicks", 1e6))

    .exit();


import Difficulty from "@rbxts/ejt";
import { OnoeNum } from "@rbxts/serikanum";
import CurrencyBundle from "shared/currency/CurrencyBundle";
import Formula from "shared/currency/Formula";
import Item from "shared/item/Item";
import { Server } from "shared/api/APIExpose";
import Generator from "shared/item/traits/generator/Generator";
import CorruptedBonanza from "shared/items/0/ifinitude/CorruptedBonanza";
import TimelostDesert from "shared/items/0/vibeness/TimelostDesert";
import CanisteringGenerator from "shared/items/0/vintage/CanisteringGenerator";
import TransientTesseract from "shared/items/0/winsome/TransientTesseract";
import HandCrankGenerator from "shared/items/negative/a/HandCrankGenerator";
import TheFirstGenerator from "shared/items/negative/friendliness/TheFirstGenerator";
import PeripheralGenerator from "shared/items/negative/reversedperipherality/PeripheralGenerator";
import UpgradedGenerator from "shared/items/negative/trueease/UpgradedGenerator";
import Class0Shop from "shared/items/0/Class0Shop";

const amt = new OnoeNum(1e18);
const base = new CurrencyBundle().set("Power", amt);

export = new Item(script.Name)
    .setName("Octahedral Temple")
    .setDescription(
        `The shape for optimal power generation. It is said that this temple was built by worshippers of the octahedron as a symbol of balance and harmony.
Now, it has been reduced to a mere generator, corrupted by the greed of those who seek to harness its power.

Produces %gain%, this amount increasing with Skill.`,
    )
    .setDifficulty(Difficulty.Spontaneous)
    .setPrice(new CurrencyBundle().set("Funds", 140e45).set("Power", 1e30).set("Purifier Clicks", 1e30), 1)
    .setRequiredItemAmount(TheFirstGenerator, TheFirstGenerator.pricePerIteration.size())
    .setRequiredItemAmount(UpgradedGenerator, UpgradedGenerator.pricePerIteration.size())
    .setRequiredItemAmount(HandCrankGenerator, HandCrankGenerator.pricePerIteration.size())
    .setRequiredItemAmount(PeripheralGenerator, PeripheralGenerator.pricePerIteration.size())
    .setRequiredItemAmount(TransientTesseract, TransientTesseract.pricePerIteration.size())
    .setRequiredItemAmount(CanisteringGenerator, CanisteringGenerator.pricePerIteration.size())
    .setRequiredItemAmount(CorruptedBonanza, CorruptedBonanza.pricePerIteration.size())
    .setRequiredItemAmount(TimelostDesert, TimelostDesert.pricePerIteration.size())

    .addPlaceableArea("BarrenIslands")
    .soldAt(Class0Shop)
    .setCreator("emoronq2k")

    .setFormula(new Formula().pow(0.25))
    .setFormulaX("skill")

    .trait(Generator)
    .setPassiveGain(base)
    .applyFormula(
        (v, item) => {
            return item.setPassiveGain(base.set("Power", amt.mul(v)));
        },
        () => Server.Currency.get("Skill"),
    )

    .exit();