Module:MutationValue

local p = {}

function p.main(frame) local args = require("Module:Arguments").getArgs(frame) local base = args['base'] local eqt = args['equation'] local tmp = args['cap'] local unit = args['unit'] local r = args['round'] if not tmp then tmp = 999999 end cap = math.min(40, tonumber(tmp)) base = tonumber(base) result = {} result[1] = ' ' result[2] = '{| class=wikitable style="text-align:center;'	result[3] = '!Number of stats'	result[4] = '|-'	result[5] = '|Mutation effect'	result[6] = '|}'	result[7] = ' '	if not r then r = 1 end	local equation = ''	for k = 0, cap-1 do		result[3] = result[3] .. '|| ' .. tostring(k+1)		equation = eqt:gsub('base', base):gsub('i', k) .. ' round ' .. r		result[5] = result[5] .. '|| ' .. frame:callParserFunction{ name = '#expr', args = equation } .. unit	end	result[3] = result[3] .. '|| ...'	result[5] = result[5] .. '|| ...'	return table.concat(result, "\n") end

return p