Template:Infobox Bonuses: Difference between revisions

From Darkan
Jump to navigation Jump to search
(Undo revision 173628 by Jawarrior1 (talk))
Tag: Undo
No edit summary
Line 1: Line 1:
<div style="display:table">
<infobox type="bonuses">
{|class="wikitable" {{#if:{{{style|}}}|style="{{{style}}}"}}
    <title><default>[[Equipment Stats|Bonuses]]</default></title>
!colspan="3"|[[Beta:Equipment Stats|Equipment Bonuses]]
<image source="image"><format>{{#switch:{{{image}}}
{{#if:{{{image|}}}|{{#switch:{{{image}}}
|no=  
|no=
|needed=
|needed={{!}}rowspan="{{#expr:3{{#if:{{{mainType|}}}{{{mainDamage|}}}{{{mainAccuracy|}}}|+3}}{{#if:{{{offType|}}}{{{offDamage|}}}{{{offAccuracy|}}}|+3}}{{#if:{{{defence|}}}{{{life|}}}{{{prayer|}}}|+3}}{{#if:{{{meleecrit|}}}{{{rangedcrit|}}}{{{magiccrit|}}}|+2}}{{#ifeq:{{lc:{{{aspeed|}}}}}|no||+2}}}}" width="125" {{ctr}} valign="center"{{!}}[[Special:Upload|<big>'''Please upload an image!'''</big>]]{{mainonly|[[Category:Needs image]]}}
|#default={{#tag:gallery|
|#default={{!}}rowspan="{{#expr:4{{#if:{{{mainType|}}}{{{mainDamage|}}}{{{mainAccuracy|}}}|+3}}{{#if:{{{offType|}}}{{{offDamage|}}}{{{offAccuracy|}}}|+3}}{{#if:{{{defence|}}}{{{life|}}}{{{prayer|}}}|+3}}{{#if:{{{meleecrit|}}}{{{rangedcrit|}}}{{{magiccrit|}}}|+2}}{{#ifeq:{{lc:{{{aspeed|}}}}}|no||+1}}}}" width="125" {{ctr}} valign="center"{{!}}[[File:{{rmv|File:|{{{image}}}}}{{#if:{{{caption|}}}|{{!}}{{{caption}}}}}{{!}}x{{#expr:309{{#if:{{{aspeed|}}}|+66}}}}px]]{{#if:{{{caption|}}}|<br /><small>{{{caption}}}</small>}}{{#if:{{{image2|}}}|{{!!}}rowspan="{{#expr:4{{#if:{{{mainType|}}}{{{mainDamage|}}}{{{mainAccuracy|}}}|+3}}{{#if:{{{offType|}}}{{{offDamage|}}}{{{offAccuracy|}}}|+3}}{{#if:{{{defence|}}}{{{life|}}}{{{prayer|}}}|+3}}{{#if:{{{meleecrit|}}}{{{rangedcrit|}}}{{{magiccrit|}}}|+2}}{{#ifeq:{{lc:{{{aspeed|}}}}}|no||+2}}}}" width="125" align="center" valign="center"{{!}}[[File:{{rmv|File:|{{{image2}}}}}{{#if:{{{caption2|}}}|{{!}}{{{caption2}}}}}{{!}}x{{#expr:309{{#if:{{{aspeed|}}}|+66}}}}px]]{{#if:{{{caption2|}}}|<br /><small>{{{caption2}}}</small>}}}}
{{#invoke:HF|stripFileWrapper|{{{image}}}}}|{{{caption|}}}
}}|{{mainonly|[[Category:Needs image placement]]}}}}
{{#invoke:HF|stripFileWrapper|{{{image2}}}}}|{{{caption2|}}}
|-
}}}}</format>
{{#if:{{{mainType|}}}{{{mainDamage|}}}{{{mainAccuracy|}}}|!colspan="3"{{!}}Main Hand Info
</image>
{{!}}-
    <data source="image" name="needs-image">
!Type!!Damage!!Accuracy
        <format>{{#ifeq:{{{image|}}}|needed|{{#invoke:HF|content|[[Special:Upload|Please add an image!]][[Category:Needs image]]}}}}</format>
{{!}}-
    <default>{{#if:{{{image|}}}||{{#invoke:HF|content|[[Special:Upload|Please add an image!]][[Category:Needs image]]}}}}</default>
{{!}}{{ctr}}{{!}}{{#if:{{{mainType|}}}|{{{mainType}}}|?}}{{!!}}{{ctr}}{{!}}{{#if:{{{mainDamage|}}}|{{{mainDamage}}}|?}}{{!!}}{{ctr}}{{!}}{{#if:{{{mainAccuracy|}}}|{{{mainAccuracy}}}|?}}
    </data>
{{!}}-
<group row-items="5">
}}
    <header>{{skill clickpic|Attack}}&nbsp;[[Attack|Attack bonus]]</header>
 
    <data source="astab">
{{#if:{{{offType|}}}{{{offDamage|}}}{{{offAccuracy|}}}|!colspan="3"{{!}}Offhand Info
        <label>[[File:White dagger.png|link=Stab|Attack Stab]]</label>
{{!}}-
        <format>{{format eq stat|{{{astab}}} }}</format>
!Type!!Damage!!Accuracy
    </data>
{{!}}-
    <data source="aslash">
{{!}}{{ctr}}{{!}}{{#if:{{{offType|}}}|{{{offType}}}|?}}{{!!}}{{ctr}}{{!}}{{#if:{{{offDamage|}}}|{{{offDamage}}}|?}}{{!!}}{{ctr}}{{!}}{{#if:{{{offAccuracy|}}}|{{{offAccuracy}}}|?}}
        <label>[[File:White scimitar.png|link=Slash|Attack Slash]]</label>
{{!}}-
        <format>{{format eq stat|{{{aslash}}} }}</format>
}}
    </data>
{{#if:{{{defence|}}}{{{life|}}}{{{prayer|}}}|!colspan="3"{{!}}Defence Info
    <data source="acrush">
{{!}}-
        <label>[[File:White warhammer.png|link=Crush|Attack Crush]]</label>
!{{Skill clickpic|Defence}}!!{{Skill clickpic|Constitution}}!!{{Skill clickpic|Prayer}}
        <format>{{format eq stat|{{{acrush}}} }}</format>
{{!}}-
    </data>
{{!}}{{ctr}}{{!}}{{#if:{{{defence|}}}|{{{defence}}}|?}}{{!!}}{{ctr}}{{!}}{{#if:{{{life|}}}|{{{life}}}|?}}{{!!}}{{ctr}}{{!}}{{#if:{{{prayer|}}}|{{{prayer}}}|?}}
    <data source="amagic">
{{!}}-
        <label>[[File:Magic icon.png|link=Magic|Attack Magic]]</label>
}}
        <format>{{format eq stat|{{{amagic}}} }}</format>
{{#if:{{{meleecrit|}}}{{{rangedcrit|}}}{{{magiccrit|}}}|!colspan="3"{{!}}Critical bonuses
    </data>
{{!}}-
    <data source="arange">
{{!}}{{ctr}}{{!}}[[File:Attack-icon.png|20px|link=Melee]]&nbsp;{{#if:{{{meleecrit|}}}|{{#replace:{{{meleecrit}}}|%|}}%|?{{mainonly|[[Category:Missing Melee critical bonus]]}}}}
        <label>[[File:Ranged icon.png|link=Ranged|Attack Ranged]]</label>
{{!}}{{ctr}}{{!}}[[File:Ranged-icon.png|20px|link=Ranged]]&nbsp;{{#if:{{{rangedcrit|}}}|{{#replace:{{{rangedcrit}}}|%|}}%|?{{mainonly|[[Category:Missing Ranged critical bonus]]}}}}
        <format>{{format eq stat|{{{arange}}} }}</format>
{{!}}{{ctr}}{{!}}[[File:Magic-icon.png|20px|link=Magic]]&nbsp;{{#if:{{{magiccrit|}}}|{{#replace:{{{magiccrit}}}|%|}}%|?{{mainonly|[[Category:Missing Magic critical bonus]]}}}}
    </data>
{{!}}-
   
}}
    <header>{{skill clickpic|Defence}}&nbsp;[[Defence|Defence bonus]]</header>
{{#if:{{{aspeed|}}}|{{#switch:{{lc:{{{aspeed|}}}}}|no=|!colspan{{=}}"3"{{!}}Attack speed
    <data source="dstab">
{{!}}-
        <label>[[File:White dagger.png|link=Stab|Defence Stab]]</label>
{{!}}colspan{{=}}"3" style{{=}}"text-align:center;"{{!}}{{#if:{{{aspeed|}}}|{{Attack speed bar|{{#switch:{{lc:{{{aspeed|}}}}}|fastest=fastest|fast=fast|average=average|{{{aspeed}}}}}}}|''Speed unknown <small>[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit]</small>''{{mainonly|[[Category:Missing attack speed]]}}}}
        <format>{{format eq stat|{{{dstab}}} }}</format>
{{!}}-
    </data>
}}|}}
    <data source="dslash">
!colspan="2" style="min-width:120px"|Class: {{#switch:{{lc:{{{class|}}}}}|melee=[[File:Attack_icon_highscores.png|link=Melee]]|ranged=[[File:Ranged_icon_highscores.png|link=Ranged]]|magic=[[File:Magic_icon_highscores.png|link=Magic]]|all=[[File:CombatSwords.png|All]]|{{#if:{{{class|}}}|{{{class}}}|''Unknown <small>[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit]</small>''}}}}
        <label>[[File:White scimitar.png|link=Slash|Defence Slash]]</label>
!rowspan="2" style="min-width:60px"|{{#switch:{{lc:{{{slot|}}}}}
        <format>{{format eq stat|{{{dslash}}} }}</format>
|head=[[File:Head slot.png|29px|link=Head slot]]{{mainonly|[[Category:Head slot items]]}}
    </data>
|ammo=[[File:Ammo slot.png|29px|link=Ammunition slot]]{{mainonly|[[Category:Ammunition slot items]]}}
    <data source="dcrush">
|neck=[[File:Neck slot.png|29px|link=Neck slot]]{{mainonly|[[Category:Neck slot items]]}}
        <label>[[File:White warhammer.png|link=Crush|Defence Crush]]</label>
|cape=[[File:Cape slot.png|29px|link=Cape slot]]{{mainonly|[[Category:Cape slot items]]}}
        <format>{{format eq stat|{{{dcrush}}} }}</format>
|weapon=[[File:Weapon slot.png|29px|link=Weapon slot]]{{mainonly|[[Category:Weapon slot items]]}}
    </data>
|2h=[[File:2h slot.png|29px|link=Two-handed slot]]{{mainonly|[[Category:Weapon slot items]][[Category:Two-handed slot items]]}}
    <data source="dmagic">
|body=[[File:Torso slot.png|29px|link=Body slot]]{{mainonly|[[Category:Body slot items]]}}
        <label>[[File:Magic icon.png|link=Magic|Defence Magic]]</label>
|shield=[[File:Shield slot.png|29px|link=Shield slot]]{{mainonly|[[Category:Shield slot items]]}}
        <format>{{format eq stat|{{{dmagic}}} }}</format>
|legs=[[File:Legs slot.png|29px|link=Legwear slot]]{{mainonly|[[Category:Legwear slot items]]}}
    </data>
|hands=[[File:Gloves slot.png|29px|link=Hands slot]]{{mainonly|[[Category:Hand slot items]]}}
    <data source="drange">
|feet=[[File:Boots slot.png|29px|link=Feet slot]]{{mainonly|[[Category:Feet slot items]]}}
        <label>[[File:Ranged icon.png|link=Ranged|Defence Ranged]]</label>
|ring=[[File:Ring slot.png|29px|link=Ring slot]]{{mainonly|[[Category:Rings]]}}
        <format>{{format eq stat|{{{drange}}} }}</format>
|aura=[[File:Aura slot.png|29px|link=Aura slot]]{{mainonly|[[Category:Auras]]}}
        </data>
|set=<!--empty on purpose-->
    <header>[[File:Melee.png|link=Equipment Stats]] Other bonuses</header>
|none=<!--empty on purpose-->
    <data source="str">
|#default=?{{mainonly|[[Category:Missing slot information]]}}
        <label>[[File:Strength icon.png|link=Strength|Strength]]</label>
}}
        <format>{{format eq stat|{{{str}}} }}</format>
|-
    </data>
|colspan="2" rowspan="1" {{ctr}} class="cioCompareLinkBeta"|<span style="font-size:smaller">Item compare not supported</span>
    <data source="rstr">
|}<span style="margin-top:-10px; font-size:xx-small; clear:left; float:left;">[[Template:Infobox Bonuses Beta|[view]]] &bull; [[Template talk:Infobox Bonuses Beta|[talk]]]</span></div>{{clear|left}}<noinclude>{{/doc}}[[Category:Infobox templates]]</noinclude>
        <label>[[File:Ranged Strength icon.png|link=Ranged Strength|Rnged Strength]]</label>
        <format>{{format eq stat|{{{rstr}}} }}</format>
    </data>
    <data source="mdmg">
        <label>[[File:Magic Damage icon.png|link=Magic|Magic Damage]]</label>
        <format>{{format eq stat|{{{mdmg}}}%}}</format>
    </data>
    <data source="prayer">
        <label>[[File:Prayer icon.png|link=Prayer|Prayer]]</label>
        <format>{{format eq stat|{{{prayer}}} }}</format>
    </data>
    <data layout="default" source="slot">
        <label>Slot</label>
        <format>{{#switch:{{lc:{{{slot|}}}}}
|head=[[File:Head slot.png|29px|link=Head slot|Head slot]]{{#invoke:HF|content|[[Category:Head slot items]]}}
|ammo=[[File:Ammo slot.png|29px|link=Ammunition slot|Ammunition slot]]{{#invoke:HF|content|[[Category:Ammunition slot items]]}}
|neck=[[File:Neck slot.png|29px|link=Neck slot|Neck slot]]{{#invoke:HF|content|[[Category:Neck slot items]]}}
|cape=[[File:Cape slot.png|29px|link=Cape slot|Cape slot]]{{#invoke:HF|content|[[Category:Cape slot items]]}}
|weapon=[[File:Weapon slot.png|29px|link=Weapon slot|Weapon slot]]{{#invoke:HF|content|[[Category:Weapon slot items]]}}
|2h=[[File:2h slot.png|29px|link=Two-handed slot|Two-handed slot]]{{#invoke:HF|content|[[Category:Two-handed slot items]]}}
|body=[[File:Torso slot.png|29px|link=Body slot|Body slot]]{{#invoke:HF|content|[[Category:Body slot items]]}}
|shield=[[File:Shield slot.png|29px|link=Shield slot|Shield slot]]{{#invoke:HF|content|[[Category:Shield slot items]]}}
|legs=[[File:Legs slot.png|29px|link=Leg slot|Leg slot]]{{#invoke:HF|content|[[Category:Leg slot items]]}}
|hands=[[File:Gloves slot.png|29px|link=Hand slot|Hand slot]]{{#invoke:HF|content|[[Category:Hand slot items]]}}
|feet=[[File:Boots slot.png|29px|link=Feet slot|Feet slot]]{{#invoke:HF|content|[[Category:Feet slot items]]}}
|ring=[[File:Ring slot.png|29px|link=Ring slot|Ring slot]]{{#invoke:HF|content|[[Category:Ring slot items]]}}
|set=
|none=
}}[[{{{slot}}} slot table|List]]</format>
    </data>
    <data name="attackspeed" source="aspeed" span="5">
        <label>[[Attack speed]]</label>
        <format>{{#ifeq:{{lc:{{{aspeed|}}}}}|no||{{#ifeq:{{#switch:{{lc:{{{slot|}}}}}|weapon=1|2h=1|0}}|1|
{{Speed Bar|{{{aspeed}}}}}}}}}</format>
        <default>{{#ifeq:{{#switch:{{lc:{{{slot|}}}}}|weapon=1|2h=1|0}}|1|''{{Unknown_Attack_Speed}}'' {{#invoke:HF|content|[[Category:Missing attack speed]]}}}}</default>
        </data>
</group>
</infobox><includeonly>{{#ifexpr: ({{#if:{{{astab|}}}|0|1}} + {{#if:{{{aslash|}}}|0|1}} + {{#if:{{{acrush|}}}|0|1}} + {{#if:{{{amagic|}}}|0|1}} + {{#if:{{{arange|}}}|0|1}} + {{#if:{{{dstab|}}}|0|1}} + {{#if:{{{dslash|}}}|0|1}} + {{#if:{{{dcrush|}}}|0|1}} + {{#if:{{{dmagic|}}}|0|1}} + {{#if:{{{drange|}}}|0|1}} + {{#if:{{{str|}}}|0|1}} + {{#if:{{{rstr|}}}|0|1}} + {{#if:{{{mdmg|}}}|0|1}} + {{#if:{{{prayer|}}}|0|1}} + {{#if:{{{slot|}}}|0|1}})=0||{{#invoke:HF|content|[[Category:Incomplete bonuses]]}}}}</includeonly><noinclude>{{/doc}}[[Category:Infobox templates|Bonuses]]</noinclude>

Revision as of 05:57, 23 January 2024

<infobox type="bonuses">

   <title><default>Bonuses</default></title>

<image source="image"><format>

</format>

</image>

   
       <format></format>

<default>Script error: No such module "HF".</default>

   

<group row-items="5"> <header> Attack bonus</header>

   	
   	    <label>Attack Stab</label>

<format>Template:Format eq stat</format>

   	
   	    <label>Attack Slash</label>

<format>Template:Format eq stat</format>

   	
   	
   	    <label>Attack Crush</label>

<format>Template:Format eq stat</format>

   	
   	
       	<label>Attack Magic</label>

<format>Template:Format eq stat</format>

   	
   	
   	    <label>Attack Ranged</label>

<format>Template:Format eq stat</format>

   	
   	

<header> Defence bonus</header>

   	
   	    <label>Defence Stab</label>

<format>Template:Format eq stat</format>

   	
   	
   	    <label>Defence Slash</label>

<format>Template:Format eq stat</format>

   	
   	
   	    <label>Defence Crush</label>

<format>Template:Format eq stat</format>

   	
   	
   	    <label>Defence Magic</label>

<format>Template:Format eq stat</format>

   	
   	
   	    <label>Defence Ranged</label>

<format>Template:Format eq stat</format>

       
   	<header>File:Melee.png Other bonuses</header>
   	
   	    <label>Strength</label>
   	    <format>Template:Format eq stat</format>
   	
   	
   	    <label>Rnged Strength</label>
   	    <format>Template:Format eq stat</format>
   	
   	
   	    <label>Magic Damage</label>
   	    <format>Template:Format eq stat</format>
   	
   	
   	    <label>Prayer</label>
   	    <format>Template:Format eq stat</format>
   	
   	
   	    <label>Slot</label>
   	    <format>[[{{{slot}}} slot table|List]]</format>
   	
   	 

<label>Attack speed</label> <format></format> <default></default>

       

</group>

</infobox>

[view] [edit] [purge] Template documentation

This documentation is transcluded from Template:Infobox Bonuses/doc.
{{Infobox Bonuses Beta
| slot       = Which slot(s) the item occupies? Options:Head/Ammo/Neck/Cape/Weapon/2h/Body/Shield/Legs/Hands/Feet/Ring/Aura
| mainDamage = The damage caused by a mainhand weapon. Type N/A if not available.
| mainAccuracy   = The accuracy of a mainhand weapon. Type N/A if not available.
| maintype  = The style/type of the weapon, e.g. Slashing for whip. Type N/A if not available.
| offDamage  = The damage caused by an offhand weapon. Type N/A if not available.
| offAccuracy   = The accuracy of an offhand weapon. Type N/A if not available.
| offType   = The style/type of the weapon, e.g. Slashing for whip. Type N/A if not available.
| defence    = The armour rating of a piece of armour.
| life       = The amount of life points boosted by the equipment.
| prayer     = The prayer bonus given by the equipment.
| aspeed     = Attack speed of the main or offhand weapon. DELETE THIS LINE for armour. Options:Average/Fast/Fastest
| class      = The class of the equipment. Type N/A if there is no class. Options:Melee/Magic/Ranged/All
| meleecrit  = The critical bonus given to a melee weapon and armour.
| rangedcrit = The critical bonus given to a ranged weapon and armour.
| magiccrit  = The critical bonus given to a magic weapon and armour.
| style      = Extra styling.
}}

Empty template

{{Infobox Bonuses Beta
| slot         = 
| mainDamage   = 
| mainAccuracy = 
| mainType     = 
| offDamage    = 
| offAccuracy  = 
| offType      = 
| defence      = 
| life         = 
| prayer       = 
| aspeed       = 
| class        = 
| meleecrit    = 
| rangedcrit   = 
| magiccrit    = 
| style        = 
| image        = 
| caption      = 
}}