Template:Infobox item: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 61: Line 61:
{{#if:{{{attackspeed|}}} |<!--
{{#if:{{{attackspeed|}}} |<!--
   // We define the attack speed based on attacks per second
   // We define the attack speed based on attacks per second
   -->{{#vardefine:$attackspeed|{{#expr:1000 / {{{attackspeed}}}}}}}<nowiki />
   -->{{#vardefine:$attackspeed|{{#expr:(1000 / {{{attackspeed}}}) round 2}}}}<nowiki />
   {{!}}-
   {{!}}-
   {{!}} class="infobox-section" {{!}} Attack speed:
   {{!}} class="infobox-section" {{!}} Attack speed:
   {{!}} class="infobox-detail" {{!}} <span title="Attacks per second ({{{attackspeed}}} ms)">{{#expr:{{#var:$attackspeed}} round 2}}</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 too
-->{{#if:{{#show:{{FULLPAGENAME}}|?Damage=}}|{{#set:DPS={{#expr:{{#show:{{FULLPAGENAME}}|?Damage=}} * {{#var:$attackspeed}}}}}}}}<nowiki />
-->{{#if:{{#show:{{FULLPAGENAME}}|?Damage=}}|{{#set:DPS={{#expr:{{#show:{{FULLPAGENAME}}|?Damage=}} * {{#var:$attackspeed}}}}}}}}<nowiki />

Navigation menu