Template:Battle

From TheKolWiki
Jump to: navigation, search
Chest.gif This high-use template has been protected from editing to prevent inaccurate edits and/or vandalism. Please use the talk page to discuss changes, and/or to ask an administrator to make an edit for you.
{{Battle}}

{{#ifexist:Data:{{PAGENAME}}| {{Data:{{PAGENAME}}|format=INFOBOX_Combat}}|'''<span class="plainlinks" style="float: right">[{{fullurle:Data:{{PAGENAME}}|action=edit&preload=Template:Combat/data}} Create metadata]</span>'''<br style="clear: all" />{{#ifeq:{{{autocat|yes}}}|yes|[[Category:Missing Metadata]]}}}}{{#switch:{{{type|default}}}|haiku=<div style="text-align:center"><table style="margin-left: auto; margin-right: auto; line-height: 1.5;"><tr><td>{{#ifeq:{{Data|{{PAGENAME}}|plainimage|n}}|y|{{Data|{{PAGENAME}}|image|{{{image}}}}}|[[File:{{Data|{{PAGENAME}}|image|{{{image}}}}}|{{Data|{{PAGENAME}}|name|{{{name}}}}}]]}}</td> <td style="text-align: left;">{{{nameHaiku}}}<td></tr> <tr><td colspan="2" style="text-align: left;"> {{{descHaiku}}}</td></tr></table></div>|default=<div style="text-align:center">{{#ifeq:{{Data|{{PAGENAME}}|plainimage|n}}|y|{{Data|{{PAGENAME}}|image|{{{image}}}}}|[[File:{{Data|{{PAGENAME}}|image|{{{image}}}}}|{{Data|{{PAGENAME}}|name|{{{name}}}}}]]}}{{#switch:{{{namebreak|n}}}|y=<br />|#default=&nbsp;}}You're fighting {{Data|{{PAGENAME}}|pronoun|{{{a}}}}} {{#if:{{Data|{{PAGENAME}}|displayname|}}|{{Data|{{PAGENAME}}|displayname}}|{{Data|{{PAGENAME}}|name|{{{name}}}}}}}</div> {{{text|}}}|weirdeaux={{WeirdeauxIntro}} |hipster= <div style="text-align:center"><table style="margin-left: auto; margin-right: auto; line-height: 1.5;"><tr><td>[[File:{{Data|{{PAGENAME}}|image|{{{image}}}}}|{{Data|{{PAGENAME}}|name|{{{name}}}}}]]</td> <td style="text-align: left;" valign="center"><table cellpadding="5"><tr><td bgcolor="black" align="center"><font color="white" size="1">{{{hipname}}}<br>{{{hipdesc}}}</font></td></tr></table><br /><br />You're fighting '''{{Data|{{PAGENAME}}|pronoun|{{{a}}}}} {{Data|{{PAGENAME}}|name|{{{name}}}}}'''</td></tr></table></div> {{{text|}}}}} {{#ifeq:{{{hit}}}|!|| ''Hit Message(s):'' <div style="text-align:center"> {{#switch:{{{hit|?}}}|?|=<span style="color:red">'''not known'''</span>{{#ifeq:{{{autocat|yes}}}|no||[[Category:Missing Combat Messages|{{PAGENAME}}]]}}|{{{hit}}}}} </div> }}{{#ifeq:{{{critical}}}|!|| ''Critical Hit Message:'' <div style="text-align:center"> {{#switch:{{{critical|?}}}|?|=<span style="color:red">'''not known'''</span>{{#ifeq:{{{autocat|yes}}}|no||[[Category:Missing Combat Messages|{{PAGENAME}}]]}}|{{{critical}}}}} </div> }}{{#ifeq:{{{miss}}}|!|| ''Miss Message(s):'' <div style="text-align:center"> {{#switch:{{{miss|?}}}|?|=<span style="color:red">'''not known'''</span>{{#ifeq:{{{autocat|yes}}}|no||[[Category:Missing Combat Messages|{{PAGENAME}}]]}}|{{{miss}}}}} </div> }}{{#ifeq:{{{fumble}}}|!|| ''Fumble Message:'' <div style="text-align:center"> {{#switch:{{{fumble|?}}}|?|=<span style="color:red">'''not known'''</span>{{#ifeq:{{{autocat|yes}}}|no||[[Category:Missing Combat Messages|{{PAGENAME}}]]}}|#default={{{fumble}}} <font color="red">(FUMBLE!)</font>}} </div> }}{{#switch:{{{special|!}}}|?|!|=| #default=''Special Move(s):'' <div style="text-align:center"> {{{special}}} </div> }}{{#if:{{{nosep|}}}||<div style="padding-top:2px;"> ---- <center style="position:relative;top:-1.05em;height:0px;"><span style="background-color:#ffffff;padding-left:2px;padding-right:2px;">After Combat</span></center></div>}}

&#32;__NOTOC__{{#ifeq:{{{autocat|yes}}}|no||{{#switch:{{Data|{{PAGENAME}}|phylum|{{{phylum|?}}}}}|beast=[[Category:Beasts]]|bug=[[Category:Bugs]]|constellation=[[Category:Constellations]]|construct=[[Category:Constructs]]|demon=[[Category:Demons]]|dude=[[Category:Dudes]]|elemental=[[Category:Elementals]]|elf=[[Category:Elves]]|fish=[[Category:Fish]]|goblin=[[Category:Goblins]]|hippy=[[Category:Hippies]]|hobo=[[Category:Hobos]]|horror=[[Category:Horrors]]|humanoid=[[Category:Humanoids]]|mer-kin=[[Category:Mer-Kin]]|orc=[[Category:Orcs]]|penguin=[[Category:Penguins]]|pirate=[[Category:Pirates]]|plant=[[Category:Plants]]|slime=[[Category:Slimes]]|undead=[[Category:Undead]]|weird=[[Category:Weird]]|!=[[Category:Combat Adventures]]|#default=[[Category:Monsters Needing Phylum]]}}{{PartsCat|{{Data|{{PAGENAME}}|parts|?}}}}}}

Usage

{{battle
|image=image.gif
|a=article (Ex: a, an, the)
|name=name
|type=optional (see below for more details)
|namebreak=optional 
|text=encounter text
|hit=hit messages
|miss=miss messages
|critical=critical hit message
|fumble=fumble message
|special=special move text
|nosep=optional
|autocat=yes/no}}

If any group of messages is unknown, specify a single question mark (?). If a particular message is impossible (for example, the Shadow Class missing or fumbling), fill in an exclamation point (!).

The namebreak parameter is optional. Set it to y to make the monster's name appear beneath its image, rather than to the right of it. This is principally for use with monsters that have very large images, whose in-game name is displayed similarly.

The type parameter is optional. It is only needed in special cases. Set it to haiku, if the creature has its name and description in a haiku, such as enemies in The Haiku Dungeon. Set it to hipster, if the monster is a Mini-Hipster specific enemy. In that case, the black box name and description should be included, as hipname and hipdesc, respectively.

If a data page has been created for the combat, the fields image, a, and name become optional.

The nosep parameter is optional. Set it to y to prevent an After Combat separator line from being added at the end.

Examples

Create metadata
Knott Yeti You're fighting a Knott Yeti

This is an enormous Yeti, from the distant icy lands of Knott. The Yetis of Knott are extremely powerful, outmatched only by the fiendish Slandings of Knott.

Hit Message(s):

He claws your <head> with his big, sharp, pointy claws. Brrrrrrrrrrr. (cold damage)

He gnaws on your <arm> with his big, sharp, pointy teeth. Brrrrrrrrrrr. (cold damage)

He gnaws on your stomach with his teeth, causing you abominable abdominal pain. Brrrrrrrrrrr. (cold damage)

He puts your entire head in his mouth. Ew, and you thought these things smelled bad on the outside... Brrrrrrrrrrr. (cold damage)

Critical Hit Message:

He lets loose a fiendish roar, which starts an avalanche high in the mountains. You get run over by at least twelve inches of snow (a licky boom boom down). Brrrrrrrrrrr. (cold damage)

Miss Message(s):

He tries to claw you, but you duck and make the mating call of the Knott Slanding, which frightens him.

He gnashes his teeth at you, but you act like an elfin dentist until he's frightened away.

He tries to gnaw on your stomach, but fails abominably. And abdominally.

He tries to put your head in his mouth, but stops when he catches a whiff of your hair.

Fumble Message:

He stomps toward you, but falls into a patch of deep snow. You kick back and enjoy watching him struggle to extricate himself. (FUMBLE!)


After Combat