-
Notifications
You must be signed in to change notification settings - Fork 152
Card IDs
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:
game.player1.give("CS2_231")
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 IDCS2_073e
. The combo buff has the IDCS2_073e2
. -
Poison Cloud has the ID
NAX11_02
. The Heroic version has the IDNAX11_02H
-
Rexxar has the ID
HERO_05
. The Alleria Windrunner skin has the IDHERO_05a
. -
Elite Tauren Chieftain has the ID
PRO_001
. I Am Murloc has the IDPRO_001a
. The summoned Murloc has the IDPRO_001at
.
The 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.
- The Fireplace Card API
- The Fireplace DSL
- Card introspection
- Creating and playing a Game
- The CardDefs.xml file
- Developer Quick Start
- How to enable logging in Hearthstone
- Frequently Asked Questions
- Game State
- Game Actions
- Powers and Card Actions
- Target Selection
- Events
- Enchantments