打开/关闭菜单
1687
2.2万
6605
11.8万
舰R百科
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

舰R百科是靠无数志愿编辑者持续地建设更新完善的。编辑非常简单,无需代码知识,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

模块:舰娘:修订间差异

舰R百科,玩家自由编辑的战舰少女R百科
Donnyjie留言 | 贡献
无编辑摘要
中二睡神留言 | 贡献
无编辑摘要
 
第28行: 第28行:


p['统计'] = function(frame)
p['统计'] = function(frame)
     local normal = 0
     local normal = 0; local mod = 0; local skin = 0
    local mod = 0
     local total = 0
     local skin = 0
     for index, name in pairs(byIndex) do
     for index, name in pairs(byIndex) do
         if type(index) == 'string'  
         if type(index) == 'string' then
             then skin = skin + 1
             skin = skin + 1
        else
            local gold = ships[name] and ships[name].gold
             if index < 1000
             if gold then
                 then normal = normal + 1
                 local num = tonumber(gold)
            else if index < 2000 then mod = mod + 1 end
                if num and num > 0 then total = total + num end
             end
             end
         end
         elseif index < 1000 then normal = normal + 1
        elseif index < 2000 then mod = mod + 1 end
     end
     end
     if frame.args[1] == '普通' then return normal end
     local arg = frame.args[1]
     if frame.args[1] == '改造' then return mod end
    if arg == '普通'     then return normal end
     if frame.args[1] == '换装' then return skin end
     if arg == '改造'     then return mod end
     if arg == '换装'     then return skin end
    if arg == '换装总价' then return total end
end
end


第147行: 第149行:
     local idx = ships[frame.args[1]].index
     local idx = ships[frame.args[1]].index
     return byIndex[idx % 1000]
     return byIndex[idx % 1000]
end
p['格式化价格'] = function(frame)
    local raw = frame.args[1] or ''
    if raw == '' or raw == '0' then return '-' end
    if tonumber(raw) then return raw .. '钻石' end
    return raw
end
end


return p
return p