Difference between revisions of "Template:Enemy"

From Stoneshard wiki
Jump to navigation Jump to search
(updated additional resistances from body type to 0.8.1.7 values)
(add parameter support)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
--- If item name is provided as parameter, use the parameter instead of root page. ---
-->{{#vardefine:Page|{{#if:{{{1|}}}|{{{1|}}}|{{ROOTPAGENAME}}}}}}<!--
--- Load complete datastring into a variable - to only load from the Enemy data page once. ---
--- Load complete datastring into a variable - to only load from the Enemy data page once. ---
-->{{#vardefine:Datastring|{{:Enemy_data|{{ROOTPAGENAME}}}}}}<!--
-->{{#vardefine:Datastring|{{:Enemy_data|{{#var:Page}}}}}}<!--
--- Separate values from datastring into individual variables. ---
--- Separate values from datastring into individual variables. ---
-->{{#vardefine:Matter|{{#explode: {{#var:Datastring}}|;|9}}}}<!--
-->{{#vardefine:Matter|{{#explode: {{#var:Datastring}}|;|9}}}}<!--
Line 69: Line 71:
--- TOOLTIP START ---
--- TOOLTIP START ---
--><div style="width: 450px;">
--><div style="width: 450px;">
<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}}|{{#var:Page}}}}</span><br><!--
--- Level X / Enemy Type with capitalized first letter ---
--- Level X / Enemy Type with capitalized first letter ---
-->Level {{#var:Level}} <!--
-->Level {{#var:Level}} <!--
--><span style="color:#d5b292;">{{ucfirst:{{#explode: {{#var:Datastring}}|;|3}}}}</span>{{Clear}}<!--
--><span style="color:#d5b292;">{{ucfirst:{{#explode: {{#var:Datastring}}|;|3}}}}</span>{{Clear}}<!--
--- Enemy Image + Second Enemy Image for Necromancer (Dagger) only---
--- Enemy Image + Second Enemy Image for Necromancer (Dagger) only---
-->[[File:{{ROOTPAGENAME}}.png|link=|class=image2x|alt={{ROOTPAGENAME}}|{{ROOTPAGENAME}}]]{{#ifeq:{{ROOTPAGENAME}}|Necromancer (Dagger)|[[File:Necromancer (Cowl and dagger).png|link=|class=image2x|alt={{ROOTPAGENAME}}|{{ROOTPAGENAME}}]]|}}{{Clear}}<!--
-->[[File:{{#var:Page}}.png|link=|class=image2x|alt={{#var:Page}}|{{#var:Page}}]]{{#ifeq:{{#var:Page}}|Necromancer (Dagger)|[[File:Necromancer (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;">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><!--
--><div style="margin-left:5px;margin-right:5px;display:inline-block;">Energy: <span style="color:#4c7fff;">{{#explode: {{#var:Datastring}}|;|13}}</span></div><!--

Revision as of 11:33, 21 June 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%
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%

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.