Hearthstone Wiki

Hearthstone Wiki is currently under major revamp. All articles that have card lists or queries may not function properly for now. Please check back later!

READ MORE

Hearthstone Wiki
Advertisement
Hearthstone Wiki

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
    A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT COUNT(DISTINCT `cargo__Cards`.`_pageName`) AS `count` FROM `cargo__Cards` LEFT OUTER JOIN `cargo___pageData` ON ((`cargo__Cards`.`_pageId`=`cargo___pageData`.`_pageId`)) WHERE (`cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Card_data(\\||$)" AND `cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Wild_format_cards(\\||$)") AND `cargo__Cards`.`bg_type` IS NULL AND (`cargo__Cards`.`type`=CONCAT("W","e","a","p","o","n")) ORDER BY COUNT(DISTINCT `cargo__Cards`.`_pageName`) LIMIT 1000 Function: CargoSQLQuery::run Error: 1054 Unknown column 'cargo__Cards.bg_type' in 'where clause' (geo-db-i-master.query.consul.)

, 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
    A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT COUNT(DISTINCT `cargo__Cards`.`_pageName`) AS `count` FROM `cargo__Cards` LEFT OUTER JOIN `cargo__Cards__class` ON ((`cargo__Cards`.`_ID`=`cargo__Cards__class`.`_rowID`)) LEFT OUTER JOIN `cargo___pageData` ON ((`cargo__Cards`.`_pageId`=`cargo___pageData`.`_pageId`)) WHERE (`cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Card_data(\\||$)" AND `cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Standard_format_cards(\\||$)") AND `cargo__Cards`.`bg_type` IS NULL AND (`cargo__Cards`.`type`=CONCAT("S","p","e","l","l")) AND (`cargo__Cards__class`.`_value`=CONCAT("M","a","g","e")) AND (`cargo__Cards`.`rarity`=CONCAT("!","L","e","g","e","n","d","a","r","y")) AND (`cargo__Cards`.`collectible`=1) ORDER BY COUNT(DISTINCT `cargo__Cards`.`_pageName`) LIMIT 1000 Function: CargoSQLQuery::run Error: 1054 Unknown column 'cargo__Cards.bg_type' in 'where clause' (geo-db-i-master.query.consul.)

.

  • {{Custom card count|type=Minion|collectible=true|class=Any{{!}}{{!}}Priest|mana=8~99|format=wild}}
    produces
    A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT COUNT(DISTINCT `cargo__Cards`.`_pageName`) AS `count` FROM `cargo__Cards` LEFT OUTER JOIN `cargo__Cards__class` ON ((`cargo__Cards`.`_ID`=`cargo__Cards__class`.`_rowID`)) LEFT OUTER JOIN `cargo___pageData` ON ((`cargo__Cards`.`_pageId`=`cargo___pageData`.`_pageId`)) WHERE (`cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Card_data(\\||$)") AND `cargo__Cards`.`bg_type` IS NULL AND (`cargo__Cards`.`type`=CONCAT("M","i","n","i","o","n")) AND (`cargo__Cards__class`.`_value`=CONCAT("A","n","y") OR `cargo__Cards__class`.`_value`=CONCAT("P","r","i","e","s","t")) AND (`cargo__Cards`.`cost`>="8" AND `cargo__Cards`.`cost`<="99") AND (`cargo__Cards`.`collectible`=1) ORDER BY COUNT(DISTINCT `cargo__Cards`.`_pageName`) LIMIT 1000 Function: CargoSQLQuery::run Error: 1054 Unknown column 'cargo__Cards.bg_type' in 'where clause' (geo-db-i-master.query.consul.)

.

    • This is the number of different neutral or priest minions with cost (8) or higher in Wild format, which is the card pool for Free From Amber if cast by a priest.
  • {{#var:stdcount}} produces
    A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT COUNT(DISTINCT `cargo__Cards`.`_pageName`) AS `count` FROM `cargo__Cards` LEFT OUTER JOIN `cargo__Cards__class` ON ((`cargo__Cards`.`_ID`=`cargo__Cards__class`.`_rowID`)) LEFT OUTER JOIN `cargo___pageData` ON ((`cargo__Cards`.`_pageId`=`cargo___pageData`.`_pageId`)) WHERE (`cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Card_data(\\||$)" AND `cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Standard_format_cards(\\||$)") AND `cargo__Cards`.`bg_type` IS NULL AND (`cargo__Cards`.`type`=CONCAT("S","p","e","l","l")) AND (`cargo__Cards__class`.`_value`=CONCAT("M","a","g","e")) AND (`cargo__Cards`.`rarity`=CONCAT("!","L","e","g","e","n","d","a","r","y")) AND (`cargo__Cards`.`collectible`=1) ORDER BY COUNT(DISTINCT `cargo__Cards`.`_pageName`) LIMIT 1000 Function: CargoSQLQuery::run Error: 1054 Unknown column 'cargo__Cards.bg_type' in 'where clause' (geo-db-i-master.query.consul.)

again without re-querying, from the Standard format mage query above.

  • {{#var:wild-onlycount}} produces
    A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT COUNT(DISTINCT `cargo__Cards`.`_pageName`) AS `count` FROM `cargo__Cards` LEFT OUTER JOIN `cargo___pageData` ON ((`cargo__Cards`.`_pageId`=`cargo___pageData`.`_pageId`)) WHERE (`cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Card_data(\\||$)" AND `cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Wild_format_cards(\\||$)") AND `cargo__Cards`.`bg_type` IS NULL AND (`cargo__Cards`.`type`=CONCAT("W","e","a","p","o","n")) ORDER BY COUNT(DISTINCT `cargo__Cards`.`_pageName`) LIMIT 1000 Function: CargoSQLQuery::run Error: 1054 Unknown column 'cargo__Cards.bg_type' in 'where clause' (geo-db-i-master.query.consul.)

again without re-querying, from the wild-exclusive weapon query above.

  • {{#var:wildcount}} produces
    A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT COUNT(DISTINCT `cargo__Cards`.`_pageName`) AS `count` FROM `cargo__Cards` LEFT OUTER JOIN `cargo__Cards__class` ON ((`cargo__Cards`.`_ID`=`cargo__Cards__class`.`_rowID`)) LEFT OUTER JOIN `cargo___pageData` ON ((`cargo__Cards`.`_pageId`=`cargo___pageData`.`_pageId`)) WHERE (`cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Card_data(\\||$)") AND `cargo__Cards`.`bg_type` IS NULL AND (`cargo__Cards`.`type`=CONCAT("M","i","n","i","o","n")) AND (`cargo__Cards__class`.`_value`=CONCAT("A","n","y") OR `cargo__Cards__class`.`_value`=CONCAT("P","r","i","e","s","t")) AND (`cargo__Cards`.`cost`>="8" AND `cargo__Cards`.`cost`<="99") AND (`cargo__Cards`.`collectible`=1) ORDER BY COUNT(DISTINCT `cargo__Cards`.`_pageName`) LIMIT 1000 Function: CargoSQLQuery::run Error: 1054 Unknown column 'cargo__Cards.bg_type' in 'where clause' (geo-db-i-master.query.consul.)

again without re-querying, from the Wild format Free From Amber query above.

  • {{Custom card count|type=Minion|mana=10|format=potato}} produces
    A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT COUNT(DISTINCT `cargo__Cards`.`_pageName`) AS `count` FROM `cargo__Cards` LEFT OUTER JOIN `cargo___pageData` ON ((`cargo__Cards`.`_pageId`=`cargo___pageData`.`_pageId`)) WHERE (`cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Card_data(\\||$)") AND `cargo__Cards`.`bg_type` IS NULL AND (`cargo__Cards`.`type`=CONCAT("M","i","n","i","o","n")) AND (`cargo__Cards`.`cost`="10") ORDER BY COUNT(DISTINCT `cargo__Cards`.`_pageName`) LIMIT 1000 Function: CargoSQLQuery::run Error: 1054 Unknown column 'cargo__Cards.bg_type' in 'where clause' (geo-db-i-master.query.consul.)

, the number of 10-mana minions in Wild format (the most general format since "potato" is not valid).

  • {{#var:wildcount}} produces
    A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT COUNT(DISTINCT `cargo__Cards`.`_pageName`) AS `count` FROM `cargo__Cards` LEFT OUTER JOIN `cargo___pageData` ON ((`cargo__Cards`.`_pageId`=`cargo___pageData`.`_pageId`)) WHERE (`cargo___pageData`.`_categories__full` RLIKE "(^|\\|)Card_data(\\||$)") AND `cargo__Cards`.`bg_type` IS NULL AND (`cargo__Cards`.`type`=CONCAT("M","i","n","i","o","n")) AND (`cargo__Cards`.`cost`="10") ORDER BY COUNT(DISTINCT `cargo__Cards`.`_pageName`) LIMIT 1000 Function: CargoSQLQuery::run Error: 1054 Unknown column 'cargo__Cards.bg_type' in 'where clause' (geo-db-i-master.query.consul.)

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

Advertisement