置顶公告:【置顶】关于临时开启评论区所有功能的公告(2022.10.22) | 【置顶】关于本站Widget恢复使用的公告
  • 你好~!欢迎来到萌娘百科镜像站!如需查看或编辑,请联系本站管理员注册账号。
  • 本镜像站和其他萌娘百科的镜像站无关,请注意分别。

Module:无畏契约英雄契约

贴贴♀百科,万娘皆可贴的百科全书!转载请标注来源页面的网页链接,并声明引自贴贴百科。内容不可商用。
跳到导航 跳到搜索
local p = {}

function p.main(frame)
	local args = frame.args
	return p._main(args)
end

function p._main(args)
	local agent = args["agent"]
	local exps = 
		{"20000", "30000", "40000", "50000", "60000", "75000", "100000", "150000", "200000", "250000"}
	
	local container = mw.html.create():tag("div"):addClass("val-contracts")
	for i = 1, 10 do
		local t = ""
		local img = ""
		
		if args[i .. "-type"] == "t" then
			img = "[[File:VALORANT_Contract_Title.png|link=]]"
			t = "称号"
		elseif args[i .. "-type"] == "c" then
			img = "[[File:VALORANT_Contract_" .. agent .. "_" .. i .. ".png|x180px|link=]]"
			t = "卡面"
		else
			img = "[[File:VALORANT_Contract_" .. agent .. "_" .. i .. "." .. args[i .. "-format"] .. "|link=]]"
			if args[i .. "-type"] == "s" then
				t = "-{zh-cn:喷漆;zh-tw:塗鴉;}-"
			elseif args[i .. "-type"] == "b" then
				t = "-{zh-cn:挂饰;zh-tw:吊飾;}-"
			elseif args[i .. "-type"] == "a" then
				t = "-{zh-cn:英雄;zh-tw:特務;}-"
			else
				t = "皮肤"
			end
		end
		
		container
			:tag("div"):addClass("val-contract")
				:tag("div"):addClass("val-contract-level")
					:wikitext(i):done()
				:tag("div"):addClass("val-contract-img")
					:wikitext(img):done()
				:tag("div"):addClass("val-contract-title")
					:wikitext(args[i .. "-title"]):done()
				:tag("div"):addClass("val-contract-info")
					:wikitext(t .. "<br/>" .. exps[i] .. "经验"):done()
			:allDone()
	end
	
	return container
end

return p