FANDOM


(Monster Link Markers array is now fixed. I'll remove Decode Talker soon.)
(Just seeing if keeping Link Markers in page-specified order is preferable.)
Line 23: Line 23:
 
}}{{ #vardefine: $show-pendulum | {{ #switch: {{ lc: {{ #explode: {{{pendulum}}} }} }} | left=left | right=right | }}
 
}}{{ #vardefine: $show-pendulum | {{ #switch: {{ lc: {{ #explode: {{{pendulum}}} }} }} | left=left | right=right | }}
 
}}{{ #if: {{ #var: $show-pendulum | }} | {{ #vardefine: $pendulum-scale | {{ #show: {{ #var: $page-name }} |?Pendulum Scale }}
 
}}{{ #if: {{ #var: $show-pendulum | }} | {{ #vardefine: $pendulum-scale | {{ #show: {{ #var: $page-name }} |?Pendulum Scale }}
}}{{ #if: {{ #var: $pendulum-scale | }} | {{ #vardefine: $pendulum-scale | {{ #var: $pendulum-scale }} {{ #iferror: {{ #expr: {{ #explode: {{{pendulum|}}} || -1 }} }} || → {{ #expr: {{ #explode: {{{pendulum|}}} || -1 }} }} }} }} }} }}{{ #if: {{{noname|}}} || {{ #if: {{{reset|}}} | {{ #vardefine: $monster-names }} }}"{{ #if: {{{nolink|}}}{{ #pos: {{ #var: $monster-names }} | *{{ #var: $page-name }}* }} | {{ #if: {{{2|}}} | {{{2}}} | {{ #var: $monster-name }} }} | [[{{ #var: $page-name }}|{{ #if: {{{2|}}} | {{{2}}} | {{ #var: $monster-name }} }}]]{{ #if: {{ #pos: {{{1}}} | Tokens }} | s }} }}" }}{{ #if: {{{pre|}}} | {{ #if: {{ #pos: {{ #sub: {{{pre}}} | 0 | 1 }} | . }}{{ #pos: {{ #sub: {{{pre}}} | 0 | 1 }} | , }}{{ #pos: {{ #sub: {{{pre}}} | 0 | 1 }} | ; }} || &#32; }}{{{pre}}} }} ({{ #if: {{ #var: $show-pendulum }} | {{Pendulum Scale|{{ #var: $show-pendulum }} }} {{ #var: $pendulum-scale }} | {{ #if: {{ #var: $no-level }} || {{ #if: {{ #var: $Toei }} | [[Level|<span style="color:black;">★</span>]] | {{ #if: {{ #var: $anime-manga }} | [[File:{{ #ifeq: {{ #var: $monster-level-rank }} | Level | CG | Rank }} Star.svg|16px|link={{ #var: $monster-level-rank }}]] | [[{{ #var: $monster-level-rank }}|<span style="color:black;">{{ #ifeq: {{ #var: $monster-level-rank }} | Level | ★ | ☆ }}</span>]] }} }} [[{{ #var: $monster-level-rank }} {{ #var: $monster-stars }} Monster Cards|{{ #var: $monster-stars }}]]{{ #ifeq: {{ #var: $monster-stars }} | {{ #var: $new-stars | {{ #var: $monster-stars }} }} || &nbsp;&rarr; {{ #var: $new-stars }} }}/ }}[[{{ #var: $monster-atk }} ATK Monster Cards|{{ #var: $monster-atk }}]]{{ #ifeq: {{ #var: $monster-atk }} | {{ #var: $new-atk | {{ #var: $monster-atk }} }} || &nbsp;&rarr; {{ #var: $new-atk }} }}/{{ #if: {{ #var: $monster-link | }} | [[Link {{ #var: $monster-link }} Monster Cards|LINK {{ #var: $monster-link }}]] {{ #arrayprint: $all-link-markers || @@@@ | {{ #arraysearch: $monster-link-markers | @@@@ | 0 | [[File:LM-{{ #replace: @@@@ | - | }}.png|link=Link Marker]] | }} }} | [[{{ #var: $monster-def }} DEF Monster Cards|{{ #var: $monster-def }}]]{{ #ifeq: {{ #var: $monster-def }} | {{ #var: $new-def | {{ #var: $monster-def }} }} || &nbsp;&rarr; {{ #var: $new-def }} }}{{ #ifeq: {{ #var: $overlay-units }} | 0 || /{{ #var: $overlay-units }} [[Xyz Material|ORU]] }} }}{{ #if: {{{notes|}}} | &nbsp;{{{notes}}} }} }}){{ #if: {{{noname|}}} || {{ #if: {{ #pos: {{ #var: $monster-names }} | *{{ #var: $page-name }}* }} || {{ #vardefine: $monster-names | {{ #var: $monster-names | * }}{{ #var: $page-name }}* }} }} }} | {{ #if: {{ #ifeq: {{{1}}} | reset | 1 }}{{{reset|}}} | {{ #vardefine: $monster-names }} }} }}<noinclude>
+
}}{{ #if: {{ #var: $pendulum-scale | }} | {{ #vardefine: $pendulum-scale | {{ #var: $pendulum-scale }} {{ #iferror: {{ #expr: {{ #explode: {{{pendulum|}}} || -1 }} }} || → {{ #expr: {{ #explode: {{{pendulum|}}} || -1 }} }} }} }} }} }}{{ #if: {{{noname|}}} || {{ #if: {{{reset|}}} | {{ #vardefine: $monster-names }} }}"{{ #if: {{{nolink|}}}{{ #pos: {{ #var: $monster-names }} | *{{ #var: $page-name }}* }} | {{ #if: {{{2|}}} | {{{2}}} | {{ #var: $monster-name }} }} | [[{{ #var: $page-name }}|{{ #if: {{{2|}}} | {{{2}}} | {{ #var: $monster-name }} }}]]{{ #if: {{ #pos: {{{1}}} | Tokens }} | s }} }}" }}{{ #if: {{{pre|}}} | {{ #if: {{ #pos: {{ #sub: {{{pre}}} | 0 | 1 }} | . }}{{ #pos: {{ #sub: {{{pre}}} | 0 | 1 }} | , }}{{ #pos: {{ #sub: {{{pre}}} | 0 | 1 }} | ; }} || &#32; }}{{{pre}}} }} ({{ #if: {{ #var: $show-pendulum }} | {{Pendulum Scale|{{ #var: $show-pendulum }} }} {{ #var: $pendulum-scale }} | {{ #if: {{ #var: $no-level }} || {{ #if: {{ #var: $Toei }} | [[Level|<span style="color:black;">★</span>]] | {{ #if: {{ #var: $anime-manga }} | [[File:{{ #ifeq: {{ #var: $monster-level-rank }} | Level | CG | Rank }} Star.svg|16px|link={{ #var: $monster-level-rank }}]] | [[{{ #var: $monster-level-rank }}|<span style="color:black;">{{ #ifeq: {{ #var: $monster-level-rank }} | Level | ★ | ☆ }}</span>]] }} }} [[{{ #var: $monster-level-rank }} {{ #var: $monster-stars }} Monster Cards|{{ #var: $monster-stars }}]]{{ #ifeq: {{ #var: $monster-stars }} | {{ #var: $new-stars | {{ #var: $monster-stars }} }} || &nbsp;&rarr; {{ #var: $new-stars }} }}/ }}[[{{ #var: $monster-atk }} ATK Monster Cards|{{ #var: $monster-atk }}]]{{ #ifeq: {{ #var: $monster-atk }} | {{ #var: $new-atk | {{ #var: $monster-atk }} }} || &nbsp;&rarr; {{ #var: $new-atk }} }}/{{ #if: {{ #var: $monster-link | }} | [[Link {{ #var: $monster-link }} Monster Cards|LINK {{ #var: $monster-link }}]] {{ #arrayprint: $monster-link-markers || @@@@ | [[File:LM-{{ #replace: @@@@ | - | }}.png|link=Link Marker]] }} | [[{{ #var: $monster-def }} DEF Monster Cards|{{ #var: $monster-def }}]]{{ #ifeq: {{ #var: $monster-def }} | {{ #var: $new-def | {{ #var: $monster-def }} }} || &nbsp;&rarr; {{ #var: $new-def }} }}{{ #ifeq: {{ #var: $overlay-units }} | 0 || /{{ #var: $overlay-units }} [[Xyz Material|ORU]] }} }}{{ #if: {{{notes|}}} | &nbsp;{{{notes}}} }} }}){{ #if: {{{noname|}}} || {{ #if: {{ #pos: {{ #var: $monster-names }} | *{{ #var: $page-name }}* }} || {{ #vardefine: $monster-names | {{ #var: $monster-names | * }}{{ #var: $page-name }}* }} }} }} | {{ #if: {{ #ifeq: {{{1}}} | reset | 1 }}{{{reset|}}} | {{ #vardefine: $monster-names }} }} }}<noinclude>
   
 
==Usage==
 
==Usage==

Revision as of 00:13, June 7, 2017


Usage

This is a quick reference template for adding monster statistics in a Duel. It also adds a link to the Monster Card's page. If arbitrary stats are added, the template will accept mathematical expressions to calculate values. These expressions in turn will accept the placeholders "LV", "Rank", "ATK" and "DEF" to denote the original stats. If the "pendulum" parameter is used, it can be set to "left", "right", "left X" or "right X"; X indicates the monster's Pendulum Scale if it is different from the default value.

The template keeps a record of which pages have been linked to, and does not add any extra links to pages in the record. A page will be added to the record even if the nolink parameter is used, but not if the noname parameter is used. If the reset parameter is used, the record will be cleared before any text is added, meaning that a link will be added even though a link already exists. Alternatively, to reset the record without specifying a monster, one can either use the reset parameter without specifying a monster's name (e.g. {{Monster|reset=1}}) or enter "reset" as the first parameter (i.e. {{Monster|reset}}).

1 = the name of the monster (specifically, the name of the page to link to)
2 = the actual display text (if different from {{{1}}})
pre = any additional text between the monster's name and stats
stars = the monster's current Level/Rank (if different from the default value)
atk = the monster's current ATK (if different from the default value)
def = the monster's current DEF (if different from the default value)
overlay = the number of Overlay Units (if different from the default value)
notes = any additional text inside the template
reset = if set, a link will be added even if one has already been added
nolink = if set, no link will be added even if no link has yet been added
noname = if set, the name will not be displayed
real = unless set, the link added will be to anime and manga versions by default
pendulum = if set to "left" or "right", Pendulum Scale is shown, otherwise normal stats are shown

Examples

If the template was used with "Number 39: Utopia", it would look like this: {{Monster|Number 39: Utopia}} "Number 39: Utopia" (2500/2000/2 ORU)

If the template was used with the original version of "Obelisk the Tormentor", it would look like this: {{Monster|Obelisk the Tormentor (original)|Obelisk the Tormentor}} "Obelisk the Tormentor" (4000/4000)

"Decode Talker" (2300/???)

Community content is available under CC-BY-SA unless otherwise noted.