Module:无畏契约技能
跳到导航
跳到搜索
local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame) return p._main(frame, args) end function p._main(frame, args) if not frame then frame = mw.getCurrentFrame() end local keys = {"C", "Q", "E", "X", "Space"} local icons = {args["c-icon"], args["q-icon"], args["e-icon"], args["x-icon"], args["space-icon"]} local names = {args["c-name"], args["q-name"], args["e-name"], args["x-name"], args["space-name"]} local intros = {args["c-intro"], args["q-intro"], args["e-intro"], args["x-intro"], args["space-intro"]} if not args["space-icon"] then table.remove(keys, 5) table.remove(icons, 5) table.remove(names, 5) table.remove(intros, 5) end local container = mw.html.create():tag("div") for i = 1, #keys do container :tag("div"):addClass("val-ability") :tag("div"):addClass("val-ability-side") :tag("div"):addClass("val-ability-side-icon") :wikitext("[[File:" .. icons[i] .. "|40px|link=|" .. keys[i] .. " - " .. names[i] .. "]]") :done() :done() :tag("div"):addClass("val-ability-info") :tag("div"):addClass("val-ability-info-name") :wikitext(keys[i] .. " - " .. names[i]) :done() :tag("div"):addClass("val-ability-info-intro") :wikitext(intros[i]) :done() :allDone() end return container end return p