- TypeScript 87.3%
- Svelte 8.4%
- MDX 3.1%
- JavaScript 0.7%
- CSS 0.2%
- Other 0.1%
| .github | ||
| packs | ||
| sites | ||
| src | ||
| test/src | ||
| tools | ||
| universe | ||
| .gitattributes | ||
| .gitignore | ||
| biome.json | ||
| bun.lock | ||
| CHANGELOG.md | ||
| config.ts | ||
| decks.json | ||
| hub.ts | ||
| index.ts | ||
| install.sh | ||
| LICENSE | ||
| loc.md | ||
| package.json | ||
| README.md | ||
| run.bat | ||
| setup.bat | ||
| tsconfig.json | ||
Hearthstone.js
A console-based recreation of Hearthstone.
Features
- Most of Hearthstone's features before 2025!
- Create your own cards. Minimal programming knowledge required!
- Limitations on what cards can do are considered bugs!
- Make your own decks.
- A relatively clean codebase which is easy to mod!
- 70+ configurable settings to change how the game works!
- An AI (or two) you can play against!
- Import cards directly from Hearthstone!
- Procedural audio support!
- ~150 pre-built cards. (26 Collectible.)
- Publish cards online for others to see and use!
- GPL-3.0 License.
Note
Hearthstone.js is a hobby project I'm working on in my free time. I don't always have the time nor energy to work on it. Therefore, I can't guarantee that updates will be released in a reasonable timeframe. Update 2.0 took ~4 months to come out, whereas 3.0 took almost 2 years. I work in my own pace, so don't expect constant updates.
If you notice any issues, or want to request a new feature, open an issue. I'll try to respond as soon as I'm able. You're free to open pull requests, but I can't guarantee that they'll be merged.
Running
See the docs for a more comprehensive guide.
You need to have Node and Bun installed.
- If you are on Windows, open
setup.bat, thenrun.bat. - Otherwise, open a console / terminal, then run
bun install, andbun .(This works on all platforms.) - If you're on Linux, you can run the
install.shscript. This will allow you to run the game through the newhscommand.
Images
Here's what you can expect from Hearthstone.js
HUB
This is the hub. It connects the different aspects of Hearthstone.js together, allowing you to run the separate tools seamlessly.
Generic game
This is what the main game looks like. It might look different if the settings
under the Debug category are off.
Commands
This is what is shown when you select Commands in-game. This list is scrollable,
and there are more commands out of view.
Help message in-game
This is what is shown when you run the help command. As you can see, there is
a lot of commands that can be run.
Deck Creator
This is what the Deck Creator looks like. This is the tool that lets you create a deck, and gives you its corresponding deckcode.
Deck Creator commands
This is what is shown when you select Commands in the deck creator.
Custom Card Creator
This is the custom card creator. It allows you to create custom cards. Not much else to be said. See the docs for more information.
Vanilla Card Creator
This is the vanilla card creator. If set up right, it will allow you to import any card from Hearthstone.
Vanilla Card Creator generated code (No manual lines of code written)
This is the code generated by selecting Brann Bronzebeard in the vanilla
card creator. The custom card creator will generate identical code.
Functional code
This is the same code, but cleaned up. I changed the event from ChangeMe to
PlayCard, and added value.trigger(Ability.Battlecry). This makes Brann
Bronzebeard work properly.
History
This is the result of running the History command in-game.
It shows a log of what has happened since the game started.
This is helpful for seeing what happened last turn.