Module:CharGrowth

--This module is invoked by Template:CharGrowth

local p = {} local getArgs = require('Module:Arguments').getArgs local getColor = require('Module:Color').colorByGame local common = require('Module:Common') local cols = { -- growth stats hp =     '\n!HP', str =    '\n!Str', mag =    '\n!Mag', sm = '\n!S/M', skl =    '\n!Skl', spd =    '\n!Spd', agl = '\n!Agl', lck =    '\n!Lck', def =    '\n!Def', res =    '\n!Res', con =    '\n!Con', bld = '\n!Bld', wlv =    '\n!Wlv', mov =    '\n!Mov', }

function p.main(frame) args = getArgs(frame) return p._main(args) end

function p._main(args) local out, game, color, class, columns if(common.check(args.game)) then color, class = ,  else game = string.lower(args.game) color = getColor[game] class = common.colorLinks(game) end

if(game == 'fe1' or game == 'fe3') then columns = cols.hp.. cols.str.. cols.skl.. cols.spd.. cols.lck.. cols.wlv.. cols.def.. cols.res elseif(game == 'fe2') then columns = cols.hp.. cols.str.. cols.skl.. cols.spd.. cols.lck.. cols.def.. cols.res elseif(game == 'fe5') then columns = cols.hp.. cols.str.. cols.mag.. cols.skl.. cols.spd.. cols.lck.. cols.def.. cols.bld.. cols.mov elseif(game == 'fe6' or game == 'fe7' or game == 'fe8') then columns = cols.hp.. cols.sm.. cols.skl.. cols.spd.. cols.lck.. cols.def.. cols.res elseif(game == 'ts') then columns = cols.hp.. cols.str.. cols.mag.. cols.skl.. cols.agl.. cols.lck.. cols.wlv.. cols.def.. cols.mov else columns = cols.hp.. cols.str.. cols.mag.. cols.skl.. cols.spd.. cols.lck.. cols.def.. cols.res end

out = '{|class="statbox"'.. '\n|-bgcolor='..color..' class='..class.. columns.. '\n|-class="s-cells"' return out end

return p --