MTG Wiki
Hanmac (talk | contribs)
No edit summary
(Added general description, mainly to link to related templates and clarify which should be used)
 
(65 intermediate revisions by 8 users not shown)
Line 1: Line 1:
  +
{{Infobox
{| class="toccolours" style="width:30em; margin:0 0 0.5em 1em; float:right;"
 
  +
| abovestyle = {{Infobox sec|above}}
|- bgcolor="#D4D4D4"
 
  +
| headerstyle = {{Infobox sec|header}}
! colspan="2" | <big>{{{name|{{PAGENAME}}}}}{{#if:{{{name2|}}}|/{{{name2}}}}}</big>{{#if:{{{icon|}}}|<br/>[[File:{{{icon}}}|70x70px|link=]]}}
 
  +
| labelstyle = {{Infobox sec|label|width=28%}}
{{#if:{{{type|}}}|
 
  +
| above = <span class="nomobile">{{{name|{{PAGENAME}}}}}{{#if:{{{name2|}}}|<br/>({{{name2|}}})}}</span>
{{!}}- bgcolor="#F9F9F9"
 
  +
| image = {{#if:{{{icon|}}}|[[File:{{#setmainimage:{{{icon}}}}}|70x70px]]}}
{{!}} valign="top" {{!}}'''Type:'''
 
{{!}} {{{type}}}
+
| header1 = {{{infobox|Mechanic}}}
  +
| label2 = Type
}}
 
 
| data2 = {{{type|}}}
|- bgcolor="#E4E4E4"
 
| valign="top" | '''Introduced:'''
+
| label3 = Introduced
| {{#if:{{{first_mech|}}}|''[[{{{first_mech}}}]]'' <small>(mechanic)</small><br/>''[[{{{first}}}]]'' <small>(keyword)</small>|''[[{{{first}}}]]''}}
+
| data3 = {{#if:{{{first_mech|}}}|''[[{{{first_mech}}}]]'' <small>(mechanic)</small><br/>''[[{{{first}}}]]'' <small>(keyword)</small>|''[[{{{first}}}]]''}}
  +
| label4 = Last used
|- bgcolor="#F9F9F9"
 
  +
| data4 = ''[[{{{last|{{{first}}}}}}]]''
| '''Last Used:'''
 
| ''[[{{{last|{{{first}}}}}}]]''
+
| label5 = {{{text_type|Reminder}}} Text
  +
| data5 = {{#if: {{{notext|}}}| ''No official {{lc:{{{text_type|Reminder}}}}} text'' | {{{text|{{{reminder|}}}}}} }}
|- bgcolor="#E4E4E4"
 
  +
| label6 = [[Storm Scale]]
| valign="top" | '''{{{text_type|Reminder}}} Text:'''
 
| {{#if: {{{notext|}}}| ''No official {{lc:{{{text_type|Reminder}}}}} text'' | {{{text|}}} }}
+
| data6 = {{{storm|}}}{{{storm_ref|}}}
 
| label7 = Statistics
|- bgcolor="#F9F9F9"
 
{{#if:{{{storm|}}}|
+
| data7 = {{{stats|}}}
  +
| header8 = {{#if:{{{icon2|}}}|Other Symbols}}
{{!}} valign="top" {{!}} '''Storm count:'''
 
  +
| data9 = {{#if:{{{icon2|}}}|[[File:{{#setmainimage:{{{icon2}}}}}|70x70px]]}}
{{!}} {{{storm|}}}{{{storm_ref|}}}
 
  +
| header10 = {{#ifeq:{{{searchtype}}}|none||Scryfall Search}}
{{!}}- bgcolor="#E4E4E4"
 
  +
| data11 = {{#ifeq:{{{searchtype}}}|none||{{Scryfall search|{{{search|{{{name|{{PAGENAME}}}}}}}}|{{{searchtype|fulloracle}}}|enclose={{{enclose|"}}}|display={{{searchtype|fulloracle}}}:"{{{search|{{{name|{{PAGENAME}}}}}}}}"}}{{#if:{{{name2|}}}{{{search2|}}}|{{#if:{{{search2|}}}|<br/>{{Scryfall search|{{{search2|}}}|{{{searchtype|fulloracle}}}|enclose={{{enclose|"}}}|display={{{searchtype|fulloracle}}}:"{{{search2|{{{name2|{{{name|{{PAGENAME}}}}}}}}}}}"}}}}}}}}
}}
 
  +
}}{{#ifeq:{{{search}}}|+|[[Category:Pages that have Infobox mechanic with search equal plus]]}}<noinclude>
| valign="top" | '''Statistics:'''
 
  +
==Description==
| {{{stats|}}}
 
  +
This template is used as the primary infobox on pages for game [[mechanic]]s, summarizing its key details. It is used by several other templates for more specific types of mechanics:
|- bgcolor="#D4D4D4"
 
  +
* {{tl|Infobox keyword}} for a [[keyword ability]]
! colspan="2" | [http://gatherer.wizards.com/Pages/Search/Default.aspx?action=advanced&text=+%5B{{urlencode:"{{{search|{{{name|{{PAGENAME}}}}}}}}"|PATH}}%5D&special=true Gatherer search for "{{{name|{{PAGENAME}}}}}"]{{#if:{{{name2|}}}|<br/>[http://gatherer.wizards.com/Pages/Search/Default.aspx?action=advanced&text=+%5B{{urlencode:"{{{search2|{{{name2}}}}}}"|PATH}}%5D&special=true Gatherer search for "{{{name2}}}"] }}
 
  +
* {{tl|Infobox action}} for a [[keyword action]]
|}<noinclude>
 
  +
* {{tl|Infobox ability}} for an [[ability word]]
  +
This template should be used directly on pages for mechanics that don't fit into those subcategories.
  +
  +
Using this template or its subtemplates automatically categorizes the page it's used on, like [[:Category:Miscellaneous mechanics]].
  +
 
==Syntax==
 
==Syntax==
 
{| style="background: transparent;"
 
{| style="background: transparent;"
|<pre>{{Infobox mechanics
+
|<pre>{{Infobox mechanic
 
| name = (optional, if different from page name)
 
| name = (optional, if different from page name)
 
| name2 = (optional, for different second name}
 
| name2 = (optional, for different second name}
 
| icon = (optional if exists: Duels [name] symbol.png)
 
| icon = (optional if exists: Duels [name] symbol.png)
  +
| icon2 = (optional if exists: Duels [name] symbol.png)
 
| type = (if keyword: Activated|Characteristic|Evasion|Spell|Static|Triggered)
 
| type = (if keyword: Activated|Characteristic|Evasion|Spell|Static|Triggered)
  +
| first = (required. First set mechanic was used. First set it was used by name, if it is a keyword mechanic.)
| first =
 
 
| first_mech = (optional, use to identify when the keyword's mechanic was introduced, even if it wasn't a keyword yet (such as Fear or Shroud))
 
| first_mech = (optional, use to identify when the keyword's mechanic was introduced, even if it wasn't a keyword yet (such as Fear or Shroud))
 
| last = (optional, if different from first)
 
| last = (optional, if different from first)
Line 41: Line 47:
 
| text_type = (default: Reminder, can be changed if reminder text is not applicable)
 
| text_type = (default: Reminder, can be changed if reminder text is not applicable)
 
| stats =
 
| stats =
| search = (optional, use to refine gatherer search)
+
| search = (optional, use to refine scryfall search. May be wrapped in double straight quotation marks if white space is needed at the beginning or end of the search term, e.g. "enchant ")
  +
| searchtype = (optional, can be used to modify the search type, e.g. oracle, keyword, or flavor. Default is fulloracle. Set to none to not include search link.)
| search2 = (optional, use to refine different second gatherer search)
 
  +
| enclose = (optional, enclosing symbol for search terms. Default is ". Using / enables regular expressions.)
  +
| searchlabel = (optional, used to display a different label than the search text itself. Often recommended with regular expression searches.)
 
| search2 = (optional, use to refine different second scryfall search. All the same related parameters apply.)
 
}}</pre>
 
}}</pre>
[[Category:Infobox templates]]
+
[[Category:Infobox templates]]</noinclude>
</noinclude>
 

Latest revision as of 14:31, 23 April 2023

Infobox mechanic
Mechanic
Introduced [[{{{first}}}]]
Last used [[{{{first}}}]]
Scryfall Search
fulloracle:"Infobox mechanic"

Description

This template is used as the primary infobox on pages for game mechanics, summarizing its key details. It is used by several other templates for more specific types of mechanics:

This template should be used directly on pages for mechanics that don't fit into those subcategories.

Using this template or its subtemplates automatically categorizes the page it's used on, like Category:Miscellaneous mechanics.

Syntax

{{Infobox mechanic
| name = (optional, if different from page name)
| name2 = (optional, for different second name}
| icon = (optional if exists: Duels [name] symbol.png)
| icon2 = (optional if exists: Duels [name] symbol.png)
| type = (if keyword: Activated|Characteristic|Evasion|Spell|Static|Triggered)
| first = (required. First set mechanic was used. First set it was used by name, if it is a keyword mechanic.)
| first_mech = (optional, use to identify when the keyword's mechanic was introduced, even if it wasn't a keyword yet (such as Fear or Shroud))
| last = (optional, if different from first)
| text =
| notext = (optional, if there is no official reminder text available)
| text_type = (default: Reminder, can be changed if reminder text is not applicable)
| stats =
| search = (optional, use to refine scryfall search. May be wrapped in double straight quotation marks if white space is needed at the beginning or end of the search term, e.g. "enchant ")
| searchtype = (optional, can be used to modify the search type, e.g. oracle, keyword, or flavor. Default is fulloracle. Set to none to not include search link.)
| enclose = (optional, enclosing symbol for search terms. Default is ". Using / enables regular expressions.)
| searchlabel = (optional, used to display a different label than the search text itself. Often recommended with regular expression searches.)
| search2 = (optional, use to refine different second scryfall search. All the same related parameters apply.)
}}