The Root

CardRoot

CardRoot :=

| leaderCard(int, int, int, AtkTimes, Abilities, Effects)

| minionCard(int, int, int, AtkTimes, MinionType, Abilities, Effects)

| spellCard(int, Abilities, Effects)

CardRoot is the starting symbol (nonterminal type) in the item grammar for cards. The root of the item tree for every card is a CardRoot node. There are three major types of cards in ChaosCards, leader cards, minion cards and spell cards, corresponding to the three rules listed above. Please refer to the game mechanism for how each type of cards work. Each Leader card or minion card will need three integer fields for mana cost, attack, and health respectively, and need to have its attack times (how many times it can attack each turn) decided. The cost and attack is randomly chosen in the range of 0 ~ 10, while the health is 1 ~ 10 for minion cards and 10 ~ 40 for leader cards. A minion card will have a minion type. All cards can have abilities and effects, which are possible to expanded into nothing, indicating no ability for effects, except for the effect field for spell, which are forced to contain at least one actual effect. The attack times and minion types are expanded as AttackTimes and MinionType nodes, discussed below, and the abilities and effects are expanded as Abilities and Effects nodes respectively, discussed on the Effect page and Misc page respectively.

AttackTimes

AtkTimes :=

| zeroAttack()

| singleAttack()

| multipleAttack(int)

The attack times in this grammar is not formulated as an integer, but instead a nonterminal type, because the common and default mode is single attack (attack once per turn), and other cases are considered special and very rare, which make it easier to be formulated with categorization. Besides the default single attack setting, other two rare options are zero attack, which means the card cannot attack unless being buffed on the attack times, or multiple attack, which allows the minion/leader to attack multiple times per turn, with the number of times generated as an integer field (the range is 2 ~ 5, biased towards lower value).

MinionType

MinionType :=

| beastMinion()

| dragonMinion()

| demonMinion()

The current minion type system is very simple. There are three types of minions, beasts, dragons, and demons. Currently they are not particularly differentiated by game mechanisms or having any biases in generating other parts of the cards, but is only used in conditions (e.g. "if there is a Beast on the field") and effects (e.g. "change the minion type of a minion to Dragon").