Module:BattleTeam

From Cassette Beasts
Revision as of 00:12, 11 September 2026 by Solari (talk | contribs)

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')
		local cell = row:tag('td')
			:attr('align', 'center')
			:addClass('battle_move_link')
			:wikitext(frame:callParserFunction('#invoke', 'Database', 'get_link', move))
			:allDone()
		
		table.insert(result, tostring(cell))
	end
	
	return table.concat(result)
end

return p