Template:Infobox item: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 65: Line 65:
   {{!}} class="infobox-section" {{!}} Attack speed:
   {{!}} class="infobox-section" {{!}} Attack speed:
   {{!}} class="infobox-detail" {{!}} <span title="Attacks per second ({{{attackspeed}}} ms)">{{#var:$attackspeed}}</span> {{#set:Attackspeed={{#var:$attackspeed}}}}<!--
   {{!}} class="infobox-detail" {{!}} <span title="Attacks per second ({{{attackspeed}}} ms)">{{#var:$attackspeed}}</span> {{#set:Attackspeed={{#var:$attackspeed}}}}<!--
// If we have set attack speed and damage, set the DPS too
// If we have set attack speed and damage, set the DPS variable
-->{{#if:{{#show:{{FULLPAGENAME}}|?Damage=}}|{{#set:DPS={{#expr:{{#show:{{FULLPAGENAME}}|?Damage=}} * {{#var:$attackspeed}}}}}}}}<!--
-->{{#if:{{#show:{{FULLPAGENAME}}|?Damage=}}|{{#vardefine:$DPS|{{#expr:{{#show:{{FULLPAGENAME}}|?Damage=}} * {{#var:$attackspeed}}}}}}}}<!--
// If dpsmodifier is given, multiply the dps
// If dpsmodifier is given, multiply the current DPS (default 1 if not set) with the modifier and set the DPS variable to that
-->{{#if:{{{dpsmodifier|}}}|{{#set:DPS={{#expr:{{#show:{{FULLPAGENAME}}|?DPS=|default=1}} * {{{dpsmodifier|}}}}}}}}}<nowiki />
-->{{#if:{{{dpsmodifier|}}}|{{#vardefine:$DPS={{#expr:{{#var:$DPS|1}} * {{{dpsmodifier|}}}}}}}}}<!--
// Finally, if the DPS variable exists, set the DPS property
-->{{#varexists:$DPS|{{#set:DPS={{#var:$DPS}}}}}}<nowiki />
}}<nowiki />
}}<nowiki />
{{#if:{{{attackcooldown|}}} |<nowiki />
{{#if:{{{attackcooldown|}}} |<nowiki />

Navigation menu