Module:Pie

local p = {} function p.main(frame)

local args = require('Module:ProcessArgs').merge(true)

local output = "" local first if args.first == "Base" then first = 0 else first = args.first end local counter, splTotal, rdTotal = 0, 0, 0 for i=0,args.last do		local splCost = math.floor(args.splBase * (args.splInc ^ counter)) splTotal = splTotal + splCost local rdMinutes = (string.sub(args.rdBase,0,3) * 60) + string.sub(args.rdBase,5,7) + (args.rdInc * counter) rdTotal = rdTotal + rdMinutes output = output .. "Level " .. i .. " " ..   		"Required " .. args.requiredAttribute .. math.floor(args.requiredBase * (args.requiredInc ^ counter)) .. " " ..   		"" .. args.statType .. " " .. math.floor(args.statBase * (args.statInc ^ counter)) .. " " ..   		"Durability " .. math.floor(args.durabilityBase * (args.durabilityInc ^ counter)) .. " " ..			"SPL Cost " .. splCost .. " " ..			"R&D Time " .. formatTime(rdMinutes) .. " "   	counter = counter + 1 end

--return "" .. frame:extensionTag("tabber", output) .. " "   return " " .. output .. " " end

function formatTime(minutes) return string.format("%03d:%03d", math.floor(minutes / 60), math.fmod(minutes,60)) end

return p