Difference between revisions of "Template:Set-Details-Compact"

From mtgpq wiki
Jump to: navigation, search
Line 10: Line 10:
 
* <code><nowiki>{{{mechanics}}}</nowiki></code>: Comma separated list of zero or more mechanics (e.g. "Saga, Historic, Leader")
 
* <code><nowiki>{{{mechanics}}}</nowiki></code>: Comma separated list of zero or more mechanics (e.g. "Saga, Historic, Leader")
 
* <code><nowiki>{{{cards_total}}}</nowiki></code>: The total number of cards in the set (e.g. 211)
 
* <code><nowiki>{{{cards_total}}}</nowiki></code>: The total number of cards in the set (e.g. 211)
* <code><nowiki>{{{cards_mp}}}</nowiki></code>: The number of masterpiece cards in the set (e.g. 10)
+
* <code><nowiki>{{{cards_mp}}}</nowiki></code>: The number of masterpiece cards in the set, if any (e.g. 10)
* <code><nowiki>{{{cards_m}}}</nowiki></code>: The number of mythic cards in the set (e.g. 29)
+
* <code><nowiki>{{{cards_m}}}</nowiki></code>: The number of mythic cards in the set, if any (e.g. 29)
* <code><nowiki>{{{cards_r}}}</nowiki></code>: The number of rare cards in the set (e.g. 48)
+
* <code><nowiki>{{{cards_r}}}</nowiki></code>: The number of rare cards in the set, if any (e.g. 48)
* <code><nowiki>{{{cards_u}}}</nowiki></code>: The number of uncommon cards in the set (e.g. 64)
+
* <code><nowiki>{{{cards_u}}}</nowiki></code>: The number of uncommon cards in the set, if any (e.g. 64)
* <code><nowiki>{{{cards_c}}}</nowiki></code>: The number of common cards in the set (e.g. 60)
+
* <code><nowiki>{{{cards_c}}}</nowiki></code>: The number of common cards in the set, if any (e.g. 60)
  
 
A file named <code><nowiki>{{{abbr}}}_Symbol.png</nowiki></code> is assumed to exist and is used for the set icon.
 
A file named <code><nowiki>{{{abbr}}}_Symbol.png</nowiki></code> is assumed to exist and is used for the set icon.
Line 59: Line 59:
 
! rowspan="2" style="text-align: left;" | {{nowrap|[[{{{name}}}]] ({{{abbr}}})}}
 
! rowspan="2" style="text-align: left;" | {{nowrap|[[{{{name}}}]] ({{{abbr}}})}}
 
<small>''[{{{notes}}} {{{date}}} (version {{{version}}})]''</small>
 
<small>''[{{{notes}}} {{{date}}} (version {{{version}}})]''</small>
| '''Cards:''' [https://mtgpq.info/cards/search?sets={{{id}}} {{{cards_total}}}]&nbsp; (<small><!--
+
| {{Card rarity counts|set={{{id}}}|total={{{cards_total}}}|c={{{cards_c|}}}|u={{{cards_u|}}}|r={{{cards_r|}}}|m={{{cards_m|}}}|mp={{{cards_mp|}}}}}
-->{{#ifeq: {{{cards_c}}}|0||{{Rarity|C}}[https://mtgpq.info/cards/search?rarities=5&sets={{{id}}} {{{cards_c}}}]&nbsp;'''·'''&nbsp;}}<!--
 
-->{{#ifeq: {{{cards_u}}}|0||{{Rarity|U}}[https://mtgpq.info/cards/search?rarities=4&sets={{{id}}} {{{cards_u}}}]&nbsp;'''·'''&nbsp;}}<!--
 
-->{{#ifeq: {{{cards_r}}}|0||{{Rarity|R}}[https://mtgpq.info/cards/search?rarities=3&sets={{{id}}} {{{cards_r}}}]}}<!--
 
-->{{#ifeq: {{{cards_m}}}|0||&nbsp;'''·'''&nbsp;{{Rarity|M}}[https://mtgpq.info/cards/search?rarities=2&sets={{{id}}} {{{cards_m}}}]}}<!--
 
-->{{#ifeq: {{{cards_mp}}}|0||&nbsp;'''·'''&nbsp;{{Rarity|MP}}[https://mtgpq.info/cards/search?rarities=1&sets={{{id}}} {{{cards_mp}}}]}}</small>)
 
 
|-
 
|-
 
| {{#if: {{#explode:{{{mechanics}}}|,|0}} | '''New mechanics:''' <small>&nbsp; [[Abilities#{{#explode:{{{mechanics}}}|,|0}}|{{#explode:{{{mechanics}}}|,|0}}]]<!--
 
| {{#if: {{#explode:{{{mechanics}}}|,|0}} | '''New mechanics:''' <small>&nbsp; [[Abilities#{{#explode:{{{mechanics}}}|,|0}}|{{#explode:{{{mechanics}}}|,|0}}]]<!--

Revision as of 06:34, 22 February 2019

Shorthand for creating rows of a table containing set details for a given Set.

Parameters are:

  • {{{id}}}: The set's ID on mtgpq.info (e.g. 13)
  • {{{name}}}: The name of the set (e.g. Dominaria)
  • {{{abbr}}}: The abbreviation used for the set (e.g. DOM)
  • {{{date}}}: The month/year the set was released (e.g. May 2018)
  • {{{version}}}: The version of the app the set released in (e.g. 2.7 for DOM)
  • {{{notes}}}: Release notes for the version
  • {{{mechanics}}}: Comma separated list of zero or more mechanics (e.g. "Saga, Historic, Leader")
  • {{{cards_total}}}: The total number of cards in the set (e.g. 211)
  • {{{cards_mp}}}: The number of masterpiece cards in the set, if any (e.g. 10)
  • {{{cards_m}}}: The number of mythic cards in the set, if any (e.g. 29)
  • {{{cards_r}}}: The number of rare cards in the set, if any (e.g. 48)
  • {{{cards_u}}}: The number of uncommon cards in the set, if any (e.g. 64)
  • {{{cards_c}}}: The number of common cards in the set, if any (e.g. 60)

A file named {{{abbr}}}_Symbol.png is assumed to exist and is used for the set icon.

Example

This shorthand within a table

{{Set-Details-Compact
|id = 13
|name = Dominaria
|abbr = DOM
|date = May 2018
|version = 2.7
|notes = https://forums.d3go.com/discussion/72742/2-7-release-notes-updated-5-23-18
|mechanics = Saga,Historic,Leader
|cards_total = 211
|cards_mp = 10
|cards_m = 29
|cards_r = 48
|cards_u = 64
|cards_c = 60
}}

Produces: