Difference between revisions of "Template:Card data"

From mtgpq wiki
Jump to: navigation, search
Line 5: Line 5:
 
The card data is stored in templates named "Template:Card data: card name".  For example, [[Template:Card data: Zetalpa, Primal Dawn]].  The contents of each card data template are formatted as follows:
 
The card data is stored in templates named "Template:Card data: card name".  For example, [[Template:Card data: Zetalpa, Primal Dawn]].  The contents of each card data template are formatted as follows:
  
'''Name|Expansion|Rarity|Colors|Cost|Type|Subtypes|Stats|Keywords'''
+
'''Name|Expansion|Rarity|Colors|Cost|Type|Subtypes|P/T|Shields|Keywords'''
  
* Name: The card name, such as "Zetalpa, Primal Dawn".  Use "Side1//Side2" for double-sided cards, such as "Invent//Invert".
+
{| class="wikitable"
* Expansion: The 3-letter abbreviation for the card's expansion set, such as "RIX"
+
|-
* Rarity: "C", "U", "R", "M", or "MP" according to the rarity
+
! Element
* Colors: An upper-case color string such as "UBR", or "C" for colorless
+
! Description
* Cost: The base mana cost of the card, such as "19".  Use two costs separated by a comma for split cards, such as "6,9"
+
! Examples
* Type: "Creature", "Spell", or "Support"
+
|-
* Subtypes: A comma-separated list of sub-types, such as "Dinosaur,Elder"
+
| Name
* Stats: For creatures, power and toughness separated by a slash, such as "4/8"For supports, the shield cost, such as "4".  Blank for spells.
+
| The card name.  Use "Side1//Side2" for double-sided cards, such as "Invent//Invert".
* Keywords: A comma-separated list of keywords used by the card, such as "Activate,Double Strike,Flying,Trample,Vigilance".
+
| "Zetalpa, Primal Dawn"
 +
|-
 +
| Expansion
 +
| The 3-letter abbreviation for the card's expansion set.
 +
| "RIX"
 +
|-
 +
| Rarity
 +
| A one or two letter abbreviation of the card's rarity.
 +
| "C", "U", "R", "M", or "MP"
 +
|-
 +
| Colors
 +
| An upper-case string representing the color of the card.
 +
| "W", "UBR", "C"
 +
|-
 +
| Cost
 +
| The base mana cost of the card.  Use two costs separated by a comma for split cards.
 +
| "19", "6,9"
 +
|-
 +
| Type
 +
| The type of the card.
 +
| "Creature", "Spell", "Support"
 +
|-
 +
| Subtypes
 +
| A comma-separated list of sub-types.
 +
| "Dinosaur,Elder"
 +
|-
 +
| P/T
 +
| For creatures, power and toughness separated by a slash; blank otherwise.
 +
| "4/8"
 +
|-
 +
| Shields
 +
| For supports, the shield cost; blank otherwise.
 +
| "4"
 +
|-
 +
| Keywords
 +
| A comma-separated list of keywords used by the card.
 +
| "Activate,Double Strike,Flying,Trample,Vigilance"
 +
|}
  
 
==Example==
 
==Example==

Revision as of 00:55, 10 February 2019

Usage

Extract card data for a card for use in other templates. The only parameter is the card name.

The card data is stored in templates named "Template:Card data: card name". For example, Template:Card data: Zetalpa, Primal Dawn. The contents of each card data template are formatted as follows:

Name|Expansion|Rarity|Colors|Cost|Type|Subtypes|P/T|Shields|Keywords

Element Description Examples
Name The card name. Use "Side1//Side2" for double-sided cards, such as "Invent//Invert". "Zetalpa, Primal Dawn"
Expansion The 3-letter abbreviation for the card's expansion set. "RIX"
Rarity A one or two letter abbreviation of the card's rarity. "C", "U", "R", "M", or "MP"
Colors An upper-case string representing the color of the card. "W", "UBR", "C"
Cost The base mana cost of the card. Use two costs separated by a comma for split cards. "19", "6,9"
Type The type of the card. "Creature", "Spell", "Support"
Subtypes A comma-separated list of sub-types. "Dinosaur,Elder"
P/T For creatures, power and toughness separated by a slash; blank otherwise. "4/8"
Shields For supports, the shield cost; blank otherwise. "4"
Keywords A comma-separated list of keywords used by the card. "Activate,Double Strike,Flying,Trample,Vigilance"

Example

The following mark-up:

{{Card data|Zetalpa, Primal Dawn}}

Produces:

{{p{{{1}}}|Zetalpa, Primal Dawn|RIX|M|W|19|Creature|Dinosaur,Elder|4/8||Activate,Double Strike,Flying,Trample,Vigilance|Zetalpa_Primal_Dawn.png}}