Module:WeaponDPS: Difference between revisions

No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 12: Line 12:
     if not ticks then return "No speed" end
     if not ticks then return "No speed" end


     local effectiveStr = str + (acc / 8)
     local effectiveStr = str + acc
     local maxHit = effectiveStr / 8
     local maxHit = effectiveStr / 14
     local seconds = ticks * 0.6
     local seconds = ticks * 0.6
     local dps = maxHit / seconds
     local dps = maxHit / seconds


     return '<abbr title="Estimated damage per second">' .. string.format('%.2f', (dps * 1)) .. '</abbr>'
     return '<abbr title="Theoretical damage per second">' .. string.format('%.2f', dps) .. '</abbr>'
end
end


return p
return p