Template:MonsterStats: Difference between revisions

Barrier section now only shows up when needed
(Now powered by Lua)
(Barrier section now only shows up when needed)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Template for auto-building monster stat blocks.
Template for auto-building monster stat blocks.


For example, <nowiki>{{User:Falterfire/MonsterStats|Aeris}}</nowiki> becomes {{MonsterStats|Aeris}}
For example, <nowiki>{{User:MonsterStats|Magic Golem}}</nowiki> becomes {{MonsterStats|Magic Golem}}
<onlyinclude><includeonly>{{#vardefine:monster|{{{1|{{PAGENAME}}}}}}}{| class="wikitable" style="margin: 0rem 1rem;"
<onlyinclude><includeonly>{| class="wikitable" style="margin: 0rem 1rem;"
|-
|-
! colspan=16 | Combat Stats
! colspan=16 | Combat Stats
|-
|-
| style="font-weight: bold;" | Combat Level:  
| style="font-weight: bold;" | Combat Level:  
| colspan=15 style="text-align: right" | {{formatnum:{{#invoke:Monsters|getMonsterCombatLevel|{{#var:monster}}}}}}
| colspan=15 style="text-align: right" | {{formatnum:{{#invoke:Monsters|getMonsterCombatLevel|{{{1|{{PAGENAME}}}}}}}}}
|-
|-
| style="font-weight: bold;" | Hitpoints:  
| style="font-weight: bold;" | Hitpoints:  
| colspan=15 style="text-align: right" | {{Skill|Hitpoints|notext=true}} {{formatnum:{{formatnum:{{#invoke:Monsters|getMonsterHP|{{#var:monster}}}}}}}}
| colspan=15 style="text-align: right" | {{Skill|Hitpoints|notext=true}} {{formatnum:{{#invoke:Monsters|getMonsterHP|{{{1|{{PAGENAME}}}}}}}}}
{{#invoke:Monsters|getMonsterBoxBarrierText|{{{1|{{PAGENAME}}}}}}}
|-
|-
| style="font-weight: bold;" | Attack Speed:  
| style="font-weight: bold;" | Attack Speed:  
| colspan=15 style="text-align: right" | {{formatnum:{{#invoke:Monsters|getMonsterAttackSpeed|{{#var:monster}}}}}} s
| colspan=15 style="text-align: right" | {{formatnum:{{#invoke:Monsters|getMonsterAttackSpeed|{{{1|{{PAGENAME}}}}}}}}}s
|-
| style="font-weight: bold;" | Max Hit:
| colspan=15 style="text-align: right" | {{#invoke:Monsters|getMonsterStyleIcon|{{{1|{{PAGENAME}}}}}|notext=true}} {{formatnum:{{#invoke:Monsters|getMonsterStat|{{{1|{{PAGENAME}}}}}|maxHit}}}}
|-
|-
| style="font-weight: bold;" | Accuracy Rating:  
| style="font-weight: bold;" | Accuracy Rating:  
| colspan=15 style="text-align: right" | {{formatnum:{{#invoke:Monsters|getMonsterAR|{{#var:monster}}}}}}
| colspan=15 style="text-align: right" | {{formatnum:{{#invoke:Monsters|getMonsterAR|{{{1|{{PAGENAME}}}}}}}}}
|-
| style="font-weight: bold;" | Damage Reduction:
| colspan=15 style="text-align: right" | {{formatnum:{{#invoke:Monsters|getMonsterStat|{{{1|{{PAGENAME}}}}}|damageReduction}}}}%
|-
|-
| rowspan=2 style="font-weight: bold;" | Evasion Ratings:
| rowspan=2 style="font-weight: bold;" | Evasion Ratings:
Line 23: Line 30:
| colspan=5 style="text-align: center;" | [[File:Magic (skill).svg|25px|middle|link=Magic]]  
| colspan=5 style="text-align: center;" | [[File:Magic (skill).svg|25px|middle|link=Magic]]  
|-
|-
| colspan=5 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterER|{{#var:monster}}|Melee}}}}
| colspan=5 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterER|{{{1|{{PAGENAME}}}}}|Melee}}}}
| colspan=5 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterER|{{#var:monster}}|Ranged}}}}
| colspan=5 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterER|{{{1|{{PAGENAME}}}}}|Ranged}}}}
| colspan=5 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterER|{{#var:monster}}|Magic}}}}
| colspan=5 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterER|{{{1|{{PAGENAME}}}}}|Magic}}}}
|-
|-
| rowspan=2 style="font-weight: bold;" | Skill Levels:
| rowspan=2 style="font-weight: bold;" | Skill Levels:
Line 34: Line 41:
| colspan=3 style="text-align: center;" | [[File:Magic (skill).svg|25px|middle|link=Magic]]  
| colspan=3 style="text-align: center;" | [[File:Magic (skill).svg|25px|middle|link=Magic]]  
|-
|-
| colspan=3 style="text-align: right;" | {{#invoke:Monsters|getMonsterStat|{{#var:monster}}|attackLevel}}
| colspan=3 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterLevel|{{{1|{{PAGENAME}}}}}|Attack}}}}
| colspan=3 style="text-align: right;" | {{#invoke:Monsters|getMonsterStat|{{#var:monster}}|strengthLevel}}
| colspan=3 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterLevel|{{{1|{{PAGENAME}}}}}|Strength}}}}
| colspan=3 style="text-align: right;" | {{#invoke:Monsters|getMonsterStat|{{#var:monster}}|defenceLevel}}
| colspan=3 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterLevel|{{{1|{{PAGENAME}}}}}|Defence}}}}
| colspan=3 style="text-align: right;" | {{#invoke:Monsters|getMonsterStat|{{#var:monster}}|rangedLevel}}
| colspan=3 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterLevel|{{{1|{{PAGENAME}}}}}|Ranged}}}}
| colspan=3 style="text-align: right;" | {{#invoke:Monsters|getMonsterStat|{{#var:monster}}|magicLevel}}
| colspan=3 style="text-align: right;" | {{formatnum:{{#invoke:Monsters|getMonsterLevel|{{{1|{{PAGENAME}}}}}|Magic}}}}
|}</includeonly></onlyinclude>
|}
 
===Attacks===
{{#invoke:Monsters|getMonsterAttacks|{{{1|{{PAGENAME}}}}}}}
 
{{#invoke:Monsters|getMonsterPassives|{{{1|{{PAGENAME}}}}}}}</includeonly></onlyinclude>