此模块的文档可以在模块:Hearthstone/doc创建

local p = {}
local getArgs = require('Module:Arguments').getArgs
local enum_type = require('Module:Query/data ').type
local enum_class = require('Module:Query/data ').class
local enum_set = require('Module:Query/data ').set
local enum_rarity = require('Module:Query/data ').rarity
local enum_race = require('Module:Query/data ').race
-------------------------------------------------------
function p._getAllSet(frame)
	local res = ''
	local pipeline = {
	  {["$match"] = 
		{	['main_category'] = 'card_data',
			['set'] = { ['$exists'] = true }
		}},
	-------------------------------------------------------------------
	  {	["$group"] = {                                                           
		    ['_id'] = '$set',                                    
		    ['count'] = {['$sum'] = 1},
		}}
	} 
	local data = mw.huiji.db.aggregate(pipeline)
	return mw.dumpObject(data)
end
-------------------------------------------------------
function p._getAllRace(frame)
	local res = ''
	local pipeline = {
	  {["$match"] = 
		{	['main_category'] = 'card_data',
			['race'] = { ['$exists'] = true }
		}},
	-------------------------------------------------------------------
	  {	["$group"] = {                                                           
		    ['_id'] = '$race',                                    
		    ['count'] = {['$sum'] = 1},
		}}
	} 
	local data = mw.huiji.db.aggregate(pipeline)
	return mw.dumpObject(data)
end
-------------------------------------------------------
function p._getAllMech(frame)
	local res = ''
	local pipeline = {
	  {["$match"] = 
		{	['main_category'] = 'card_data',
			['mechanics'] = { ['$exists'] = true }
		}},
	-------------------------------------------------------------------
	  {	["$group"] = {                                                           
		    ['_id'] = '$mechanics',                                    
		    ['count'] = {['$sum'] = 1},
		}}
	} 
	local data = mw.huiji.db.aggregate(pipeline)
	return mw.dumpObject(data)
end
-----------------------------------------------------------
function p._getImage(path,size,link)
	local res = ''
	if path ~= nil then
		res = '[[file:'..path..'|'..size..'px'..'|link='..link..']]'
	else
    	res = '[[file:图片缺失.png|'..size..'px'..'|link='..link..']]'
	end
	return res
end
-----------------------------------------------------------
function p._getTitleIcon(class,s)
	local res = ''
	local size = s or "32"
	local enum = {
		['DEATHKNIGHT']	= p._getImage('Death Knight icon.png',size,'死亡骑士'),
		['DEMONHUNTER']	= p._getImage('icon_dh.png',size,'恶魔猎手'),
		['DREAM'] = '',
		['DRUID'] = p._getImage('icon_druid.png',size,'德鲁伊'),
		['GRIMY_GOONS'] = p._getImage('jade lotus icon.png',size,'污手党'),
		['HUNTER'] = p._getImage('icon_hunter.png',size,'猎人'),
		['INVALID'] = '无效',
		['JADE_LOTUS']	= p._getImage('icon_warrior.png',size,'玉莲帮'),
		['KABAL'] = p._getImage('the kabal icon.png',size,'暗金教'),
		['MAGE'] = p._getImage('icon_mage.png',size,'法师'),
		['NEUTRAL'] = p._getImage('icon_neutral.png',size,'中立'),
		['PALADIN'] = p._getImage('icon_paladin.png',size,'圣骑士'),
		['PRIEST'] = p._getImage('icon_priest.png',size,'牧师'),
		['ROGUE'] = p._getImage('icon_rogue.png',size,'潜行者'),
		['SHAMAN'] = p._getImage('icon_shaman.png',size,'萨满祭司'),
		['WARLOCK'] = p._getImage('icon_warlock.png',size,'术士'),
		['WARRIOR'] = p._getImage('icon_warrior.png',size,'战士'),
		['WHIZBANG'] = p._getImage('icon_whizbang.png',size,'神奇的威兹班'),
	}
	if enum[class] ~= nil then
		res = enum[class]
	end
	return res
end
--------------------------------------------------------
function p._colorByClass(class)
	local enum = {
	['DEATHKNIGHT']	= '#b12626',
	['DREAM'] = 'rgba(72, 117, 60, 0.43)',
	['DRUID'] = '#ce881d',
	['HUNTER'] = '#589e57',
	['INVALID'] = '#333',
	['MAGE'] = '#3786cc',
	['NEUTRAL'] = '#111',
	['PALADIN'] = '#c5839c',
	['PRIEST'] = '#c7c7c7',
	['ROGUE'] = '#d0cd69',
	['SHAMAN'] = '#36c',
	['WARLOCK'] = '#9e25bb',
	['WARRIOR'] = 'rgb(193, 156, 107)',
	['WHIZBANG'] = '#111',
	['GRIMY_GOONS'] = '#111',
	['JADE_LOTUS']	= '#111',
	['KABAL'] = '#111'
	}
	local res = enum[class]
	if res == nil then
		res = '#111'
	end
	return res
end
----------------------------------------------------
function p._infoboxCard(frame)
	local res = ''
	local args = getArgs(frame)
	local id = args['dbfId']
	local query = {
		['dbfId'] = tonumber(id),
	}
	local data = mw.huiji.db.find(query)
	data = data[1]
	----------------------------------------------------
	local title = ''
	local cat_res = ''
	if data['classes'] then
		for _i, v in ipairs(data['classes']) do
			title = title .. p._getTitleIcon(v)
		end
	else
		title = p._getTitleIcon(data['cardClass'])
	end
	local titleClass = 'bg_'..data['cardClass']
	local titleStyle = 'text-align:left;font-size:24px;'
	local image = '[[file:'..(data['id'] or '')..'_card_zhCN.png|300px|link=]]'
	local type = '[['..(enum_type[data['type']] or data['type'])..']]'
	cat_res = cat_res .. '[[category:'.. (enum_type[data['type']] or data['type']) ..'卡牌]]'
	local class = ''
	if data['classes'] then
		for _i,v in ipairs(data['classes']) do
			class = class .. '[[' .. enum_class[v] .. ']]'
			if _i ~= #data['classes'] then
				class = class .. ','
			end
			cat_res = cat_res .. '[[category:'.. enum_class[v] ..'卡牌]]'
		end
		if #data['classes'] == 2 then
			cat_res = cat_res .. '[[category:双职业卡牌]]'
		end
	else
		class = '[['..enum_class[data['cardClass']]..']]'
		cat_res = cat_res .. '[[category:'.. enum_class[data['cardClass']] ..'卡牌]]'
	end
	local set = '[['.. (enum_set[data['set']] or data['set']) ..']]'
	local rarity = (enum_rarity[data['rarity']] or data['rarity'] or '')
	if rarity ~= '' then
		cat_res = cat_res .. '[[category:'.. rarity ..'卡牌]]'
		rarity = '[['.. rarity ..']]'
	end
	local race = enum_race[data['race']] or data['race']
	local below = '艺术家:'..( data['artist'] or '') .. '<br>card ID:' .. '[[data:'..data['id']..'.json|'..data['id']..']]'
	local param = {
		['title'] = title..' '..data['name_enUS'] ,
		['titleclass'] = 'hsnew '..titleClass,
		['titlestyle'] = titleStyle,
		['image'] = image,
		['headerstyle'] = 'color:#fff;background:#333;',
		['label1'] = '类型',
		['data1'] = type,
		['label2'] = '职业',
		['data2'] = class,
		['label3'] = '来源',
		['data3'] = set,
		['label4'] = '稀有度',
		['data4'] = rarity,
		['label5'] = '别称',
		['data5'] = args['别称'],
		['label6'] = '种族',
		['data6'] = race ,
		['belowstyle'] = 'font-size:8px;color:#666;text-align:right;padding:2px 1em;',
		['below'] = below
		}
	--res = mw.dumpObject(param) .. mw.dumpObject(args) .. mw.dumpObject(data)
	res = frame:expandTemplate{ title = 'infobox', args = param }
	return cat_res..'\n'..frame:preprocess(res)
end
--------------------------------------------------------------------------------
----------------------------------------------------
function p._infoboxCard_battlegrounds(frame)
	local res = ''
	local args = getArgs(frame)
	local id = args['dbfId']
	local query = {
		['dbfId'] = tonumber(id),
	}
	local data = mw.huiji.db.find(query)
	data = data[1]
	----------------------------------------------------
	local title = ''
	if data['classes'] then
		for _i, v in ipairs(data['classes']) do
			title = title .. p._getTitleIcon(v)
		end
	else
		title = p._getTitleIcon(data['cardClass'])
	end
	local titleStyle = 'text-align:left;font-size:24px;background:'..p._colorByClass(data['cardClass'])
	local image = '[[file:'..(data['id'] or '')..'_card_zhCN.png|300px|link=]]'
	if data['type'] ~= "MINION" then
		image = '[[file:'..(data['id'] or '')..'_card_zhCN.png|300px|link=]]'
	end
	local type = '[['..(enum_type[data['type']] or data['type'])..']]'
	local class = ''
	if data['classes'] then
		for _i,v in ipairs(data['classes']) do
			class = class .. '[[' .. enum_class[v] .. ']]'
			if _i ~= #data['classes'] then
				class = class .. ','
			end
		end
	else
		class = '[['..enum_class[data['cardClass']]..']]'
	end
	local set = '[['.. (enum_set[data['set']] or data['set']) ..']]'
	local rarity ='[['.. (enum_rarity[data['rarity']] or data['rarity'] or '')..']]'
	local race = enum_race[data['race']] or data['race']
	local below = '艺术家:'..( data['artist'] or '') .. '<br>card ID:' .. '[[data:'..data['id']..'.json|'..data['id']..']]'
	local param = {
		['title'] = title..' '..data['name_enUS'] ,
		['titleclass'] = 'hsnew',
		['titlestyle'] = titleStyle,
		['image'] = image,
		['headerstyle'] = 'color:#fff;background:#333;',
		['label1'] = '类型',
		['data1'] = type,
		['label2'] = '职业',
		['data2'] = class,
		['label3'] = '来源',
		['data3'] = set,
		['label4'] = '稀有度',
		['data4'] = rarity,
		['label5'] = '别称',
		['data5'] = args['别称'],
		['label6'] = '种族',
		['data6'] = race ,
		['belowstyle'] = 'font-size:8px;color:#666;text-align:right;padding:2px 1em;',
		['below'] = below
		}
	--res = mw.dumpObject(param) .. mw.dumpObject(args) .. mw.dumpObject(data)
	res = frame:expandTemplate{ title = 'infobox', args = param }..'[[category:酒馆战棋]]'
	return frame:preprocess(res)
end
--------------------------------------------------------------------------------
function p._card(frame)
	local res = ''
	local args = getArgs(frame)
	local old_key = args[1]
	local gold = args['G']
	local anime = args['A']
	local size = args[2] or args['userparam'] or '200'
	local link = args[1] or args['link']
	local id = args['id']
	if args['id'] then
			id = mw.ustring.gsub(id,' ','_')
		local query = {
			['id'] = id
		}
		local data = mw.huiji.db.find(query)
		data = data[1]
		if data ~= nil or data ~= '' then
			local name = data['name'] or ''
			local type = data['type'] or ''
			local collectible = data['collectible']
			if type == "ENCHANTMENT" then
				link = 'Enchantment'
			elseif collectible then 
				link = name
			else
				link = name..'('..id..')'
			end
			res = '[[file:'..id..'_card_zhCN.png|'..(args['size'] or 250)..'px|link='..link..']]'
		end
		--..mw.dumpObject(name)..mw.dumpObject(args['id'])
		--
	else
		res = '[[file:'..old_key
		if gold then
			res = res .. '_Gold'
		end
		if anime then
			res = res ..'.gif'
			else
				res = res .. '.png'
		end
		res = res ..'|'..size..'px'..'|link='..link..']]'
	end
	return res
end
----------------------------------
function p._cardLink(frame)
	local res = ''
	local args = getArgs(frame)
	local link = args.link or args[1] or args.name
	local text = args._name or args.name or args[2] or args[1]
	local link_id = args.id or string.match(link, '%((.+)%)$')
	if link_id then
		res = res .. '<span class="huiji-tt" data-type="card" data-name="'..link_id..'" style="display:inline-block;'..(args['style'] or '')..'">'
		res = res ..'[['..link..'|'..text..']]</span>'
	else
		local dict = mw.loadData('Module:Hearthstone/name_to_id')
		local _id = dict[link] and p._selectRightId(dict[link],'1')-- or (mw.huiji.db.findOne{name=link} or {}).id
		if _id then
			res = res .. '<span class="huiji-tt" data-type="card" data-name="'.._id..'" style="display:inline-block;'..(args['style'] or '')..'">'
			res = res ..'[['..link..'|'..text..']]</span>'
		end
	end
	--res = mw.dumpObject(_id)..mw.dumpObject(dict['index'][link])
	return res
end
--------------------------------------------------------------------------------
function p._cardLink_battlegrounds(frame)
	local res = ''
	local args = getArgs(frame)
	local link = args['name'] ..'('..args['id']..')'
	local text = args['name']
	local dict = mw.loadData('module:Hearthstone/data')
	local _id = args['id']

		res = res .. '<span class="huiji-tt" data-type="card_bg" data-name="'.._id..'" style="display:inline-block;'..(args['style'] or '')..'">'
		res = res ..'[['..link..'|'..text..']]</span>'

	--res = mw.dumpObject(_id)..mw.dumpObject(dict['index'][link])
	return res
end
-------------e: enchantment
-------------t: 衍生
function p._selectRightId(list, mode)
	local prioder = {
		['AT'] = 100 ,    -- TGT 试炼
		['BCON'] = 10 ,   -- Arena Only
		['BGS'] = 100 ,    -- Battleground 酒馆战旗
		['BOT'] = 100 ,    -- BOOMSDAY 砰砰计划 BOTA
		['BOTA'] = 50 ,    -- BOOMSDAY 砰砰计划 BOTA
		['BRM'] = 100 ,    -- BRM 黑石山 BRMA,BRMC
		['BRMA'] = 50 ,    -- BRM 黑石山 BRMA,BRMC
		['CFM'] = 100 ,    -- GANGS 加基森
		['CRED'] = 0 ,   -- Credit
		['CS1'] = 100 ,     -- Classic,CS2
		['CS2'] = 100 ,     -- Classic,CS2
		['DAL'] = 100 ,    -- DALARAN,DALA
		['DALA'] = 50 ,    -- DALARAN,DALA
		['DFX'] = 0 ,
		['DREAM'] = 100 ,
		['DRG'] = 100 ,
		['DRGA'] = 50 ,
		['DS'] = 0 ,
		['EX1'] = 100 ,      -- EXPERT
		['FB'] = 0 ,      -- Tarvern Braw
		['FP'] = 50 ,      -- NAXX
		['GAME'] = 0 ,
		['GBL'] = 0 ,
		['GIL'] = 100 ,     -- GILNEAS,GILA
		['GILA'] = 50 ,     -- GILNEAS,GILA
		['GVG'] = 100 ,     -- GVG
		['HERO'] = 0 ,
		['HRW'] = 0 ,     -- TB
		['ICC'] = 100 ,
		['ICCA'] = 50 ,
		['KAR'] = 100 ,     -- KARA 卡拉赞
		['KARA'] = 50 ,     -- KARA 卡拉赞
		['LOE'] = 100 ,     -- LOE 冒险者协会
		['LOEA'] = 50 ,     -- LOE 冒险者协会
		['LOOT'] = 100 ,    -- LOOT 狗头人
		['LOOTA'] = 50 ,    -- LOOT 狗头人
		['Mekka'] = 50 ,   -- HOF
		['NAX'] = 150 , 
		['NEW'] = 100 ,     -- EXPERT
		['OG'] = 100 ,      -- OG
		['PART'] = 0 ,    -- GVG
		['PRO'] = 50 ,     -- HOF
		['TB'] = 0 ,      -- TB
		['TOT'] = 0 ,     -- TB
		['TRL'] = 100 ,     -- TROLL
		['TRLA'] = 50 ,     -- TROLL
		['tt'] = 0 ,		
		['TU'] = 0 ,      -- MISSION 教学
		['ULD'] = 100 ,     -- 奥丹姆
		['ULDA'] = 50 ,     -- 奥丹姆
		['UNG'] = 100 ,     -- 安戈洛
		['WE'] = 0 ,      -- 狂野事件
		['YOD'] = 50 ,     -- 巨龙年
	}
	local rorder = {
		'NAX','BRMA','LOEA'
	}
	local r = {}
	r['score'] = 0
	r['key'] = 0
	
	for _i,v in ipairs(list) do
		local score = 0
		local _split = mw.text.split(v,'_')
		score = 100 -100 *(#_split-2)
		if prioder[_split[1]] then
			score = score + prioder[_split[1]]
		else
			for enum in pairs(rorder) do
				if mw.ustring.find(_split[1],enum) then
					score = score + 50
				end
			end
		end
		local tail = mw.ustring.sub(_split[#_split],-1)
		if tail == 'e' or tail == 't'  or tail == 'h' then
			score = score -100
		end
		------------------------------
		if score > r['score'] then
			r['score'] = score
			r['key'] = v
		end
	end
	
	return tostring(r['key'])

end
-----------------------------------
function p._trans(frame)
	local args = frame.args
	local mode = args[1]
	local param = args[2]
	local res = ''
	if mode == "Card Set" then
		res = enum_set[param] or param
	end
	if mode == "Card Class" then
		res = enum_class[param] or param
	end
	if mode == "Card Type" then
		res = enum_type[param] or param
	end
	res = '[[' .. res .. ']]'
	return res
end
------------------------------
function p._getFullArt(frame)
	local args = frame.args
	local res = ''
	
		local query = {
			["main_category"] = "card_data",
			["id"] = args[1]
		}
		local data = mw.huiji.db.find(query)
		data = data[1]
		
	if data ~= nil and data['artist'] then	
		local name_en = data['name_enUS']
		local artist = data['artist']
		local jpg = name_en..'_full.jpg'
		local png = name_en..'_full.png'
		
		local jpg_title = mw.title.makeTitle('file',jpg)
	    local png_title = mw.title.makeTitle('file',png)
	    
	    if jpg_title['id'] == 0 then
			if png_title['id'] == 0 then
				res = ''
				else
				res = '[[file:'..png..'|thumb|left|由'..artist..'创作的卡牌原画|300px|link=]]'
			end
		else
			res = '[[file:'..jpg..'|thumb|left|由'..artist..'创作的卡牌原画|300px|link=]]'
		end
	end
	 if args['2'] ~= "" then
		res = res ..  '[[file:'..args['2']..'|thumb|left|300px|link=]]'
		--res = res ..mw.dumpObject(args)
	 end
	--res = mw.dumpObject(data)
	return res
end
-----------------------------
local function pure_text(text, nospace)
	if not text then return end
	if nospace then text = mw.ustring.gsub(text,"%s","") end
	text = mw.ustring.gsub(text,"\n"," ")
	text = mw.ustring.gsub(text,"\\n"," ")
	text = mw.ustring.gsub(text,"<.->","")
	return text
end

function p._getCardText(frame)
	local args = frame.args
	local query = {
		["main_category"] = "card_data",
		["id"] = args[1]
	}
	local data = mw.huiji.db.find(query)
	data = data[1]
	local name = data['name']
	local name_enUS = data['name_enUS']
	local name_zhTW = data['name_zhTW']
	local name_jaJP = data['name_jaJP']
	local text = pure_text(data['text'], true)
	local text_enUS = pure_text(data['text_enUS'], false)
	local text_zhTW = pure_text(data['text_zhTW'], true)
	local text_jaJP = pure_text(data['text_jaJP'], true)
	local html = mw.html.create()
	
	local res_html = html
	:tag('table'):addClass('wikitable')
	:tag('tr')
		:tag('th'):wikitext('语言版本'):cssText('width:5em'):done()
		:tag('th'):wikitext('卡牌名'):done()
		:tag('th'):wikitext('卡牌效果'):done()
	:done()
	:tag('tr')
		:tag('td'):wikitext('简体中文'):cssText('font-family: 楷体;background: #2a4b8d;'):done()
		:tag('td'):wikitext(name):done()
		:tag('td'):wikitext(text):done()
	:done()
	:tag('tr')
		:tag('td'):wikitext('英文'):cssText('font-family: 楷体;background: #2a4b8d;'):done()
		:tag('td'):wikitext(name_enUS):done()
		:tag('td'):wikitext(text_enUS):done()
	:done()
	:tag('tr')
		:tag('td'):wikitext('繁体中文'):cssText('font-family: 楷体;background: #2a4b8d;'):done()
		:tag('td'):wikitext(name_zhTW):done()
		:tag('td'):wikitext(text_zhTW):done()
	:done()
	:tag('tr')
		:tag('td'):wikitext('日语'):cssText('font-family: 楷体;background: #2a4b8d;'):done()
		:tag('td'):wikitext(name_jaJP):done()
		:tag('td'):wikitext(text_jaJP):done()
	:done()
	:done()
		
    return tostring(res_html)
	--return mw.dumpObject(data)
end
-----------------------------
function p._getCardFlavorText(frame)
	local args = frame.args
	local query = {
		["main_category"] = "card_data",
		["id"] = args[1]
	}
	local data = mw.huiji.db.find(query)
	data = data[1]
	local name = data['name']
	local name_enUS = data['name_enUS']
	local name_zhTW = data['name_zhTW']
	local name_jaJP = data['name_jaJP']
	local flavor = data['flavor']
	local flavor_enUS = data['flavor_enUS']
	local flavor_zhTW = data['flavor_zhTW']
	local flavor_jaJP = pure_text(data['flavor_jaJP'], true)
	local html = mw.html.create()
	
	local res_html = html
	:tag('table'):addClass('wikitable')
	:tag('tr')
		:tag('th'):wikitext('语言版本'):cssText('width:5em'):done()
		:tag('th'):wikitext('描述文本'):done()
	:done()
	:tag('tr')
		:tag('td'):wikitext('简体中文'):cssText('font-family: 楷体;background: #2a4b8d;'):done()
		:tag('td'):wikitext(flavor):done()
	:done()
	:tag('tr')
		:tag('td'):wikitext('英文'):cssText('font-family: 楷体;background: #2a4b8d;'):done()
		:tag('td'):wikitext(flavor_enUS):done()
	:done()
	:tag('tr')
		:tag('td'):wikitext('繁体中文'):cssText('font-family: 楷体;background: #2a4b8d;'):done()
		:tag('td'):wikitext(flavor_zhTW):done()
	:done()
	:tag('tr')
		:tag('td'):wikitext('日语'):cssText('font-family: 楷体;background: #2a4b8d;'):done()
		:tag('td'):wikitext(flavor_jaJP):done()
	:done()
	:done()
		
	return tostring(res_html)
	--return mw.dumpObject(data)
end
--------------------------------
function p._tt_card_bg(frame)
	local args = frame.args
	local id = args[1]
	local query = {
		['id'] = id ,
		['set'] = 'BATTLEGROUNDS'
	}
	local data = mw.huiji.db.find(query)
	data = data[1]
	local techLevel = data['techLevel'] or ''
	local res = ''
	res ='[[File:'..id ..'_card_zhCN.png|300px]]'
	if data['type'] == 'MINION' then
		res = res ..'<div class = "card_bg_tt";>' .. (techLevel or '') .. '</div>'
	end
	return res
end
----------------------------------
function p._showHeroOwer(frame) -- =p._showHeroOwer{args = {'YOD_009'}}
	local args = frame.args
	local id = args[1] or ''
	local res = ''
	local query = {
		id = {['$regex'] = id..'.'},
		type = 'HERO_POWER'
	}
	local options = {
		['sort'] = { ['id'] = 1 }
	}
	local data = mw.huiji.db.find(query, options)
	for _,card in ipairs(data) do
		res = res..mw.getCurrentFrame():expandTemplate{ title = 'card', args = {id = card.id} }
	end
	return '<div>'..res..'</div>'
end
----------------------------------
function p._showChooseOption(frame)
	local args = frame.args
	local id = args[1] or ''
	local res = ''
	local query = {
		['id'] = {['$regex'] = id..'(a|b)'} 
	}
	local options = {
		['sort'] = { ['id'] = 1 }
	}	
	local data = mw.huiji.db.find(query, options)
	if data ~= nil or data ~= '' then
		for _i,v in ipairs(data) do
			local param = {
				['id'] = v['id']
			}
			res = res..frame:expandTemplate{ title = 'card', args = param }
		end
	end
	return res
end
----------------------------------
function p._showToken(frame)
	local args = frame.args
	local id = args[1] or ''
	local res = ''
	local query = {
		['id'] = {['$regex'] = id..'t'} 
	}
	local options = {
		['sort'] = { ['id'] = 1 }
	}
	local data = mw.huiji.db.find(query, options)
	if data ~= nil or data ~= '' then
		for _i,v in ipairs(data) do
			if v['type'] == 'MINION' or v['type'] == 'SPELL' then
				local param = {
					['id'] = v['id']
				}
				res = res..frame:expandTemplate{ title = 'card', args = param }
			end
		end
	end
	return res
end
return p
0.0
0人评价
avatar