Module:WeaponDPS: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 14: | Line 14: | ||
local seconds = ticks * 0.6 | local seconds = ticks * 0.6 | ||
local dps = maxHit / seconds | local dps = maxHit / seconds | ||
return "STR=" .. tostring(args.Strength or args.strength) .. " Ticks=" .. tostring(args.Ticks or args.ticks) | |||
return | |||
end | end | ||
return p | return p |
Revision as of 12:54, 8 June 2025
Documentation for this module may be created at Module:WeaponDPS/doc
local p = {}
function p.dps(frame)
local args = frame:getParent().args
local str = tonumber(args.Strength or args.strength or args.Magic or args.magic or args.Range or args.range)
local ticks = tonumber(args.Ticks or args.ticks)
if not str or not ticks or ticks == 0 then
return ""
end
local maxHit = str / 8
local seconds = ticks * 0.6
local dps = maxHit / seconds
return "STR=" .. tostring(args.Strength or args.strength) .. " Ticks=" .. tostring(args.Ticks or args.ticks)
end
return p