Module:MaximumStats

local p = {} function p.gettable local monsterdata = mw.loadData("Module:MonsterData") local monsterdata_ = {} for _, v in pairs(monsterdata) do table.insert(monsterdata_, v) end table.sort(monsterdata_, function(v1,v2) return tonumber(v1.monsterid) < tonumber(v2.monsterid) end) attr_ids = { ["1"] = "Water", ["2"] = "Fire", ["3"] = "Earth", ["4"] = "Light", ["5"] = "Dark", ["6"] = "Heart" }   race_ids = { ["1"] = "Human", ["2"] = "Beast", ["3"] = "Elf", ["4"] = "Dragon", ["5"] = "God", ["6"] = "EvolveElements", ["7"] = "LevelUpElements", ["8"] = "Demon", ["10"] = "Machina" }   table = mw.html.create("table") :addClass("wikitable sortable") :attr("border", "0") :tag("tr") :tag("th"):attr("scope", "col"):wikitext("#"):done :tag("th"):attr("scope", "col"):wikitext("Card Name"):done :tag("th"):attr("scope", "col"):wikitext("★"):done :tag("th"):attr("scope", "col"):wikitext("Attr"):done :tag("th"):attr("scope", "col"):wikitext("Race"):done :tag("th"):attr("scope", "col"):wikitext("Lvl Max"):done :tag("th"):attr("scope", "col"):wikitext("Exp Tier"):done :tag("th"):attr("scope", "col"):wikitext("Exp Max"):done :tag("th"):attr("scope", "col"):wikitext("HP Max"):done :tag("th"):attr("scope", "col"):wikitext("ATK Max"):done :tag("th"):attr("scope", "col"):wikitext("RCR Max"):done :tag("th"):attr("scope", "col"):wikitext("Total Max"):done :done row = table:tag("tr") for _, data in ipairs(monsterdata_) do       row = table:tag("tr") :tag("td"):wikitext(data.monsterid):done :tag("td"):wikitext("" .. data.name .. ""):done :tag("td"):wikitext(data.star):done :tag("td"):wikitext(attr_ids[data.attribute]):done :tag("td"):wikitext(race_ids[data.racialtype]):done :tag("td"):wikitext(data.lvl_max):done :tag("td"):wikitext(data.exp_tier):done :tag("td"):wikitext(data.exp_max):done :tag("td"):wikitext(data.hp_max):done :tag("td"):wikitext(data.att_max):done :tag("td"):wikitext(data.rec_max):done :tag("td"):wikitext(data.hp_max + data.att_max + data.rec_max):done :done end return tostring(table) end

return p