Difference between revisions of "Template:Enemy"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(updated check for displaying only non-zero resistances to include the body type bonuses)
old>Realpsojed
(custom button and position for collapsible)
Line 7: Line 7:
| #default = }}
| #default = }}
| }}<!--
| }}<!--
--><div style="width: 300px;" class="mw-collapsible mw-collapsed" data-expandtext="Show all statistics" data-collapsetext="Hide all statistics">
--><div style="width: 300px;">
<div style="text-align:center;"><br><span style="font-size: 20px;">{{#if:{{:{{ROOTPAGENAME}}|Name}}|{{:{{ROOTPAGENAME}}|Name}}|{{ROOTPAGENAME}}}}</span><br><!--
<div style="text-align:center;"><br><span style="font-size: 20px;">{{#if:{{:{{ROOTPAGENAME}}|Name}}|{{:{{ROOTPAGENAME}}|Name}}|{{ROOTPAGENAME}}}}</span><br><!--
-->Level {{:{{ROOTPAGENAME}}|Level}} <!--
-->Level {{:{{ROOTPAGENAME}}|Level}} <!--
Line 37: Line 37:
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |<div style="width: 145px;">{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{:{{ROOTPAGENAME}}|SacredResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |<div style="width: 145px;">{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{:{{ROOTPAGENAME}}|SacredResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |<div style="width: 145px;">{{C|Psionic}} <span style="float:right;">{{C|Psionic|{{:{{ROOTPAGENAME}}|PsionicResistance}}%}}</span></div>}}</div><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |<div style="width: 145px;">{{C|Psionic}} <span style="float:right;">{{C|Psionic|{{:{{ROOTPAGENAME}}|PsionicResistance}}%}}</span></div>}}</div><!--
--><div class="mw-collapsible-content"><!--
--><div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-statistics1"><!--
--><div style="text-align:center;">{{Tooltip rule}}'''Defensive stats'''</div><!--
--><div style="text-align:center;">{{Tooltip rule}}'''Defensive stats'''</div><!--
--><div style="width: 142px; float: left; padding-right: 5px; min-height: 1px;"><!--
--><div style="width: 142px; float: left; padding-right: 5px; min-height: 1px;"><!--
Line 83: Line 83:
--><div style="width:30%;display:inline-block;">Size:<br>{{:{{ROOTPAGENAME}}|Size}}<br></div><!--
--><div style="width:30%;display:inline-block;">Size:<br>{{:{{ROOTPAGENAME}}|Size}}<br></div><!--
--><div style="width:30%;display:inline-block;">XP:<br>{{:{{ROOTPAGENAME}}|XP}}<br></div></div><!--
--><div style="width:30%;display:inline-block;">XP:<br>{{:{{ROOTPAGENAME}}|XP}}<br></div></div><!--
--><div style="color:#9d7969;text-align:justify">{{Tooltip rule}}{{:{{ROOTPAGENAME}}|Description}}</div></div><!--
-->{{Tooltip rule}}<div style="text-align:center;"><span class="mw-collapsible mw-customtoggle-statistics1 mw-customtoggle-statistics2" id="mw-customcollapsible-statistics2" style="background-color: #231f36; border: 2px solid black; padding: 10px 15px; font-size: 16px;">Show more</span><!--
--><span class="mw-collapsible mw-collapsed mw-customtoggle-statistics1 mw-customtoggle-statistics2" id="mw-customcollapsible-statistics2" style="background-color: #231f36; border: 2px solid black; padding: 10px 15px; font-size: 16px;">Show less</span><br></div><!--
--><div style="color:#9d7969;text-align:justify;">{{:{{ROOTPAGENAME}}|Description}}</div></div><!--
--></includeonly><noinclude>{{doc}}[[Category:Tooltip templates]]</noinclude>
--></includeonly><noinclude>{{doc}}[[Category:Tooltip templates]]</noinclude>

Revision as of 01:36, 30 May 2021

Template-info.png Documentation

This is template created for use together with the Template:Tooltip hover box template. Copy this code to a specific Enemy page (for example, Skeleton Swordsman):

{{ {{{1|Tooltip hover box}}}|title= {{Enemy}} }}

It will automatically load the attrbutes from Enemy data and fill them into the format you see below.

You can provide the enemy name as first parameter, otherwise the pagename is used.

Enemy body types

Enemies gain certain additional attributes (mainly Resistances) from their body types. These bonuses are hardcoded in the Enemy template as the "Matter" variable and added to each enemy's base attributes.

Example

Physical Expression error: Unrecognized punctuation character "[".%
Nature Expression error: Unrecognized punctuation character "[".%
Magic Expression error: Unrecognized punctuation character "[".%
Slashing Expression error: Unrecognized punctuation character "[".%
Piercing Expression error: Unrecognized punctuation character "[".%
Crushing Expression error: Unrecognized punctuation character "[".%
Rending Enemy%
Fire Expression error: Unrecognized punctuation character "[".%
Frost Enemy%
Shock Enemy%
Poison Expression error: Unrecognized punctuation character "[".%
Caustic Expression error: Unrecognized punctuation character "[".%
Unholy Enemy%
Arcane Enemy%
Sacred Enemy%
Psionic Enemy%

Defensive stats
Block Chance Enemy%
Bleed Res. Enemy%
Control Res. Enemy%
Protection Enemy
Block Power Enemy
Pain Res. Enemy%
Move Res. Enemy%
Dodge Chance Enemy%

Offensive stats
Crit Chance Enemy%
Accuracy Enemy%
Counter Chance Enemy%
Stun Chance Enemy%
Knockb. Chance Enemy%
Life Leech Enemy%
Vision Enemy
Magic Power Expression error: Unrecognized punctuation character "[".%
Crit Efficiency xExpression error: Unrecognized punctuation character "[".
Bleed Chance Enemy%
Fumble Chance Enemy%
Daze Chance Enemy%
Immob. Chance Enemy%
Energy Leech Enemy%
Bonus Range Enemy
Armor Pen. Enemy%

Attributes
STR
AGL
PRC
VIT
WIL


Miscellaneous
Faction:
Enemy
Size:
Enemy

Show moreShow less