Difference between revisions of "Template:Color rank"
From Tales of Maj'Eyal
(add support for numeric ranks) |
(update documentation) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <onlyinclude><includeonly>{{color|{{#switch: {{{1|}}} |1|critter=#aaaaaa|2|normal=black|3|elite=gold|3.2|rare=salmon|3.5|unique=#f4a460|4|boss=orange|5|elite boss=#ddbb00|10|god=#FF4000|11|godslayer=#FF4000| | + | <onlyinclude><includeonly>{{color|{{#switch: {{{1|}}} |1|critter=#aaaaaa|2|normal=black|3|elite=gold|3.2|rare=salmon|3.5|unique=#f4a460|4|boss=orange|5|elite boss=#ddbb00|10|god=#FF4000|11|godslayer=#FF4000|#FF4000}}|'''{{#if: {{{2|}}} |
+ | | {{{2|}}} | ||
+ | | {{#switch: {{{1|}}} |1|critter=critter|2|normal=normal|3|elite=elite|3.2|rare=rare|3.5|unique=unique|4|boss=boss|5|elite boss=elite boss|10|god=god|11|godslayer=godslayer|god}} | ||
+ | }}'''}}</includeonly></onlyinclude> | ||
+ | |||
<!-- Note the critter, elite, and elite boss colors are slightly darker here than in the game: the game specifies C0C0C0 for critter, yellow for elite, and gold for elite boss. Also unique is given as "sandy brown" in the game, but that color isn't recognized here.--> | <!-- Note the critter, elite, and elite boss colors are slightly darker here than in the game: the game specifies C0C0C0 for critter, yellow for elite, and gold for elite boss. Also unique is given as "sandy brown" in the game, but that color isn't recognized here.--> | ||
+ | |||
<noinclude> | <noinclude> | ||
− | '''Usage''': <nowiki>{{color rank|<rank>|<text>}}</nowiki> | + | '''Usage''': <nowiki>{{color rank|<rank>|<text>}}</nowiki> or <nowiki>{{color rank|<rank>}}</nowiki>. |
+ | ''rank'' may be given as the name of the rank or its numeric value. | ||
− | Examples: | + | Examples (and test cases): |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 32: | Line 38: | ||
! Wiki code !! Output | ! Wiki code !! Output | ||
|- | |- | ||
− | | <nowiki>{{color rank|1|I am a critter.}}</nowiki> || {{color rank| | + | | <nowiki>{{color rank|1|I am a critter.}}</nowiki> || {{color rank|1|I am a critter.}} |
|- | |- | ||
− | | <nowiki>{{color rank|2|I am normal.}}</nowiki> || {{color rank| | + | | <nowiki>{{color rank|2|I am normal.}}</nowiki> || {{color rank|2|I am normal.}} |
|- | |- | ||
− | | <nowiki>{{color rank|3|I am elite.}}</nowiki> || {{color rank| | + | | <nowiki>{{color rank|3|I am elite.}}</nowiki> || {{color rank|3|I am elite.}} |
|- | |- | ||
− | | <nowiki>{{color rank|3.2|I am rare.}}</nowiki> || {{color rank| | + | | <nowiki>{{color rank|3.2|I am rare.}}</nowiki> || {{color rank|3.2|I am rare.}} |
|- | |- | ||
− | | <nowiki>{{color rank|3.5|I am unique.}}</nowiki> || {{color rank| | + | | <nowiki>{{color rank|3.5|I am unique.}}</nowiki> || {{color rank|3.5|I am unique.}} |
|- | |- | ||
− | | <nowiki>{{color rank|4|I am a boss.}}</nowiki> || {{color rank| | + | | <nowiki>{{color rank|4|I am a boss.}}</nowiki> || {{color rank|4|I am a boss.}} |
|- | |- | ||
− | | <nowiki>{{color rank|5|I am an elite boss.}}</nowiki> || {{color rank| | + | | <nowiki>{{color rank|5|I am an elite boss.}}</nowiki> || {{color rank|5|I am an elite boss.}} |
|- | |- | ||
− | | <nowiki>{{color rank|10|I am a god.}}</nowiki> || {{color rank| | + | | <nowiki>{{color rank|10|I am a god.}}</nowiki> || {{color rank|10|I am a god.}} |
|- | |- | ||
− | | <nowiki>{{color rank|11|I am a godslayer.}}</nowiki> || {{color rank| | + | | <nowiki>{{color rank|11|I am a godslayer.}}</nowiki> || {{color rank|11|I am a godslayer.}} |
|} | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Wiki code !! Output | ||
+ | |- | ||
+ | | <nowiki>{{color rank|1}}</nowiki> || {{color rank|1}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|2}}</nowiki> || {{color rank|2}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|3}}</nowiki> || {{color rank|3}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|3.2}}</nowiki> || {{color rank|3.2}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|3.5}}</nowiki> || {{color rank|3.5}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|4}}</nowiki> || {{color rank|4}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|5}}</nowiki> || {{color rank|5}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|10}}</nowiki> || {{color rank|10}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|11}}</nowiki> || {{color rank|11}} | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Wiki code !! Output | ||
+ | |- | ||
+ | | <nowiki>{{color rank|critter}}</nowiki> || {{color rank|critter}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|normal}}</nowiki> || {{color rank|normal}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|elite}}</nowiki> || {{color rank|elite}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|rare}}</nowiki> || {{color rank|rare}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|unique}}</nowiki> || {{color rank|unique}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|boss}}</nowiki> || {{color rank|boss}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|elite boss}}</nowiki> || {{color rank|elite boss}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|god}}</nowiki> || {{color rank|god}} | ||
+ | |- | ||
+ | | <nowiki>{{color rank|godslayer}}</nowiki> || {{color rank|godslayer}} | ||
+ | |} | ||
+ | |||
</noinclude> | </noinclude> | ||
<noinclude>[[Category:Templates]]</noinclude> | <noinclude>[[Category:Templates]]</noinclude> |
Latest revision as of 13:50, 26 October 2021
Usage: {{color rank|<rank>|<text>}} or {{color rank|<rank>}}.
rank may be given as the name of the rank or its numeric value.
Examples (and test cases):
Wiki code | Output |
---|---|
{{color rank|critter|I am a critter.}} | I am a critter. |
{{color rank|normal|I am normal.}} | I am normal. |
{{color rank|elite|I am elite.}} | I am elite. |
{{color rank|rare|I am rare.}} | I am rare. |
{{color rank|unique|I am unique.}} | I am unique. |
{{color rank|boss|I am a boss.}} | I am a boss. |
{{color rank|elite boss|I am an elite boss.}} | I am an elite boss. |
{{color rank|god|I am a god.}} | I am a god. |
{{color rank|godslayer|I am a godslayer.}} | I am a godslayer. |
Wiki code | Output |
---|---|
{{color rank|1|I am a critter.}} | I am a critter. |
{{color rank|2|I am normal.}} | I am normal. |
{{color rank|3|I am elite.}} | I am elite. |
{{color rank|3.2|I am rare.}} | I am rare. |
{{color rank|3.5|I am unique.}} | I am unique. |
{{color rank|4|I am a boss.}} | I am a boss. |
{{color rank|5|I am an elite boss.}} | I am an elite boss. |
{{color rank|10|I am a god.}} | I am a god. |
{{color rank|11|I am a godslayer.}} | I am a godslayer. |
Wiki code | Output |
---|---|
{{color rank|1}} | critter |
{{color rank|2}} | normal |
{{color rank|3}} | elite |
{{color rank|3.2}} | rare |
{{color rank|3.5}} | unique |
{{color rank|4}} | boss |
{{color rank|5}} | elite boss |
{{color rank|10}} | god |
{{color rank|11}} | godslayer |
Wiki code | Output |
---|---|
{{color rank|critter}} | critter |
{{color rank|normal}} | normal |
{{color rank|elite}} | elite |
{{color rank|rare}} | rare |
{{color rank|unique}} | unique |
{{color rank|boss}} | boss |
{{color rank|elite boss}} | elite boss |
{{color rank|god}} | god |
{{color rank|godslayer}} | godslayer |