Difference between revisions of "Template:Part"

From TheKolWiki
Jump to: navigation, search
m (minor cleanup)
m (...or not. Oh well...)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<nowiki><</nowiki><bodypart></bodypart><nowiki>></nowiki><noinclude>[[Category:Standardization Templates| {{PAGENAME}}]]</noinclude>
+
<includeonly>&lt;[[Anatomical Injuries|{{#switch:{{#rand:1|26}}|1=ankle|2=arm|3=arse|4=bung|5=calf|6=ear|7=elbow|8=eye|9=face|10=foot|11=forehead|12=giblets|13=groin|14=head|15=kidney|16=knee|17=leg|18=lower back|19=neck|20=nipple|21=shins|22=shoulder|23=skull|24=solar plexus|25=thigh|26=throat}}]]&gt;</includeonly><noinclude>
 +
Generate a random body part, for use with hit and critical hit messages, particularly those for monsters (see {{tl|battle}}). 
 +
 
 +
==Examples==
 +
Due to the way the wiki optimizes the use of this template, one has to use slightly different notation if you want distinct bodyparts to be generated with multiple calls to the template on the same page.
 +
 
 +
*<nowiki>He hits you in the {{part}} and the {{part}}, and then bites you in the {{part}}.  You hate getting bit in the {{part}}.</nowiki>
 +
*:He hits you in the {{part}} and the {{part}}, and then bites you in the {{part}}.  You hate getting bit in the {{part}}.
 +
*<nowiki>He hits you in the {{part|}} and the {{part|}}, and then bites you in the {{part|}}.  You hate getting bit in the {{part|}}.</nowiki>
 +
*:He hits you in the {{part|}} and the {{part|}}, and then bites you in the {{part|}}.  You hate getting bit in the {{part|}}.
 +
*<nowiki>He hits you in the {{part|}} and the {{part|}}, and then bites you in the {{part}}.  You hate getting bit in the {{part}}.</nowiki>
 +
*:He hits you in the {{part|}} and the {{part|}}, and then bites you in the {{part}}.  You hate getting bit in the {{part}}.
 +
 
 +
Notice how all calls to <nowiki>{{part}}</nowiki> have the same value in ''all'' of the above examples. However <nowiki>{{part|}}</nowiki> is evaluated randomly each time (but may not always be distinct).  As in the third example, this can be exploited a bit when the message actually intentionally uses the same part in multiple places.
 +
 
 +
[[Category:Standardization Templates|{{PAGENAME}}]]</noinclude>

Latest revision as of 18:52, 22 July 2011

Generate a random body part, for use with hit and critical hit messages, particularly those for monsters (see {{battle}}).

Examples

Due to the way the wiki optimizes the use of this template, one has to use slightly different notation if you want distinct bodyparts to be generated with multiple calls to the template on the same page.

  • He hits you in the {{part}} and the {{part}}, and then bites you in the {{part}}. You hate getting bit in the {{part}}.
    He hits you in the <arm> and the <thigh>, and then bites you in the <groin>. You hate getting bit in the <giblets>.
  • He hits you in the {{part|}} and the {{part|}}, and then bites you in the {{part|}}. You hate getting bit in the {{part|}}.
    He hits you in the <head> and the <foot>, and then bites you in the <lower back>. You hate getting bit in the <forehead>.
  • He hits you in the {{part|}} and the {{part|}}, and then bites you in the {{part}}. You hate getting bit in the {{part}}.
    He hits you in the <eye> and the <arse>, and then bites you in the <forehead>. You hate getting bit in the <calf>.

Notice how all calls to {{part}} have the same value in all of the above examples. However {{part|}} is evaluated randomly each time (but may not always be distinct). As in the third example, this can be exploited a bit when the message actually intentionally uses the same part in multiple places.