Difference between revisions of "Template:Enemy"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(switching crit efficiency format to x1.25)
old>Realpsojed
(flexbox for resistances section to eliminate spaces, removing min height for that)
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; min-height: 1px;"><!--
--><div style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch;"><!--
--><div style="width: 142px; float: left; padding-right: 5px;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PhysicalResistance}} | 0 | |<div style="padding-bottom: 5px;">Physical <span style="float:right;">{{:{{ROOTPAGENAME}}|PhysicalResistance}}%</span><br></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PhysicalResistance}} | 0 | |<div style="padding-bottom: 5px;">Physical <span style="float:right;">{{:{{ROOTPAGENAME}}|PhysicalResistance}}%</span><br></div>}}<!--
-->{{#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 19:
-->{{#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; min-height: 1px;"><!--
--><div style="width: 142px; float: left; padding-left: 5px;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|NatureResistance}} | 0 | |<div style="padding-bottom: 5px;">Nature <span style="float:right;">{{:{{ROOTPAGENAME}}|NatureResistance}}%</span><br></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|NatureResistance}} | 0 | |<div style="padding-bottom: 5px;">Nature <span style="float:right;">{{:{{ROOTPAGENAME}}|NatureResistance}}%</span><br></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FireResistance}} | 0 | |{{C|Fire}} <span style="float:right;">{{C|Fire|{{:{{ROOTPAGENAME}}|FireResistance}}%}}</span><br>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FireResistance}} | 0 | |{{C|Fire}} <span style="float:right;">{{C|Fire|{{:{{ROOTPAGENAME}}|FireResistance}}%}}</span><br>}}<!--
Line 27: Line 28:
--><div style="width: 100%; text-align:center; min-height: 1px; padding-top: 5px;"><!--
--><div style="width: 100%; text-align:center; min-height: 1px; padding-top: 5px;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|MagicResistance}} | 0 | |<div style="padding-bottom: 5px;">Magic {{:{{ROOTPAGENAME}}|MagicResistance}}%<br></div>}}</div>{{Clear}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|MagicResistance}} | 0 | |<div style="padding-bottom: 5px;">Magic {{:{{ROOTPAGENAME}}|MagicResistance}}%<br></div>}}</div>{{Clear}}<!--
--><div style="width: 142px; float: left; padding-right: 5px; min-height: 1px;"><!--
--><div style="width: 142px; float: left; padding-right: 5px;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|UnholyResistance}} | 0 | |{{C|Unholy}} <span style="float:right;">{{C|Unholy|{{:{{ROOTPAGENAME}}|UnholyResistance}}%}}</span><br>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|UnholyResistance}} | 0 | |{{C|Unholy}} <span style="float:right;">{{C|Unholy|{{:{{ROOTPAGENAME}}|UnholyResistance}}%}}</span><br>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ArcaneResistance}} | 0 | |{{C|Arcane}} <span style="float:right;">{{C|Arcane|{{:{{ROOTPAGENAME}}|ArcaneResistance}}%}}</span><br>}}</div><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ArcaneResistance}} | 0 | |{{C|Arcane}} <span style="float:right;">{{C|Arcane|{{:{{ROOTPAGENAME}}|ArcaneResistance}}%}}</span><br>}}</div><!--
--><div style="width: 142px; float: left; padding-left: 5px; min-height: 1px;"><!--
--><div style="width: 142px; float: left; padding-left: 5px;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{:{{ROOTPAGENAME}}|SacredResistance}}%}}</span><br>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{:{{ROOTPAGENAME}}|SacredResistance}}%}}</span><br>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |{{C|Psionic}} <span style="float:right;">{{C|Psionic|{{:{{ROOTPAGENAME}}|PsionicResistance}}%}}</span><br>}}</div>{{Clear}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |{{C|Psionic}} <span style="float:right;">{{C|Psionic|{{:{{ROOTPAGENAME}}|PsionicResistance}}%}}</span><br>}}</div></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><!--

Revision as of 18:40, 2 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 Enemy%
Slashing Enemy%
Piercing Enemy%
Crushing Enemy%
Rending Enemy%
Nature Enemy%
Fire Enemy%
Frost Enemy%
Shock Enemy%
Poison Enemy%
Caustic Enemy%
Magic Enemy%
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 Enemy%
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