-
Notifications
You must be signed in to change notification settings - Fork 152
3: Card introspection
Jerome Leclanche edited this page Sep 5, 2015
·
3 revisions
The declarative action system in the Fireplace DSL allows for easy introspection of a card's actions. It is therefore possible to programmatically know what effects a card will have and when, without ever playing it.
Here we take a look at the Deathrattle script of the Leper Gnome card (EX1_029
).
>>> from fireplace.card import Card
>>> leper_gnome = Card("EX1_029")
>>> deathrattle = leper_gnome.data.scripts.deathrattle
>>> deathrattle
<TargetedAction: Hit(AMOUNT=2)>
>>> deathrattle._args[deathrattle.__class__.Args.TARGETS]
<Selector: PLAY HOSTILE and HERO and>
>>> deathrattle._args[deathrattle.__class__.Args.AMOUNT]
2
Next article: Creating and playing a Game
- 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