Difference between revisions of "Template:Enemy test"
Jump to navigation
Jump to search
m |
(Updated template to work with datastring) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
--- Define | --- Define datastring as variable - to only load from the Enemy data page once. --- | ||
-->{{#vardefine: | -->{{#vardefine:Datastring|{{:Enemy_data|{{ROOTPAGENAME}}}}}}<!-- | ||
-->{{#vardefine:Name|{{: | -->{{#vardefine:Matter|{{#explode: {{#var:Datastring}}|;|9}}}}<!-- | ||
-->{{#vardefine:Level|{{: | -->{{#vardefine:Name|{{#explode: {{#var:Datastring}}|;|-2}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Level|{{#explode: {{#var:Datastring}}|;|0}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Head DEF|{{#explode: {{#var:Datastring}}|;|14}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Body DEF|{{#explode: {{#var:Datastring}}|;|15}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Arms DEF|{{#explode: {{#var:Datastring}}|;|16}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Legs DEF|{{#explode: {{#var:Datastring}}|;|17}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Slashing Damage|{{#explode: {{#var:Datastring}}|;|67}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Piercing Damage|{{#explode: {{#var:Datastring}}|;|68}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Crushing Damage|{{#explode: {{#var:Datastring}}|;|69}}}}<!-- | ||
-->{{#vardefine:NatureResistance|{{: | -->{{#vardefine:Rending Damage|{{#explode: {{#var:Datastring}}|;|70}}}}<!-- | ||
-->{{#vardefine:MagicResistance|{{: | -->{{#vardefine:Fire Damage|{{#explode: {{#var:Datastring}}|;|71}}}}<!-- | ||
-->{{#vardefine:SlashingResistance|{{: | -->{{#vardefine:Frost Damage|{{#explode: {{#var:Datastring}}|;|75}}}}<!-- | ||
-->{{#vardefine:PiercingResistance|{{: | -->{{#vardefine:Shock Damage|{{#explode: {{#var:Datastring}}|;|72}}}}<!-- | ||
-->{{#vardefine:CrushingResistance|{{: | -->{{#vardefine:Poison Damage|{{#explode: {{#var:Datastring}}|;|73}}}}<!-- | ||
-->{{#vardefine:RendingResistance|{{: | -->{{#vardefine:Caustic Damage|{{#explode: {{#var:Datastring}}|;|74}}}}<!-- | ||
-->{{#vardefine:FireResistance|{{: | -->{{#vardefine:Arcane Damage|{{#explode: {{#var:Datastring}}|;|76}}}}<!-- | ||
-->{{#vardefine:FrostResistance|{{: | -->{{#vardefine:Sacred Damage|{{#explode: {{#var:Datastring}}|;|78}}}}<!-- | ||
-->{{#vardefine:ShockResistance|{{: | -->{{#vardefine:Unholy Damage|{{#explode: {{#var:Datastring}}|;|77}}}}<!-- | ||
-->{{#vardefine:PoisonResistance|{{: | -->{{#vardefine:Psionic Damage|{{#explode: {{#var:Datastring}}|;|79}}}}<!-- | ||
-->{{#vardefine:CausticResistance|{{: | -->{{#vardefine:PhysicalResistance|{{#explode: {{#var:Datastring}}|;|80}}}}<!-- | ||
-->{{#vardefine:UnholyResistance|{{: | -->{{#vardefine:NatureResistance|{{#explode: {{#var:Datastring}}|;|81}}}}<!-- | ||
-->{{#vardefine:ArcaneResistance|{{: | -->{{#vardefine:MagicResistance|{{#explode: {{#var:Datastring}}|;|82}}}}<!-- | ||
-->{{#vardefine:SacredResistance|{{: | -->{{#vardefine:SlashingResistance|{{#explode: {{#var:Datastring}}|;|83}}}}<!-- | ||
-->{{#vardefine:PsionicResistance|{{: | -->{{#vardefine:PiercingResistance|{{#explode: {{#var:Datastring}}|;|84}}}}<!-- | ||
-->{{#vardefine:CrushingResistance|{{#explode: {{#var:Datastring}}|;|85}}}}<!-- | |||
-->{{#vardefine:RendingResistance|{{#explode: {{#var:Datastring}}|;|86}}}}<!-- | |||
-->{{#vardefine:FireResistance|{{#explode: {{#var:Datastring}}|;|87}}}}<!-- | |||
-->{{#vardefine:FrostResistance|{{#explode: {{#var:Datastring}}|;|91}}}}<!-- | |||
-->{{#vardefine:ShockResistance|{{#explode: {{#var:Datastring}}|;|88}}}}<!-- | |||
-->{{#vardefine:PoisonResistance|{{#explode: {{#var:Datastring}}|;|89}}}}<!-- | |||
-->{{#vardefine:CausticResistance|{{#explode: {{#var:Datastring}}|;|90}}}}<!-- | |||
-->{{#vardefine:UnholyResistance|{{#explode: {{#var:Datastring}}|;|93}}}}<!-- | |||
-->{{#vardefine:ArcaneResistance|{{#explode: {{#var:Datastring}}|;|92}}}}<!-- | |||
-->{{#vardefine:SacredResistance|{{#explode: {{#var:Datastring}}|;|94}}}}<!-- | |||
-->{{#vardefine:PsionicResistance|{{#explode: {{#var:Datastring}}|;|95}}}}<!-- | |||
<!-- DEFINE ENEMY BODY TYPE BONUSES | <!-- DEFINE ENEMY BODY TYPE BONUSES | ||
-->{{#if: {{#var:Matter}} | {{#switch: {{#var:Matter}} | -->{{#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:{{#var:Name}}|{{#var:Name}}|{{ROOTPAGENAME}}}}</span><br><!-- | <div style="text-align:center;"><br><span style="font-size: 20px;">{{#if:{{#var:Name}}|{{#var:Name}}|{{ROOTPAGENAME}}}}</span><br><!-- | ||
-->Level {{: | -->Level {{#var:Level}} <!-- | ||
-->{{: | -->{{#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: {{: | --><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: {{: | --><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><!-- | ||
-->< | --- Only display Damage types that have a value. --- | ||
-->{{#if: {{#var: | -->{{#if:{{#var:Slashing Damage}}|{{#var:Slashing Damage}} {{Translate|Slashing|Properties}}<br>}}<!-- | ||
-->{{#if: {{#var: | -->{{#if:{{#var:Piercing Damage}}|{{#var:Piercing Damage}} {{Translate|Piercing|Properties}}<br>}}<!-- | ||
-->{{# | -->{{#if:{{#var:Crushing Damage}}|{{#var:Crushing Damage}} {{Translate|Crushing|Properties}}<br>}}<!-- | ||
--> | -->{{#if:{{#var:Rending Damage}}|{{#var:Rending Damage}} {{Translate|Rending|Properties}}<br>}}<!-- | ||
-->{{#if:{{#var:Fire Damage}}|{{c|Fire|{{#var:Fire Damage}} {{Translate|Fire|Properties}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Frost Damage}}|{{c|Frost|{{#var:Frost Damage}} {{Translate|Frost|Properties}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Shock Damage}}|{{c|Shock|{{#var:Shock Damage}} {{Translate|Shock|Properties}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Poison Damage}}|{{c|Poison|{{#var:Poison Damage}} {{Translate|Poison|Properties}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Caustic Damage}}|{{c|Caustic|{{#var:Caustic Damage}} {{Translate|Caustic|Properties}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Arcane Damage}}|{{c|Arcane|{{#var:Arcane Damage}} {{Translate|Arcane|Properties}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Sacred Damage}}|{{c|Sacred|{{#var:Sacred Damage}} {{Translate|Sacred|Properties}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Unholy Damage}}|{{c|Unholy|{{#var:Unholy Damage}} {{Translate|Unholy|Properties}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Psionic Damage}}|{{c|Psionic|{{#var:Psionic Damage}} {{Translate|Psionic|Properties}}}}<br>}}<!-- | |||
-->{{Tooltip rule}}'''Protection'''</div><!-- | |||
--><div style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: space-between;"><!-- | |||
-->{{#ifeq: {{#var:Head DEF}} | |0|<div style="width: 145px;">Head <span style="float:right;">{{#var:Head DEF}}</span></div>}}<!-- | |||
-->{{#ifeq: {{#var:Body DEF}} | |0|<div style="width: 145px;">Head <span style="float:right;">{{#var:Body DEF}}</span></div>}}<!-- | |||
-->{{#ifeq: {{#var:Arms DEF}} | |0|<div style="width: 145px;">Head <span style="float:right;">{{#var:Arms DEF}}</span></div>}}<!-- | |||
-->{{#ifeq: {{#var:Legs DEF}} | |0|<div style="width: 145px;">Head <span style="float:right;">{{#var:Legs DEF}}</span></div>}}</div><!-- | |||
--><div style="text-align:center;">'''Resistances'''</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}} + {{#var:PhysicalResistance}}}} | 0 | |<div style="width: 145px;">Physical <span style="float:right;">{{#expr: {{#var:resphysical}} + {{#var:PhysicalResistance}}}}%</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>}}<!-- | ||
Line 68: | Line 95: | ||
--><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;">{{: | -->Block Chance <span style="float:right;">{{#explode: {{#var:Datastring}}|;|20}}%</span><br><!-- | ||
-->Bleed Res. <span style="float:right;">{{: | -->Bleed Res. <span style="float:right;">{{#explode: {{#var:Datastring}}|;|35}}%</span><br><!-- | ||
-->Control Res. <span style="float:right;">{{: | -->Control Res. <span style="float:right;">{{#explode: {{#var:Datastring}}|;|34}}%</span><br><!-- | ||
--><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;">{{: | -->Block Power <span style="float:right;">{{#explode: {{#var:Datastring}}|;|21}}</span><br><!-- | ||
-->Pain Res. <span style="float:right;">{{: | -->Pain Res. <span style="float:right;">{{#explode: {{#var:Datastring}}|;|61}}%</span><br><!-- | ||
-->Move Res. <span style="float:right;">{{: | -->Move Res. <span style="float:right;">{{#explode: {{#var:Datastring}}|;|33}}%</span><br><!-- | ||
-->Dodge Chance <span style="float:right;">{{: | -->Dodge Chance <span style="float:right;">{{#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;">{{: | -->Crit Chance <span style="float:right;">{{#explode: {{#var:Datastring}}|;|23}}%</span><br><!-- | ||
-->Accuracy <span style="float:right;">{{: | -->Accuracy <span style="float:right;">{{#explode: {{#var:Datastring}}|;|18}}%</span><br><!-- | ||
-->Counter Chance <span style="float:right;">{{: | -->Counter Chance <span style="float:right;">{{#explode: {{#var:Datastring}}|;|25}}%</span><br><!-- | ||
-->Stun Chance <span style="float:right;">{{: | -->Stun Chance <span style="float:right;">{{#explode: {{#var:Datastring}}|;|37}}%</span><br><!-- | ||
-->Knockb. Chance <span style="float:right;">{{: | -->Knockb. Chance <span style="float:right;">{{#explode: {{#var:Datastring}}|;|39}}%</span><br><!-- | ||
-->Life Leech <span style="float:right;">{{: | -->Life Leech <span style="float:right;">{{#explode: {{#var:Datastring}}|;|50}}%</span><br><!-- | ||
-->Vision <span style="float:right;">{{: | -->Vision <span style="float:right;">{{#explode: {{#var:Datastring}}|;|48}}</span><br><!-- | ||
-->Magic Power <span style="float:right;">{{# | -->Magic Power <span style="float:right;">{{#explode: {{#var:Datastring}}|;|65}}%</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}}{{# | -->Crit Efficiency <span style="float:right;">{{x}}{{#explode: {{#var:Datastring}}|;|24}}</span><br><!-- | ||
-->Bleed Chance <span style="float:right;">{{: | -->Bleed Chance <span style="float:right;">{{#explode: {{#var:Datastring}}|;|36}}%</span><br><!-- | ||
-->Fumble Chance <span style="float:right;">{{: | -->Fumble Chance <span style="float:right;">{{#explode: {{#var:Datastring}}|;|26}}%</span><br><!-- | ||
-->Daze Chance <span style="float:right;">{{: | -->Daze Chance <span style="float:right;">{{#explode: {{#var:Datastring}}|;|38}}%</span><br><!-- | ||
-->Immob. Chance <span style="float:right;">{{: | -->Immob. Chance <span style="float:right;">{{#explode: {{#var:Datastring}}|;|40}}%</span><br><!-- | ||
-->Energy Leech <span style="float:right;">{{: | -->Energy Leech <span style="float:right;">{{#explode: {{#var:Datastring}}|;|51}}%</span><br><!-- | ||
-->Bonus Range <span style="float:right;">{{: | -->Bonus Range <span style="float:right;">{{#explode: {{#var:Datastring}}|;|49}}</span><br><!-- | ||
-->Armor Pen. <span style="float:right;">{{: | -->Armor Pen. <span style="float:right;">{{#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 102: | 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;">{{: | --><div style="width:15%;display:inline-block;">{{#explode: {{#var:Datastring}}|;|42}}</div><!-- | ||
--><div style="width:15%;display:inline-block;">{{: | --><div style="width:15%;display:inline-block;">{{#explode: {{#var:Datastring}}|;|43}}</div><!-- | ||
--><div style="width:15%;display:inline-block;">{{: | --><div style="width:15%;display:inline-block;">{{#explode: {{#var:Datastring}}|;|45}}</div><!-- | ||
--><div style="width:15%;display:inline-block;">{{: | --><div style="width:15%;display:inline-block;">{{#explode: {{#var:Datastring}}|;|44}}</div><!-- | ||
--><div style="width:15%;display:inline-block;">{{: | --><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>{{: | --><div style="width:30%;display:inline-block;">Faction:<br>{{#explode: {{#var:Datastring}}|;|4}}</div><!-- | ||
--><div style="width:30%;display:inline-block;">Size:<br>{{: | --><div style="width:30%;display:inline-block;">Size:<br>{{#explode: {{#var:Datastring}}|;|8}}<br></div><!-- | ||
--><div style="width:30%;display:inline-block;">XP:<br>{{: | --><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;">{{: | --><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 11:58, 11 October 2022
This template has no documentation. If you know how to use this template, please add some.