Hearthstone Wiki
Register
m (→‎Examples: clarify last one)
m (→‎Usage: reword a couple usage notes)
Line 10: Line 10:
 
* <code><nowiki>{{#var:wild-onlycount}}</nowiki></code> produces the same value as the previous call to this template that used <code>|format=wild-only</code>.
 
* <code><nowiki>{{#var:wild-onlycount}}</nowiki></code> produces the same value as the previous call to this template that used <code>|format=wild-only</code>.
 
* <code><nowiki>{{#var:wildcount}}</nowiki></code> produces the same value as the previous call to this template that used <code>|format=wild</code> or any other format, including no format at all.
 
* <code><nowiki>{{#var:wildcount}}</nowiki></code> produces the same value as the previous call to this template that used <code>|format=wild</code> or any other format, including no format at all.
* Note that if multiple queries are used in the same page with differences other than <code>format</code>, these variables will always refer to the most recent one.
+
* Note that if multiple template calls are used in the same page with the same <code>format</code>, these count variables will always refer to the most ''recent'' template call of the corresponding format, which may have had a different count than earlier queries.
   
Note that unlike {{t|Custom card table}}, this does not have type-specific versions like {{t|Custom minion card table}} for minions, spells, or weapons. (Those alternates are used because they make good choices about table columns, whereas this template does not make a table at all.) Make sure to add <code>|type=minion</code> (or weapon or spell) to the parameter list if adding this template and copying parameters from one of the type-specific versions.
+
Note that unlike {{t|Custom card table}}, this does not have type-specific versions like {{t|Custom minion card table}} for minions, spells, or weapons. (Those alternates are used because they make good choices about table columns, whereas this template does not make a table at all.) Make sure to add <code>|type=minion</code> (or weapon or spell) to the parameter list if adding this template and copying parameters from one of the type-specific templates.
   
 
==Examples==
 
==Examples==

Revision as of 21:33, 22 May 2017

This template returns a count of cards matching the same criteria as {{Custom card table}}. It also sets a variable for ease of retrieval of the count later in the same page without repeating the entire template call.

This may be useful directly in strategy descriptions or mechanics notes, but can also be used with {{DrawChance}} or {{DiscoverChance}} to generate dynamically updated probabilities.

Usage

See {{Custom card table}} for most parameter/syntax documentation.

To use variables after an initial call to this template on a page:

  • {{#var:stdcount}} produces the same value as the previous call to this template that used |format=standard.
  • {{#var:wild-onlycount}} produces the same value as the previous call to this template that used |format=wild-only.
  • {{#var:wildcount}} produces the same value as the previous call to this template that used |format=wild or any other format, including no format at all.
  • Note that if multiple template calls are used in the same page with the same format, these count variables will always refer to the most recent template call of the corresponding format, which may have had a different count than earlier queries.

Note that unlike {{Custom card table}}, this does not have type-specific versions like {{Custom minion card table}} for minions, spells, or weapons. (Those alternates are used because they make good choices about table columns, whereas this template does not make a table at all.) Make sure to add |type=minion (or weapon or spell) to the parameter list if adding this template and copying parameters from one of the type-specific templates.

Examples

  • {{Custom card count|type=Weapon|format=wild-only}} produces {{#ask:
   Concept:Cards
            
            Has card type::Weapon

|format=count |default=0}}, the number of weapon cards only available in Wild format play.

  • {{Custom card count|type=Spell|class=Mage|format=standard|rarity=!Legendary|collectible=true}} produces {{#ask:
   Concept:Cards
            
            Has card type::Spell
            
            Has class::Mage
            Has rarity::!Legendary
            
            
            
            
            
            
            
            
            Is collectible::true

|format=count |default=0}}.

  • {{Custom card count|type=Minion|collectible=true|class=Any{{!}}{{!}}Priest|mana=>8|format=wild}}
    produces {{#ask:
   Concept:Cards
            
            
            Has card type::Minion
            
            |Priest
            
            [[Has mana cost::>8]]
            
            
            
            
            
            
            
            Is collectible::true

|format=count |default=0}}.

    • This is the number of different neutral or priest minions with cost (8) or higher in Wild format, which is the card pool for Journey to Un'GoroFree From Amber if cast by a priest.
  • {{#var:stdcount}} produces {{#ask:
   Concept:Cards
            
            Has card type::Spell
            
            Has class::Mage
            Has rarity::!Legendary
            
            
            
            
            
            
            
            
            Is collectible::true

|format=count |default=0}} again without re-querying, from the Standard format mage query above.

  • {{#var:wild-onlycount}} produces {{#ask:
   Concept:Cards
            
            Has card type::Weapon

|format=count |default=0}} again without re-querying, from the wild-exclusive weapon query above.

  • {{#var:wildcount}} produces {{#ask:
   Concept:Cards
            
            
            Has card type::Minion
            
            |Priest
            
            [[Has mana cost::>8]]
            
            
            
            
            
            
            
            Is collectible::true

|format=count |default=0}} again without re-querying, from the Wild format Free From Amber query above.

  • {{Custom card count|type=Minion|mana=10|format=potato}} produces {{#ask:
   Concept:Cards
            
            
            Has card type::Minion
            
            
            
            Has mana cost::10

|format=count |default=0}}, the number of 10-mana minions in Wild format (the most general format since "potato" is not valid).

  • {{#var:wildcount}} produces {{#ask:
   Concept:Cards
            
            
            Has card type::Minion
            
            
            
            Has mana cost::10

|format=count |default=0}} again without re-querying. The result from the Free From Amber count has been replaced with the the more recent one from the 10-mana minion count.

See also