Module:BattleTeam

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

Documentation for this module may be created at Module:BattleTeam/doc

local p = {}
local get_move_link = require('Module:Database').get_link

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(get_move_link(move))
			:allDone()
		
		table.insert(result, tostring(cell))
	end
	
	return table.concat(result)
end

return p