Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fireplace uses the original Hearthstone Card IDs to implement cards.
For example, Wisp is
CS2_231. To give a Wisp to a player, you would then do:
This is a bit impractical. The
fireplace.cards.filter function helps us find cards programmatically by name. Note that the names from the
enUS locale are used, no other name is currently available in Fireplace.
>>> import fireplace.cards >>> fireplace.cards.filter(name="Wisp") ['CS2_231']
Note that names are not necessarily unique. In fact, many Choose One druid cards have duplicate names, so do not rely on them to find the card you want. You can add
collectible=True to the
filter() call to filter on collectible cards only, eliminating most duplicates.
If you need to figure out which ID a card is, unfortunately, neither Hearthpwn nor the Hearthstone Wiki currently display them. However, the CardDefs.xml file in
fireplace/cards/data/CardDefs.xml does. It is human-readable, so it is easy to find cards and match them up to their ID or description.
Buffs, summoned tokens and other "related" cards often have the ID of the main card, with a suffix of some kind. Some examples:
Cold Blood has the ID
CS2_073. The standard buff has the ID
CS2_073e. The combo buff has the ID
Poison Cloud has the ID
NAX11_02. The Heroic version has the ID
Rexxar has the ID
HERO_05. The Alleria Windrunner skin has the ID
Elite Tauren Chieftain has the ID
PRO_001. I Am Murloc has the ID
PRO_001a. The summoned Murloc has the ID
tests/implemented.py script will also output a list of all card names and their IDs. It's easy to find a card from there.