Template:Deck rares: Difference between revisions

From MTG Wiki
Jump to navigation Jump to search
>@legacy41915546
No edit summary
>Jerodast
(Woo new setcode seems to be working, at least on Deckmasters page. Looking at template code it appears only 4 art-specific cards are supported, not 6.)
 
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The rares in this deck are{{#if:{{{alt-art-1|}}}|&nbsp;<c>{{{alt-art-1}}}</c> (alternate art)}}{{#if:{{{alt-art-2|}}}|,&nbsp;<c>{{{alt-art-2}}}</c> (alternate art}}{{#if:{{{alt-art-3|}}}|,&nbsp;<c>{{{alt-art-3}}}</c> (alternate art)}}{{#if:{{{holo-1|}}}|&nbsp;<c>{{{holo-1}}}</c> (holographic foil)}}{{#if:{{{holo-2|}}}|,&nbsp;<c>{{{holo-2}}}</c> (holographic foil)}}{{#if:{{{rare-1|}}}|&nbsp;<c>{{{rare-1}}}</c>}}{{#if:{{{rare-2|}}}|,&nbsp;<c> {{{rare-2}}}</c>}}{{#if:{{{rare-3|}}}|,&nbsp;<c>{{{rare-3}}}</c>}}{{#if:{{{rare-4|}}}|,&nbsp;<c>{{{rare-4}}}</c>}}{{#if:{{{rare-5|}}}|,&nbsp;<c>{{{rare-5}}}</c>}}{{#if:{{{rare-6|}}}|,&nbsp;<c>{{{rare-6}}}</c>}}{{#if:{{{rare-last|}}}|&nbsp;and {{{rare-last}}}.}}<noinclude>
<includeonly>The rares in this deck are<!--
-->{{#if:{{{setcode|}}}|<!--
TEMPLATE WITH SETCODES:<!--
-->{{#if:{{{alt-art-1|}}}|&nbsp;{{#tag:c|{{{alt-art-1}}}|set={{{setcode}}}}} (alternate art)}}<!--
-->{{#if:{{{alt-art-2|}}}|,&nbsp;{{#tag:c|{{{alt-art-2}}}|set={{{setcode}}}}} (alternate art)}}<!--
-->{{#if:{{{alt-art-3|}}}|,&nbsp;{{#tag:c|{{{alt-art-3}}}|set={{{setcode}}}}} (alternate art)}}<!--
-->{{#if:{{{alt-art-4|}}}|,&nbsp;{{#tag:c|{{{alt-art-4}}}|set={{{setcode}}}}} (alternate art)}}<!--
-->{{#if:{{{holo-1|}}}|&nbsp;{{#tag:c|{{{holo-1}}}|set={{{setcode}}}}} (holographic foil)}}<!--
-->{{#if:{{{holo-2|}}}|,&nbsp;{{#tag:c|{{{holo-2}}}|set={{{setcode}}}}} (holographic foil)}}<!--
-->{{#if:{{{holo-3|}}}|,&nbsp;{{#tag:c|{{{holo-3}}}|set={{{setcode}}}}} (holographic foil)}}<!--
-->{{#if:{{{holo-4|}}}|,&nbsp;{{#tag:c|{{{holo-4}}}|set={{{setcode}}}}} (holographic foil)}}<!--
-->{{#if:{{{rare-1|}}}|&nbsp;{{#tag:c|{{{rare-1}}}|set={{{setcode}}}}}}}<!--
-->{{#if:{{{rare-2|}}}|,&nbsp;{{#tag:c|{{{rare-2}}}|set={{{setcode}}}}}}}<!--
-->{{#if:{{{rare-3|}}}|,&nbsp;{{#tag:c|{{{rare-3}}}|set={{{setcode}}}}}}}<!--
-->{{#if:{{{rare-4|}}}|,&nbsp;{{#tag:c|{{{rare-4}}}|set={{{setcode}}}}}}}<!--
-->{{#if:{{{rare-5|}}}|,&nbsp;{{#tag:c|{{{rare-5}}}|set={{{setcode}}}}}}}<!--
-->{{#if:{{{rare-6|}}}|,&nbsp;{{#tag:c|{{{rare-6}}}|set={{{setcode}}}}}}}<!--
-->{{#if:{{{rare-7|}}}|,&nbsp;{{#tag:c|{{{rare-7}}}|set={{{setcode}}}}}}}<!--
-->{{#if:{{{rare-8|}}}|,&nbsp;{{#tag:c|{{{rare-8}}}|set={{{setcode}}}}}}}<!--
-->{{#if:{{{comma|}}}|,|}}<!--
-->{{#if:{{{rare-last|}}}|&nbsp;and {{#tag:c|{{{rare-last}}}|set={{{setcode}}}}}}}.<!--
-->|<!--
TEMPLATE WITHOUT SETCODES:
-->{{#if:{{{alt-art-1|}}}|&nbsp;{{#tag:c|{{{alt-art-1}}}}} (alternate art)}}<!--
-->{{#if:{{{alt-art-2|}}}|,&nbsp;{{#tag:c|{{{alt-art-2}}}}} (alternate art)}}<!--
-->{{#if:{{{alt-art-3|}}}|,&nbsp;{{#tag:c|{{{alt-art-3}}}}} (alternate art)}}<!--
-->{{#if:{{{alt-art-4|}}}|,&nbsp;{{#tag:c|{{{alt-art-4}}}}} (alternate art)}}<!--
-->{{#if:{{{holo-1|}}}|&nbsp;{{#tag:c|{{{holo-1}}}}} (holographic foil)}}<!--
-->{{#if:{{{holo-2|}}}|,&nbsp;{{#tag:c|{{{holo-2}}}}} (holographic foil)}}<!--
-->{{#if:{{{holo-3|}}}|,&nbsp;{{#tag:c|{{{holo-3}}}}} (holographic foil)}}<!--
-->{{#if:{{{holo-4|}}}|,&nbsp;{{#tag:c|{{{holo-4}}}}} (holographic foil)}}<!--
-->{{#if:{{{rare-1|}}}|&nbsp;{{#tag:c|{{{rare-1}}}}}}}<!--
-->{{#if:{{{rare-2|}}}|,&nbsp;{{#tag:c|{{{rare-2}}}}}}}<!--
-->{{#if:{{{rare-3|}}}|,&nbsp;{{#tag:c|{{{rare-3}}}}}}}<!--
-->{{#if:{{{rare-4|}}}|,&nbsp;{{#tag:c|{{{rare-4}}}}}}}<!--
-->{{#if:{{{rare-5|}}}|,&nbsp;{{#tag:c|{{{rare-5}}}}}}}<!--
-->{{#if:{{{rare-6|}}}|,&nbsp;{{#tag:c|{{{rare-6}}}}}}}<!--
-->{{#if:{{{rare-7|}}}|,&nbsp;{{#tag:c|{{{rare-7}}}}}}}<!--
-->{{#if:{{{rare-8|}}}|,&nbsp;{{#tag:c|{{{rare-8}}}}}}}<!--
-->{{#if:{{{comma|}}}|,|}}<!--
-->{{#if:{{{rare-last|}}}|&nbsp;and {{#tag:c|{{{rare-last}}}}}}}.<!--
END OF TEMPLATE
-->}}</includeonly><noinclude>
==Usage==
==Usage==
For a standardized, readily mass-changeable line listing the rares in a preconstructed theme deck.


This template assumed that there is at least one non-alternate-art, non-holographic foil, and that there is more than one rare in a deck.
:<code><nowiki>{{Deck rares|alt-art-n=...|holo-n=...|rare-n=...|rare-last=...}}</nowiki></code>
:<code><nowiki>{{Deck rares|alt-art-n=...|holo-n=...|rare-n=...|rare-last=...|comma=yes}}</nowiki></code>
::For an Oxford comma if the deck has more than two rares.
===Parameters===
'''N.B.''': Any parameter may be left out. <code>{{{rare-last}}}</code>, however, should never be left empty, as this part of the template is responsible for the "and".
*<code>{{{alt-art-''n''}}}</code>: The names of the rares with alternate art. If alternate art cards are holographic foils, they are first alternate art cards. Currently, the largest value of ''n'' supported is 4.
*<code>{{{holo-''n''}}}</code>: The names of the rares with holographic foil treatment. Currently, the largest value of ''n'' supported is 4.
*<code>{{{rare-''n''}}}</code>: The names of non-alternate-art, non-holographic-foil rares. Currently, the largest value of ''n'' supported is 8. If a deck has holographic foil rares, please commence listing rares with rare-2, not rare-1.
*<code>{{{rare-last}}}</code>: The name of last rare.
*<code>{{{comma}}}</code>: A terminal serial comma. The variable for this parameter is, by definition, "yes"; "no" or anything else also works but, for consistency, please use "yes".
*<code>{{{setcode}}}</code>: A 3 letter set code which will cause all cards to link to their version from that set, e.g. DKM for ''[[Deckmasters 2001]]''. See {{tl|Card}} for more on set codes and card lookup.


[[Category:Magic product templates]]</noinclude>
[[Category:Magic product templates]]</noinclude>

Latest revision as of 07:34, 21 March 2023

Usage

For a standardized, readily mass-changeable line listing the rares in a preconstructed theme deck.

This template assumed that there is at least one non-alternate-art, non-holographic foil, and that there is more than one rare in a deck.

{{Deck rares|alt-art-n=...|holo-n=...|rare-n=...|rare-last=...}}
{{Deck rares|alt-art-n=...|holo-n=...|rare-n=...|rare-last=...|comma=yes}}
For an Oxford comma if the deck has more than two rares.

Parameters

N.B.: Any parameter may be left out. {{{rare-last}}}, however, should never be left empty, as this part of the template is responsible for the "and".

  • {{{alt-art-n}}}: The names of the rares with alternate art. If alternate art cards are holographic foils, they are first alternate art cards. Currently, the largest value of n supported is 4.
  • {{{holo-n}}}: The names of the rares with holographic foil treatment. Currently, the largest value of n supported is 4.
  • {{{rare-n}}}: The names of non-alternate-art, non-holographic-foil rares. Currently, the largest value of n supported is 8. If a deck has holographic foil rares, please commence listing rares with rare-2, not rare-1.
  • {{{rare-last}}}: The name of last rare.
  • {{{comma}}}: A terminal serial comma. The variable for this parameter is, by definition, "yes"; "no" or anything else also works but, for consistency, please use "yes".
  • {{{setcode}}}: A 3 letter set code which will cause all cards to link to their version from that set, e.g. DKM for Deckmasters 2001. See {{Card}} for more on set codes and card lookup.