• v2.0.0-beta.0 e278d0fb7f

    v2.0.0-beta.0 Pre-release

    LunarTides released this 2023-09-19 19:31:24 +00:00 | 1018 commits to main since this release

    Moved language to TypeScript.

    Breaking Changes (non exhaustive)

    1. Card blueprints now look completely different
    2. Replaced tag format from &xExample&y to <foo>Example</foo>
    3. Renamed the class field to classes and made it an array.
    4. Renamed spellClass to spellSchool.
    5. Renamed frozen_turn to turnFrozen in cards.
    6. Removed corrupted field from cards.
    7. The spellSchool field is now required for spells. (enforced by the new Blueprint Validator)
    8. The hpCost field is now required for heroes.
    9. Renamed mana to cost.
    10. Every card now gets an id, no matter if it is collectible or not.
    11. The card creator library no longer has setDebug, setType functions and instead has parameters for those in the create function.
    12. Removed tests
    13. Switched color library
    14. Disabled use of console.log, you now have to use the game.log wrapper which supports tags natively
    15. Rewrote the game.functions.addEventListener function.
    16. Location card blueprints no longer supports stats. Use the new durability instead.
    17. Renamed card.settings to card.deckSettings.
    18. card.randomizeUUID no longer has a return value.
    19. A lot more.

    ^ At this point, just forget everything you have learned.

    Features

    1. Added game.ts:createGame since creating a game is a pretty common thing to do.
    2. Added the cmd debug command
    3. Added the undo debug command
    4. The reload command now targets graveyard too
    5. Added updateIds script. Use with caution.
    6. Added tick and handtick abilities. This ability triggers when the game ticks.
    7. Added create ability. This ability triggers when the card is created.
    8. Added support for import { ... } from "@Game/types.ts instead of import { ... } from "../../../../src/types.ts".
    9. Removed export and reworked undo commands in deck creator
    10. Changed config file format to toml.
    11. Added another DIY card
    12. A script to upgrade pre 2.0 cards. (Should fix most problems)
    13. Made the tag system ~10x more powerful.
    14. Added support for tags in placeholders
    15. Rewrote printAll (The code that shows you the game state)
    16. The game now cleanly exits when running the exit command in the runner.
    17. Rewrote the deck creator command system.
    18. A LOT of bugfixes.
    19. A lot more features.

    What's Changed

    Full Changelog: https://github.com/LunarTides/Hearthstone.js/compare/v1.6.2...v2.0.0-beta.0

    Downloads
  • v1.6.2 2c9d805753

    Stable

    LunarTides released this 2023-08-28 19:52:58 +00:00 | 1176 commits to main since this release

    Downloads
  • v1.6.1 4ce5148456

    Stable

    LunarTides released this 2023-08-21 12:34:54 +00:00 | 1180 commits to main since this release

    Downloads
  • v1.6.0 e0e223eed8

    Stable

    LunarTides released this 2023-08-05 17:35:08 +00:00 | 1217 commits to main since this release

    Version 1.6 is here!

    Here are the changes:

    Player changes

    None

    Creator changes

    BREAKING CHANGE: Removed update parameter from all functions #230

    BC Prompt: None, sorry

    Removed the update parameter from all functions that had it.
    Instead function docstrings show what events they can broadcast.
    Then you need to add this piece of code:

    game.suppressedEvents.push("[Event]");
    // Run the function that had the remove parameter
    game.suppressedEvents.pop();
    

    This might become easier to do in the future.

    BREAKING CHANGE: Rewrote game.functions.createWall.

    BC Prompt: \.createWall

    Previously, walls were created like this:

    let [wall, finishWall] = functions.createWall("-");
    
    wall.push(someArray);
    
    let finishedWall = finishWall();
    

    Now, walls are created like this:

    let finishedWall = functions.createWall(someArray, "-");
    

    Discover now filters class cards by default #221

    game.interact.discover now filters by game.functions.validateClass by default. The third parameter toggles it.

    Added ticks and tick hooks

    Alt version of passives with certain advantages and disadvantages.

    Added better documentation #218

    Added better documentation to nearly all functions / fields.

    Small changes

    Seperated the custom card creator into its own file #226

    The custom card creator and the card creator library are now in two different files.

    Added the version command

    This shows some information about the game. It also shows a todo-list.

    Removed the events debug command

    This command is now entirely useless because of the history command

    Massively improved the history command

    The history command now shows A LOT more information.

    Merged the two log files #214

    Merged the normal log file and the ai log file into 1 file.

    Made renathal actually work with the deck creator #212

    Renathal now works again. However there is still a bug where if you add renathal to your deck, then remove him, the deck will still require 40 cards. This bug is only on the card creator side, and the resulting deck will be rejected when trying to use it in a game. The only way to fix the bug currently is to restart the deck creator.

    Look up vanilla cards using their dbfId #172

    You can now look up vanilla cards using their dbfId. Find a card's dbfId by searching it up on the Hearthstone Wiki then CTRL+F on the webpage and type dbfId. For example, the dbfId of Brann Bronzebeard is 2949

    Added a regex toggle prompt to the breaking change script #198

    You can now choose if you want to use regex or not when using the breaking change script. Speaking of the breaking change script, for any changes here labelled BREAKING CHANGE, the thing under it that says BC Prompt: is a prompt which you can enter into the breaking change script to search for that breaking change and fix any of your cards that are affected.

    Fixed a class creator bug #229

    Bugged when any answer starts with b, it would think you wrote back if the answer to ANY of the class creator's question started with b

    When minions with reborn die, and their reborn effect kicks in, still grant 1 corpse, and add move the original minion to the graveyard (spoilers, when a minion with reborn dies, a new minion gets summoned in it's place)

    Removed game.dirname #199

    game.dirname was added since i once wrote __dirname__ instead of __dirname in a file, and thought you could only use __dirname in certain files.

    Began work on future updates

    Began work on things that couldn't fit into this update.

    A lot of small things that didn't make it on this list

    There is a list of things to cover to see a list of commits, go to #195.

    Fixed bugs

    Fixed a lot of bugs

    Changelog

    Full Changelog: https://github.com/LunarTides/Hearthstone.js/compare/v1.5.1...v1.6.0

    Downloads
  • v1.5.1 222e271358

    Stable

    LunarTides released this 2023-06-09 10:17:48 +00:00 | 1286 commits to main since this release

    Downloads
  • v1.5.0 4d79680e05

    Stable

    LunarTides released this 2023-06-09 10:16:50 +00:00 | 1288 commits to main since this release

    Version 1.5 is here!

    Here are the changes:

    Player changes

    None

    Creator changes

    BREAKING CHANGE: Removed redundant keyword methods #149

    endofturn, startofturn, and onattack have been removed in place of passives.

    All functions in the source code now has better docstrings #175

    These docstrings work with vscode now.

    Small changes

    Made generating vanilla cards easier #137

    You can now run scripts/genvanilla.bat to generate vanilla cards.

    You can now specify a global editor #170

    You can now change the editor in config/general.json from vim to something else, like code. Now every time the game tries to open the editor, like when making a card using the card creator, it will run {editor} {path} instead.

    Some files are now in the new scripts/ folder #170

    Some vanilla cards are now filtered away #169

    Some useless vanilla cards (cards from battlegrounds, solo missions, etc...) are now filtered away from the card generator. This should make the functions that use the vanilla cards about 50% faster.

    Improved support for Linux #170

    Reworked adapt and invoke #143

    The backend for adapt and invoke has been reworked. This is NOT a breaking change.

    Added test files for all modules #141 #138

    All modules now have a test file

    Fixed all quests #145

    I forgot to update old quests when i reworked the quest system in 1.4

    The card creator now adds some additional comments to cards #158

    Card files that were created with the card creator now has 2 additional comments.

    1. // Created by the {Custom / Vanilla / Class} Card Creator at the top of the file
    2. // {The card's description} in the generated function (battlecry, deathrattle, cast, etc...)

    Fixed a bug that allowed the ai to attack targets with stealth #144

    Fixed a bug that allowed location cards to be indirectly damaged #154

    Changelog:

    Full Changelog: https://github.com/LunarTides/Hearthstone.js/compare/v1.4.0...v1.5.0

    Downloads
  • v1.2.0 41ba7b0843

    v1.2.0 Stable

    LunarTides released this 2023-05-14 13:21:27 +00:00 | 1446 commits to main since this release

    Version 1.2 is here!

    After a week of work, update 1.2 is finished.
    Here are the changes:

    Player changes

    Ai attack models #34

    You can now switch between ai attack models by changing AIAttackModel in the ai config. Setting this value to 1 will make the ai use the old attacking code, before 3ff32b7. Setting this to any other values makes the ai use the default one.

    Creator changes

    BREAKING CHANGE: Renamed game passives to events #39

    All functions work the same, just with different names.

    game.functions.addPassive has been renamed to game.functions.addEventListener

    game.GameStats has been renamed to game.EventManager.
    game.passives has been renamed to game.eventListeners
    game.stats has been renamed to game.events
    game.stats.update has been renamed to game.events.broadcast
    game.updatePassives has been renamed to game.triggerEventListeners
    All event names have been changed. Look at events.txt.

    BREAKING CHANGE: functions.getCards now returns a list instead of an object #16

    This now returns a list of blueprints, instead of an object like it used to. This is because I was always just doing Object.values(functions.getCards()) regardless. If you want the keys of the old version, you can just do functions.getCards().map(c => c.name).

    Improved backups #33

    The card class now has the createBackup and restoreBackup functions. This will allow you to create and restore infinite amounts of backups of cards. Why? ...

    Added functions to copy cards #50

    The card class now has the perfectCopy and imperfectCopy functions. perfectCopy will make a perfect copy of the card, this is rarely useful. imperfectCopy will make an imperfect copy of the card, this happens when, for example, shuffling a card into the player's deck.

    Added a way to run the vanilla card creator through the runner #48

    You can now add vanilla cards through the runner, instead of having to open up the folder and running it from there.

    Added breaking change script #54

    Added a breaking change script. You can type in a regular expression to search for, and it will show every card that matches the search. You can then run a command for each of them, like vim. This will make it a lot easier to make breaking changes, but there are a lot of other uses this has.

    Added missing docstrings #12

    All functions in the source code now have docstrings!

    Small changes

    Made the tester handle crashes #41

    The tester (test.js) will now show more information when the game crashes, it will show the ai's history, and the general history.

    Made the card creator more readable #53

    The card creator code has always been a mess, even before the rewrite (19d2384). The card creator code should now be more readable, except for the doCode function. I'm not brave enough yet. <-- #81 for 1.3

    Fixed a bug in the deck creator #47

    The deck creator got confused when you added cards that began with p, a, or r, without typing a command before it, and thought you were trying to do other commands. I'm surprised it took me this long to notice that.

    Made the ai trade #66

    Before this, the ai would never trade.

    Changelog:

    Full Changelog: https://github.com/LunarTides/Hearthstone.js/compare/v0.1.0...v1.2.0

    Downloads
  • v1.3.0 a87dfaa279

    Stable

    LunarTides released this 2023-05-14 13:20:11 +00:00 | 1388 commits to main since this release

    Version 1.3 is here!

    After another week of work, update 1.3 is finished.
    Here are the changes:

    Player changes

    Made mulligan show more information #79

    Now when mulligan-ing you will be able to see the entire game like you can when playing a card, instead of just the name of the cards in your hand.

    Creator changes

    BREAKING CHANGE Removed add_to_hand and clone parameters from interact.discover

    game.interact.discover no longer has the add_to_hand and clone parameters. You will have to manually clone and add the card to your hand. The example in the wiki has been updated, so check that out.

    Added a condition system #59

    You can now get a card to automatically say if it's condition is cleared. Check out cards/Tests/condition.js and cards/Tests/condition2.js

    Added a placeholder system #88

    You can now put a placeholder in the card's description like this: Draw cards equal to how many cards you have played while this was in your hand. (Currently: {amount}). You can then replace the {amount} with anything, and it will automatically keep updating it. Check out cards/Tests/placeholder.js.

    Added back type to card blueprints #49

    Card blueprints now have the type variable. Set this to Minion, Spell, Weapon, etc...

    Small changes

    Added support for vanilla deckcodes #56

    The game now supports vanilla Hearthstone deckcodes.
    Just put in a vanilla deckcode and it should work if every card in the deckcode is implemented in Hearthstone.js
    The good thing about this is that if the card isn't implemented, the game can just look up all of the information of that card and run it through the vanilla card creator to immediately create that card. The only thing you need to do is program the logic of the card.

    Made a crash log system #105

    Now when the game crashes, a file will be created in the new logs folder called crashlog-XX.XX.XX-XX.XX.XX.txt (The X's is the date it crashed at. Example: crashlog-04.05.23-23.59.59.txt).
    Drag this file into the Logs section when making a bug report.

    Made a log system #106

    This is the same as the crash log system, but it generates a log-XX.XX-----(etc...) instead.
    Drag this file into the Logs section when making a bug report where the game doesn't crash.

    Renamed card generator to vanilla card creator #55

    This just helps with clarity.

    Fixed an infuse bug #90

    Fixed a bug with the infuse keyword. I forgot to update a part of the code in 1.2.

    Made cast on draw spells also trigger when played #89

    This is vanilla functionality that i didn't know existed. Cast on Draw is now a keyword instead of a function.

    Made the test deck (30 Sheep) only work in debug mode #78

    The test deck is a pseudo-valid deck and so shouldn't exist outside of debug mode. Now if you don't enter a deckcode, it will show an error message.
    Debug mode is not a requirement if you're on the develop branch.

    Put the debug cards (inf mana, 10 mana) in cards/Debug #75

    I want to support these cards, but none of the other cards in cards/Tests, so i just moved these to another folder.

    Made the card creator even more readable #81

    Made the doCode function more readable (or at least better then what it was). Also renamed the function to createCard

    Version numbers now end with -stable or -dev #107

    This way, when you're on the develop branch, it won't say V1.2.0 or V1.3.0 when the stable branch is on V1.2.0, because that's a bit confusing.

    Changelog:

    Full Changelog: https://github.com/LunarTides/Hearthstone.js/compare/v1.2.0...v1.3.0

    Downloads
  • v1.4.0 b2eedc866a

    Stable

    LunarTides released this 2023-05-14 13:19:05 +00:00 | 1355 commits to main since this release

    Version 1.4 is here!

    Here are the changes:

    Player changes

    Added the finale keyword #114

    Added the Finale keyword.

    Added the overheal keyword #116

    Added the Overheal keyword.

    Creator changes

    BREAKING CHANGE Moved dredge from functions to interact #134

    functions.dredge is now interact.dredge.

    Small changes

    Added example cards #60

    They are in cards/Examples. Make sure to read the README.md's

    Removed useless packages #119

    All files are now in one package.

    Added a card updater. #115

    If you update the vanilla cards by running genvanilla.bat, run this script and it will tell you if the hearthstone.js version of the card is outdated.

    Moved all deckcode functions to another class #124

    Moved the deckcode functions to Functions.js:DeckcodeFunctions.

    Added a Hearthstone.js to Vanilla deckcode converter #117

    Added a Hearthstone.js to Vanilla deckcode converter

    Added a functions.js test #131

    Added a test file for functions.js

    Improved sharing the game constant #132

    This makes the code look better.

    Changelog:

    Full Changelog: https://github.com/LunarTides/Hearthstone.js/compare/v1.3.0...v1.4.0

    Downloads