Template:Tutormv: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
m (rewriting to remove tutormv/footer)
m (Existing colors have way too little contrast, blue especially. Replacing with colors from Underground shard sprites.)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>{|
This template is meant for use on the [[move tutor]] page to condense the move tables.  It is used in conjunction with the {{Template|tutormv/header}} template and two <code><nowiki>|}</nowiki></code> to create uniform, sortable lists of tutored moves. It supports all the different tables on the move tutor page, but adding an additional table type would likely require a change to <code>tutormv/header</code>.
</noinclude>|-
 
| {{mcolor|{{{1}}}|000000}}{{#if:{{{note|}}}|{{tt|*|{{{note}}}}}|}}
==Usage==
| style="background:#{{{{{2}}} color}}; text-align:center" | {{typecolor|{{{2}}}}}
Simply invoke <code>tutormv/header</code>, specify the table type and optional header, list the moves using <code>tutormv</code> (this template), and end everything with two <code><nowiki>|}</nowiki></code>.
{{#if: {{{cat|}}}|{{!}} style="background:#{{{{{cat}}} color}}; text-align:center" {{!}} [[{{{cat}}} move{{!}}{{color|{{{{{cat}}} textcolor}}|{{{cat}}}}}]]
 
For instance, the following code:
  <nowiki>{{tutormv/header|platinum|Route 1337}}
{{tutormv|ThunderPunch|Electric|cat=Physical|2|0|6|0}}
{{tutormv|Mud-Slap|Ground|cat=Special|4|0|4|0|}}
|}
|}</nowiki>
produces the following sortable table:
{{tutormv/header|platinum|Route 1337}}
{{tutormv|ThunderPunch|Electric|cat=Physical|2|0|6|0}}
{{tutormv|Mud-Slap|Ground|cat=Special|4|0|4|0|}}
|}
|}
 
The header template recognizes <code>crystal</code>, <code>xd</code>, <code>emerald</code>, <code>frlg</code>, <code>dp</code>, <code>platinum</code>, <code>hgss</code>, and <code>bw</code> as table types, and determines the table columns and header color using this required parameter. The second optional header parameter is simply the title of the table; it will not be displayed if omitted.
 
Each <code>tutormv</code> [[move]] entry supports a number of ordered and named parameters.  The first two ordered parameters are used for the move's name and [[elemental types|elemental type]]. The next four ordered parameters (3 through 6) are only used for the shard prices in the Platinum tutor tables. The named parameters may be specified at any point in the parameter list, but the order of parameters should be kept consistent for ease of editing; the template will automatically place the named parameter in the correct column.
 
Named parameters include <code>cat</code> for the move's [[damage category]], <code>loc</code> for the tutor's location, <code>tm</code> for the move's associated [[Generation I]] [[TM]], <code>bp</code> for the move's cost in [[Battle Point]]s. The <code>cat</code> parameter automatically adds a link, but <code>loc</code> does not. The <code>tm</code> and <code>bp</code> parameters add text to the column, but only if the parameter's value is numeric (i.e., passing &amp;mdash; as the value for one of these will cause "TM" or "BP" to be omitted).
 
[[Category:Table templates]]
{|
</noinclude><includeonly>|-
| {{m|{{{1}}}}}
| align="center" style="background:#{{{{{2}}} color}}" | {{typecolor|{{{2}}}}}
{{#if: {{{cat|}}}|{{!}} align="center" style="background:#{{{{{cat}}} color}}" {{!}} [[{{{cat}}} move{{!}}{{color|{{{{{cat}}} textcolor}}|{{{cat}}}}}]]
}}{{#if: {{{loc|}}}|{{!}}{{!}} {{{loc}}}
}}{{#if: {{{loc|}}}|{{!}}{{!}} {{{loc}}}
}}{{#if: {{{bp|}}}|{{!}}{{!}} {{{bp}}}{{#iferror: {{#expr: {{{bp}}} + 1 }}||[[Battle Point|BP]]}}
}}{{#if: {{{bp|}}}|{{!}}{{!}} {{{bp}}}{{#iferror: {{#expr: {{{bp}}} + 1 }}||[[Battle Point|BP]]}}
}}{{#if: {{{tm|}}}|{{!}}{{!}} {{#iferror: {{#expr: {{{tm}}} + 1 }}|{{{tm}}}|[[TM{{{tm}}}]]}}
}}{{#if: {{{tm|}}}|{{!}}{{!}} {{#iferror: {{#expr: {{{tm}}} + 1 }}|{{{tm}}}|[[TM{{{tm}}}]]}}
}}{{#if: {{{3|}}}|{{!}}{{!}} style="background:#{{red color}}; color:#FFF" align="center" {{!}} {{{3}}}
}}{{#if: {{{hm|}}}|{{!}}{{!}} {{#iferror: {{#expr: {{{hm}}} + 1 }}|{{{hm}}}|[[HM{{{hm}}}]]}}
}}{{#if: {{{4|}}}|{{!}}{{!}} style="background:#{{green color}}; color:#FFF" align="center" {{!}} {{{4}}}
}}{{#if: {{{3|}}}|{{!}}{{!}} style="background:#FF7362; color:#000; text-align:center" {{!}} {{{3}}}
}}{{#if: {{{5|}}}|{{!}}{{!}} style="background:#{{blue color}}; color:#FFF" align="center" {{!}} {{{5}}}
}}{{#if: {{{4|}}}|{{!}}{{!}} style="background:#7BE662; color:#000; text-align:center" {{!}} {{{4}}}
}}{{#if: {{{6|}}}|{{!}}{{!}} style="background:#{{yellow color}}; color:#000" align="center" {{!}} {{{6}}}}}<includeonly><noinclude>|}</noinclude>
}}{{#if: {{{5|}}}|{{!}}{{!}} style="background:#6A94FF; color:#000; text-align:center" {{!}} {{{5}}}
}}{{#if: {{{6|}}}|{{!}}{{!}} style="background:#FFC562; color:#000; text-align:center" {{!}} {{{6}}}}}<noinclude>
|}
[[Category:Table templates]]</noinclude>

Latest revision as of 12:02, 21 February 2013

[[{{{1}}} (move)|{{{1}}}]] [[{{{2}}} (type)| {{{2}}} ]]