-
Notifications
You must be signed in to change notification settings - Fork 152
Actions
Implementation: fireplace/actions.py
These actions are used by the Game object. They can be registered on for Events, but cannot be used within cards.
Creates an attack from source
to target
.
Begins a turn for player
.
Moves target
to Zone.GRAVEYARD
and queues its deathrattles.
Ends player
's turn.
Plays card card
, on target target
if specified. Chooses the action from choose
if specified.
These actions can be used by cards and the game alike. They all have a targets
selector argument, which will resolve to a list of one or more targets upon which the action will be performed. Read more on selectors here.
Note: Evaluated cards: Some card arguments can be given as evaluated cards. This means they can be a Card ID, the result of a Copy()
, or the result of a card Generator (such as a random card).
Buff characters with Enchantment id
.
Move a minion on the field back into the hand. Note: Safely usable on weapons, but untested.
Counters target cards, setting GameTag.CANT_PLAY
which prevents the on-play script from running. This is only used for Counterspell.
Damage characters by amount
. The event will not broadcast if the final amount (after armor) is 0.
Trigger all deathrattles on the targets. This takes EXTRA_DEATHRATTLES
(Baron Rivendare) into account.
Destroy characters.
**Note: Do not use this as an event listener, unless you specifically want to trigger when a character is destroyed (eg. by an effect). Use the Death()
Game Action instead.
Discard targeted cards in hand.
Draws one card for the targets from the top of their deck.
*Note: If you want to draw more than one card, use action multipliers. (eg. Draw(CONTROLLER) * 2
)
Make the targets draw all cards matching the match
selector from their deck. Note: This will not trigger the Draw()
event.
Helper action to call Heal()
on the character targets, for an amount equal to their max health.
Make hero targets gain amount
armor. Do not use on anything else than heroes.
Make player targets gain amount
mana. Note: amount
can be negative to cause them to lose mana.
Give player targets card
. The card
argument is an Evaluated Card (see above)
Cause a hit on targets
for amount
. Optionally sets the hit source as source
(eg. Betrayal)
Heal targets for amount
. The event will not broadcast if the final amount is 0.
Give player targets amount
temporary mana.
Mills count
cards from the targets' decks.
Morph minion targets into card
. card
is an Evaluated Card (see above).
Freezes character targets.
Refills amount
mana crystals for the player targets.
Reveals and destroys targeted Secret cards.
Sets tags on targets following the values
dict argument. For example, SetTag(TARGET, {GameTag.TAUNT: True, GameTag.WINDFURY: False})
will set TAUNT
and unset WINDFURY
.
Silences minion targets.
Summons card
for each target. This can be used to summon a Minion, Hero, HeroPower, or equip a Weapon. card
is an Evaluated Card (see above). Note that if card
is a selector, the card is directly summoned from where it currently is (eg "force played").
Shuffles card
for each target. card
is an Evaluated Card (see above).
Give control of the targets to the controller of the source of the action.
Unlock the overload (both locked and owed) on the targets. Targets must be players.
- 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