Difference between revisions of "Template:Enemy"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(remove padding, use justify-content: space between for flexbox)
 
(40 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><div style="width: 300px;" class="mw-collapsible mw-collapsed" data-expandtext="Show all statistics" data-collapsetext="Hide all statistics">
<includeonly><!--
<div style="text-align:center;"><br><span style="font-size: 20px;">{{#if:{{:{{ROOTPAGENAME}}|Name}}|{{:{{ROOTPAGENAME}}|Name}}|{{ROOTPAGENAME}}}}</span><br><!--
--- If item name is provided as parameter, use the parameter instead of root page. ---
-->Level {{:{{ROOTPAGENAME}}|Level}} <!--
-->{{#vardefine:Page|{{#if:{{{1|}}}|{{{1|}}}|{{ROOTPAGENAME}}}}}}<!--
-->{{:{{ROOTPAGENAME}}|Type}}{{Clear}}<!--
--- Load complete datastring into a variable - to only load from the Enemy data page once. ---
-->[[File:{{ROOTPAGENAME}}.png|link={{ROOTPAGENAME}}/Tooltip|class=image2x|alt={{ROOTPAGENAME}}|{{ROOTPAGENAME}}]]{{Clear}}<!--
-->{{#vardefine:Datastring|{{:Enemy_data|{{#var:Page}}}}}}<!--
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">Health: {{:{{ROOTPAGENAME}}|Health}}</div><!--
--- Separate values from datastring into individual variables. ---
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">Energy: {{:{{ROOTPAGENAME}}|Energy}}</div><!--
-->{{#vardefine:Matter|{{#explode: {{#var:Datastring}}|;|9}}}}<!--
-->{{#vardefine:Name|{{#explode: {{#var:Datastring}}|;|-2}}}}<!--
-->{{#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}}}}}}<!--
-->{{#vardefine:BleedResistance|{{#ifeq: {{#explode: {{#var:Datastring}}|;|35}} | |0|{{#explode: {{#var:Datastring}}|;|35}}}}}}<!--
--- Define additional resistance bonuses from enemy body type as individual variables (from scr_mob_material_type). ---
-->{{#if: {{#var:Matter}} | {{#switch: {{#var:Matter}}
| flesh = {{#vardefine:healReceived|10}}
| bones = {{#vardefine:resphysical|25}}{{#vardefine:rescrushing|-15}}{{#vardefine:respiercing|10}}{{#vardefine:respoison|200}}{{#vardefine:resnature|40}}{{#vardefine:resbleed|200}}
| ectoplasm = {{#vardefine:resphysical|75}}{{#vardefine:resnature|60}}{{#vardefine:resmagic|-50}}{{#vardefine:respoison|200}}{{#vardefine:resbleed|200}}{{#vardefine:resstone|100}}
| ooze = {{#vardefine:rescaustic|100}}{{#vardefine:respoison|75}}{{#vardefine:resfire|-75}}
| chitin = {{#vardefine:resphysical|25}}
| #default = }}
| }}<!--
--- Define Total Resistance variables by adding up resistances from enemy res, body type res and from the respective phys/natur/magic res category. ---
-->{{#vardefine:TotalPhysicalResistance|{{#expr: {{#var:resphysical}} + {{#var:PhysicalResistance}}}}}}<!--
-->{{#vardefine:TotalNatureResistance|{{#expr: {{#var:resnature}} + {{#var:NatureResistance}}}}}}<!--
-->{{#vardefine:TotalMagicResistance|{{#expr: {{#var:resmagic}} + {{#var:MagicResistance}}}}}}<!--
-->{{#vardefine:TotalSlashingResistance|{{#expr: {{#var:resphysical}} + {{#var:resslashing}} + {{#var:PhysicalResistance}} + {{#var:SlashingResistance}}}}}}<!--
-->{{#vardefine:TotalPiercingResistance|{{#expr: {{#var:resphysical}} + {{#var:respiercing}} + {{#var:PhysicalResistance}} + {{#var:PiercingResistance}}}}}}<!--
-->{{#vardefine:TotalCrushingResistance|{{#expr: {{#var:resphysical}} + {{#var:rescrushing}} + {{#var:PhysicalResistance}} + {{#var:CrushingResistance}}}}}}<!--
-->{{#vardefine:TotalRendingResistance|{{#expr: {{#var:resphysical}} + {{#var:PhysicalResistance}} + {{#var:RendingResistance}}}}}}<!--
-->{{#vardefine:TotalFireResistance|{{#expr: {{#var:resnature}} + {{#var:resfire}} + {{#var:NatureResistance}} + {{#var:FireResistance}}}}}}<!--
-->{{#vardefine:TotalFrostResistance|{{#expr: {{#var:resnature}} + {{#var:NatureResistance}} + {{#var:FrostResistance}}}}}}<!--
-->{{#vardefine:TotalShockResistance|{{#expr: {{#var:resnature}} + {{#var:NatureResistance}} + {{#var:ShockResistance}}}}}}<!--
-->{{#vardefine:TotalPoisonResistance|{{#expr: {{#var:resnature}} + {{#var:respoison}} + {{#var:NatureResistance}} + {{#var:PoisonResistance}}}}}}<!--
-->{{#vardefine:TotalCausticResistance|{{#expr: {{#var:resnature}} + {{#var:rescaustic}} + {{#var:NatureResistance}} + {{#var:CausticResistance}}}}}}<!--
-->{{#vardefine:TotalUnholyResistance|{{#expr: {{#var:resmagic}} + {{#var:MagicResistance}} + {{#var:UnholyResistance}}}}}}<!--
-->{{#vardefine:TotalArcaneResistance|{{#expr: {{#var:resmagic}} + {{#var:MagicResistance}} + {{#var:ArcaneResistance}}}}}}<!--
-->{{#vardefine:TotalSacredResistance|{{#expr: {{#var:resmagic}} + {{#var:MagicResistance}} + {{#var:SacredResistance}}}}}}<!--
-->{{#vardefine:TotalPsionicResistance|{{#expr: {{#var:resmagic}} + {{#var:MagicResistance}} + {{#var:PsionicResistance}}}}}}<!--
-->{{#vardefine:TotalBleedResistance|{{#expr: {{#var:resbleed}} + {{#var:BleedResistance}}}}}}<!--
--- TOOLTIP START ---
--><div style="width: 450px;">
<div style="text-align:center;"><br><span style="font-size: 20px;">{{#if:{{#var:Name}}|{{#var:Name}}|{{#var:Page}}}}</span><br><!--
--- Level X / Enemy Type with capitalized first letter ---
-->Level {{#var:Level}} <!--
--><span style="color:#d5b292;">{{ucfirst:{{#explode: {{#var:Datastring}}|;|3}}}}</span>{{Clear}}<!--
--- Enemy Image + Second Enemy Image for Necromancer (Dagger) only---
-->[[File:{{#var:Page}}.png|link=|class=image2x|alt={{#var:Page}}|{{#var:Page}}]]{{#ifeq:{{#var:Page}}|Occultist|[[File:Occultist (Cowl and dagger).png|link=|class=image2x|alt={{#var:Page}}|{{#var:Page}}]]|}}{{Clear}}<!--
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">Health: <span style="color:#c75c5d;">{{#explode: {{#var:Datastring}}|;|12}}</span></div><!--
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">Energy: <span style="color:#4c7fff;">{{#explode: {{#var:Datastring}}|;|13}}</span></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><!--
--- Enemy Damage - 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}}<!--
--- Enemy primary defenses - display both zero and non-zero Protection for all bodyparts, display only non-zero Resistances. ---
-->'''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: {{:{{ROOTPAGENAME}}|PhysicalResistance}} | 0 | |<div style="width: 145px;">Physical <span style="float:right;">{{:{{ROOTPAGENAME}}|PhysicalResistance}}%</span></div>}}<!--
--><div style="width: 145px;">Head <span style="float:right;color:#d5b292;">{{#var:Head DEF}}</span></div><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|NatureResistance}} | 0 | |<div style="width: 145px;">Nature <span style="float:right;">{{:{{ROOTPAGENAME}}|NatureResistance}}%</span></div>}}<!--
--><div style="width: 145px;">Body <span style="float:right;color:#d5b292;">{{#var:Body DEF}}</span></div></div><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|MagicResistance}} | 0 | |<div style="width: 145px;">Magic <span style="float:right;">{{:{{ROOTPAGENAME}}|MagicResistance}}%</span></div>}}<!--
--><div style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: space-between;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SlashingResistance}} | 0 | |<div style="width: 145px;">Slashing <span style="float:right;">{{:{{ROOTPAGENAME}}|SlashingResistance}}%</span></div>}}<!--
--><div style="width: 145px;">Arms <span style="float:right;color:#d5b292;">{{#var:Arms DEF}}</span></div><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PiercingResistance}} | 0 | |<div style="width: 145px;">Piercing <span style="float:right;">{{:{{ROOTPAGENAME}}|PiercingResistance}}%</span></div>}}<!--
--><div style="width: 145px;">Legs <span style="float:right;color:#d5b292;">{{#var:Legs DEF}}</span></div></div><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|CrushingResistance}} | 0 | |<div style="width: 145px;">Crushing <span style="float:right;">{{:{{ROOTPAGENAME}}|CrushingResistance}}%</span></div>}}<!--
--><div style="text-align:center;"><br>'''Resistances'''</div><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|RendingResistance}} | 0 | |<div style="width: 145px;">Rending <span style="float:right;">{{:{{ROOTPAGENAME}}|RendingResistance}}%</span></div>}}<!--
--><div style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: space-between;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FireResistance}} | 0 | |<div style="width: 145px;">{{C|Fire}} <span style="float:right;">{{C|Fire|{{:{{ROOTPAGENAME}}|FireResistance}}%}}</span></div>}}<!--
--><div style="width: 142px; float: left; padding-right: 5px; min-height: 1px;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|FrostResistance}} | 0 | |<div style="width: 145px;">{{C|Frost}} <span style="float:right;">{{C|Frost|{{:{{ROOTPAGENAME}}|FrostResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalPhysicalResistance}} | 0 | |<div style="width: 145px;border-width: 1px;border-style: none none dotted none;border-color:#71725e;">Physical <span style="float:right;">{{#var:TotalPhysicalResistance}}%</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ShockResistance}} | 0 | |<div style="width: 145px;">{{C|Shock}} <span style="float:right;">{{C|Shock|{{:{{ROOTPAGENAME}}|ShockResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalSlashingResistance}} | 0 | |<div style="width: 145px;">Slashing <span style="float:right;">{{#var:TotalSlashingResistance}}%</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|PoisonResistance}} | 0 | |<div style="width: 145px;">{{C|Poison}} <span style="float:right;">{{C|Poison|{{:{{ROOTPAGENAME}}|PoisonResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalPiercingResistance}} | 0 | |<div style="width: 145px;">Piercing <span style="float:right;">{{#var:TotalPiercingResistance}}%</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|CausticResistance}} | 0 | |<div style="width: 145px;">{{C|Caustic}} <span style="float:right;">{{C|Caustic|{{:{{ROOTPAGENAME}}|CausticResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalCrushingResistance}} | 0 | |<div style="width: 145px;">Crushing <span style="float:right;">{{#var:TotalCrushingResistance}}%</span></div>}}<!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|UnholyResistance}} | 0 | |<div style="width: 145px;">{{C|Unholy}} <span style="float:right;">{{C|Unholy|{{:{{ROOTPAGENAME}}|UnholyResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalRendingResistance}} | 0 | |<div style="width: 145px;">Rending <span style="float:right;">{{#var:TotalRendingResistance}}%</span></div>}}</div><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|ArcaneResistance}} | 0 | |<div style="width: 145px;">{{C|Arcane}} <span style="float:right;">{{C|Arcane|{{:{{ROOTPAGENAME}}|ArcaneResistance}}%}}</span></div>}}<!--
--><div style="width: 142px; float: left; padding-right: 5px; min-height: 1px;"><!--
-->{{#ifeq: {{:{{ROOTPAGENAME}}|SacredResistance}} | 0 | |<div style="width: 145px;">{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{:{{ROOTPAGENAME}}|SacredResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalNatureResistance}} | 0 | |<div style="width: 145px;border-width: 1px;border-style: none none dotted none;border-color:#71725e;">Nature <span style="float:right;">{{#var:TotalNatureResistance}}%</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:TotalFireResistance}} | 0 | |<div style="width: 145px;">{{C|Fire}} <span style="float:right;">{{C|Fire|{{#var:TotalFireResistance}}%}}</span></div>}}<!--
--><div class="mw-collapsible-content"><!--
-->{{#ifeq: {{#var:TotalFrostResistance}} | 0 | |<div style="width: 145px;">{{C|Frost}} <span style="float:right;">{{C|Frost|{{#var:TotalFrostResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalShockResistance}} | 0 | |<div style="width: 145px;">{{C|Shock}} <span style="float:right;">{{C|Shock|{{#var:TotalShockResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalPoisonResistance}} | 0 | |<div style="width: 145px;">{{C|Poison}} <span style="float:right;">{{C|Poison|{{#var:TotalPoisonResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalCausticResistance}} | 0 | |<div style="width: 145px;">{{C|Caustic}} <span style="float:right;">{{C|Caustic|{{#var:TotalCausticResistance}}%}}</span></div>}}</div><!--
--><div style="width: 142px; float: left; padding-right: 5px; min-height: 1px;"><!--
-->{{#ifeq: {{#var:TotalMagicResistance}} | 0 | |<div style="width: 145px;border-width: 1px;border-style: none none dotted none;border-color:#71725e;">Magic <span style="float:right;">{{#var:TotalMagicResistance}}%</span></div>}}<!--
-->{{#ifeq: {{#var:TotalUnholyResistance}} | 0 | |<div style="width: 145px;">{{C|Unholy}} <span style="float:right;">{{C|Unholy|{{#var:TotalUnholyResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalArcaneResistance}} | 0 | |<div style="width: 145px;">{{C|Arcane}} <span style="float:right;">{{C|Arcane|{{#var:TotalArcaneResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalSacredResistance}} | 0 | |<div style="width: 145px;">{{C|Sacred}} <span style="float:right;">{{C|Sacred|{{#var:TotalSacredResistance}}%}}</span></div>}}<!--
-->{{#ifeq: {{#var:TotalPsionicResistance}} | 0 | |<div style="width: 145px;">{{C|Psionic}} <span style="float:right;">{{C|Psionic|{{#var:TotalPsionicResistance}}%}}</span></div>}}</div></div><!--
--- COLLAPSED SECTION START - because these values are not normally visible ingame and there's a ton of them so it clutters the tooltip. ---
--- Stats are displayed in two columns. ---
--><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="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: space-between;"><!--
--><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;color:#d5b292;">{{#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;color:#d5b292;">{{#var:TotalBleedResistance}}%</span><br><!--
-->Control Res. <span style="float:right;">{{:{{ROOTPAGENAME}}|ControlResistance}}%</span><br><!--
-->Pain Res. <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|61}} | |0|{{#explode: {{#var:Datastring}}|;|61}}}}%</span></div><!--
-->Protection <span style="float:right;">{{:{{ROOTPAGENAME}}|Protection}}</span></div><!--
--><div style="width: 142px; float: left; padding-left: 5px;  min-height: 1px;"><!--
-->Block Power <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|21}} | |0|{{#explode: {{#var:Datastring}}|;|21}}}}</span><br><!--
-->Control Res. <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|34}} | |0|{{#explode: {{#var:Datastring}}|;|34}}}}%</span><br><!--
-->Fortitude <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|28}} | |0|{{#explode: {{#var:Datastring}}|;|28}}}}%</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><!--
-->Dodge Chance <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|19}} | |0|{{#explode: {{#var:Datastring}}|;|19}}}}%</span><br><!--
-->Pain Res. <span style="float:right;">{{:{{ROOTPAGENAME}}|PainResistance}}%</span><br><!--
-->Move Res. <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|33}} | |0|{{#explode: {{#var:Datastring}}|;|33}}}}%</span></div></div><!--
-->Move Res. <span style="float:right;">{{:{{ROOTPAGENAME}}|MoveResistance}}%</span><br><!--
-->Dodge Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|DodgeChance}}%</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="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: space-between;"><!--
--><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;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|23}} | |0|{{#explode: {{#var:Datastring}}|;|23}}}}%</span><br><!--
-->Accuracy <span style="float:right;">{{:{{ROOTPAGENAME}}|Accuracy}}%</span><br><!--
-->Counter Chance <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|25}} | |0|{{#explode: {{#var:Datastring}}|;|25}}}}%</span><br><!--
-->Counter Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|CounterChance}}%</span><br><!--
-->Stun Chance <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|37}} | |0|{{#explode: {{#var:Datastring}}|;|37}}}}%</span><br><!--
-->Stun Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|StunChance}}%</span><br><!--
-->Knockb. Chance <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|39}} | |0|{{#explode: {{#var:Datastring}}|;|39}}}}%</span><br><!--
-->Knockb. Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|KnockbackChance}}%</span><br><!--
-->Life Leech <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|50}} | |0|{{#explode: {{#var:Datastring}}|;|50}}}}%</span><br><!--
-->Life Leech <span style="float:right;">{{:{{ROOTPAGENAME}}|LifeLeech}}%</span><br><!--
-->Vision <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|48}} | |0|{{#explode: {{#var:Datastring}}|;|48}}}}</span></div><!--
-->Vision <span style="float:right;">{{:{{ROOTPAGENAME}}|Vision}}</span><br><!--
--><div style="width: 142px; float: left; padding-left: 5px; min-height: 1px;"><!--
-->Magic Power <span style="float:right;">{{:{{ROOTPAGENAME}}|MagicPower}}%</span></div><!--
-->Crit Efficiency <span style="float:right;color:#d5b292;">{{x}}{{#expr: ({{#ifeq: {{#explode: {{#var:Datastring}}|;|24}} | |0|{{#explode: {{#var:Datastring}}|;|24}}}} + 100)/100}}</span><br><!--
-->Bleed Chance <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|36}} | |0|{{#explode: {{#var:Datastring}}|;|36}}}}%</span><br><!--
-->Daze Chance <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|38}} | |0|{{#explode: {{#var:Datastring}}|;|38}}}}%</span><br><!--
-->Immob. Chance <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|40}} | |0|{{#explode: {{#var:Datastring}}|;|40}}}}%</span><br><!--
-->Energy Leech <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|51}} | |0|{{#explode: {{#var:Datastring}}|;|51}}}}%</span><br><!--
-->Bonus Range <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|49}} | |0|{{#explode: {{#var:Datastring}}|;|49}}}}</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><!--
-->Accuracy <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|18}} | |0|{{#explode: {{#var:Datastring}}|;|18}}}}%</span><br><!--
-->Bleed Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|BleedChance}}%</span><br><!--
-->Fumble Chance <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|26}} | |0|{{#explode: {{#var:Datastring}}|;|26}}}}%</span><br><!--
-->Fumble Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|FumbleChance}}%</span><br><!--
-->Stagger Chance <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|41}} | |0|{{#explode: {{#var:Datastring}}|;|41}}}}%</span><br><!--
-->Daze Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|DazeChance}}%</span><br><!--
-->Magic Power <span style="float:right;color:#d5b292;">{{#expr: {{#ifeq: {{#explode: {{#var:Datastring}}|;|65}} | |0|{{#explode: {{#var:Datastring}}|;|65}}}} + 100}}%</span><br><!--
-->Immob. Chance <span style="float:right;">{{:{{ROOTPAGENAME}}|ImmobilizeChance}}%</span><br><!--
-->Armor Pen. <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|66}} | |0|{{#explode: {{#var:Datastring}}|;|66}}}}%</span><br><!--
-->Energy Leech <span style="float:right;">{{:{{ROOTPAGENAME}}|EnergyLeech}}%</span><br><!--
-->Bodypart Dmg <span style="float:right;color:#d5b292;">{{#ifeq: {{#explode: {{#var:Datastring}}|;|64}} | |0|{{#explode: {{#var:Datastring}}|;|64}}}}%</span></div></div><!--
-->Bonus Range <span style="float:right;">{{:{{ROOTPAGENAME}}|BonusRange}}</span><br><!--
--><div style="text-align:center;">{{Tooltip rule}}<!--
-->Armor Pen. <span style="float:right;">{{:{{ROOTPAGENAME}}|ArmorPiercing}}%</span></div>{{Clear}}<!--
--- Attributes are displayed in a row. ---
--><div style="text-align:center;">{{Tooltip rule}}'''Attributes'''<br><!--
-->'''Attributes'''<br><!--
--><div style="width:15%;display:inline-block;">STR</div><!--
--><div style="width:15%;display:inline-block;">STR: <span style="color:#d5b292;">{{#explode: {{#var:Datastring}}|;|42}}</span></div><!--
--><div style="width:15%;display:inline-block;">AGL</div><!--
--><div style="width:15%;display:inline-block;">AGL: <span style="color:#d5b292;">{{#explode: {{#var:Datastring}}|;|43}}</span></div><!--
--><div style="width:15%;display:inline-block;">PRC</div><!--
--><div style="width:15%;display:inline-block;">PRC: <span style="color:#d5b292;">{{#explode: {{#var:Datastring}}|;|45}}</span></div><!--
--><div style="width:15%;display:inline-block;">VIT</div><!--
--><div style="width:15%;display:inline-block;">VIT: <span style="color:#d5b292;">{{#explode: {{#var:Datastring}}|;|44}}</span></div><!--
--><div style="width:15%;display:inline-block;">WIL</div><br><!--
--><div style="width:15%;display:inline-block;">WIL: <span style="color:#d5b292;">{{#explode: {{#var:Datastring}}|;|46}}</span></div></div></div><!--
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|STR}}</div><!--
--- COLLAPSED SECTION END ---
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|AGL}}</div><!--
--><div style="text-align:center;">{{Tooltip rule}}<!--
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|PRC}}</div><!--
-->'''Miscellaneous'''<br><!--
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|VIT}}</div><!--
--><div style="width:30%;display:inline-block;">Faction: <span style="color:#9d9a9a;">{{#explode: {{#var:Datastring}}|;|4}}</span></div><!--
--><div style="width:15%;display:inline-block;">{{:{{ROOTPAGENAME}}|WIL}}</div></div></div><!--
--><div style="width:30%;display:inline-block;">Size: <span style="color:#9d9a9a;">{{#explode: {{#var:Datastring}}|;|8}}</span></div><!--
--><div style="text-align:center;">{{Tooltip rule}}'''Miscellaneous'''<br><!--
--><div style="width:30%;display:inline-block;">XP: <span style="color:#f6bb15;">{{#explode: {{#var:Datastring}}|;|11}}</span></div></div><!--
--><div style="width:30%;display:inline-block;">Faction:<br>{{:{{ROOTPAGENAME}}|Faction}}</div><!--
-->{{Tooltip rule}}<!--
--><div style="width:30%;display:inline-block;">Size:<br>{{:{{ROOTPAGENAME}}|Size}}<br></div><!--
--- BUTTONS START ---
--><div style="width:30%;display:inline-block;">XP:<br>{{:{{ROOTPAGENAME}}|XP}}<br></div></div><!--
--><div style="margin: 1.2em 0; text-align:center;"><span class="spoilerShow mw-collapsible mw-customtoggle-statistics1 mw-customtoggle-statistics2" id="mw-customcollapsible-statistics2" style="font-size: 16px;">Show more</span><!--
--><div style="color:#9d7969;text-align:justify">{{Tooltip rule}}{{:{{ROOTPAGENAME}}|Description}}</div></div><!--
--><span class="spoilerHide mw-collapsible mw-collapsed mw-customtoggle-statistics1 mw-customtoggle-statistics2" id="mw-customcollapsible-statistics2" style="font-size: 16px;">Show less</span></div><!--
--- BUTTONS END ---
--- Enemy Description ---
--><div style="color:#9d7969;text-align:justify;margin-top:10px;">{{#explode: {{#var:Datastring}}|;|-1}}</div></div><!--
--- TOOLTIP END ---
--></includeonly><noinclude>{{doc}}[[Category:Tooltip templates]]</noinclude>
--></includeonly><noinclude>{{doc}}[[Category:Tooltip templates]]</noinclude>

Latest revision as of 12:20, 22 October 2023

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


Skeleton Swordsman
Level 4 Undead
Skeleton Swordsman
Health: 65
Energy: 40

Damage
13 Slashing
2 Unholy

Protection
Head 0
Body 2
Arms 1
Legs 1

Resistances
Physical 25%
Slashing 25%
Piercing 35%
Crushing 10%
Rending 25%
Nature 40%
Fire 40%
Frost 40%
Shock 40%
Poison 240%
Caustic 40%
Unholy 99%
Sacred -50%

Defensive stats
Block Chance 10%
Bleed Res. 200%
Pain Res. 100%
Block Power 10
Control Res. 20%
Fortitude 0%
Dodge Chance 0%
Move Res. 0%

Offensive stats
Crit Chance 0%
Counter Chance 0%
Stun Chance 0%
Knockb. Chance 0%
Life Leech 0%
Vision 6
Crit Efficiency ×1
Bleed Chance 10%
Daze Chance 0%
Immob. Chance 0%
Energy Leech 0%
Bonus Range 0
Accuracy 70%
Fumble Chance 30%
Stagger Chance 0%
Magic Power 100%
Armor Pen. 10%
Bodypart Dmg 5%

Attributes
STR: 14
AGL: 12
PRC: 12
VIT: 10
WIL: 10

Miscellaneous
Faction: Undead
Size: medium
XP: 40

Show moreShow less
Hastily armed under the orders of a necromancer, this skeleton is quite capable of dispatching an inexperienced adversary.