Hearthstone Wiki
Register
m (More syntax explanation)
(more details on semantic wiki)
Line 32: Line 32:
 
* <code><nowiki>|rarity=Legendary{{!}}{{!}}Epic</nowiki></code> specifies either of the highest two rarities
 
* <code><nowiki>|rarity=Legendary{{!}}{{!}}Epic</nowiki></code> specifies either of the highest two rarities
   
<code><nowiki>!</nowiki></code> can be used as a prefix before a value to exclude a specific value:
+
<code><nowiki>!</nowiki></code> can be used as a prefix before a value to select any values not equal to a specific one:
* <code><nowiki>|rarity=!Legendary</nowiki></code> specifies all rarities ''except'' Legendary
+
* <code><nowiki>|rarity=!Legendary</nowiki></code> specifies any rarities ''other than'' Legendary
  +
* This is not useful for criteria which are optional and/or allow multiple values, because it does not ''exclude'' the stated value from the results, it simply searches ''for'' values ''other'' than that one. For example <code><nowiki>|ability=!Taunt</nowiki></code> seems like it would select all cards without Taunt, but instead:
  +
** includes cards with the Taunt ability as long as they have ''at least one non-Taunt ability''.
  +
** does not include cards that have no abilities at all, since they do not have at least one non-Taunt ability.
  +
** This is a limitation of the Semantic MediaWiki software. If there is truly a need to select for such conditions, automatic hiddentags can be set up to represent the absence of another property, which can then be selected for.
   
<code><nowiki>></nowiki></code> can be used as a prefix before a value to select all values equal to or greater:
+
<code><nowiki>></nowiki></code> can be used as a prefix before a value to select all values greater than ''or equal to'' the following value (this is different from the normal mathematical meaning of "strictly greater than"):
 
* <code><nowiki>|mana=>8</nowiki></code> specifies a mana cost of 8 or more
 
* <code><nowiki>|mana=>8</nowiki></code> specifies a mana cost of 8 or more
   

Revision as of 21:54, 22 May 2017

This template shows a table listing cards according to the criteria specified to the parameters below.

Note: All parameters below are optional. If left blank, they will not affect what cards are shown.

{{Custom card table
  |query=a Semantic MediaWiki expression of which cards should be included. If provided, this query will be used instead of all other parameters.
  |categoryname=the exact name of a category to get cards from, not including the Category prefix. Multiple names can be provided separated by commas, and cards are returned only if they are in all the given categories.
  |category=name prefix of category to get cards from, should match that used for the category parameter on Card infobox. Multiple names can be provided separated by commas, and cards are returned only if they are in all the given categories.
  |name=name of card(s) to show
  |type=type of cards to show
  |subtype=subtype of cards to show
  |class=class of cards to show, using "Any" for neutral cards
  |multiclass=multiclass of cards to show
  |rarity=rarity of cards to show
  |mana=mana cost of cards to show
  |attack=attack value of cards to show
  |health=health value of cards to show
  |gold=True to show only cards with a gold version, False to show only cards that do not
  |ability=show cards with this ability (currently, only one ability can be used as a selector)
  |artist=show cards with this artist
  |voiceactor=show cards with this voice actor
  |tag=show cards with this tag (currently, only one tag can be used as a selector)
  |hiddentag=show cards with this hiddentag (currently, only one tag can be used as a selector)
  |collectible=True to show only collectible cards, False to show only uncollectible cards
  |set=page name of a set of cards to show (currently, only one set can be used as a selector)
}}

While this table is capable of listing cards of any type, separate templates exist for listing the main card types: {{Custom spell card table}}, {{Custom weapon card table}}, and {{Custom minion card table}}. These omit the columns that are unnecessary to those card types, and should be used instead of this template when specifically listing cards of those types.

{{!}}{{!}} can be used as a separator for multiple options in most of the fields for this template:

  • |class=Any{{!}}{{!}}Priest specifies priest cards or neutral cards
  • |rarity=Legendary{{!}}{{!}}Epic specifies either of the highest two rarities

! can be used as a prefix before a value to select any values not equal to a specific one:

  • |rarity=!Legendary specifies any rarities other than Legendary
  • This is not useful for criteria which are optional and/or allow multiple values, because it does not exclude the stated value from the results, it simply searches for values other than that one. For example |ability=!Taunt seems like it would select all cards without Taunt, but instead:
    • includes cards with the Taunt ability as long as they have at least one non-Taunt ability.
    • does not include cards that have no abilities at all, since they do not have at least one non-Taunt ability.
    • This is a limitation of the Semantic MediaWiki software. If there is truly a need to select for such conditions, automatic hiddentags can be set up to represent the absence of another property, which can then be selected for.

> can be used as a prefix before a value to select all values greater than or equal to the following value (this is different from the normal mathematical meaning of "strictly greater than"):

  • |mana=>8 specifies a mana cost of 8 or more

See also

  • {{List cards}}, which transcludes this template
  • {{Cards}}, which produces card images instead of a table
  • {{Custom card count}}, which counts cards instead of listing them