模块:ItemInfo:修订间差异
跳转到导航
跳转到搜索
改善高开销解析器滥用
(增加可用参数) |
(改善高开销解析器滥用) |
||
第295行: | 第295行: | ||
function p.listArmorsInAt1() | function p.listArmorsInAt1() | ||
local html = mw.html.create('table'):addClass('wikitable') | |||
html:tag('tr') | |||
:tag('th'):wikitext('ID'):done() | |||
:tag('th'):wikitext('索引'):done() | |||
:tag('th'):wikitext('名称'):done() | |||
:tag('th'):wikitext('卖价'):done() | |||
:tag('th'):wikitext('配方'):done() | |||
local baseIndex = 19 | |||
for i = 1, 29 do | for i = 1, 29 do | ||
local item = p.getItemInfoByIndex('AT1', '防具', i) | |||
local recipe = '-' | |||
if item.base.synthesisable ~= '0' then | |||
recipe = ci.getRecipeCardNameById(item.base.rc_id) | |||
end | |||
html:tag('tr') | |||
:tag('td'):wikitext(tostring(baseIndex + i)):done() | |||
:tag('td'):wikitext(tostring(i)):done() | |||
:tag('td'):wikitext('[[攻略:AT1/物品/' .. item.name .. '|' .. item.name .. ']]'):done() | |||
:tag('td'):wikitext(tostring(item.base.sell_price)):done() | |||
:tag('td'):wikitext(recipe):done() | |||
end | end | ||
return | return tostring(html) | ||
end | end | ||
function p.listWeaponsInAt1() | function p.listWeaponsInAt1() | ||
local html = mw.html.create('table'):addClass('wikitable') | |||
html:tag('tr') | |||
:tag('th'):wikitext('ID'):done() | |||
:tag('th'):wikitext('索引'):done() | |||
:tag('th'):wikitext('名称'):done() | |||
:tag('th'):wikitext('卖价'):done() | |||
:tag('th'):wikitext('配方'):done() | |||
local baseIndex = 190 | |||
for i = 1, 35 do | for i = 1, 35 do | ||
local item = p.getItemInfoByIndex('AT1', '武器', i) | |||
local recipe = '-' | |||
if item.base.synthesisable ~= '0' then | |||
recipe = ci.getRecipeCardNameById(item.base.rc_id) | |||
end | |||
html:tag('tr') | |||
:tag('td'):wikitext(tostring(baseIndex + i)):done() | |||
:tag('td'):wikitext(tostring(i)):done() | |||
:tag('td'):wikitext('[[攻略:AT1/物品/' .. item.name .. '|' .. item.name .. ']]'):done() | |||
:tag('td'):wikitext(tostring(item.base.sell_price)):done() | |||
:tag('td'):wikitext(recipe):done() | |||
end | end | ||
return | return tostring(html) | ||
end | end | ||
function p.listAccessoriesInAt1() | function p.listAccessoriesInAt1() | ||
local html = mw.html.create('table'):addClass('wikitable') | |||
html:tag('tr') | |||
:tag('th'):wikitext('ID'):done() | |||
:tag('th'):wikitext('索引'):done() | |||
:tag('th'):wikitext('名称'):done() | |||
:tag('th'):wikitext('卖价'):done() | |||
:tag('th'):wikitext('配方'):done() | |||
local baseIndex = -1 | |||
for i = 1, 20 do | for i = 1, 20 do | ||
local item = p.getItemInfoByIndex('AT1', '饰品', i) | |||
local recipe = '-' | |||
if item.base.synthesisable ~= '0' then | |||
recipe = ci.getRecipeCardNameById(item.base.rc_id) | |||
end | |||
html:tag('tr') | |||
:tag('td'):wikitext(tostring(baseIndex + i)):done() | |||
:tag('td'):wikitext(tostring(i)):done() | |||
:tag('td'):wikitext('[[攻略:AT1/物品/' .. item.name .. '|' .. item.name .. ']]'):done() | |||
:tag('td'):wikitext(tostring(item.base.sell_price)):done() | |||
:tag('td'):wikitext(recipe):done() | |||
end | end | ||
return | return tostring(html) | ||
end | end | ||
function p.listMaterialsInAt1() | function p.listMaterialsInAt1() | ||
local html = mw.html.create('table'):addClass('wikitable') | |||
html:tag('tr') | |||
:tag('th'):wikitext('ID'):done() | |||
:tag('th'):wikitext('索引'):done() | |||
:tag('th'):wikitext('名称'):done() | |||
:tag('th'):wikitext('卖价'):done() | |||
:tag('th'):wikitext('配方'):done() | |||
local baseIndex = 60 | |||
for i = 1, 34 do | for i = 1, 34 do | ||
local item = p.getItemInfoByIndex('AT1', '材料物品', i) | |||
local recipe = '-' | |||
if item.base.synthesisable ~= '0' then | |||
recipe = ci.getRecipeCardNameById(item.base.rc_id) | |||
end | |||
html:tag('tr') | |||
:tag('td'):wikitext(tostring(baseIndex + i)):done() | |||
:tag('td'):wikitext(tostring(i)):done() | |||
:tag('td'):wikitext('[[攻略:AT1/物品/' .. item.name .. '|' .. item.name .. ']]'):done() | |||
:tag('td'):wikitext(tostring(item.base.sell_price)):done() | |||
:tag('td'):wikitext(recipe):done() | |||
end | end | ||
return | return tostring(html) | ||
end | end | ||
function p.listMelcMaterialsInAt1() | function p.listMelcMaterialsInAt1() | ||
local html = mw.html.create('table'):addClass('wikitable') | |||
html:tag('tr') | |||
:tag('th'):wikitext('ID'):done() | |||
:tag('th'):wikitext('索引'):done() | |||
:tag('th'):wikitext('名称'):done() | |||
:tag('th'):wikitext('卖价'):done() | |||
:tag('th'):wikitext('配方'):done() | |||
local baseIndex = 94 | |||
for i = 1, 24 do | for i = 1, 24 do | ||
local item = p.getItemInfoByIndex('AT1', '合成材料', i) | |||
local recipe = '-' | |||
if item.base.synthesisable ~= '0' then | |||
recipe = ci.getRecipeCardNameById(item.base.rc_id) | |||
end | |||
html:tag('tr') | |||
:tag('td'):wikitext(tostring(baseIndex + i)):done() | |||
:tag('td'):wikitext(tostring(i)):done() | |||
:tag('td'):wikitext('[[攻略:AT1/物品/' .. item.name .. '|' .. item.name .. ']]'):done() | |||
:tag('td'):wikitext(tostring(item.base.sell_price)):done() | |||
:tag('td'):wikitext(recipe):done() | |||
end | end | ||
return | return tostring(html) | ||
end | end | ||
function p.listKeysInAt1() | function p.listKeysInAt1() | ||
local html = mw.html.create('table'):addClass('wikitable') | |||
html:tag('tr') | |||
:tag('th'):wikitext('ID'):done() | |||
:tag('th'):wikitext('索引'):done() | |||
:tag('th'):wikitext('名称'):done() | |||
:tag('th'):wikitext('卖价'):done() | |||
:tag('th'):wikitext('配方'):done() | |||
local baseIndex = 48 | |||
for i = 1, 12 do | for i = 1, 12 do | ||
local item = p.getItemInfoByIndex('AT1', '重要', i) | |||
local recipe = '-' | |||
if item.base.synthesisable ~= '0' then | |||
recipe = ci.getRecipeCardNameById(item.base.rc_id) | |||
end | |||
html:tag('tr') | |||
:tag('td'):wikitext(tostring(baseIndex + i)):done() | |||
:tag('td'):wikitext(tostring(i)):done() | |||
:tag('td'):wikitext('[[攻略:AT1/物品/' .. item.name .. '|' .. item.name .. ']]'):done() | |||
:tag('td'):wikitext(tostring(item.base.sell_price)):done() | |||
:tag('td'):wikitext(recipe):done() | |||
end | end | ||
return | return tostring(html) | ||
end | end | ||
function p.listUseInAt1() | function p.listUseInAt1() | ||
local html = mw.html.create('table'):addClass('wikitable') | |||
html:tag('tr') | |||
:tag('th'):wikitext('ID'):done() | |||
:tag('th'):wikitext('索引'):done() | |||
:tag('th'):wikitext('名称'):done() | |||
:tag('th'):wikitext('卖价'):done() | |||
:tag('th'):wikitext('配方'):done() | |||
local baseIndex = 118 | |||
for i = 1, 72 do | for i = 1, 72 do | ||
local item = p.getItemInfoByIndex('AT1', '使用', i) | |||
local recipe = '-' | |||
if item.base.synthesisable ~= '0' then | |||
recipe = ci.getRecipeCardNameById(item.base.rc_id) | |||
end | |||
html:tag('tr') | |||
:tag('td'):wikitext(tostring(baseIndex + i)):done() | |||
:tag('td'):wikitext(tostring(i)):done() | |||
:tag('td'):wikitext('[[攻略:AT1/物品/' .. item.name .. '|' .. item.name .. ']]'):done() | |||
:tag('td'):wikitext(tostring(item.base.sell_price)):done() | |||
:tag('td'):wikitext(recipe):done() | |||
end | end | ||
return | return tostring(html) | ||
end | end | ||
return p | return p |