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

From mtgpq wiki
Jump to: navigation, search
 
(31 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>Shorthand for creating a miniature table with set details for a given Set.
+
<noinclude>
 +
==Usage==
 +
Shorthand for creating a row of a table containing set details for a given card set.
  
Parameters are:
+
The only parameter is the three-letter abbreviation of the card set. The other data is pulled from the corresponding card set data template. If the parameter is empty or not present, no output is produced.
* <code><nowiki>{{{id}}}</nowiki></code>: The set's ID on mtgpq.info (e.g. 13)
 
* <code><nowiki>{{{name}}}</nowiki></code>: The name of the set (e.g. Dominaria)
 
* <code><nowiki>{{{abbr}}}</nowiki></code>: The abbreviation used for the set (e.g. DOM)
 
* <code><nowiki>{{{date}}}</nowiki></code>: The month/year the set was released (e.g. May 2018)
 
* <code><nowiki>{{{version}}}</nowiki></code>: The version of the app the set released in (e.g. 2.7 for DOM)
 
* <code><nowiki>{{{notes}}}</nowiki></code>: Release notes for the version
 
* <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_mp}}}</nowiki></code>: The number of masterpiece cards in the set (e.g. 10)
 
* <code><nowiki>{{{cards_m}}}</nowiki></code>: The number of mythic cards in the set (e.g. 29)
 
* <code><nowiki>{{{cards_r}}}</nowiki></code>: The number of rare cards in the set (e.g. 48)
 
* <code><nowiki>{{{cards_u}}}</nowiki></code>: The number of uncommon cards in the set (e.g. 64)
 
* <code><nowiki>{{{cards_c}}}</nowiki></code>: The number of common cards in the set (e.g. 60)
 
 
 
A file named <code><nowiki>{{{abbr}}}_Symbol.png</nowiki></code> is assumed to exist and is used for the set icon.
 
  
 
== Example ==
 
== Example ==
This shorthand
+
The following shorthand:
 
<pre><nowiki>
 
<pre><nowiki>
{{Set-Details-Compact
+
{| class="wikitable"
|id = 13
+
{{Set-Details-Compact|DOM}}
|name = Dominaria
+
{{Set-Details-Compact|M19}}
|abbr = DOM
+
|}
|date = May 2018
+
</nowiki></pre>
|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
 
}}</nowiki></pre>
 
  
 
Produces:
 
Produces:
{{Set-Details-Compact
+
{| class="wikitable"
|id = 13
+
{{Set-Details-Compact|DOM}}
|name = Dominaria
+
{{Set-Details-Compact|M19}}
|abbr = DOM
+
|}
|date = May 2018
+
 
|version = 2.7
+
</noinclude><includeonly>{{#if:{{{1|}}}|<br>
|notes = https://forums.d3go.com/discussion/72742/2-7-release-notes-updated-5-23-18
+
{{!}}-
|mechanics = Saga,Historic,Leader
+
! {{SetSymbol|{{{1}}}|48}}
|cards_total = 211
+
! style="text-align: left;" {{!}} {{nowrap|[[{{Card set data: {{{1}}}|1}}]] ({{Trim|{{{1}}}}})}}
|cards_mp = 10
+
<small>''[{{Release data: {{Card set data: {{{1}}}|5}}|2}} {{Card set data: {{{1}}}|4}} (version {{Card set data: {{{1}}}|5}})]''</small>
|cards_m = 29
+
{{!}} {{Card rarity counts|set={{Card set data: {{{1}}}|3}}|total={{Card set data: {{{1}}}|8}}|c={{Card set data: {{{1}}}|9}}|u={{Card set data: {{{1}}}|10}}|r={{Card set data: {{{1}}}|11}}|m={{Card set data: {{{1}}}|12}}|mp={{Card set data: {{{1}}}|13}}}}
|cards_r = 48
+
{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|0}} | '''New mechanics:''' <small>&nbsp; {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|0}}}}<!--
|cards_u = 64
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|1}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|1}}}}}}<!--
|cards_c = 60
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|2}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|2}}}}}}<!--
}}
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|3}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|3}}}}}}<!--
</noinclude><includeonly>{| class="wikitable"
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|4}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|4}}}}}}<!--
|-
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|5}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|5}}}}}}<!--
! style="text-align: left;" | {{nowrap|[[File:{{{abbr}}}_Symbol.png|x24px|{{{title}}} icon]] &nbsp; [[{{{name}}}]] ({{{abbr}}})}}
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|6}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|6}}}}}}<!--
| colspan="2" | '''Cards:''' [https://mtgpq.info/cards/search?sets={{{id}}} {{{cards_total}}}] &nbsp;<small><!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|7}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|7}}}}}}<!--
-->C:{{#ifeq: {{{cards_c}}}|0|0|[https://mtgpq.info/cards/search?rarities=5&sets={{{id}}} {{{cards_c}}}]}} <!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|8}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|8}}}}}}<!--
-->U:{{#ifeq: {{{cards_u}}}|0|0|[https://mtgpq.info/cards/search?rarities=4&sets={{{id}}} {{{cards_u}}}]}} <!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|9}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|9}}}}}}<!--
-->R:{{#ifeq: {{{cards_r}}}|0|0|[https://mtgpq.info/cards/search?rarities=3&sets={{{id}}} {{{cards_r}}}]}} <!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|10}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|10}}}}}}<!--
-->M:{{#ifeq: {{{cards_m}}}|0|0|[https://mtgpq.info/cards/search?rarities=2&sets={{{id}}} {{{cards_m}}}]}} <!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|11}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|11}}}}}}<!--
-->MP:{{#ifeq: {{{cards_mp}}}|0|0|[https://mtgpq.info/cards/search?rarities=1&sets={{{id}}} {{{cards_mp}}}]}}</small>
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|12}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|12}}}}}}<!--
|-
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|13}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|13}}}}}}<!--
| colspan="2" | [{{{notes}}} {{{date}}} (version {{{version}}})]
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|14}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|14}}}}}}<!--
| {{#if: {{#explode:{{{mechanics}}}|,|0}} | '''New mechanics:''' [[Abilities#{{#explode:{{{mechanics}}}|,|0}}|{{#explode:{{{mechanics}}}|,|0}}]] <!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|15}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|15}}}}}}<!--
-->{{#if: {{#explode:{{{mechanics}}}|,|1}} | [[Abilities#{{#explode:{{{mechanics}}}|,|1}}|{{#explode:{{{mechanics}}}|,|1}}]] | }} <!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|16}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|16}}}}}}<!--
-->{{#if: {{#explode:{{{mechanics}}}|,|2}} | [[Abilities#{{#explode:{{{mechanics}}}|,|2}}|{{#explode:{{{mechanics}}}|,|2}}]] | }} <!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|17}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|17}}}}}}<!--
-->{{#if: {{#explode:{{{mechanics}}}|,|3}} | [[Abilities#{{#explode:{{{mechanics}}}|,|3}}|{{#explode:{{{mechanics}}}|,|3}}]] | }} <!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|18}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|18}}}}}}<!--
-->{{#if: {{#explode:{{{mechanics}}}|,|4}} | [[Abilities#{{#explode:{{{mechanics}}}|,|4}}|{{#explode:{{{mechanics}}}|,|4}}]] | }} <!--
+
-->{{#if: {{#explode:{{Card set data: {{{1}}}|7}}|,|19}} |&nbsp;'''·''' {{Ability|{{#explode:{{Card set data: {{{1}}}|7}}|,|19}}}}}}<!--
-->{{#if: {{#explode:{{{mechanics}}}|,|5}} | [[Abilities#{{#explode:{{{mechanics}}}|,|5}}|{{#explode:{{{mechanics}}}|,|5}}]] | }} <!--
+
-->|<small>''(No new mechanics added)''
-->{{#if: {{#explode:{{{mechanics}}}|,|6}} | [[Abilities#{{#explode:{{{mechanics}}}|,|6}}|{{#explode:{{{mechanics}}}|,|6}}]] | }} <!--
+
}}</small>}}</includeonly>
-->{{#if: {{#explode:{{{mechanics}}}|,|7}} | [[Abilities#{{#explode:{{{mechanics}}}|,|7}}|{{#explode:{{{mechanics}}}|,|7}}]] | }} <!--
 
-->{{#if: {{#explode:{{{mechanics}}}|,|8}} | [[Abilities#{{#explode:{{{mechanics}}}|,|8}}|{{#explode:{{{mechanics}}}|,|8}}]] | }} <!--
 
-->{{#if: {{#explode:{{{mechanics}}}|,|9}} | [[Abilities#{{#explode:{{{mechanics}}}|,|9}}|{{#explode:{{{mechanics}}}|,|9}}]] | }} <!--
 
-->| ''(No new mechanics added)''
 
}}
 
|}</includeonly>
 

Latest revision as of 17:03, 11 October 2022

Usage

Shorthand for creating a row of a table containing set details for a given card set.

The only parameter is the three-letter abbreviation of the card set. The other data is pulled from the corresponding card set data template. If the parameter is empty or not present, no output is produced.

Example

The following shorthand:

{| class="wikitable"
{{Set-Details-Compact|DOM}}
{{Set-Details-Compact|M19}}
|}

Produces:


Dominaria Dominaria (DOM)

May 2018 (version 2.7)

Cards: 192  (Common60 · Uncommon55 · Rare41 · Mythic26 · Masterpiece10)

New mechanics:   Historic · LeaderLeader · Saga

Core Set 2019 Core Set 2019 (M19)

Jul 2018 (version 2.8)

Cards: 190  (Common60 · Uncommon55 · Rare40 · Mythic25 · Masterpiece10)

New mechanics:   FlashFlash · Stored ManaStored Mana