Module:AttackBox

local module = {}

local function getVals(args, name, cols) local vals = {} local val = args[name] if val and #val > 0 then local pos = 1 for start, stop in string.gmatch(val, ';%s*') do        vals[#vals+1] = string.sub(val, pos, start - 1) pos = stop end vals[#vals+1] = string.sub(val, pos) elseif cols then for i = 1, cols do        vals[i] = args[name .. i]     end else for i = 1, math.huge do        val = args[name .. i]        if not val then break end vals[i] = val end end return vals end

function module.player(frame) local args = frame.args if args.parent then args = frame:getParent.args end

local power = getVals(args, 'power') if #power == 0 then power = { 0, 5, 10, 15, 20, 25 } end

out[#out+1] = '|-\n'; for p = 1, #power do     out[#out+1] = sprintf('| %d\n', power[p]) end

local out = { '{| class="player ranks"\n' } out[#out+1] = '|}' return table.concat(out) end

return module