Difference between revisions of "Template:Enemy"
Jump to navigation
Jump to search
Defensive stats
Offensive stats
old>Realpsojed (flexbox for resistances section to eliminate spaces, removing min height for that) |
old>Realpsojed (removed more linebreaks and turned each resistance stat into separate div, allowing for flexbox wrapping) |
||
Line 13: | Line 13: | ||
-->{{Tooltip rule}}'''Resistances'''</div><!-- | -->{{Tooltip rule}}'''Resistances'''</div><!-- | ||
--><div style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch;"><!-- | --><div style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch;"><!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PhysicalResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">Physical <span style="float:right;">{{:{{ROOTPAGENAME}}|PhysicalResistance}}%</span></div>}}<!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PhysicalResistance}} | 0 | |<div style="padding | -->{{#ifeq: {{:{{ROOTPAGENAME}}|NatureResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">Nature <span style="float:right;">{{:{{ROOTPAGENAME}}|NatureResistance}}%</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}| | -->{{#ifeq: {{:{{ROOTPAGENAME}}|MagicResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">Magic <span style="float:right;">{{:{{ROOTPAGENAME}}|MagicResistance}}%</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}| | -->{{#ifeq: {{:{{ROOTPAGENAME}}|SlashingResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">Slashing <span style="float:right;">{{:{{ROOTPAGENAME}}|SlashingResistance}}%</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}| | -->{{#ifeq: {{:{{ROOTPAGENAME}}|PiercingResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">Piercing <span style="float:right;">{{:{{ROOTPAGENAME}}|PiercingResistance}}%</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}| | -->{{#ifeq: {{:{{ROOTPAGENAME}}|CrushingResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">Crushing <span style="float:right;">{{:{{ROOTPAGENAME}}|CrushingResistance}}%</span></div>}}<!-- | ||
--><div style="width: 142px; | -->{{#ifeq: {{:{{ROOTPAGENAME}}|RendingResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">Rending <span style="float:right;">{{:{{ROOTPAGENAME}}|RendingResistance}}%</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}| | -->{{#ifeq: {{:{{ROOTPAGENAME}}|FireResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">{{C|Fire}} <span style="float:right;">{{C|Fire|{{:{{ROOTPAGENAME}}|FireResistance}}%}}</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FireResistance}} | 0 | |{{C|Fire}} <span style="float:right;">{{C|Fire|{{:{{ROOTPAGENAME}}|FireResistance}}%}}</span>< | -->{{#ifeq: {{:{{ROOTPAGENAME}}|FrostResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">{{C|Frost}} <span style="float:right;">{{C|Frost|{{:{{ROOTPAGENAME}}|FrostResistance}}%}}</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FrostResistance}} | 0 | |{{C|Frost}} <span style="float:right;">{{C|Frost|{{:{{ROOTPAGENAME}}|FrostResistance}}%}}</span>< | -->{{#ifeq: {{:{{ROOTPAGENAME}}|ShockResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">{{C|Shock}} <span style="float:right;">{{C|Shock|{{:{{ROOTPAGENAME}}|ShockResistance}}%}}</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ShockResistance}} | 0 | |{{C|Shock}} <span style="float:right;">{{C|Shock|{{:{{ROOTPAGENAME}}|ShockResistance}}%}}</span>< | -->{{#ifeq: {{:{{ROOTPAGENAME}}|PoisonResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">{{C|Poison}} <span style="float:right;">{{C|Poison|{{:{{ROOTPAGENAME}}|PoisonResistance}}%}}</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PoisonResistance}} | 0 | |{{C|Poison}} <span style="float:right;">{{C|Poison|{{:{{ROOTPAGENAME}}|PoisonResistance}}%}}</span>< | -->{{#ifeq: {{:{{ROOTPAGENAME}}|CausticResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">{{C|Caustic}} <span style="float:right;">{{C|Caustic|{{:{{ROOTPAGENAME}}|CausticResistance}}%}}</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|CausticResistance}} | 0 | |{{C|Caustic}} <span style="float:right;">{{C|Caustic|{{:{{ROOTPAGENAME}}|CausticResistance}}%}}</span> | -->{{#ifeq: {{:{{ROOTPAGENAME}}|UnholyResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">{{C|Unholy}} <span style="float:right;">{{C|Unholy|{{:{{ROOTPAGENAME}}|UnholyResistance}}%}}</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ArcaneResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">{{C|Arcane}} <span style="float:right;">{{C|Arcane|{{:{{ROOTPAGENAME}}|ArcaneResistance}}%}}</span></div>}}<!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}| | -->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{:{{ROOTPAGENAME}}|SacredResistance}}%}}</span></div>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |<div style="width: 142px; padding: 0px 2.5px 0px 2.5px;">{{C|Psionic}} <span style="float:right;">{{C|Psionic|{{:{{ROOTPAGENAME}}|PsionicResistance}}%}}</span></div>}}</div><!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ArcaneResistance}} | 0 | |{{C|Arcane}} <span style="float:right;">{{C|Arcane|{{:{{ROOTPAGENAME}}|ArcaneResistance}}%}}</span>< | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{:{{ROOTPAGENAME}}|SacredResistance}}%}}</span>< | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |{{C|Psionic}} <span style="float:right;">{{C|Psionic|{{:{{ROOTPAGENAME}}|PsionicResistance}}%}}</span>< | |||
--><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 19:02, 2 May 2021
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
Physical Enemy%
Nature Enemy%
Magic Enemy%
Slashing Enemy%
Piercing Enemy%
Crushing Enemy%
Rending Enemy%
Fire Enemy%
Frost Enemy%
Shock Enemy%
Poison Enemy%
Caustic Enemy%
Unholy Enemy%
Arcane Enemy%
Sacred Enemy%
Psionic Enemy%
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%