Module:WeaponDPS: Difference between revisions

No edit summary
Tags: Manual revert Reverted
No edit summary
Tag: Reverted
Line 2: Line 2:


function p.dps(frame)
function p.dps(frame)
     local args = frame.args
     local args = frame:getParent():getParent().args
    local parent = frame:getParent()


     local str = tonumber(args.Strength or parent.args.Strength)
     local str = tonumber(args.Strength or args.Magic or args.Range)
        or tonumber(args.Magic or parent.args.Magic)
    local ticks = tonumber(args.Ticks)
        or tonumber(args.Range or parent.args.Range)


    local ticks = tonumber(args.Ticks or parent.args.Ticks)
     if not str or not ticks or ticks == 0 then
 
        return ""
     if not str then return "No STR" end
     end
     if not ticks then return "No ticks" end


     local maxHit = str / 8
     local maxHit = str / 8