Bureaucrats, Interface administrators, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Suppressors, Administrators
3,322
edits
No edit summary |
No edit summary |
||
Line 64: | Line 64: | ||
{{!}}- | {{!}}- | ||
{{!}} 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}}}} | ||
}}<nowiki /> | |||
-->{{# | {{#if:{{#show:{{FULLPAGENAME}}|?Damage=}}|<!-- | ||
-->{{#vardefine:$damage|{{formatnum:{{#show:{{FULLPAGENAME}}|?Damage=}}|R}}}}<!-- | |||
// Define attack speed based on attackspeed stat | |||
-->{{#vardefine:$attackspeed|{{formatnum:{{#show:{{FULLPAGENAME}}|?Attackspeed=}}|R}}}}<!-- | |||
// If no attackspeed is defined, set it to 1 | |||
-->{{#if:{{#var:$attackspeed}}||{{#vardefine:$attackspeed|1}}}}<!-- | |||
// Set the DPS variable | |||
-->{{#vardefine:$DPS|{{#expr:{{#var:$damage}} * {{#var:$attackspeed}}}}}}<!-- | |||
// 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 is given, multiply the current DPS (default 1 if not set) with the modifier and set the DPS variable to that | ||
-->{{#if:{{{dpsmodifier|}}}|{{#vardefine:$DPS|{{#expr:{{#var:$DPS|1}} * {{{dpsmodifier|}}}}}}}}}<!-- | -->{{#if:{{{dpsmodifier|}}}|{{#vardefine:$DPS|{{#expr:{{#var:$DPS|1}} * {{{dpsmodifier|}}}}}}}}}<!-- |