Template:Infobox Bonuses: Difference between revisions

From Darkan
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<infobox type="bonuses">
{| class="wikitable smallpadding" {{#if:{{{style|}}}|style="{{{style}}}"}}
    <title><default>[[Equipment Stats|Bonuses]]</default></title>
|+ [[Equipment Stats|Bonuses]]
<image source="image"><format>{{#switch:{{{image}}}
!colspan="12" align="center" width="180"|<small>Hover over image for type</small>
{{#if:{{{image|}}}|{{#switch:{{{image}}}
|no=  
|no=  
|needed=
|needed={{!}}rowspan="{{#ifeq:{{lc:{{{aspeed|}}}}}|no|14|{{#switch:{{lc:{{{slot|}}}}}|weapon=15|2h=15|14}}}}" width="125" align="center" valign="center"{{!}}[[Special:Upload|<big>'''Please upload an image!'''</big>]]
|#default={{#tag:gallery|
|#default={{!}}rowspan="{{#ifeq:{{lc:{{{aspeed}}}}}|no|14|{{#switch:{{lc:{{{slot|}}}}}|weapon=15|2h=15|14}}}}" width="125" align="center" valign="center"{{!}}[[File:{{rmv|File:|{{{image}}}}}{{#if:{{{caption|}}}|{{!}}{{{caption}}}}}]]{{#if:{{{caption|}}}|<br /><small>{{{caption}}}</small>}}{{#if:{{{image2|}}}|{{!}}{{!}}rowspan="{{#switch:{{lc:{{{slot|}}}}}|weapon=15|2h=15|14}}" width="125" align="center" valign="center"{{!}}[[File:{{rmv|File:|{{{image2}}}}}{{#if:{{{caption2|}}}|{{!}}{{{caption2}}}}}]]{{#if:{{{caption2|}}}|<br /><small>{{{caption2}}}</small>}}}}
{{#invoke:HF|stripFileWrapper|{{{image}}}}}|{{{caption|}}}
}}|}}
{{#invoke:HF|stripFileWrapper|{{{image2}}}}}|{{{caption2|}}}
|-
}}}}</format>
!colspan="5" align="center"|{{skill clickpic|Attack}}&nbsp;[[Attack|Attack bonus]]
</image>
|-
    <data source="image" name="needs-image">
!width="35" align="center"|[[File:White dagger.png|link=Stab]]
        <format>{{#ifeq:{{{image|}}}|needed|{{#invoke:HF|content|[[Special:Upload|Please add an image!]][[Category:Needs image]]}}}}</format>
!width="35" align="center"|[[File:White scimitar.png|link=Slash]]
    <default>{{#if:{{{image|}}}||{{#invoke:HF|content|[[Special:Upload|Please add an image!]][[Category:Needs image]]}}}}</default>
!width="35" align="center"|[[File:White warhammer.png|link=Crush]]
    </data>
!width="35" align="center"|[[File:Magic-icon.png|link=Magic]]
<group row-items="5">
!width="35" align="center"|[[File:Ranged-icon.png|link=Ranged]]
    <header>{{skill clickpic|Attack}}&nbsp;[[Attack|Attack bonus]]</header>
|-
    <data source="astab">
|width="35" align="center"|{{#if:{{{astab|}}}|{{{astab}}}|?}}
        <label>[[File:White dagger.png|link=Stab|Attack Stab]]</label>
|width="35" align="center"|{{#if:{{{aslash|}}}|{{{aslash}}}|?}}
        <format>{{format eq stat|{{{astab}}} }}</format>
|width="35" align="center"|{{#if:{{{acrush|}}}|{{{acrush}}}|?}}
    </data>
|width="35" align="center"|{{#if:{{{amagic|}}}|{{{amagic}}}|?}}
    <data source="aslash">
|width="35" align="center"|{{#if:{{{arange|}}}|{{{arange}}}|?}}
        <label>[[File:White scimitar.png|link=Slash|Attack Slash]]</label>
|-
        <format>{{format eq stat|{{{aslash}}} }}</format>
!colspan="5" align="center"|{{skill clickpic|Defence}}&nbsp;[[Defence|Defence bonus]]
    </data>
|-
    <data source="acrush">
!width="35" align="center"|[[File:White dagger.png|link=Stab]]
        <label>[[File:White warhammer.png|link=Crush|Attack Crush]]</label>
!width="35" align="center"|[[File:White scimitar.png|link=Slash]]
        <format>{{format eq stat|{{{acrush}}} }}</format>
!width="35" align="center"|[[File:White warhammer.png|link=Crush]]
    </data>
!width="35" align="center"|[[File:Magic-icon.png|link=Magic]]
    <data source="amagic">
!width="35" align="center"|[[File:Ranged-icon.png|link=Ranged]]
        <label>[[File:Magic icon.png|link=Magic|Attack Magic]]</label>
|-
        <format>{{format eq stat|{{{amagic}}} }}</format>
|width="35" align="center"|{{#if:{{{dstab|}}}|{{{dstab}}}|?}}
    </data>
|width="35" align="center"|{{#if:{{{dslash|}}}|{{{dslash}}}|?}}
    <data source="arange">
|width="35" align="center"|{{#if:{{{dcrush|}}}|{{{dcrush}}}|?}}
        <label>[[File:Ranged icon.png|link=Ranged|Attack Ranged]]</label>
|width="35" align="center"|{{#if:{{{dmagic|}}}|{{{dmagic}}}|?}}
        <format>{{format eq stat|{{{arange}}} }}</format>
|width="35" align="center"|{{#if:{{{drange|}}}|{{{drange}}}|?}}
    </data>
|-
   
!colspan="4" align="center"|Other bonuses
    <header>{{skill clickpic|Defence}}&nbsp;[[Defence|Defence bonus]]</header>
!Slot
    <data source="dstab">
|-
        <label>[[File:White dagger.png|link=Stab|Defence Stab]]</label>
!width="35" align="center"|[[File:Strength-icon.png|link=Strength]]
        <format>{{format eq stat|{{{dstab}}} }}</format>
!width="35" align="center"|[[File:RangedStrength-icon.png|link=Ranged Strength]]
    </data>
!width="35" align="center"|[[File:MagicDamage-icon.png|link=Magic]]
    <data source="dslash">
!width="35" align="center"|[[File:Prayer-icon.png|link=Prayer]]
        <label>[[File:White scimitar.png|link=Slash|Defence Slash]]</label>
!rowspan="2" width="35" align="center"|
        <format>{{format eq stat|{{{dslash}}} }}</format>
{{#switch:{{lc:{{{slot|}}}}}
    </data>
|head=[[File:Head slot.png|29px|link=Head slot]]{{mainonly|[[Category:Head slot items]]}}
    <data source="dcrush">
|ammo=[[File:Ammo slot.png|29px|link=Ammunition slot]]{{mainonly|[[Category:Ammunition slot items]]}}
        <label>[[File:White warhammer.png|link=Crush|Defence Crush]]</label>
|neck=[[File:Neck slot.png|29px|link=Neck slot]]{{mainonly|[[Category:Neck slot items]]}}
        <format>{{format eq stat|{{{dcrush}}} }}</format>
|cape=[[File:Cape slot.png|29px|link=Cape slot]]{{mainonly|[[Category:Cape slot items]]}}
    </data>
|weapon=[[File:Weapon slot.png|29px|link=Weapon slot]]{{mainonly|[[Category:Weapon slot items]]}}
    <data source="dmagic">
|2h=[[File:2h slot.png|29px|link=Two-handed slot]]{{mainonly|[[Category:Two-handed slot items]]}}
        <label>[[File:Magic icon.png|link=Magic|Defence Magic]]</label>
|body=[[File:Torso slot.png|29px|link=Body slot]]{{mainonly|[[Category:Body slot items]]}}
        <format>{{format eq stat|{{{dmagic}}} }}</format>
|shield=[[File:Shield slot.png|29px|link=Shield slot]]{{mainonly|[[Category:Shield slot items]]}}
    </data>
|legs=[[File:Legs slot.png|29px|link=Legwear slot]]{{mainonly|[[Category:Legwear slot items]]}}
    <data source="drange">
|hands=[[File:Gloves slot.png|29px|link=Hands slot]]{{mainonly|[[Category:Hands slot items]]}}
        <label>[[File:Ranged icon.png|link=Ranged|Defence Ranged]]</label>
|feet=[[File:Boots slot.png|29px|link=Feet slot]]{{mainonly|[[Category:Feet slot items]]}}
        <format>{{format eq stat|{{{drange}}} }}</format>
|ring=[[File:Ring slot.png|29px|link=Ring slot]]{{mainonly|[[Category:Ring slot items]]}}
        </data>
|set= <!--empty on purpose-->
    <header>[[File:Melee.png|link=Equipment Stats]] Other bonuses</header>
|none= <!--empty on purpose-->
    <data source="str">
|#default=?
        <label>[[File:Strength icon.png|link=Strength|Strength]]</label>
}}
        <format>{{format eq stat|{{{str}}} }}</format>
|-
    </data>
|width="30" align="center"|{{#if:{{{str|}}}|{{{str}}}|?}}
    <data source="rstr">
|width="30" align="center"|{{#if:{{{rstr|}}}|{{{rstr}}}|0}}
        <label>[[File:Ranged Strength icon.png|link=Ranged Strength|Rnged Strength]]</label>
|width="30" align="center"|{{#if:{{{mdmg|}}}|{{{mdmg}}}%|0%}}
        <format>{{format eq stat|{{{rstr}}} }}</format>
|width="30" align="center"|{{#if:{{{prayer|}}}|{{{prayer}}}|?}}
    </data>
{{#ifeq:{{lc:{{{aspeed|}}}}}|no||{{#ifeq:{{#switch:{{lc:{{{slot|}}}}}|weapon=1|2h=1|0}}|1|
    <data source="mdmg">
{{!}}-
        <label>[[File:Magic Damage icon.png|link=Magic|Magic Damage]]</label>
!colspan="5" height="55px" align="center"{{!}}{{#if:{{{aspeed|}}}|{{Speed Bar|{{{aspeed}}}}}|''{{Unknown_Attack_Speed}}'' {{mainonly|[[Category:Missing attack speed]]}}}}
        <format>{{format eq stat|{{{mdmg}}}%}}</format>
}}}}
    </data>
|}<includeonly>
    <data source="prayer">
{{#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}})=0||[[Category:Incomplete bonuses]]}}</includeonly>
        <label>[[File:Prayer icon.png|link=Prayer|Prayer]]</label>
<noinclude>{{/doc}}[[Category:Infobox templates|Bonuses]]</noinclude>
        <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:58, 23 January 2024

Bonuses
Hover over image for type
 Attack bonus
? ? ? ? ?
 Defence bonus
? ? ? ? ?
Other bonuses Slot

?

? 0 0% ?

[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      = 
}}