Module:InfoboxSpell

local p = {} local infobox = require("Module:Infobox") local utilsCode = require("Module:UtilsCode") local utilsString = require("Module:UtilsString")

local FIELDS = {{parameter = "class", content = "", caption = "Class", type = "inline"}, {parameter = "unlock_level", content = "", caption = "Unlock level", type = "inline"} }

function p._Main(frame) local args = frame:getParent.args return p.Main(args) end

function p.Main(args) local fields = FIELDS -- Setting image local image = "" for key, field in ipairs(fields) do		if field["parameter"] == "class" then field["content"] = "" .. args["class"] .. "" else field["content"] = args[field["parameter"]] end end return infobox.CreateInfobox(args["name"], {content = image, caption = args["caption"]}, fields) end

return p