Template:AutoArmourStats: Difference between revisions

From Melvor Idle
(Change to single Lua invocation)
Tag: Replaced
m (Removed mention of a non-existent template)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Automatic version of [[Template:ArmourStats]] that pulls data via Lua.
{{T|{{PAGENAME}}|Ragnar God Gloves}} gives {{{{PAGENAME}}|Ragnar God Gloves}}


{{T|{{PAGENAME}}|Ragnar God Gloves}} gives {{{{PAGENAME}}|Ragnar God Gloves}}
When called for items without any combat stats, it returns a simple statement to that effect. For example, {{T|{{PAGENAME}}|Gold Topaz Ring}} gives<br/>{{{{PAGENAME}}|Gold Topaz Ring}}
<includeonly><onlyinclude>{{#invoke:Items|getArmourStatsBox|{{{1|{{PAGENAME}}}}}}}</onlyinclude></includeonly>
<includeonly><onlyinclude>{{#ifeq:true|{{#invoke:Items|getItemStat|{{{1|{{PAGENAME}}}}}|hasCombatStats}}|{{#invoke:Items|getArmourStatsBox|{{{1|{{PAGENAME}}}}}}}|{{{1|{{PAGENAME}}}}} does not provide any stat bonuses in combat.}}
</onlyinclude></includeonly>

Latest revision as of 12:36, 2 July 2024

{{AutoArmourStats|Ragnar God Gloves}} gives

Armour Stats
Offensive Stats Defensive Stats
Error creating thumbnail: File missing
Strength Bonus
16
Error creating thumbnail: File missing
Defence Bonus
11
Error creating thumbnail: File missing
Stab Bonus
12
Error creating thumbnail: File missing
Damage Reduction
7%
Error creating thumbnail: File missing
Slash Bonus
12
Error creating thumbnail: File missing
Defence Bonus
0
Error creating thumbnail: File missing
Block Bonus
12
Error creating thumbnail: File missing
Defence Bonus
0
Error creating thumbnail: File missing
Attack Bonus
-5 Equip Requirements
Error creating thumbnail: File missing
Strength Bonus
0
Error creating thumbnail: File missing
Level Required
85
Error creating thumbnail: File missing
Attack Bonus
-8
Error creating thumbnail: File missing
 % Damage Bonus
0%


When called for items without any combat stats, it returns a simple statement to that effect. For example, {{AutoArmourStats|Gold Topaz Ring}} gives
Gold Topaz Ring does not provide any stat bonuses in combat.