2023年政策修订增补工作正在进行中,欢迎参与!
Module:Sandbox/唯爱绫华/侧边栏底图
跳转到导航
跳转到搜索
local p = {}
local function notempty(s)
return (s and s ~= "")
end
local titleset = mw.loadData("模块:kiraraf角色信息")
local getArgs = require("Module:Arguments").getArgs
local function wikitext(text1)
return mw.getCurrentFrame():preprocess(text1)
end
local items = {
{"10012000","宫子","日之剑士"},
{"10022010","寻","情人节的日之牧师"},
{"10032000","沙英","白色情人节的日之剑士"},
{"12222000","成年若狭悠里","日之炼金术师"},
{"13002020","透","土之牧师"},
{"14042010","猪熊阳子","泳装的日之法师"},
{"16022010","村上椎奈","月之骑士"},
{"16052000","百武照","水之法师"},
{"16062000","饭野水叶","月之炼金术师"},
{"17002030","千矢","复活节的土之剑士"},
{"17012010","巽绀","泳装的风之法师"},
{"19002021","高山春香","婚礼服的水之炼金术师"},
{"21022021","十仓荣依子","情人节的火之剑士"},
{"28002020","花小泉杏","婚礼服的火之法师"},
{"30032000","千夜","风之牧师"},
{"30082000","青山Blue Mountain","正月的水之牧师"},
{"31022001","猿渡宇希","火之剑士"},
{"31022011","猿渡宇希","七夕的火之炼金术师"},
{"32022021","克蕾尔","婚礼服的水之骑士"},
{"32042031","柯尔克","七夕的火之牧师"},
{"32152010","薄荷","第2部的月之剑士"},
{"32162001","梅蒂娅","第2部的月之法师"},
{"33042010","园部篠","复活节的风之剑士"},
{"35012011","千代田桃","月之剑士"},
{"37012011","森野麒麟","火之剑士"},
{"39022001","川口芳乃","风之炼金术师"},
{"43042001","小野坂纱织","七夕的月之法师"}
}
function p.main(frame)
math.randomseed(tostring(os.time()))
local rand = math.random(#items)
r = '*左侧边栏底图是《[[闪耀幻想曲]]》中'
if (titleset[items[rand][2]][2]=='闪耀幻想曲') then
r = r .. '原创'
else
r = r.. '《[[' .. titleset[items[rand][2]][2] .. ']]》'
end
r = r .. "角色'''[[" .. titleset[items[rand][2]][1] ..'|' .. items[rand][2] .."]]'''的[[闪耀幻想曲:" .. items[rand][2] ..'(' ..items[rand][3] .. ')|卡片]]。'
r = r .. "[{{fullurl:{{FULLPAGENAME}}|action=purge}} 换一个?] ([[User:唯爱绫华/侧边栏底图|图库]])"
r = r .. "{{替换侧边栏底图|url=https://asset.kirafan.cn/texture/charauiresource/charaillustchara/charaillust_chara_" .. items[rand][1] .. ".png|width=180px}}"
r = wikitext(r)
return r
end
function p.check()
t=""
for i = 1,#items
do
s = '<div style="display:inline-block; text-align:center; width:150px; margin:0 5px;">{{图片外链|https://asset.kirafan.cn/texture/charauiresource/charaillustchara/charaillust_chara_'
s = s ..items[i][1].. '.png|120}}'
s = s .. '<br>[[' .. titleset[items[i][2]][1] ..'|' .. items[i][2] ..']]<br><small>[[闪耀幻想曲:' .. items[i][2] ..'(' ..items[i][3] .. ')|(' ..items[i][3] .. ')]]</small></div>'
t = t .. wikitext(s) .. "\n"
end
return t
end
return p