A Variable is a custom word that represents a number, text or card(s).
User-created variables are deleted once the card 'moves' to a different place (Like being destroyed, flipped face-down, etc.)
Differences between the commandsEdit
STORE stores data into a variable to be used later. If the variable already contains data, it is overwritten.
APPEND works exactly like STORE, except it adds more data to the variable instead of overwriting it. Be careful not to let the variable get too big with this, or it can slow the program down.
INCREMENT only works on Number variables and increases the number by 1.
DECREMENT is the same as INCREMENT except it decreases it by 1.
Number variables represent a number or a group of numbers, usually created in a COUNT, INCREMENT or DECREMENT command. They can be used to match Level, Atk, Def, Range and other number-based data.
Text variables represent words or a group of words, usually created in a DECLARE command. They can be used to match Card Names, Types, Attributes, and other text-based data.
Card variables represent a card or a group of cards, and can be created a multiple number of ways, the most common being a STORE or APPEND command at the end of some major command.
For example, if there is a STORE at the end of a MOVE, the card(s) that were moved will be stored into the variable.
Card variables differ from Number and Text variables in that you can access properties (Like Type, Attribute) with a period after the variable.
For example, if you stored a variable named MyCardVar, you can check if it's a Spell like this:
CHECK MyCardVar.Attr IS Attr:Spell
Me ----- A card variable of the card calling the script
Chosen ---- A card chosen by CHOOSE or OPCHOOSE.