◆少前百科是非盈利性、非官方的少女前线维基百科。
◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科
◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科
◆To foreigners,You can use twitter to contact us.
Icon Nyto Silver.png

更改

跳转至: 导航搜索

模块:Sangvis info

添加1,810字节2023年5月31日 (三) 02:39
技能图标名格式和用户:莹lolo统一
local unitdata
local data = mw.loadData('Module:Sangvis info/data')
local sdata bdata = {}local mdata = mw.loadData('Module:Battle Mission skill config/sangvis data')
local infobox = require('Module:Infobox').infobox
local forces = {'铁血工造', '正规军', '帕拉蒂斯', '其他势力'}
'穿甲', '暴击', '暴击伤害', '移速', '射程'}
local effectname = {'伤害', '攻速', '命中', '回避', '暴击率', [8] = '护甲'}
local orgs = {'', '专用训练场', '隔离考场', '专用工厂'}
local function serveSkillInfo(order)
local id = unitdata['skill' .. order]
local group = math.floor(id/1e5) local skilldata = mdata[id] if not skilldata then if not bdata[group] then bdata[group] = mw.loadData('Module:Battle skill config/sangvis data ' .. tostring(group)) end skilldata = sdatabdata[group][id] end local skill = root:tag('table'):attr{id = 'skill' .. order, class = 'skill-table',
['data-cd'] = skilldata.cd_time,
['data-cd-start'] = skilldata.start_cd_time }
if skilldata.vals then skill:attr('data-val', skilldata.vals) end
local signature = skill:tag('tr'):attr('class', 'skill-signature')
icon:attr('class', 'active-skill') end
icon:attr('rowspan', 2)
:wikitext('[[fileFile:icon skill IconSkill ' .. skilldata.code .. '.png|48px|link=]]')
local skillname = signature:tag('td')
skillname:wikitext(skilldata.name)
desc:wikitext(descstr)
else for i, v in ipairs(skilldata.full_desc) do
desc:tag('p'):wikitext((string.gsub(v, '\n', '<br>'))) end
end
if order == '1' then
local rescrow = skill:tag('tr'):attr('class', 'desc-hidden')
local resc = rescrow:tag('td'):attr('colspan', 2)
local resdata = sdatabdata[group][unitdata.skill_res]
local descstr = string.gsub(resdata.desc, '{}', '<span class="skill"></span>')
descstr = string.gsub(descstr, '\n', '<br>')
if griddata[i] then
content:wikitext('<br>')
content:wikitext('对', '[[:分类:' .. chartype[i] .. '单位|' .. chartype[i] .. ']]', '有效,<br>')
local pair = griddata[i]
for j = 1, 8 do
if pair[j] then
content:wikitext('<br>') content:wikitext(attrnameeffectname[j] .. , '上升<span>' .. tostring(pair[j]) .. '%</span>')
end
end
end
serveSkillInfo('_adv')
root:newline()
end
tbody2:tag('td'):wikitext(val)
end
root:newline()
end
 
local function addIntro()
local intro = unitdata.intro
if unitdata.id < 1013 then
intro = "'''" .. unitdata.name .. "'''是[[铁血工造]]的头目单位。" .. intro
elseif unitdata.id == 1015 then
intro = "'''建筑师-临海战斗特化型''',简称'''NVW型'''" .. mw.ustring.sub(intro, 19)
elseif unitdata.id ~= 1021 and unitdata.id > 1014 and unitdata.id < 2001 then
local namepos = mw.ustring.find(intro, ',')
intro = "'''" .. mw.ustring.sub(intro, 1, namepos-1) .. "'''" .. mw.ustring.sub(intro, namepos)
elseif unitdata.id ~= 2017 then intro = "'''" .. unitdata.name .. "'''是" .. intro end
root:wikitext(intro)
root:newline()
end
local function addInfobox()
rootlocal cat = {} for i = 1,3 do local ctype = chartype[unitdata.char[i]] cat[i] = '[[:分类:wikitext(infobox{' .. ctype .. '单位|' .. ctype .. ']]' cat[i] = cat[i] .. '[[分类:' .. ctype .. '单位|' .. ctype .. ']]' end local params = { above = unitdata.name,
label1 = '初始星级',
data1 = tostring(4 - unitdata.type),
data2 = forces[unitdata.force],
label3 = '战斗特性',
data3 = chartype[unitdata.char[1]] .. ' ' .. chartype[unitdata.char[2]] .table. concat(cat, ' ' .. chartype[unitdata.char[3]]),
label4 = '费用',
data4 = tostring(unitdata.cost), image1 = '[[file:pic ' .. unitdata.code .. ' LL.png|320px]]' } }if unitdata.type == 1 then params.caption1 = '初始形象' params.image2 = '[[file:pic ' .. unitdata.code .. ' LL 1.png|320px]]' params.caption2 = '五星形象' params.label5 = '所属部门' org = orgs[unitdata.org-10600] params.data5 = '[[内部一览/协议同归部#' .. org .. '|' .. org .. ']]' end root:wikitext(infobox(params)) root:newline()
end
addInfobox()
root:newlineaddIntro()
root:wikitext('== 作战能力 ==')
root:newline()
if unitdata.type == 1 then putGrid() end
putSkills()
root:wikitext('== 战斗形象 ==')
root:newline()
local templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = '模板:融合势力信息/styles.css' }
}
local chibi = mw.getCurrentFrame():expandTemplate{ title = 'Q版调用', args = { ['人形名'] = args.spine or unitdata.code, W = '360px', H = '360px', ['大单位'] = args.large or '' } } return templatestyles .. tostring(root).. chibi
end

导航菜单