Module:BattleTeam
From Cassette Beasts
Documentation for this module may be created at Module:BattleTeam/doc
local p = {}
function p.get_moves(frame)
local move_list = mw.text.split(frame.args[1], ",", true)
local result = {}
for _, move in ipairs(move_list) do
local row = mw.html.create('tr')
:attr('align', 'center')
local cell = row:tag('td')
:addClass(frame:callParserFunction('#invoke', 'Database', 'get_move', move, 'elemental_type') .. "_type")
:cssText('display: inline-block; line-height: 1.1em; background-repeat: no-repeat; background-position: calc(0% - 0.21em) center; background-size: 1.65em; padding-left: 1.75em; background-color: transparent;')
:wikitext(frame:callParserFunction('#invoke', 'Database', 'get_link', 'move', move))
:allDone()
table.insert(result, tostring(cell))
end
return table.concat(result)
end
return p
