Module:SynergyCharts

local util_args = require('Module:ArgsUtil') local util_vars = require('Module:VarsUtil') local i18n = require('Module:i18nUtil')

local h = {}

local p = {} function p.main(frame) i18n.init('SynergyCharts') return h.makeOutput end

function h.makeOutput local output = mw.html.create h.printSection(output, 'Class') h.printSection(output, 'Origin') return output end

function h.printSection(output, sectionType) output:tag('h3') :wikitext(i18n.default('heading' .. sectionType)) h.printTable(output, sectionType, util_vars.getObject('Champion' .. sectionType)) end

function h.printTable(output, sectionType, var) for _, v in ipairs(var) do		output:wikitext(h.getTemplate(sectionType, v)) end end

function h.getTemplate(sectionType, v)	return mw.getCurrentFrame:expandTemplate{ title = ('Champion%sQuery'):format(sectionType), args = { v, full = 'no' }, } end

return p