Module:Partnertable:修订间差异

来自Arcaea中文维基
无编辑摘要
(v6.0)
 
(未显示6个用户的26个中间版本)
第1行: 第1行:
local getArgs = require('Module:Arguments').getArgs
local getArgs = require 'Module:Arguments'.getArgs
local link = require('Module:Link')._link
local lang = mw.getContentLanguage()
local getData = require("Module:data")
local p = {}
local p = {}


function labelText(text,class)
function labelText(text, class)
local span = mw.html.create( 'span' )
   local span = mw.html.create 'span'
span:addClass( 'label-text' )
   span:addClass 'label-text'
span:wikitext(text)
   span:wikitext(text)
return tostring(span)
   return tostring(span)
end
end


function update(version,device,awakenyes,version2)
function update(version, device, awakenyes, version2) --更新时间
if device == 'ns'
   if device == 'ns' then
then
     if awakenyes and version ~= version2 and version2 then
return '<div class="date-box"><div>'..labelText('NS版')..'</div><div>'..version..'</div><div></div></div>'
       return '<div class="date-box"><div>' .. labelText 'NS版' .. '</div><div>搭档:' .. version .. '<br />觉醒形态:' .. version2 .. '</div><div></div></div>'
else
     end
if awakenyes
     return '<div class="date-box"><div>' .. labelText 'NS版' .. '</div><div>' .. version .. '</div><div></div></div>'
then 
   else
return '<div class="date-box"><div>'..labelText('移动版')..'</div><div>搭档:'..version..'<br />觉醒形态:'..version2..'</div><div></div></div>'
     if awakenyes and version ~= version2 and version2 then
end
       return '<div class="date-box"><div>' .. labelText '移动版' .. '</div><div>搭档:' .. version .. '<br />觉醒形态:' .. version2 .. '</div><div></div></div>'
   return '<div class="date-box"><div>'..labelText('移动版')..'</div><div>'..version..'</div><div></div></div>'
     end
end
     return '<div class="date-box"><div>' .. labelText '移动版' .. '</div><div>' .. version .. '</div><div></div></div>'
   end
end
 
function skill(text, skilldiff, label)
   if skilldiff then
     return '<div><span class="label-text">' .. label .. '</span></div>' .. text
   else
     return text
   end
end
 
function title(name, nameSecond)
   local result = name
   if nameSecond then result = result .. '<br />' .. nameSecond end
   return result
end
end


function version(time)
function version(time)
    local ans
    return ({string.find(time, '([vV]%d+%.%d+%.%d+c?)')})[3] or 'unknown'
   if string.byte(time,7) == 99 or string.byte(time,7) >= 48 and string.byte(time,7) <= 57 then ans = 7 else ans = 6 end
   return string
.gsub(string.sub(time,1,ans),v,V)
end
end


function getImage(normal,awaken,JacketArgs,awakenyes,type,size)
function getImage(normal, awaken, normalJacket, awakenJacket, awakenyes, type)
local container,tab=mw.html.create('div'),mw.html.create('div')
   local container, tab = mw.html.create 'div', mw.html.create 'div'
local tab1,tab2,part1,part2,jacket
   local tab1, tab2, part1, part2, jacket
container:addClass( 'container' )
   container:addClass 'container'
tab:attr( 'id','tab-'..type ) tab:addClass( 'img-tab' )
   tab:attr('id', 'tab-' .. type)
   tab:addClass 'img-tab'
local Jacket=JacketArgs
 
   local JacketNormal = normalJacket
if awaken
 
then
   if awaken then
tab1,tab2,part1,part2=mw.html.create('div'),mw.html.create('div'),mw.html.create('div'),mw.html.create('div')
     tab1, tab2, part1, part2 = mw.html.create 'div', mw.html.create 'div', mw.html.create 'div', mw.html.create 'div'
     local JacketAwaken = normalJacket
     if awakenJacket then
       JacketAwaken = awakenJacket
     end
     tab1:wikitext 'Normal'
     tab2:wikitext 'Awaken'
     tab1:addClass 'img-tab-part normal active'
     tab2:addClass 'img-tab-part awaken'
     tab:wikitext(tostring(tab1))
     tab:wikitext(tostring(tab2))
     container:wikitext(tostring(tab))
 
     part1:wikitext('[[文件:' .. normal .. '|300px|none]]' .. labelText '画师' .. tostring(JacketNormal))
     part2:wikitext('[[文件:' .. awaken .. '|300px|none]]' .. labelText '画师' .. tostring(JacketAwaken))
     part1:addClass('active tab-text-' .. type)
     part2:addClass('tab-text-' .. type)
     container:wikitext(tostring(part1))
     container:wikitext(tostring(part2))
 
     return tostring(container)
   end


tab1:wikitext('Normal') tab2:wikitext('Awaken')
   return '<div><div class="floatnone">[[文件:' .. normal .. '|300px]]</div><div>' .. labelText '画师' .. JacketNormal .. '</div></div>'
tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part awaken')
tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
container:wikitext(tostring(tab))
part1:wikitext('[[文件:'..normal..'|'..size..'px|none]]'..labelText('画师')..Jacket) part2:wikitext('[[文件:'..awaken..'|'..size..'px|none]]'..labelText('画师')..tostring(Jacket))
part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
return tostring(container)
end
return '<div><div class="floatnone">[[文件:'..normal..'|'..size..'px]]</div><div>'..labelText('画师')..Jacket..'</div></div>'
end
end


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


function p._main(args)
function p._main(args)
   local awaken    --觉醒判定
local awaken
   local size     --图片大小
local size
   local belongs    --所属单位
local belongs
   local skillawaken --觉醒技能
if args['觉醒形态'] == '有' then awaken=true else awaken=false end
   local skillsec   --第二技能
if args[' 名称'] == ' 白姬' or args[' 名称'] == '凛可' then size=200 else size=300 end
   if args['觉醒形态'] == '有' then awaken = true else awaken = false end
if args['所属曲包']
   if awaken and args[' 技能'] ~= args[' 觉醒技能'] and args[' 觉醒技能'] ~= nil then skillawaken = true else skillawaken = false end
then
   if args['第二技能'] then skillsec = true else skillsec = false end
belongs='所属曲包'
   if args['所属曲包'] then
else
     belongs = '所属曲包'
if args['所属单曲'] then belongs='所属单曲' else belongs='所属单曲/曲包' end
   elseif args['所属单曲'] then
end
     belongs = '所属单曲'
local imageA=getImage(args['图片'],args['觉醒图片'],args['画师'],awaken,'a',size)
   else
local imageB=getImage(args['图片'],args['觉醒图片'],args['画师'],awaken,'b',size)
     belongs = '所属单曲/曲包'
local infoList = {
   end
      [1] = { args['名称'], {id = 'title'}},
   local imageA = getImage(args['图片'], args['觉醒图片'], args['画师'], args['觉醒画师'], awaken, 'a')
      [2] = { imageA, {id = 'top-image'}},
   local imageB = getImage(args['图片'], args['觉醒图片'], args[' 画师'], args['觉醒 画师'], awaken, 'b')
      [3] = { imageB, {id = 'right-image'}},
   local infoList = {
      [4] = { '搭档信息', {class = 'header'}},
      [1] = {title(args['名称'], args['第二名称']), {id = 'title'}},
      [5] = { '类型', {class = 'label'}},
      [2] = {imageA, {id = 'top-image'}},
      [6] = { args['类型'], {class = 'data'}},
      [3] = {imageB, {id = 'right-image'}},
      [7] = { belongs, {class = 'label'}},
      [4] = {'搭档信息', {class = 'header'}},
      [8] = { args['所属曲包'] or args['所属单曲'] or '-', {class = 'data'}},
      [5] = {'类型', {class = 'label'}},
      [9] = { ' 觉醒形态', {class = 'label'}},
      [6] = {args['类型'], {class = 'data'}},
      [10] = { args[' 觉醒形态'] or ' ', {class = 'data'}},
      [7] = {belongs, {class = 'label'}},
      [11] = { ' 搭档数据', {class = 'header', id='all-play-header'}},
      [8] = {args['所属曲包'] or args['所属单曲'] or args['所属单曲/曲包'] or '-', {class = 'data'}},
      [12] = { ' 搭档数据 (移动版)', {class = 'header', id='mobile-play-header'}},
      [9] = {' 种类', {class = 'label'}},
      [13] = { ' 等级', {class = 'label'}},
      [10] = {args[' 种类'] or '-', {class = 'data'}},
      [14] = { 'Lv1', {class = 'level-data'}},
      [11] = {' 觉醒形态', {class = 'label'}},
      [15] = { 'Lv20', {class = 'level-data'}},
      [12] = {args[' 觉醒形态'] or '无', {class = 'data'}},
      [16] = { 'Lv30', {class = 'awaken-data'}},
     [13] = {'搭档数据', {class = 'header', id = 'all-play-header'}},
      [17] = { 'Frag', {class = 'label'}},
      [14] = {' 搭档数据 (移动版)', {class = 'header', id = 'mobile-play-header'}},
      [18] = { args['Frag1'], {class = 'level-data'}},
      [15] = {' 等级', {class = 'label'}},
      [19] = { args['Frag20'], {class = 'level-data'}},
      [16] = {'Lv1', {class = 'level-data'}},
      [20] = { args['Frag30'], {class = 'awaken-data'}},
      [17] = {'Lv20', {class = 'level-data'}},
      [21] = { 'Step', {class = 'label'}},
      [18] = {'Lv30', {class = 'awaken-data'}},
      [22] = { args['Step1'], {class = 'level-data'}},
      [19] = {'Frag', {class = 'label'}},
      [23] = { args['Step20'], {class = 'level-data'}},
      [20] = {args['Frag1'], {class = 'level-data'}},
      [24] = { args['Step30'], {class = 'awaken-data'}},
      [21] = {args['Frag20'], {class = 'level-data'}},
      [25] = { 'Over', {class = 'label over'}},
      [22] = {args['Frag30'], {class = 'awaken-data'}},
      [26] = { args['Over1'], {class = 'level-data over'}},
      [23] = {'Step', {class = 'label'}},
      [27] = { args['Over20'], {class = 'level-data over'}},
      [24] = {args['Step1'], {class = 'level-data'}},
      [28] = { args['Over30'], {class = 'awaken-data over'}},
      [25] = {args['Step20'], {class = 'level-data'}},
      [29] = { '搭档数据 (Nintendo Switch版)', {class = 'header ns', id='ns-play-header'}},
      [26] = {args['Step30'], {class = 'awaken-data'}},
      [30] = { '等级', {class = 'label ns'}},
      [27] = {'Over', {class = 'label over'}},
      [31] = { 'Lv1', {class = 'level-data ns'}},
     [28] = {args['Over1'], {class = 'level-data over'}},
      [32] = { 'Lv20', {class = 'level-data ns'}},
      [29] = {args['Over20'], {class = 'level-data over'}},
      [33] = { 'Lv30', {class = 'awaken-data ns'}},
      [30] = {args['Over30'], {class = 'awaken-data over'}},
      [34] = { 'Frag', {class = 'label ns'}},
      [31] = {'搭档数据 (Nintendo Switch版)', {class = 'header ns', id = 'ns-play-header'}},
      [35] = { args['Frag1NS'], {class = 'level-data ns'}},
      [32] = {'等级', {class = 'label ns'}},
      [36] = { args['Frag20NS'], {class = 'level-data ns'}},
      [33] = {'Lv1', {class = 'level-data ns'}},
      [37] = { args['Frag30NS'], {class = 'awaken-data ns'}},
      [34] = {'Lv20', {class = 'level-data ns'}},
      [38] = { 'Step', {class = 'label ns'}},
      [35] = {'Lv30', {class = 'awaken-data ns'}},
      [39] = { args['Step1NS'], {class = 'level-data ns'}},
      [36] = {'Frag', {class = 'label ns'}},
      [40] = { args['Step20NS'], {class = 'level-data ns'}},
      [37] = {args['Frag1NS'], {class = 'level-data ns'}},
      [41] = { args['Step30NS'], {class = 'awaken-data ns'}},
      [38] = {args['Frag20NS'], {class = 'level-data ns'}},
      [42] = { '技能', {class = 'label', id='skill-label'}},
      [39] = {args['Frag30NS'], {class = 'awaken-data ns'}},
      [43] = { args['技能'] or '-', {class = 'data', id = 'skill-normal'}},
      [40] = {'Step', {class = 'label ns'}},
      [44] = { args['觉醒技能'], {class = 'data', id = 'skill-awaken'}},
      [41] = {args['Step1NS'], {class = 'level-data ns'}},
      [45] = { ' 更新时间', {id='update-data-label' ,class = 'label'}},
      [42] = {args['Step20NS'], {class = 'level-data ns'}},
      [46] = { update(args[' 更新时间'] or '无','mobile',awaken,args[' 觉醒更新时间'] or args[' 更新时间']), {id='mobile-date-normal', class = 'data'}},
      [43] = {args['Step30NS'], {class = 'awaken-data ns'}},
      [47] = { update(args['更新时 间NS'] or '无','ns',awaken,'无'), {id='ns-date-normal', class = 'data'}}
      [44] = {'技能', {class = 'label', id = 'skill-label'}},
}
      [45] = {skill(args['技能'] or '-', skillawaken, '普通形态'), {class = 'data', id = 'skill-normal'}},
      [46] = {skill(args['觉醒技能'] or args[' 技能'], skillawaken, ' 觉醒形态'), {class = 'data', id = 'skill-awaken'}},
      [47] = {skill(args[' 技能'], skillsec, args['第一技能说明'] or '第一技能'), {class = 'data', id = 'skill-first'}},
      [48] = {skill(args[' 第二技能'], skillsec, args[' 第二技能说明'] or ' 第二技能'), {class = 'data', id = 'skill-first'}},
      [49] = {'更新时 ', {id = 'update-data-label', class = 'label'}},
     [50] = {update(args['更新时间'] or '无', 'mobile', awaken, args['觉醒更新时间'] or args['更新时间']), {id = 'mobile-date-normal', class = 'data'}},
     [51] = {update(args['更新时间NS'] or '无', 'ns', awaken, args['觉醒更新时间NS'] or args['更新时间NS']), {id = 'ns-date-normal', class = 'data'}}
   }
 
   local box = mw.html.create 'div'
 
   --样式控制
   box:addClass 'partnerbox arcaeabox'
   if awaken then box:addClass 'awaken' end
   -- if args['名称'] == '' then box:addClass( "ns-only" ) end
   if skillawaken then box:addClass 'skill-awaken' end
   if skillsec then box:addClass 'skill-second' end
   if args['类型'] == '支援型' then
     box:addClass 'support'
   elseif args['类型'] == '挑战型' then
     box:addClass 'challenge'
   else
     box:addClass 'balance'
   end


local box = mw.html.create( 'div' )
   if args[' 更新时间NS'] then
     box:addClass 'ns-box'
--样式控制
   end
box:addClass( "partnerbox" )
if awaken then box:addClass( "awaken" ) end
if args[' 名称'] == '白姬' or args['名称'] == '凛可' then box:addClass( "ns-only" ) end
if awaken and args['技能'] ~= args['觉醒技能'] and args['觉醒技能'] ~= nil then box:addClass( "skill-different" ) end
if args['类型']=='支援型'
then
box:addClass( "support" )
else
if args['类型']==' 挑战型' then box:addClass( "challenge" ) else box:addClass( "balance" ) end
end


if args['更新时间NS']
   --表格生成
then
   local boxList = {}
box:addClass( "ns-box" )
    for _, v in ipairs(infoList) do
end
      box:tag 'div':attr(v[2]):cssText(v[3]):wikitext(v[1]):done()
--表格生成
local boxList={}
    for i, o in ipairs(infoList) do
      boxList[i] = mw.html.create('div')
     boxList[i]
     :attr(infoList[i][2])
     :cssText(infoList[i][3])
     :wikitext(infoList[i][1])
     box:wikitext(tostring(boxList[i]))
    end
    end
 
--分类添加
   --分类添加
    local category = mw.html.create()
    local category = ''
 
  
    --平台
    --平台
    if args['更新时间NS']
   local plat
     then
    if args['更新时间NS'] then
      if args['更新时间']
      if args['更新时间'] then
       then
        plat = '双平台'
        category = category..'[[分类: 双平台 搭档]]'
      else
      else
        category = category..'[[分类:NS版 搭档]]'
        plat = 'NS版'
      end
      end
    else
    else
      category = category..'[[分类: 移动版 搭档]]'
      plat = '移动版'
    end
    end
   category:wikitext('[[分类:', plat, '搭档]]')


    --觉醒
    --觉醒
    category = category..'[[分类:'..(args[' 觉醒形态'] or '没有')..'觉醒形态的搭档]]'
    category:wikitext('[[分类:', awaken and ' ' or '没有', '觉醒形态的', ' 搭档]]')


    --类型
    --类型
    category = category..'[[分类:'..(args['类型'] or ' 平衡 型')..'搭档]]'
    local type = args['类型'] or '平衡型'
   local typeSet = {['支援型'] = true, ['平衡型'] = true, ['挑战型'] = true,}
   category:wikitext('[[分类:', typeSet[type] and type or ' 特殊类 型', '搭档]]')
   -- ???/创世型; ???/探索者; ???


    --种类
    --种类
    category = category..'[[ 分类:'..args['种类'].. '搭档]]'
    local cMap = {['限时'] = ' 限时活动', ['特殊'] = '获取方式特殊的', [' 专辑'] = 'Arcaea原声专辑特典',}
   for c in mw.text.gsplit(args['种类'], '/', true) do
     if c ~= '原创' then
       category:wikitext('[[分类:', cMap[c] or c, '搭档]]')
     end
   end


    --版本
    --版本
    if args['更新时间'] then category = category..'[[分类:'..version(args['更新时间']).. '添加的 曲目]]' end
    if args['更新时间'] then
    if args['更新时间NS'] then category = category..'[[分类:NS '..version(args['更新时间NS']).. '添加的 曲目]]' end
     category:wikitext('[[分类:', lang:ucfirst(version(args['更新时间'])), '添加的', '搭档]]')
    -- 测试
   end
    category='<nowiki>'..category..'</nowiki>'
   if awaken then
     category:wikitext('[[分类:', lang:ucfirst(version(args['觉醒更新时间'] or args['更新时间'])), '添加 觉醒形态 ', '搭档]]')
return tostring(box)..category
   end
    if args['更新时间NS'] then
     category:wikitext('[[分类:', 'NS ', lang:ucfirst(version(args['更新时间NS'])), '添加的', '搭档]]')
   end
 
    -- 手动关闭
    if args['nocat'] then category = '' end
 
   return tostring(box) .. tostring(category)
end
end


return p
return p

2024年11月22日 (五) 22:16的最新版本

可在Module:Partnertable/doc创建此模块的帮助文档

local getArgs = require 'Module:Arguments'.getArgs
local lang = mw.getContentLanguage()
local p = {}

function labelText(text, class)
    local span = mw.html.create 'span'
    span:addClass 'label-text'
    span:wikitext(text)
    return tostring(span)
end

function update(version, device, awakenyes, version2) --更新时间
    if device == 'ns' then
        if awakenyes and version ~= version2 and version2 then
            return '<div class="date-box"><div>' .. labelText 'NS版' .. '</div><div>搭档:' .. version .. '<br />觉醒形态:' .. version2 .. '</div><div></div></div>'
        end
        return '<div class="date-box"><div>' .. labelText 'NS版' .. '</div><div>' .. version .. '</div><div></div></div>'
    else
        if awakenyes and version ~= version2 and version2 then
            return '<div class="date-box"><div>' .. labelText '移动版' .. '</div><div>搭档:' .. version .. '<br />觉醒形态:' .. version2 .. '</div><div></div></div>'
        end
        return '<div class="date-box"><div>' .. labelText '移动版' .. '</div><div>' .. version .. '</div><div></div></div>'
    end
end

function skill(text, skilldiff, label)
    if skilldiff then
        return '<div><span class="label-text">' .. label .. '</span></div>' .. text
    else
        return text
    end
end

function title(name, nameSecond)
    local result = name
    if nameSecond then result = result .. '<br />' .. nameSecond end
    return result
end

function version(time)
    return ({string.find(time, '([vV]%d+%.%d+%.%d+c?)')})[3] or 'unknown'
end

function getImage(normal, awaken, normalJacket, awakenJacket, awakenyes, type)
    local container, tab = mw.html.create 'div', mw.html.create 'div'
    local tab1, tab2, part1, part2, jacket
    container:addClass 'container'
    tab:attr('id', 'tab-' .. type)
    tab:addClass 'img-tab'

    local JacketNormal = normalJacket

    if awaken then
        tab1, tab2, part1, part2 = mw.html.create 'div', mw.html.create 'div', mw.html.create 'div', mw.html.create 'div'
        local JacketAwaken = normalJacket
        if awakenJacket then
            JacketAwaken = awakenJacket
        end
        tab1:wikitext 'Normal'
        tab2:wikitext 'Awaken'
        tab1:addClass 'img-tab-part normal active'
        tab2:addClass 'img-tab-part awaken'
        tab:wikitext(tostring(tab1))
        tab:wikitext(tostring(tab2))
        container:wikitext(tostring(tab))

        part1:wikitext('[[文件:' .. normal .. '|300px|none]]' .. labelText '画师' .. tostring(JacketNormal))
        part2:wikitext('[[文件:' .. awaken .. '|300px|none]]' .. labelText '画师' .. tostring(JacketAwaken))
        part1:addClass('active tab-text-' .. type)
        part2:addClass('tab-text-' .. type)
        container:wikitext(tostring(part1))
        container:wikitext(tostring(part2))

        return tostring(container)
    end

    return '<div><div class="floatnone">[[文件:' .. normal .. '|300px]]</div><div>' .. labelText '画师' .. JacketNormal .. '</div></div>'
end

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

function p._main(args)
    local awaken      --觉醒判定
    local size        --图片大小
    local belongs     --所属单位
    local skillawaken --觉醒技能
    local skillsec    --第二技能
    if args['觉醒形态'] == '有' then awaken = true else awaken = false end
    if awaken and args['技能'] ~= args['觉醒技能'] and args['觉醒技能'] ~= nil then skillawaken = true else skillawaken = false end
    if args['第二技能'] then skillsec = true else skillsec = false end
    if args['所属曲包'] then
        belongs = '所属曲包'
    elseif args['所属单曲'] then
        belongs = '所属单曲'
    else
        belongs = '所属单曲/曲包'
    end
    local imageA = getImage(args['图片'], args['觉醒图片'], args['画师'], args['觉醒画师'], awaken, 'a')
    local imageB = getImage(args['图片'], args['觉醒图片'], args['画师'], args['觉醒画师'], awaken, 'b')
    local infoList = {
        [1] = {title(args['名称'], args['第二名称']), {id = 'title'}},
        [2] = {imageA, {id = 'top-image'}},
        [3] = {imageB, {id = 'right-image'}},
        [4] = {'搭档信息', {class = 'header'}},
        [5] = {'类型', {class = 'label'}},
        [6] = {args['类型'], {class = 'data'}},
        [7] = {belongs, {class = 'label'}},
        [8] = {args['所属曲包'] or args['所属单曲'] or args['所属单曲/曲包'] or '-', {class = 'data'}},
        [9] = {'种类', {class = 'label'}},
        [10] = {args['种类'] or '-', {class = 'data'}},
        [11] = {'觉醒形态', {class = 'label'}},
        [12] = {args['觉醒形态'] or '无', {class = 'data'}},
        [13] = {'搭档数据', {class = 'header', id = 'all-play-header'}},
        [14] = {'搭档数据 (移动版)', {class = 'header', id = 'mobile-play-header'}},
        [15] = {'等级', {class = 'label'}},
        [16] = {'Lv1', {class = 'level-data'}},
        [17] = {'Lv20', {class = 'level-data'}},
        [18] = {'Lv30', {class = 'awaken-data'}},
        [19] = {'Frag', {class = 'label'}},
        [20] = {args['Frag1'], {class = 'level-data'}},
        [21] = {args['Frag20'], {class = 'level-data'}},
        [22] = {args['Frag30'], {class = 'awaken-data'}},
        [23] = {'Step', {class = 'label'}},
        [24] = {args['Step1'], {class = 'level-data'}},
        [25] = {args['Step20'], {class = 'level-data'}},
        [26] = {args['Step30'], {class = 'awaken-data'}},
        [27] = {'Over', {class = 'label over'}},
        [28] = {args['Over1'], {class = 'level-data over'}},
        [29] = {args['Over20'], {class = 'level-data over'}},
        [30] = {args['Over30'], {class = 'awaken-data over'}},
        [31] = {'搭档数据 (Nintendo Switch版)', {class = 'header ns', id = 'ns-play-header'}},
        [32] = {'等级', {class = 'label ns'}},
        [33] = {'Lv1', {class = 'level-data ns'}},
        [34] = {'Lv20', {class = 'level-data ns'}},
        [35] = {'Lv30', {class = 'awaken-data ns'}},
        [36] = {'Frag', {class = 'label ns'}},
        [37] = {args['Frag1NS'], {class = 'level-data ns'}},
        [38] = {args['Frag20NS'], {class = 'level-data ns'}},
        [39] = {args['Frag30NS'], {class = 'awaken-data ns'}},
        [40] = {'Step', {class = 'label ns'}},
        [41] = {args['Step1NS'], {class = 'level-data ns'}},
        [42] = {args['Step20NS'], {class = 'level-data ns'}},
        [43] = {args['Step30NS'], {class = 'awaken-data ns'}},
        [44] = {'技能', {class = 'label', id = 'skill-label'}},
        [45] = {skill(args['技能'] or '-', skillawaken, '普通形态'), {class = 'data', id = 'skill-normal'}},
        [46] = {skill(args['觉醒技能'] or args['技能'], skillawaken, '觉醒形态'), {class = 'data', id = 'skill-awaken'}},
        [47] = {skill(args['技能'], skillsec, args['第一技能说明'] or '第一技能'), {class = 'data', id = 'skill-first'}},
        [48] = {skill(args['第二技能'], skillsec, args['第二技能说明'] or '第二技能'), {class = 'data', id = 'skill-first'}},
        [49] = {'更新时间', {id = 'update-data-label', class = 'label'}},
        [50] = {update(args['更新时间'] or '无', 'mobile', awaken, args['觉醒更新时间'] or args['更新时间']), {id = 'mobile-date-normal', class = 'data'}},
        [51] = {update(args['更新时间NS'] or '无', 'ns', awaken, args['觉醒更新时间NS'] or args['更新时间NS']), {id = 'ns-date-normal', class = 'data'}}
    }

    local box = mw.html.create 'div'

    --样式控制
    box:addClass 'partnerbox arcaeabox'
    if awaken then box:addClass 'awaken' end
    -- if args['名称'] == '' then box:addClass( "ns-only" ) end
    if skillawaken then box:addClass 'skill-awaken' end
    if skillsec then box:addClass 'skill-second' end
    if args['类型'] == '支援型' then
        box:addClass 'support'
    elseif args['类型'] == '挑战型' then
        box:addClass 'challenge'
    else
        box:addClass 'balance'
    end

    if args['更新时间NS'] then
        box:addClass 'ns-box'
    end

    --表格生成
    local boxList = {}
    for _, v in ipairs(infoList) do
        box:tag 'div':attr(v[2]):cssText(v[3]):wikitext(v[1]):done()
    end

    --分类添加
    local category = mw.html.create()

    --平台
    local plat
    if args['更新时间NS'] then
        if args['更新时间'] then
            plat = '双平台'
        else
            plat = 'NS版'
        end
    else
        plat = '移动版'
    end
    category:wikitext('[[分类:', plat, '搭档]]')

    --觉醒
    category:wikitext('[[分类:', awaken and '有' or '没有', '觉醒形态的', '搭档]]')

    --类型
    local type = args['类型'] or '平衡型'
    local typeSet = {['支援型'] = true, ['平衡型'] = true, ['挑战型'] = true,}
    category:wikitext('[[分类:', typeSet[type] and type or '特殊类型', '搭档]]')
    -- ???/创世型; ???/探索者; ???

    --种类
    local cMap = {['限时'] = '限时活动', ['特殊'] = '获取方式特殊的', ['专辑'] = 'Arcaea原声专辑特典',}
    for c in mw.text.gsplit(args['种类'], '/', true) do
        if c ~= '原创' then
            category:wikitext('[[分类:', cMap[c] or c, '搭档]]')
        end
    end

    --版本
    if args['更新时间'] then
        category:wikitext('[[分类:', lang:ucfirst(version(args['更新时间'])), '添加的', '搭档]]')
    end
    if awaken then
        category:wikitext('[[分类:', lang:ucfirst(version(args['觉醒更新时间'] or args['更新时间'])), '添加觉醒形态的', '搭档]]')
    end
    if args['更新时间NS'] then
        category:wikitext('[[分类:', 'NS ', lang:ucfirst(version(args['更新时间NS'])), '添加的', '搭档]]')
    end

    --手动关闭
    if args['nocat'] then category = '' end

    return tostring(box) .. tostring(category)
end

return p