Bureaucrats, Interface administrators, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Suppressors, Administrators
3,322
edits
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 | // If we have set attack speed and damage, set the DPS variable | ||
-->{{#if:{{#show:{{FULLPAGENAME}}|?Damage=}}|{{# | -->{{#if:{{#show:{{FULLPAGENAME}}|?Damage=}}|{{#vardefine:$DPS|{{#expr:{{#show:{{FULLPAGENAME}}|?Damage=}} * {{#var:$attackspeed}}}}}}}}<!-- | ||
// If dpsmodifier is given, multiply the | // 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|}}}|{{# | -->{{#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 /> |