Difference between revisions of "Template:Color rank"

From Tales of Maj'Eyal
Jump to: navigation, search
(fix color and add example for unique rank)
(add support for numeric ranks)
Line 1: Line 1:
<onlyinclude><includeonly>{{color|{{#switch: {{{1|}}} |critter=#aaaaaa|normal=black|elite=gold|rare=salmon|unique=#f4a460 |boss=orange|elite boss=#ddbb00|god=#FF4000|godslayer=#FF4000|black}}|'''{{{2|}}}'''}}</includeonly></onlyinclude>
+
<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|black}}|'''{{{2|}}}'''}}</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>
Line 26: Line 26:
 
|-
 
|-
 
| <nowiki>{{color rank|godslayer|I am a godslayer.}}</nowiki> || {{color rank|godslayer|I am a godslayer.}}
 
| <nowiki>{{color rank|godslayer|I am a godslayer.}}</nowiki> || {{color rank|godslayer|I am a godslayer.}}
 +
|}
 +
 +
{| class="wikitable"
 +
|-
 +
! Wiki code !! Output
 +
|-
 +
| <nowiki>{{color rank|1|I am a critter.}}</nowiki> || {{color rank|critter|I am a critter.}}
 +
|-
 +
| <nowiki>{{color rank|2|I am normal.}}</nowiki> || {{color rank|normal|I am normal.}}
 +
|-
 +
| <nowiki>{{color rank|3|I am elite.}}</nowiki> || {{color rank|elite|I am elite.}}
 +
|-
 +
| <nowiki>{{color rank|3.2|I am rare.}}</nowiki> || {{color rank|rare|I am rare.}}
 +
|-
 +
| <nowiki>{{color rank|3.5|I am unique.}}</nowiki> || {{color rank|unique|I am unique.}}
 +
|-
 +
| <nowiki>{{color rank|4|I am a boss.}}</nowiki> || {{color rank|boss|I am a boss.}}
 +
|-
 +
| <nowiki>{{color rank|5|I am an elite boss.}}</nowiki> || {{color rank|elite boss|I am an elite boss.}}
 +
|-
 +
| <nowiki>{{color rank|10|I am a god.}}</nowiki> || {{color rank|god|I am a god.}}
 +
|-
 +
| <nowiki>{{color rank|11|I am a godslayer.}}</nowiki> || {{color rank|godslayer|I am a godslayer.}}
 
|}
 
|}
 
</noinclude>
 
</noinclude>
 
<noinclude>[[Category:Templates]]</noinclude>
 
<noinclude>[[Category:Templates]]</noinclude>

Revision as of 17:09, 2 October 2021


Usage: {{color rank|<rank>|<text>}}

Examples:

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.