Add creating systems, commands and sfx #474

Open
opened 2026-02-18 09:00:43 +00:00 by LunarTides · 1 comment
LunarTides commented 2026-02-18 09:00:43 +00:00 (Migrated from github.com)
// cards/@Example/example/discombobulate.system.ts
export const system = {
    name: "Discombobulate",
    id: "",

    passive(self, owner, key, value) {},
}
// cards/@Example/example/discombobulate.command.ts
export const command = {
    name: "discombobulate", // Converts to lowercase
    description: "Discombobulates a card.",
    debug: false,

    run(args, useTUI) {}, // 'useTUI' should be false if typing the command, and true if using the Inquirer.js interface.
}

The game will look at the filename *.system.ts, *.command.ts, *.ts to figure out what type of file it is. The last one is cards. They don't need to be in a pack.

Allow creating these types of files using the custom card creator? Or something that wraps it? Actually, the latter is probably the better option since the custom card creator expects a card. There would be too many workarounds for it to be good. Maybe have an option at the top (before "Type"), set to "Card" that, when changed, launches another tool to handle it?

The registry needs to handle systems and commands on the frontend too.

This will require quite a bit of effort, but will make the game a lot more moddable. Especially since this system can be expanded upon later to add more stuff.

```ts // cards/@Example/example/discombobulate.system.ts export const system = { name: "Discombobulate", id: "", passive(self, owner, key, value) {}, } ``` ```ts // cards/@Example/example/discombobulate.command.ts export const command = { name: "discombobulate", // Converts to lowercase description: "Discombobulates a card.", debug: false, run(args, useTUI) {}, // 'useTUI' should be false if typing the command, and true if using the Inquirer.js interface. } ``` The game will look at the filename `*.system.ts`, `*.command.ts`, `*.ts` to figure out what type of file it is. The last one is cards. They don't *need* to be in a pack. Allow creating these types of files using the custom card creator? Or something that wraps it? Actually, the latter is probably the better option since the custom card creator expects a card. There would be too many workarounds for it to be good. Maybe have an option at the top (before "Type"), set to "Card" that, when changed, launches another tool to handle it? The registry needs to handle systems and commands on the frontend too. This will require quite a bit of effort, but will make the game a lot more moddable. Especially since this system can be expanded upon later to add more stuff.
LunarTides commented 2026-03-16 10:55:25 +00:00 (Migrated from github.com)

I just need to add systems, and handle this in the registry.

I just need to add systems, and handle this in the registry.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LunarTides/Hearthstone.js#474
No description provided.