Difference between revisions of "Template:Enemy"
Jump to navigation
Jump to search
Defensive stats
Offensive stats
Defensive stats
Offensive stats
old>Realpsojed (removed table, reformatted styling into 2-column, removed icons, added attribute names, added collapsible button, labeled sections, hidden stats other than hp, resistances and xp, added automatic hiding of resistances that are zero) |
old>Realpsojed (min-height to try to keep the div positions, color coding for nature and magic resistances) |
||
Line 1: | Line 1: | ||
<div style="width: 300px;" class="mw-collapsible mw-collapsed" data-expandtext="Show all statistics" data-collapsetext="Hide all statistics"> | |||
<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 12: | Line 12: | ||
-->{{#if: {{:{{ROOTPAGENAME}}|Damage4}} | <div style="margin-left:5px;margin-right:5px;display:inline-block;">{{C|{{:{{ROOTPAGENAME}}|DamageType4}}|{{:{{ROOTPAGENAME}}|Damage4}}}} {{:{{ROOTPAGENAME}}|DamageType4}}</div>| }}<!-- | -->{{#if: {{:{{ROOTPAGENAME}}|Damage4}} | <div style="margin-left:5px;margin-right:5px;display:inline-block;">{{C|{{:{{ROOTPAGENAME}}|DamageType4}}|{{:{{ROOTPAGENAME}}|Damage4}}}} {{:{{ROOTPAGENAME}}|DamageType4}}</div>| }}<!-- | ||
-->{{Tooltip rule}}'''Resistances'''</div><!-- | -->{{Tooltip rule}}'''Resistances'''</div><!-- | ||
--><div style="width: 142px; float: left; padding-right: 5px;><!-- | --><div style="width: 142px; float: left; padding-right: 5px; min-height: 1px;"><!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PhysicalResistance}} | 0 | |Physical <span style="float:right;">{{:{{ROOTPAGENAME}}|PhysicalResistance}}%</span><br><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|PhysicalResistance}} | 0 | |Physical <span style="float:right;">{{:{{ROOTPAGENAME}}|PhysicalResistance}}%</span><br><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SlashingResistance}} | 0 | |Slashing <span style="float:right;">{{:{{ROOTPAGENAME}}|SlashingResistance}}%</span><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|SlashingResistance}} | 0 | |Slashing <span style="float:right;">{{:{{ROOTPAGENAME}}|SlashingResistance}}%</span><br>}}<!-- | ||
Line 18: | Line 18: | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|CrushingResistance}} | 0 | |Crushing <span style="float:right;">{{:{{ROOTPAGENAME}}|CrushingResistance}}%</span><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|CrushingResistance}} | 0 | |Crushing <span style="float:right;">{{:{{ROOTPAGENAME}}|CrushingResistance}}%</span><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|RendingResistance}} | 0 | |Rending <span style="float:right;">{{:{{ROOTPAGENAME}}|RendingResistance}}%</span><br>}}</div><!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|RendingResistance}} | 0 | |Rending <span style="float:right;">{{:{{ROOTPAGENAME}}|RendingResistance}}%</span><br>}}</div><!-- | ||
--><div style="width: 142px; float: left; padding-left: 5px;><!-- | --><div style="width: 142px; float: left; padding-left: 5px; min-height: 1px;"><!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|NatureResistance}} | 0 | |Nature <span style="float:right;">{{:{{ROOTPAGENAME}}|NatureResistance}}%</span><br><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|NatureResistance}} | 0 | |Nature <span style="float:right;">{{:{{ROOTPAGENAME}}|NatureResistance}}%</span><br><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FireResistance}} | 0 | |Fire <span style="float:right;">{{:{{ROOTPAGENAME}}|FireResistance}}%</span><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|FireResistance}} | 0 | |Fire <span style="float:right;">{{C|Fire|{{:{{ROOTPAGENAME}}|FireResistance}}%}}</span><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FrostResistance}} | 0 | |Frost <span style="float:right;">{{:{{ROOTPAGENAME}}|FrostResistance}}%</span><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|FrostResistance}} | 0 | |Frost <span style="float:right;">{{C|Frost|{{:{{ROOTPAGENAME}}|FrostResistance}}%}}</span><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ShockResistance}} | 0 | |Shock <span style="float:right;">{{:{{ROOTPAGENAME}}|ShockResistance}}%</span><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|ShockResistance}} | 0 | |Shock <span style="float:right;">{{C|Shock|{{:{{ROOTPAGENAME}}|ShockResistance}}%}}</span><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PoisonResistance}} | 0 | |Poison <span style="float:right;">{{:{{ROOTPAGENAME}}|PoisonResistance}}%</span><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|PoisonResistance}} | 0 | |Poison <span style="float:right;">{{C|Poison|{{:{{ROOTPAGENAME}}|PoisonResistance}}%}}</span><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|CausticResistance}} | 0 | |Caustic <span style="float:right;">{{:{{ROOTPAGENAME}}|CausticResistance}}%</span><br>}}</div>{{Clear}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|CausticResistance}} | 0 | |Caustic <span style="float:right;">{{C|Caustic|{{:{{ROOTPAGENAME}}|CausticResistance}}%}}</span><br>}}</div>{{Clear}}<!-- | ||
--><div style="text-align:center;"><!-- | --><div style="width: 100%; text-align:center; min-height: 1px;"><!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|MagicResistance}} | 0 | |<br>Magic {{:{{ROOTPAGENAME}}|MagicResistance}}%<br><br>}}</div>{{Clear}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|MagicResistance}} | 0 | |<br>Magic {{:{{ROOTPAGENAME}}|MagicResistance}}%<br><br>}}</div>{{Clear}}<!-- | ||
--><div style="width: 142px; float: left; padding-right: 5px;><!-- | --><div style="width: 142px; float: left; padding-right: 5px; min-height: 1px;"><!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|UnholyResistance}} | 0 | |Unholy <span style="float:right;">{{:{{ROOTPAGENAME}}|UnholyResistance}}%</span><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|UnholyResistance}} | 0 | |Unholy <span style="float:right;">{{C|Unholy|{{:{{ROOTPAGENAME}}|UnholyResistance}}%}}</span><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ArcaneResistance}} | 0 | |Arcane <span style="float:right;">{{:{{ROOTPAGENAME}}|ArcaneResistance}}%</span><br>}}</div><!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|ArcaneResistance}} | 0 | |Arcane <span style="float:right;">{{C|Arcane|{{:{{ROOTPAGENAME}}|ArcaneResistance}}%}}</span><br>}}</div><!-- | ||
--><div style="width: 142px; float: left; padding-left: 5px;><!-- | --><div style="width: 142px; float: left; padding-left: 5px; min-height: 1px;"><!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |Sacred <span style="float:right;">{{:{{ROOTPAGENAME}}|SacredResistance}}%</span><br>}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |Sacred <span style="float:right;">{{C|Sacred|{{:{{ROOTPAGENAME}}|SacredResistance}}%}}</span><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |Psionic <span style="float:right;">{{:{{ROOTPAGENAME}}|PsionicResistance}}%</span><br>}}</div>{{Clear}}<!-- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |Psionic <span style="float:right;">{{C|Psionic|{{:{{ROOTPAGENAME}}|PsionicResistance}}%}}</span><br>}}</div>{{Clear}}<!-- | ||
--><div class="mw-collapsible-content"><!-- | --><div class="mw-collapsible-content"><!-- | ||
--><div style="text-align:center;">{{Tooltip rule}}'''Defensive stats'''</div><!-- | --><div style="text-align:center;">{{Tooltip rule}}'''Defensive stats'''</div><!-- | ||
Line 73: | Line 73: | ||
--><div style="text-align:center;">{{Tooltip rule}}'''Miscellaneous'''<br><!-- | --><div style="text-align:center;">{{Tooltip rule}}'''Miscellaneous'''<br><!-- | ||
--><div style="width:30%;display:inline-block;">Faction:<br>{{:{{ROOTPAGENAME}}|Faction}}</div><!-- | --><div style="width:30%;display:inline-block;">Faction:<br>{{:{{ROOTPAGENAME}}|Faction}}</div><!-- | ||
--><div style="width:30%;display:inline-block;">Size: {{:{{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: {{:{{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><!-- | --><div style="color:#9d7969;text-align:justify">{{Tooltip rule}}{{:{{ROOTPAGENAME}}|Description}}</div></div><!-- | ||
--></includeonly><noinclude>{{doc}}[[Category:Tooltip templates]]</noinclude> | --></includeonly><noinclude>{{doc}}[[Category:Tooltip templates]]</noinclude> |
Revision as of 17:09, 2 May 2021
Defensive stats
Offensive stats
Crit Chance Enemy%
Accuracy Enemy%
Counter Chance Enemy%
Stun Chance Enemy%
Knockb. Chance Enemy%
Life Leech Enemy%
Vision Enemy
Magic Power Enemy%
Accuracy Enemy%
Counter Chance Enemy%
Stun Chance Enemy%
Knockb. Chance Enemy%
Life Leech Enemy%
Vision Enemy
Magic Power Enemy%
</includeonly>
Documentation
[purge]
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
Defensive stats
Offensive stats
Crit Chance Enemy%
Accuracy Enemy%
Counter Chance Enemy%
Stun Chance Enemy%
Knockb. Chance Enemy%
Life Leech Enemy%
Vision Enemy
Magic Power Enemy%
Accuracy Enemy%
Counter Chance Enemy%
Stun Chance Enemy%
Knockb. Chance Enemy%
Life Leech Enemy%
Vision Enemy
Magic Power Enemy%