Difference between revisions of "Template:Enemy"

From Stoneshard wiki
Jump to navigation Jump to search
m (5 revisions imported)
(merged template Enemy test into Enemy)
Line 1: Line 1:
<includeonly><!-- DEFINE ENEMY BODY TYPE BONUSES
<includeonly><!--
-->{{#if: {{:{{ROOTPAGENAME}}|Matter}} | {{#switch: {{:{{ROOTPAGENAME}}|Matter}}
--- Define datastring as variable - to only load from the Enemy data page once. ---
| Bones = {{#vardefine:rescrushing|-20}}{{#vardefine:respiercing|30}}{{#vardefine:resslashing|20}}{{#vardefine:respoison|100}}
-->{{#vardefine:Datastring|{{:Enemy_data|{{ROOTPAGENAME}}}}}}<!--
| Ectoplasm = {{#vardefine:resphysical|80}}{{#vardefine:resnature|90}}{{#vardefine:resmagic|50}}{{#vardefine:respoison|100}}
-->{{#vardefine:Matter|{{#explode: {{#var:Datastring}}|;|9}}}}<!--
| Ooze = {{#vardefine:rescaustic|100}}{{#vardefine:respoison|75}}{{#vardefine:resfire|-75}}
-->{{#vardefine:Name|{{#explode: {{#var:Datastring}}|;|-2}}}}<!--
| Chitin = {{#vardefine:resphysical|25}}{{#vardefine:rescaustic|-25}}
-->{{#vardefine:Level|{{#explode: {{#var:Datastring}}|;|0}}}}<!--
-->{{#vardefine:Head DEF|{{#ifeq: {{#explode: {{#var:Datastring}}|;|14}} | |0|{{#explode: {{#var:Datastring}}|;|14}}}}}}<!--
-->{{#vardefine:Body DEF|{{#ifeq: {{#explode: {{#var:Datastring}}|;|15}} | |0|{{#explode: {{#var:Datastring}}|;|15}}}}}}<!--
-->{{#vardefine:Arms DEF|{{#ifeq: {{#explode: {{#var:Datastring}}|;|16}} | |0|{{#explode: {{#var:Datastring}}|;|16}}}}}}<!--
-->{{#vardefine:Legs DEF|{{#ifeq: {{#explode: {{#var:Datastring}}|;|17}} | |0|{{#explode: {{#var:Datastring}}|;|17}}}}}}<!--
-->{{#vardefine:Slashing Damage|{{#explode: {{#var:Datastring}}|;|67}}}}<!--
-->{{#vardefine:Piercing Damage|{{#explode: {{#var:Datastring}}|;|68}}}}<!--
-->{{#vardefine:Crushing Damage|{{#explode: {{#var:Datastring}}|;|69}}}}<!--
-->{{#vardefine:Rending Damage|{{#explode: {{#var:Datastring}}|;|70}}}}<!--
-->{{#vardefine:Fire Damage|{{#explode: {{#var:Datastring}}|;|71}}}}<!--
-->{{#vardefine:Frost Damage|{{#explode: {{#var:Datastring}}|;|75}}}}<!--
-->{{#vardefine:Shock Damage|{{#explode: {{#var:Datastring}}|;|72}}}}<!--
-->{{#vardefine:Poison Damage|{{#explode: {{#var:Datastring}}|;|73}}}}<!--
-->{{#vardefine:Caustic Damage|{{#explode: {{#var:Datastring}}|;|74}}}}<!--
-->{{#vardefine:Arcane Damage|{{#explode: {{#var:Datastring}}|;|76}}}}<!--
-->{{#vardefine:Sacred Damage|{{#explode: {{#var:Datastring}}|;|78}}}}<!--
-->{{#vardefine:Unholy Damage|{{#explode: {{#var:Datastring}}|;|77}}}}<!--
-->{{#vardefine:Psionic Damage|{{#explode: {{#var:Datastring}}|;|79}}}}<!--
-->{{#vardefine:PhysicalResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|80}} | |0|{{#explode: {{#var:Datastring}}|;|80}}}}}}<!--
-->{{#vardefine:NatureResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|81}} | |0|{{#explode: {{#var:Datastring}}|;|81}}}}}}<!--
-->{{#vardefine:MagicResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|82}} | |0|{{#explode: {{#var:Datastring}}|;|82}}}}}}<!--
-->{{#vardefine:SlashingResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|83}} | |0|{{#explode: {{#var:Datastring}}|;|83}}}}}}<!--
-->{{#vardefine:PiercingResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|84}} | |0|{{#explode: {{#var:Datastring}}|;|84}}}}}}<!--
-->{{#vardefine:CrushingResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|85}} | |0|{{#explode: {{#var:Datastring}}|;|85}}}}}}<!--
-->{{#vardefine:RendingResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|86}} | |0|{{#explode: {{#var:Datastring}}|;|86}}}}}}<!--
-->{{#vardefine:FireResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|87}} | |0|{{#explode: {{#var:Datastring}}|;|87}}}}}}<!--
-->{{#vardefine:FrostResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|91}} | |0|{{#explode: {{#var:Datastring}}|;|91}}}}}}<!--
-->{{#vardefine:ShockResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|88}} | |0|{{#explode: {{#var:Datastring}}|;|88}}}}}}<!--
-->{{#vardefine:PoisonResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|89}} | |0|{{#explode: {{#var:Datastring}}|;|89}}}}}}<!--
-->{{#vardefine:CausticResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|90}} | |0|{{#explode: {{#var:Datastring}}|;|90}}}}}}<!--
-->{{#vardefine:UnholyResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|93}} | |0|{{#explode: {{#var:Datastring}}|;|93}}}}}}<!--
-->{{#vardefine:ArcaneResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|92}} | |0|{{#explode: {{#var:Datastring}}|;|92}}}}}}<!--
-->{{#vardefine:SacredResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|94}} | |0|{{#explode: {{#var:Datastring}}|;|94}}}}}}<!--
-->{{#vardefine:PsionicResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|95}} | |0|{{#explode: {{#var:Datastring}}|;|95}}}}}}<!--
<!-- DEFINE ENEMY BODY TYPE BONUSES
-->{{#if: {{#var:Matter}} | {{#switch: {{#var:Matter}}
| bones = {{#vardefine:rescrushing|-20}}{{#vardefine:respiercing|30}}{{#vardefine:resslashing|20}}{{#vardefine:respoison|100}}
| ectoplasm = {{#vardefine:resphysical|80}}{{#vardefine:resnature|90}}{{#vardefine:resmagic|50}}{{#vardefine:respoison|100}}
| ooze = {{#vardefine:rescaustic|100}}{{#vardefine:respoison|75}}{{#vardefine:resfire|-75}}
| chitin = {{#vardefine:resphysical|25}}{{#vardefine:rescaustic|-25}}
| #default = }}
| #default = }}
| }}<!--
| }}<!--
--><div style="width: 300px;">
--><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:{{#var:Name}}|{{#var:Name}}|{{ROOTPAGENAME}}}}</span><br><!--
-->Level {{:{{ROOTPAGENAME}}|Level}} <!--
-->Level {{#var:Level}} <!--
-->{{:{{ROOTPAGENAME}}|Type}}{{Clear}}<!--
-->{{#explode: {{#var:Datastring}}|;|3}}{{Clear}}<!--
-->[[File:{{ROOTPAGENAME}}.png|link={{ROOTPAGENAME}}/Tooltip|class=image2x|alt={{ROOTPAGENAME}}|{{ROOTPAGENAME}}]]{{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;">Health: {{#explode: {{#var:Datastring}}|;|12}}</div><!--
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">Energy: {{:{{ROOTPAGENAME}}|Energy}}</div><!--
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">Energy: {{#explode: {{#var:Datastring}}|;|13}}</div><!--
-->{{Tooltip rule}}'''Damage'''<br><!--
-->{{Tooltip rule}}'''Damage'''<br><!--
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">{{C|{{:{{ROOTPAGENAME}}|DamageType1}}|{{:{{ROOTPAGENAME}}|Damage1}}}} {{:{{ROOTPAGENAME}}|DamageType1}}</div><!--
--- Only display Damage types that have a value. ---
-->{{#if: {{:{{ROOTPAGENAME}}|Damage2}} | <div style="margin-left:5px;margin-right:5px;display:inline-block;">{{C|{{:{{ROOTPAGENAME}}|DamageType2}}|{{:{{ROOTPAGENAME}}|Damage2}}}} {{:{{ROOTPAGENAME}}|DamageType2}}</div>| }}<!--
-->{{#if:{{#var:Slashing Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{#var:Slashing Damage}} {{Translate|Slashing|Properties}}</div>}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Damage3}} | <div style="margin-left:5px;margin-right:5px;display:inline-block;">{{C|{{:{{ROOTPAGENAME}}|DamageType3}}|{{:{{ROOTPAGENAME}}|Damage3}}}} {{:{{ROOTPAGENAME}}|DamageType3}}</div>| }}<!--
-->{{#if:{{#var:Piercing Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{#var:Piercing Damage}} {{Translate|Piercing|Properties}}</div>}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Damage4}} | <div style="margin-left:5px;margin-right:5px;display:inline-block;">{{C|{{:{{ROOTPAGENAME}}|DamageType4}}|{{:{{ROOTPAGENAME}}|Damage4}}}} {{:{{ROOTPAGENAME}}|DamageType4}}</div>| }}<!--
-->{{#if:{{#var:Crushing Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{#var:Crushing Damage}} {{Translate|Crushing|Properties}}</div>}}<!--
-->{{Tooltip rule}}'''Resistances'''</div><!--
-->{{#if:{{#var:Rending Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{#var:Rending Damage}} {{Translate|Rending|Properties}}</div>}}<!--
-->{{#if:{{#var:Fire Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{c|Fire|{{#var:Fire Damage}} {{Translate|Fire|Properties}}}}</div>}}<!--
-->{{#if:{{#var:Frost Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{c|Frost|{{#var:Frost Damage}} {{Translate|Frost|Properties}}}}</div>}}<!--
-->{{#if:{{#var:Shock Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{c|Shock|{{#var:Shock Damage}} {{Translate|Shock|Properties}}}}</div>}}<!--
-->{{#if:{{#var:Poison Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{c|Poison|{{#var:Poison Damage}} {{Translate|Poison|Properties}}}}</div>}}<!--
-->{{#if:{{#var:Caustic Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{c|Caustic|{{#var:Caustic Damage}} {{Translate|Caustic|Properties}}}}</div>}}<!--
-->{{#if:{{#var:Arcane Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{c|Arcane|{{#var:Arcane Damage}} {{Translate|Arcane|Properties}}}}</div>}}<!--
-->{{#if:{{#var:Sacred Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{c|Sacred|{{#var:Sacred Damage}} {{Translate|Sacred|Properties}}}}</div>}}<!--
-->{{#if:{{#var:Unholy Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{c|Unholy|{{#var:Unholy Damage}} {{Translate|Unholy|Properties}}}}</div>}}<!--
-->{{#if:{{#var:Psionic Damage}}|<div style="margin-left:5px;margin-right:5px;display:inline-block;">{{c|Psionic|{{#var:Psionic Damage}} {{Translate|Psionic|Properties}}}}</div>}}<!--
-->{{Tooltip rule}}'''Protection'''</div><!--
--><div style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: space-between;"><!--
--><div style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: space-between;"><!--
-->{{#ifeq: {{#expr: {{#var:resphysical}} + {{:{{ROOTPAGENAME}}|PhysicalResistance}}}} | 0 | |<div style="width: 145px;">Physical <span style="float:right;">{{#expr: {{#var:resphysical}} + {{:{{ROOTPAGENAME}}|PhysicalResistance}}}}%</span></div>}}<!--
--><div style="width: 145px;">Head <span style="float:right;">{{#var:Head DEF}}</span></div><!--
-->{{#ifeq: {{#expr: {{#var:resnature}} + {{:{{ROOTPAGENAME}}|NatureResistance}}}} | 0 | |<div style="width: 145px;">Nature <span style="float:right;">{{#expr: {{#var:resnature}} + {{:{{ROOTPAGENAME}}|NatureResistance}}}}%</span></div>}}<!--
--><div style="width: 145px;">Body <span style="float:right;">{{#var:Body DEF}}</span></div><!--
-->{{#ifeq: {{#expr: {{#var:resmagic}} + {{:{{ROOTPAGENAME}}|MagicResistance}}}} | 0 | |<div style="width: 145px;">Magic <span style="float:right;">{{#expr: {{#var:resmagic}} + {{:{{ROOTPAGENAME}}|MagicResistance}}}}%</span></div>}}<!--
--><div style="width: 145px;">Arms <span style="float:right;">{{#var:Arms DEF}}</span></div><!--
-->{{#ifeq: {{#expr: {{#var:resslashing}} + {{:{{ROOTPAGENAME}}|SlashingResistance}}}} | 0 | |<div style="width: 145px;">Slashing <span style="float:right;">{{#expr: {{#var:resslashing}} + {{:{{ROOTPAGENAME}}|SlashingResistance}}}}%</span></div>}}<!--
--><div style="width: 145px;">Legs <span style="float:right;">{{#var:Legs DEF}}</span></div></div><!--
-->{{#ifeq: {{#expr: {{#var:respiercing}} + {{:{{ROOTPAGENAME}}|PiercingResistance}}}} | 0 | |<div style="width: 145px;">Piercing <span style="float:right;">{{#expr: {{#var:respiercing}} + {{:{{ROOTPAGENAME}}|PiercingResistance}}}}%</span></div>}}<!--
--><div style="text-align:center;"><br>'''Resistances'''</div><!--
-->{{#ifeq: {{#expr: {{#var:rescrushing}} + {{:{{ROOTPAGENAME}}|CrushingResistance}}}} | 0 | |<div style="width: 145px;">Crushing <span style="float:right;">{{#expr: {{#var:rescrushing}} + {{:{{ROOTPAGENAME}}|CrushingResistance}}}}%</span></div>}}<!--
--><div style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: space-between;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|RendingResistance}} | 0 | |<div style="width: 145px;">Rending <span style="float:right;">{{:{{ROOTPAGENAME}}|RendingResistance}}%</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:resphysical}} + {{#var:PhysicalResistance}}}} | 0 | |<div style="width: 145px;">Physical <span style="float:right;">{{#expr: {{#var:resphysical}} + {{#var:PhysicalResistance}}}}%</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:resfire}} + {{:{{ROOTPAGENAME}}|FireResistance}}}} | 0 | |<div style="width: 145px;">{{C|Fire}} <span style="float:right;">{{C|Fire|{{#expr: {{#var:resfire}} + {{:{{ROOTPAGENAME}}|FireResistance}}}}%}}</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:resnature}} + {{#var:NatureResistance}}}} | 0 | |<div style="width: 145px;">Nature <span style="float:right;">{{#expr: {{#var:resnature}} + {{#var:NatureResistance}}}}%</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FrostResistance}} | 0 | |<div style="width: 145px;">{{C|Frost}} <span style="float:right;">{{C|Frost|{{:{{ROOTPAGENAME}}|FrostResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:resmagic}} + {{#var:MagicResistance}}}} | 0 | |<div style="width: 145px;">Magic <span style="float:right;">{{#expr: {{#var:resmagic}} + {{#var:MagicResistance}}}}%</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ShockResistance}} | 0 | |<div style="width: 145px;">{{C|Shock}} <span style="float:right;">{{C|Shock|{{:{{ROOTPAGENAME}}|ShockResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:resslashing}} + {{#var:SlashingResistance}}}} | 0 | |<div style="width: 145px;">Slashing <span style="float:right;">{{#expr: {{#var:resslashing}} + {{#var:SlashingResistance}}}}%</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:respoison}} + {{:{{ROOTPAGENAME}}|PoisonResistance}}}} | 0 | |<div style="width: 145px;">{{C|Poison}} <span style="float:right;">{{C|Poison|{{#expr: {{#var:respoison}} + {{:{{ROOTPAGENAME}}|PoisonResistance}}}}%}}</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:respiercing}} + {{#var:PiercingResistance}}}} | 0 | |<div style="width: 145px;">Piercing <span style="float:right;">{{#expr: {{#var:respiercing}} + {{#var:PiercingResistance}}}}%</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:rescaustic}} + {{:{{ROOTPAGENAME}}|CausticResistance}}}} | 0 | |<div style="width: 145px;">{{C|Caustic}} <span style="float:right;">{{C|Caustic|{{#expr: {{#var:rescaustic}} + {{:{{ROOTPAGENAME}}|CausticResistance}}}}%}}</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:rescrushing}} + {{#var:CrushingResistance}}}} | 0 | |<div style="width: 145px;">Crushing <span style="float:right;">{{#expr: {{#var:rescrushing}} + {{#var:CrushingResistance}}}}%</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|UnholyResistance}} | 0 | |<div style="width: 145px;">{{C|Unholy}} <span style="float:right;">{{C|Unholy|{{:{{ROOTPAGENAME}}|UnholyResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:RendingResistance}} | 0 | |<div style="width: 145px;">Rending <span style="float:right;">{{#var:RendingResistance}}%</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ArcaneResistance}} | 0 | |<div style="width: 145px;">{{C|Arcane}} <span style="float:right;">{{C|Arcane|{{:{{ROOTPAGENAME}}|ArcaneResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:resfire}} + {{#var:FireResistance}}}} | 0 | |<div style="width: 145px;">{{C|Fire}} <span style="float:right;">{{C|Fire|{{#expr: {{#var:resfire}} + {{#var:FireResistance}}}}%}}</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |<div style="width: 145px;">{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{:{{ROOTPAGENAME}}|SacredResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:FrostResistance}} | 0 | |<div style="width: 145px;">{{C|Frost}} <span style="float:right;">{{C|Frost|{{#var:FrostResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PsionicResistance}} | 0 | |<div style="width: 145px;">{{C|Psionic}} <span style="float:right;">{{C|Psionic|{{:{{ROOTPAGENAME}}|PsionicResistance}}%}}</span></div>}}</div><!--
-->{{#ifeq: {{#var:ShockResistance}} | 0 | |<div style="width: 145px;">{{C|Shock}} <span style="float:right;">{{C|Shock|{{#var:ShockResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:respoison}} + {{#var:PoisonResistance}}}} | 0 | |<div style="width: 145px;">{{C|Poison}} <span style="float:right;">{{C|Poison|{{#expr: {{#var:respoison}} + {{#var:PoisonResistance}}}}%}}</span></div>}}<!--
-->{{#ifeq: {{#expr: {{#var:rescaustic}} + {{#var:CausticResistance}}}} | 0 | |<div style="width: 145px;">{{C|Caustic}} <span style="float:right;">{{C|Caustic|{{#expr: {{#var:rescaustic}} + {{#var:CausticResistance}}}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:UnholyResistance}} | 0 | |<div style="width: 145px;">{{C|Unholy}} <span style="float:right;">{{C|Unholy|{{#var:UnholyResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:ArcaneResistance}} | 0 | |<div style="width: 145px;">{{C|Arcane}} <span style="float:right;">{{C|Arcane|{{#var:ArcaneResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:SacredResistance}} | 0 | |<div style="width: 145px;">{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{#var:SacredResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:PsionicResistance}} | 0 | |<div style="width: 145px;">{{C|Psionic}} <span style="float:right;">{{C|Psionic|{{#var:PsionicResistance}}%}}</span></div>}}</div><!--
--><div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-statistics1"><!--
--><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;"><!--
-->Block Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|BlockChance}}%</span><br><!--
-->Block Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|20}} | |0|{{#explode: {{#var:Datastring}}|;|20}}}}%</span><br><!--
-->Bleed Res. <span style="float:right;">{{:{{ROOTPAGENAME}}|BleedResistance}}%</span><br><!--
-->Bleed Res. <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|35}} | |0|{{#explode: {{#var:Datastring}}|;|35}}}}%</span><br><!--
-->Control Res. <span style="float:right;">{{:{{ROOTPAGENAME}}|ControlResistance}}%</span><br><!--
-->Control Res. <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|34}} | |0|{{#explode: {{#var:Datastring}}|;|34}}}}%</span></div><!--
-->Protection <span style="float:right;">{{:{{ROOTPAGENAME}}|Protection}}</span></div><!--
--><div style="width: 142px; float: left; padding-left: 5px;  min-height: 1px;"><!--
--><div style="width: 142px; float: left; padding-left: 5px;  min-height: 1px;"><!--
-->Block Power <span style="float:right;">{{:{{ROOTPAGENAME}}|BlockPower}}</span><br><!--
-->Block Power <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|21}} | |0|{{#explode: {{#var:Datastring}}|;|21}}}}</span><br><!--
-->Pain Res. <span style="float:right;">{{:{{ROOTPAGENAME}}|PainResistance}}%</span><br><!--
-->Pain Res. <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|61}} | |0|{{#explode: {{#var:Datastring}}|;|61}}}}%</span><br><!--
-->Move Res. <span style="float:right;">{{:{{ROOTPAGENAME}}|MoveResistance}}%</span><br><!--
-->Move Res. <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|33}} | |0|{{#explode: {{#var:Datastring}}|;|33}}}}%</span><br><!--
-->Dodge Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|DodgeChance}}%</span></div>{{Clear}}<!--
-->Dodge Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|19}} | |0|{{#explode: {{#var:Datastring}}|;|19}}}}%</span></div>{{Clear}}<!--
--><div style="text-align:center;">{{Tooltip rule}}'''Offensive stats'''</div><!--
--><div style="text-align:center;">{{Tooltip rule}}'''Offensive 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;"><!--
-->Crit Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|CritChance}}%</span><br><!--
-->Crit Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|23}} | |0|{{#explode: {{#var:Datastring}}|;|23}}}}%</span><br><!--
-->Accuracy <span style="float:right;">{{:{{ROOTPAGENAME}}|Accuracy}}%</span><br><!--
-->Accuracy <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|18}} | |0|{{#explode: {{#var:Datastring}}|;|18}}}}%</span><br><!--
-->Counter Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|CounterChance}}%</span><br><!--
-->Counter Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|25}} | |0|{{#explode: {{#var:Datastring}}|;|25}}}}%</span><br><!--
-->Stun Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|StunChance}}%</span><br><!--
-->Stun Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|37}} | |0|{{#explode: {{#var:Datastring}}|;|37}}}}%</span><br><!--
-->Knockb. Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|KnockbackChance}}%</span><br><!--
-->Knockb. Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|39}} | |0|{{#explode: {{#var:Datastring}}|;|39}}}}%</span><br><!--
-->Life Leech <span style="float:right;">{{:{{ROOTPAGENAME}}|LifeLeech}}%</span><br><!--
-->Life Leech <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|50}} | |0|{{#explode: {{#var:Datastring}}|;|50}}}}%</span><br><!--
-->Vision <span style="float:right;">{{:{{ROOTPAGENAME}}|Vision}}</span><br><!--
-->Vision <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|48}} | |0|{{#explode: {{#var:Datastring}}|;|48}}}}</span><br><!--
-->Magic Power <span style="float:right;">{{#expr: {{:{{ROOTPAGENAME}}|MagicPower}} + 100}}%</span></div><!--
-->Magic Power <span style="float:right;">{{#expr: {{#ifeq: {{#explode: {{#var:Datastring}}|;|65}} | |0|{{#explode: {{#var:Datastring}}|;|65}}}} + 100}}%</span></div><!--
--><div style="width: 142px; float: left; padding-left: 5px; min-height: 1px;"><!--
--><div style="width: 142px; float: left; padding-left: 5px; min-height: 1px;"><!--
-->Crit Efficiency <span style="float:right;">{{x}}{{#expr: ({{:{{ROOTPAGENAME}}|CritEfficiency}} + 100)/100}}</span><br><!--
-->Crit Efficiency <span style="float:right;">{{x}}{{#expr: ({{#ifeq: {{#explode: {{#var:Datastring}}|;|24}} | |0|{{#explode: {{#var:Datastring}}|;|24}}}} + 100)/100}}</span><br><!--
-->Bleed Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|BleedChance}}%</span><br><!--
-->Bleed Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|36}} | |0|{{#explode: {{#var:Datastring}}|;|36}}}}%</span><br><!--
-->Fumble Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|FumbleChance}}%</span><br><!--
-->Fumble Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|26}} | |0|{{#explode: {{#var:Datastring}}|;|26}}}}%</span><br><!--
-->Daze Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|DazeChance}}%</span><br><!--
-->Daze Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|38}} | |0|{{#explode: {{#var:Datastring}}|;|38}}}}%</span><br><!--
-->Immob. Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|ImmobilizeChance}}%</span><br><!--
-->Immob. Chance <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|40}} | |0|{{#explode: {{#var:Datastring}}|;|40}}}}%</span><br><!--
-->Energy Leech <span style="float:right;">{{:{{ROOTPAGENAME}}|EnergyLeech}}%</span><br><!--
-->Energy Leech <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|51}} | |0|{{#explode: {{#var:Datastring}}|;|51}}}}%</span><br><!--
-->Bonus Range <span style="float:right;">{{:{{ROOTPAGENAME}}|BonusRange}}</span><br><!--
-->Bonus Range <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|49}} | |0|{{#explode: {{#var:Datastring}}|;|49}}}}</span><br><!--
-->Armor Pen. <span style="float:right;">{{:{{ROOTPAGENAME}}|ArmorPiercing}}%</span></div>{{Clear}}<!--
-->Armor Pen. <span style="float:right;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|66}} | |0|{{#explode: {{#var:Datastring}}|;|66}}}}%</span></div>{{Clear}}<!--
--><div style="text-align:center;">{{Tooltip rule}}'''Attributes'''<br><!--
--><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;">STR</div><!--
Line 74: Line 128:
--><div style="width:15%;display:inline-block;">VIT</div><!--
--><div style="width:15%;display:inline-block;">VIT</div><!--
--><div style="width:15%;display:inline-block;">WIL</div><br><!--
--><div style="width:15%;display:inline-block;">WIL</div><br><!--
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|STR}}</div><!--
--><div style="width:15%;display:inline-block;">{{#explode: {{#var:Datastring}}|;|42}}</div><!--
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|AGL}}</div><!--
--><div style="width:15%;display:inline-block;">{{#explode: {{#var:Datastring}}|;|43}}</div><!--
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|PRC}}</div><!--
--><div style="width:15%;display:inline-block;">{{#explode: {{#var:Datastring}}|;|45}}</div><!--
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|VIT}}</div><!--
--><div style="width:15%;display:inline-block;">{{#explode: {{#var:Datastring}}|;|44}}</div><!--
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|WIL}}</div></div></div><!--
--><div style="width:15%;display:inline-block;">{{#explode: {{#var:Datastring}}|;|46}}</div></div></div><!--
--><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>{{#explode: {{#var:Datastring}}|;|4}}</div><!--
--><div style="width:30%;display:inline-block;">Size:<br>{{:{{ROOTPAGENAME}}|Size}}<br></div><!--
--><div style="width:30%;display:inline-block;">Size:<br>{{#explode: {{#var:Datastring}}|;|8}}<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>{{#explode: {{#var:Datastring}}|;|11}}<br></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: #272340; border: 2px solid black; padding: 10px 15px; font-size: 16px;">Show more</span><!--
-->{{Tooltip rule}}<div style="text-align:center;"><span class="mw-collapsible mw-customtoggle-statistics1 mw-customtoggle-statistics2" id="mw-customcollapsible-statistics2" style="background-color: #272340; 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: #272340; border: 2px solid black; padding: 10px 15px; font-size: 16px;">Show less</span></div><!--
--><span class="mw-collapsible mw-collapsed mw-customtoggle-statistics1 mw-customtoggle-statistics2" id="mw-customcollapsible-statistics2" style="background-color: #272340; border: 2px solid black; padding: 10px 15px; font-size: 16px;">Show less</span></div><!--
--><div style="color:#9d7969;text-align:justify;margin-top:10px;">{{:{{ROOTPAGENAME}}|Description}}</div></div><!--
--><div style="color:#9d7969;text-align:justify;margin-top:10px;">{{#explode: {{#var:Datastring}}|;|-1}}</div></div><!--
--></includeonly><noinclude>{{doc}}[[Category:Tooltip templates]]</noinclude>
--></includeonly><noinclude>{{doc}}[[Category:Tooltip templates]]</noinclude>

Revision as of 20:17, 11 October 2022

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


Enemy
Level Data does not exist.
Enemy
Health:
Energy:

Damage

Protection
Head 0
Body 0
Arms 0
Legs 0

Resistances

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

Offensive stats
Crit Chance 0%
Accuracy 0%
Counter Chance 0%
Stun Chance 0%
Knockb. Chance 0%
Life Leech 0%
Vision 0
Magic Power 100%
Crit Efficiency ×1
Bleed Chance 0%
Fumble Chance 0%
Daze Chance 0%
Immob. Chance 0%
Energy Leech 0%
Bonus Range 0
Armor Pen. 0%

Attributes
STR
AGL
PRC
VIT
WIL


Miscellaneous
Faction:
Size:

XP:


Show moreShow less
Data does not exist.