添加防具
(完善) |
(添加防具) |
||
第159行: | 第159行: | ||
table.insert(result, section .. tostring(html) .. '\n' .. list) | table.insert(result, section .. tostring(html) .. '\n' .. list) | ||
end | end | ||
return table.concat(result, '\n') | |||
end | |||
local function makeArgumentOfParameter(args, para) | |||
for i, v in ipairs(paramNames) do | |||
args[paramDisplay[i]] = para[v] | |||
end | |||
end | |||
function p.at1ArmorInfo(index) | |||
local item = p.loadItemInfoByIndex('AT1', '防具', index) | |||
local filteredRecrystalisation = recryFilter(item.recry) | |||
local arguments = { | |||
["物品名"] = item.name, | |||
["图像"] = item.img, | |||
["原文"] = item.ori, | |||
["类别"] = '装备', | |||
["子类别"] = '防具', | |||
["卖价"] = item.base.sell_price, | |||
["游戏"] = AT1, | |||
["重结晶S"] = filteredRecrystalisation.s_prod, | |||
["重结晶A"] = filteredRecrystalisation.a_prod, | |||
["重结晶B"] = filteredRecrystalisation.b_prod, | |||
["重结晶C"] = filteredRecrystalisation.c_prod, | |||
["其他来源"] = item.alt_src, | |||
["笔记"] = item.desc | |||
} | |||
if item.base.synthesisable ~= 0 then | |||
-- TODO: RC id->转换(或者在模板里做) | |||
arguments["配方"] = item.base.rc_id | |||
end | |||
makeArgumentOfParameter(arguments, item.para) | |||
slots = '' | |||
for i = 1, 4 do | |||
if item.powered_slots[i] == '1' then | |||
slots = slots .. i | |||
end | |||
end | |||
arguments["强化槽位"] = slots | |||
end | |||
function p.listArmorsInAt1() | |||
result = {} | |||
for i = 1, 29 do | |||
table.insert(result, p.at1ArmorInfo(i)) | |||
end | |||
return table.concat(result, '\n') | return table.concat(result, '\n') | ||
end | end | ||
return p | return p |