-
Notifications
You must be signed in to change notification settings - Fork 122
Tag Format
This tag format is loosely based around the effect system for Focus and the tag system of Fireplace.
There are currently two types of tags: Auras and Effects. Auras have a continuous effect, which is removed at a given event, or when the corresponding minion is removed. Effects happen repeatedly at a given event until their associated minion is removed.
Auras are a tag that provides a continuous change to the affected objects. As such, the change must be reversible, so it can be undone when the aura is removed.
Auras take the following form:
{
"action": Reversible Action,
"selector": Selector,
"until": Player Event (Optional)
}
action
is any kind of Reversible Action. This action is performed on every object selected by selector
selector
is any Selector. Typically the selector should match the action. So, if the action is Draw then the selector should be a Player Selector. If the action is Increase Health then the selector should be a Minion Selector.
until
is an optional Player Event that dictates when the aura should be removed. This should be included for any aura that is attached to a player (such as a card mana change aura) but should not be included for any aura that is attached to a minion.
An effect is a tag which performs an action each time an event occurs.
{
"when": Event,
"action": Action,
"selector": Selector
when
is an Event that dictates when the effect occurs.
action
is any kind of Action that specifies what will happen when the effect is triggered.
selector
is a Selector that indicates which objects the action should happen to.
An action is some kind of change that happens to an object. There are two types of actions: Player Actions and Minion Actions, although they are not represented differently in the serialization format.
All actions have a name
that dictates what the action is. Some actions also have properties which inform how the action is performed. For example, Heal has the amount
property that dictates how many health points to heal the target.
Player Actions are actions which affect a player, rather than a specific minion.
Mana change is an action which will change the mana cost for some cards. The amount to change the mana by, what the minimum mana resulting from this change can be, and the type of cards affected are all properties that can be changed.
{
"name": "mana_change",
"amount": Integer,
"minimum": Integer,
"card_selector": Card Selector,
}
amount
is an integer specifying the change in mana. A positive number will cause the mana cost to go up, a negative number will cause it to go down, although it will not go lower than minimum
minimum
is the lowest that the mana cost for a card affected by this change can go. Is almost always 0.
card_selector
is a Card Selector that dictates which cards are affected by this change.
Summon will cause a new minion to be added to the board, so long as there are fewer than 7 minions already on the board.
{
"name": "summon",
"card": String
}
card
is a string that gives the name of the card to summon.
Draw causes the player to draw a new card from the deck. This will cause the card to be destroyed if the player already has 10 cards in hand, and will cause the player to take fatigue damage if their deck is empty.
{
"name": "draw"
}