打开主菜单

少前百科GFwiki β

更改

模块:Enemy info

添加1,031字节2023年7月19日 (三) 14:24
无编辑摘要
local types = {'首领', '普通机械', '普通人形', '装甲机械', '装甲人形'}
local data = mw.loadData('模块:Enemy info/data')
local intros = mw.loadData('模块:Enemy info/intro data')
local chars = mw.loadData('模块:Enemy info/character data')
local function addSpine()
local function addDesc()
local chars = mw.loadData('模块:Enemy info/character data')
for _,n in ipairs(udata.chars) do
node:tag('tr'):tag('td'):attr('colspan', 2):wikitext(currentframe():expandTemplate{title='敌方图鉴TAG', args={chars[n][1], chars[n][2]}})
local function addStats()
local intros = mw.loadData('模块:Enemy info/intro data') node = node:tag('div'):attraddClass('id', 'TDollStattables'):tag('div'):addClass('tabber1')
node:tag('table'):attr('id', 'introduce'):addClass('stattable')
:tag('tr'):tag('td'):addClass('gflabelbg'):wikitext('简介'):done():done()
local templatestyle = currentframe():extensionTag{
name = 'templatestyles', args = { src = '模板:敌方单位信息/styles.lesscss' }
}
end
return _enemyInfo()
end
 
function p.enemyIndex()
local groupByForce = {}
for i = 0, 3 do groupByForce[i] = mw.html.create() end
local keys = {}
for k,_ in pairs(data) do table.insert(keys, k) end
table.sort(keys)
for _, i in ipairs(keys) do
local d = data[i]
local blacklist = {126, 140, 147, 153, 156, 157, 166}
local blacklisted = false
for j = 87, 93 do if j == i then
blacklisted = true
break
end end
for _, j in ipairs(blacklist) do if j == i then
blacklisted = true
break
end end
if i == 100 or d.chars[1] == 100 or d.chars[1] == 1002 or blacklisted then
else
local ename = i ~= 115 and d.name or string.format('%s (%s)', d.name, forces[d.force])
groupByForce[d.force]:wikitext(currentframe():expandTemplate{
title='UnitRevealIcon', args={ename, i, d.utype==1 and 'BOSS单位' or ''}})
end
end
root = mw.html.create()
for _,i in ipairs{1, 2, 3, 0} do
root:wikitext('=='..forces[i]..'==')
root:newline()
root:wikitext(tostring(groupByForce[i]))
root:newline()
end
return tostring(root)
end
return p