打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

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

模块:敌舰2:修订间差异

来自舰R百科
Donnyjie留言 | 贡献
无编辑摘要
Donnyjie留言 | 贡献
无编辑摘要
 
(未显示同一用户的6个中间版本)
第28行: 第28行:
speedType['驱逐'] = 2
speedType['驱逐'] = 2
speedType['补给'] = 2
speedType['补给'] = 2
speedType['潜母'] = 3
speedType['导潜'] = 3
speedType['潜艇'] = 3
speedType['潜艇'] = 3
speedType['炮潜'] = 3
speedType['炮潜'] = 3
第39行: 第39行:


local function formatEnemyShip(ship)
local function formatEnemyShip(ship)
     local colorName = { 'black', 'green', 'blue', 'purple', 'darkorange', 'red' }
     local colorName = { 'black', 'green', 'blue', 'purple', '#e77f00', 'red' }


     local ret = '[['
     local ret = '[['
第56行: 第56行:
     local node = frame.args[1]
     local node = frame.args[1]
     local label = frame.args[2]
     local label = frame.args[2]
     if label == nil or label == '' then label = node:sub(5,5) end
     if label == nil or label == '' then label = node:sub(-1,-1) end
     local shipNum = frame.args[3]
     local shipNum = frame.args[3]
     if shipNum == nil then shipNum = 6 end
     if shipNum == nil then shipNum = 6 end
第97行: 第97行:
         if speedCnt[2] ~= 0 then s2 = speed[2] / speedCnt[2] end
         if speedCnt[2] ~= 0 then s2 = speed[2] / speedCnt[2] end
         local s = math.min(s1, s2)
         local s = math.min(s1, s2)
        s = tonumber(string.format("%.1f", s))
        if speedCnt[1] ~= 0 and speedCnt[2] ~= 0 then s = math.floor(s) end
         local bg2 = ''
         local bg2 = ''
         if speedCnt[1] == 0 and speedCnt[2] == 0 then
         if speedCnt[1] == 0 and speedCnt[2] == 0 then
             s = speed[3] / speedCnt[3]
             s = speed[3] / speedCnt[3]
            s = tonumber(string.format("%.1f", s))
             rec = '(' .. lv .. ')'
             rec = '(' .. lv .. ')'
             bg2 = 'style="background-color:#fcf3cf;"|'
             bg2 = 'style="background-color:#fcf3cf;"|'
第105行: 第108行:
         local air2 = air*1.5
         local air2 = air*1.5
         local air3 = air*3
         local air3 = air*3
         ret = ret .. '||' .. bg2 .. rec .. '||' .. formatFloat(air) .. '||' .. formatFloat(air2) .. '||'.. formatFloat(air3) .. '||' .. math.floor(s) .. '\n'
         ret = ret .. '||' .. bg2 .. rec .. '||' .. formatFloat(air) .. '||' .. formatFloat(air2) .. '||'.. formatFloat(air3) .. '||' .. s .. '\n'
     end
     end
     return '|rowspan=' .. n .. '|' .. label .. '|' .. ret
     return '|rowspan=' .. n .. '|' .. label .. '|' .. ret