Difference between revisions of "Template:Wr-ease"

From Discworld MUD Wiki
Jump to: navigation, search
(Create template)
 
(show difficult for parry)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#switch:{{lc:{{{1}}}}}
+
<includeonly>{{#if:{{{reverse|}}}|{{#if:{{{parry|}}}|{{#switch:{{{1|}}}
 +
|0=incredibly hard
 +
|1=extremely hard
 +
|2=very hard
 +
|3=rather hard
 +
|4=hard
 +
|5=pretty hard
 +
|6=quite hard
 +
|7=reasonably hard
 +
|8=quite easy
 +
|9=pretty easy
 +
|10=easy
 +
|11=rather easy
 +
|12=very easy
 +
|13=extremely easy
 +
|14=incredibly easy
 +
|'''Unknown value: {{{1|}}}'''
 +
}}|{{#switch:{{{1|}}}
 +
|0=incredibly difficult
 +
|1=extremely difficult
 +
|2=very difficult
 +
|3=rather difficult
 +
|4=difficult
 +
|5=pretty difficult
 +
|6=quite difficult
 +
|7=reasonably difficult
 +
|8=quite easy
 +
|9=pretty easy
 +
|10=easy
 +
|11=rather easy
 +
|12=very easy
 +
|13=extremely easy
 +
|14=incredibly easy
 +
|'''Unknown value: {{{1|}}}'''
 +
}}}}|{{#switch:{{lc:{{{1}}}}}
 +
|incredibly difficult=0
 
  |incredibly hard=0
 
  |incredibly hard=0
 +
|extremely difficult=1
 
  |extremely hard=1
 
  |extremely hard=1
 +
|very difficult=2
 
  |very hard=2
 
  |very hard=2
 +
|rather difficult=3
 
  |rather hard=3
 
  |rather hard=3
 +
|difficult=4
 
  |hard=4
 
  |hard=4
 +
|pretty difficult=5
 
  |pretty hard=5
 
  |pretty hard=5
 +
|quite difficult=6
 
  |quite hard=6
 
  |quite hard=6
 +
|reasonably difficult=7
 +
|reasonably hard=7
 
  |quite easy=8
 
  |quite easy=8
 
  |pretty easy=9
 
  |pretty easy=9
Line 14: Line 57:
 
  |extremely easy=13
 
  |extremely easy=13
 
  |incredibly easy=14
 
  |incredibly easy=14
  |'''Unknown ease string: {{{1|}}}'''
+
  |{{Ifnumber|{{{1|}}}|{{{1|}}}|'''Unknown ease string: {{{1|}}}'''}}
}}</includeonly><noinclude>{{documentation}}</noinclude>
+
}}}}</includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 16:22, 19 June 2011

[edit]

Documentation
 

This template returns a number based on an 'ease' judge rating, according to the following tables:

Weapon ease, the default      

string rating
incredibly difficult 0
extremely difficult 1
very difficult 2
rather difficult 3
difficult 4
pretty difficult 5
quite difficult 6
reasonably difficult 7
quite easy 8
pretty easy 9
easy 10
rather easy 11
very easy 12
extremely easy 13
incredibly easy 14

Parry ease, with parry=1

string rating
incredibly hard 0
extremely hard 1
very hard 2
rather hard 3
hard 4
pretty hard 5
quite hard 6
reasonably hard 7
quite easy 8
pretty easy 9
easy 10
rather easy 11
very easy 12
extremely easy 13
incredibly easy 14

If you add an argument named "reverse" with any value (e.g. reverse=1) it will take a number and output the string instead.

  • If you want the parry ease string returned you need to add an argument named "parry" with any value (e.g. parry=1).

If you pass the template a number but do not put an argument named "reverse" it will just return the same number.

Examples
{{Wr-ease|very easy}}

12

{{Wr-ease|11}}

11

{{Wr-ease|11|reverse=true}}
rather easy