Difference between revisions of "Template:Enemy"
Jump to navigation
Jump to search
Defensive stats
Offensive stats
old>Xaphedo |
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) |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly><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><!-- | |||
-->Level {{:{{ROOTPAGENAME}}|Level}} <!-- | |||
-->{{:{{ROOTPAGENAME}}|Type}}{{Clear}}<!-- | |||
-->[[File:{{ROOTPAGENAME}}.png|link={{ROOTPAGENAME}}/Tooltip|class=image2x|alt={{ROOTPAGENAME}}|{{ROOTPAGENAME}}]]{{Clear}}<!-- | |||
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">Health: {{:{{ROOTPAGENAME}}|Health}}</div><!-- | |||
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">Energy: {{:{{ROOTPAGENAME}}|Energy}}</div><!-- | |||
-->{{Tooltip rule}}'''Damage'''<br><!-- | |||
| | --><div style="margin-left:5px;margin-right:5px;display:inline-block;">{{C|{{:{{ROOTPAGENAME}}|DamageType1}}|{{:{{ROOTPAGENAME}}|Damage1}}}} {{:{{ROOTPAGENAME}}|DamageType1}}</div><!-- | ||
| | -->{{#if: {{:{{ROOTPAGENAME}}|Damage2}} | <div style="margin-left:5px;margin-right:5px;display:inline-block;">{{C|{{:{{ROOTPAGENAME}}|DamageType2}}|{{:{{ROOTPAGENAME}}|Damage2}}}} {{:{{ROOTPAGENAME}}|DamageType2}}</div>| }}<!-- | ||
-->{{#if: {{:{{ROOTPAGENAME}}|Damage3}} | <div style="margin-left:5px;margin-right:5px;display:inline-block;">{{C|{{:{{ROOTPAGENAME}}|DamageType3}}|{{:{{ROOTPAGENAME}}|Damage3}}}} {{:{{ROOTPAGENAME}}|DamageType3}}</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><!-- | |||
--><div style="width: 142px; float: left; padding-right: 5px;><!-- | |||
|- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|PhysicalResistance}} | 0 | |Physical <span style="float:right;">{{:{{ROOTPAGENAME}}|PhysicalResistance}}%</span><br><br>}}<!-- | ||
|<div style="float:left; | -->{{#ifeq: {{:{{ROOTPAGENAME}}|SlashingResistance}} | 0 | |Slashing <span style="float:right;">{{:{{ROOTPAGENAME}}|SlashingResistance}}%</span><br>}}<!-- | ||
|- | -->{{#ifeq: {{:{{ROOTPAGENAME}}|PiercingResistance}} | 0 | |Piercing <span style="float:right;">{{:{{ROOTPAGENAME}}|PiercingResistance}}%</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><!-- | |||
--><div style="width: 142px; float: left; padding-left: 5px;><!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|NatureResistance}} | 0 | |Nature <span style="float:right;">{{:{{ROOTPAGENAME}}|NatureResistance}}%</span><br><br>}}<!-- | |||
</includeonly><noinclude>{{doc}} | -->{{#ifeq: {{:{{ROOTPAGENAME}}|FireResistance}} | 0 | |Fire <span style="float:right;">{{:{{ROOTPAGENAME}}|FireResistance}}%</span><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FrostResistance}} | 0 | |Frost <span style="float:right;">{{:{{ROOTPAGENAME}}|FrostResistance}}%</span><br>}}<!-- | |||
[[Category:Tooltip templates]]</noinclude> | -->{{#ifeq: {{:{{ROOTPAGENAME}}|ShockResistance}} | 0 | |Shock <span style="float:right;">{{:{{ROOTPAGENAME}}|ShockResistance}}%</span><br>}}<!-- | ||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PoisonResistance}} | 0 | |Poison <span style="float:right;">{{:{{ROOTPAGENAME}}|PoisonResistance}}%</span><br>}}<!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|CausticResistance}} | 0 | |Caustic <span style="float:right;">{{:{{ROOTPAGENAME}}|CausticResistance}}%</span><br>}}</div>{{Clear}}<!-- | |||
--><div style="text-align:center;"><!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|MagicResistance}} | 0 | |<br>Magic {{:{{ROOTPAGENAME}}|MagicResistance}}%<br><br>}}</div>{{Clear}}<!-- | |||
--><div style="width: 142px; float: left; padding-right: 5px;><!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|UnholyResistance}} | 0 | |Unholy <span style="float:right;">{{:{{ROOTPAGENAME}}|UnholyResistance}}%</span><br>}}<!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ArcaneResistance}} | 0 | |Arcane <span style="float:right;">{{:{{ROOTPAGENAME}}|ArcaneResistance}}%</span><br>}}</div><!-- | |||
--><div style="width: 142px; float: left; padding-left: 5px;><!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |Sacred <span style="float:right;">{{:{{ROOTPAGENAME}}|SacredResistance}}%</span><br>}}<!-- | |||
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |Psionic <span style="float:right;">{{:{{ROOTPAGENAME}}|PsionicResistance}}%</span><br>}}</div>{{Clear}}<!-- | |||
--><div class="mw-collapsible-content"><!-- | |||
--><div style="text-align:center;">{{Tooltip rule}}'''Defensive stats'''</div><!-- | |||
--><div style="width: 142px; float: left; padding-right: 5px;>Protection {{:{{ROOTPAGENAME}}|Protection}}<br><!-- | |||
-->Block Chance {{:{{ROOTPAGENAME}}|BlockChance}}%<br><!-- | |||
-->Dodge Chance {{:{{ROOTPAGENAME}}|DodgeChance}}%<br><!-- | |||
-->Control Res. {{:{{ROOTPAGENAME}}|ControlResistance}}%<br><!-- | |||
-->Bleed Res. {{:{{ROOTPAGENAME}}|BleedResistance}}%<br></div><!-- | |||
--><div style="width: 142px; float: left; padding-left: 5px;>Armor Pen. {{:{{ROOTPAGENAME}}|ArmorPiercing}}%<br><!-- | |||
-->Block Power {{:{{ROOTPAGENAME}}|BlockPower}}<br><!-- | |||
-->Pain Res. {{:{{ROOTPAGENAME}}|PainResistance}}%<br><!-- | |||
-->Move Res. {{:{{ROOTPAGENAME}}|MoveResistance}}%</div>{{Clear}}<!-- | |||
--><div style="text-align:center;">{{Tooltip rule}}'''Offensive stats'''</div><!-- | |||
--><div style="width: 142px; float: left; padding-right: 5px;>Crit Chance {{:{{ROOTPAGENAME}}|CritChance}}%<br><!-- | |||
-->Accuracy {{:{{ROOTPAGENAME}}|Accuracy}}%<br><!-- | |||
-->Counter Chance {{:{{ROOTPAGENAME}}|CounterChance}}%<br><!-- | |||
-->Stun Chance {{:{{ROOTPAGENAME}}|StunChance}}%<br><!-- | |||
-->Knockb. Chance {{:{{ROOTPAGENAME}}|KnockbackChance}}%<br><!-- | |||
-->Life Leech {{:{{ROOTPAGENAME}}|LifeLeech}}%<br><!-- | |||
-->Vision {{:{{ROOTPAGENAME}}|Vision}}<br><!-- | |||
-->Magic Power {{:{{ROOTPAGENAME}}|MagicPower}}%</div><!-- | |||
--><div style="width: 142px; float: left; padding-left: 5px;>Crit Efficiency {{:{{ROOTPAGENAME}}|CritEfficiency}}%<br><!-- | |||
-->Bleed Chance {{:{{ROOTPAGENAME}}|BleedChance}}%<br><!-- | |||
-->Fumble Chance {{:{{ROOTPAGENAME}}|FumbleChance}}%<br><!-- | |||
-->Daze Chance {{:{{ROOTPAGENAME}}|DazeChance}}%<br><!-- | |||
-->Immob. Chance {{:{{ROOTPAGENAME}}|ImmobilizeChance}}%<br><!-- | |||
-->Energy Leech {{:{{ROOTPAGENAME}}|EnergyLeech}}%<br><!-- | |||
-->Bonus Range {{:{{ROOTPAGENAME}}|BonusRange}}</div>{{Clear}}<!-- | |||
--><div style="text-align:center;">{{Tooltip rule}}'''Attributes'''<br><!-- | |||
--><div style="width:15%;display:inline-block;">STR</div><!-- | |||
--><div style="width:15%;display:inline-block;">AGL</div><!-- | |||
--><div style="width:15%;display:inline-block;">PRC</div><!-- | |||
--><div style="width:15%;display:inline-block;">VIT</div><!-- | |||
--><div style="width:15%;display:inline-block;">WIL</div><!-- | |||
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|STR}}</div><!-- | |||
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|AGL}}</div><!-- | |||
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|PRC}}</div><!-- | |||
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|VIT}}</div><!-- | |||
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|WIL}}</div></div></div><!-- | |||
--><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;">Size: {{:{{ROOTPAGENAME}}|Size}}<br></div><!-- | |||
--><div style="width:30%;display:inline-block;">XP: {{:{{ROOTPAGENAME}}|XP}}<br></div></div><!-- | |||
--><div style="color:#9d7969;text-align:justify">{{Tooltip rule}}{{:{{ROOTPAGENAME}}|Description}}</div></div><!-- | |||
--></includeonly><noinclude>{{doc}}[[Category:Tooltip templates]]</noinclude> |
Revision as of 16:43, 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
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%