Module:Talents

local p = {} local get_args = require('Module:Arguments').getArgs

local i18n = { talents_article = 'Talents', table_title = 'Hero Talents', }

function p.main(frame) local args = get_args(frame, {   wrappers = {      'Template:Talents'    }  }) local talents = mw.html.create('table') :addClass('wikitable') :css('text-align', 'center') :css('margin-right', '15px') -- Add the table header. :tag('tr') :tag('th') :attr('colspan', 3) :css('height', '40px') :css('background-color', '#0C2A5A') :wikitext(string.format(' %s ', i18n.talents_article, i18n.table_title)) :done :done :newline

for i=4,1,-1 do   talents :tag('tr') :tag('td') :css('width', '240px') :wikitext(frame:expandTemplate({ title = 'Talent class', args = { args['t'..i..'left'], args['v'..i..'left'] }})) :done :tag('th') :css('padding', '10px') :css('background-color', string.format('hsl(217, 76%%, %i%%)', 60-10*i)) :css('font-size', '13pt') :css('color', 'white') :wikitext(5+5*i) :done :tag('td') :css('width', '240px') :wikitext(frame:expandTemplate({ title = 'Talent class', args = { args['t'..i..'right'], args['v'..i..'right'] }})) :done :done :newline end

return talents end

return p