Skip to content

Commit

Permalink
add 灯火序曲(PL-3,PL-4,PL-5)
Browse files Browse the repository at this point in the history
2. fix 活动关卡不能连续作战的问题
3. add 面板数据更新情况的快速响应
4. move 覆潮之下(SV-7,SV-8,SV-9) to 别传
5. add 潮没海滨
6. fix several fight discovery during 灯火序曲
7. adaptive quick swip delay, especially for SV-7
  • Loading branch information
tkkcc committed Jun 1, 2021
1 parent 178439e commit 46de1f7
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 162 deletions.
87 changes: 39 additions & 48 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ cron = require("crontab")
-- swipq("资源收集列表"..1)
-- swipq({10000,-1000},{1600,500})
-- swipq({10000,-2000},{1600,500})
-- swipq({10000,-4000},{1600,500})
-- sys.exit()
-- swipq("汐斯塔")
-- sleep(100)

-- version = "20210205"
-- if get("version", "0") ~= version then
-- toast("版本" .. version .. ",设置已重置")
-- resetUIConfig("save.dat")
-- set("version", version)
-- else
-- toast("版本" .. version)
-- end

version = "20210205"
if get("version", "0") ~= version then
toast("版本" .. version .. ",设置已重置")
resetUIConfig("save.dat")
set("version", version)
else
toast("版本" .. version)
end
ret, opt = showUI('ui.json')
if ret == 0 then lua_exit() end
job = getUIContent("ui.json")
Expand Down Expand Up @@ -63,38 +64,31 @@ a = opt.all_open_time:split(',')
opt.all_open_time_start = parse_time(a[1])
opt.all_open_time_end = parse_time(a[2])
update_open_time()
-- now("公开招募聘用","公开招募刷新")

-- lua_exit()
-- opt.fight[1]="龙门市区"
-- opt.fight[1]="龙门外环"
-- opt.fight[1]="切尔诺伯格"
-- opt.fight[1]="北原冰封废城"
-- opt.fight[1]="大骑士领郊外"

debug0415 = false
debug0416 = false
if debug0415 then
opt.fight = {
-- "LS-1", "CA-1", 'CE-3', 'Ap-1', "PR-B-1", "PR-C-1", "PR-D-1", "PR-A-1",
"DM-7",
-- "1-12","S5-7",
-- "LS-1", "LS-2", "LS-3", "LS-4", "LS-5", "SK-1", "SK-2", "SK-3", "SK-4",
-- "SK-5", "CA-1", "CA-2", "CA-3", "CA-4", "CA-5", "CE-1", "CE-2", "CE-3",
-- "CE-4", "CE-5", "AP-1", "AP-2", "AP-3", "AP-4", "AP-5", "PR-A-1", "PR-A-2",
-- "PR-B-1", "PR-B-2", "PR-C-1", "PR-C-2", "PR-D-1", "PR-D-2",
-- 生于黑夜
-- "DM-1", "DM-2", "DM-3", "DM-4", "DM-5", "DM-6", "DM-7", "DM-8", "TW-8",
-- "WR-8", "WR-9", "WR-10",
-- "切尔诺伯格",
-- "北原冰封废城",
-- "废弃矿区",
-- "龙门外环",
-- "龙门市区",
-- "大骑士领郊外",
-- ============= debug
"潮没海滨",
"切尔诺伯格",
"龙门外环",
"龙门市区",
"废弃矿区",
"大骑士领郊外",
"北原冰封废城",

-- "PL-1", "PL-2", "PL-3", "PL-4", "PL-5",

-- -- 生于黑夜
-- "DM-1", "DM-2", "DM-3", "DM-4", "DM-5", "DM-6", "DM-7", "DM-8",
-- -- 遗尘漫步
-- "WD-6", "WD-7", "WD-8",
-- -- 覆潮之下
-- "SV-7", "SV-8", "SV-9",

-- "PR-A-1", "PR-A-2", "PR-B-1", "PR-B-2", "PR-C-1", "PR-C-2", "PR-D-1", "PR-D-2",
-- "CE-1", "CE-2", "CE-3", "CE-4", "CE-5", "CA-1", "CA-2", "CA-3",
-- "CA-4", "CA-5", "CA-5", "AP-1", "AP-2", "AP-3", "AP-4", "AP-5",
-- "CE-1", "CE-2", "CE-3", "CE-4", "CE-5", "CA-1", "CA-2", "CA-3","CA-4", "CA-5",
-- "AP-1", "AP-2", "AP-3", "AP-4", "AP-5",
-- "LS-1", "LS-2", "LS-3", "LS-4", "LS-5", "SK-1", "SK-2", "SK-3",
-- "SK-4", "SK-5", "0-1", "0-2", "0-3", "0-4", "0-5", "0-6", "0-7", "0-8", "0-9",
-- "0-10", "0-11", "1-1", "1-3", "1-4", "1-5", "1-6", "1-7", "1-8", "1-9",
Expand All @@ -110,26 +104,23 @@ if debug0415 then
-- "7-4", "7-5", "7-6", "7-8", "7-9", "7-10", "7-11", "7-12", "7-13", "7-14",
-- "7-15", "7-16", "S7-1", "S7-2", "7-17", "7-18",
-- "R8-1", "R8-2", "R8-3", "R8-4", "R8-5", "R8-6", "R8-7", "R8-8", "R8-9", "R8-10", "R8-11", "JT8-2", "JT8-3",
-- "M8-6", "M8-7", "M8-8", "MB-6", "MB-7", "MB-8",
-- 火蓝之心
-- "M8-6", "M8-7", "M8-8",
-- -- 火蓝之心
-- "OF-F1", "OF-F2", "OF-F3", "OF-F4",
-- 密林
-- "RI-8",
-- 骑猎
-- -- 骑猎
-- "GT-1", "GT-2", "GT-3", "GT-4", "GT-5", "GT-6",
-- 临光
-- "MN-8", "MN-7",
-- 彩6
-- "OD-7", "OD-8",
-- 漫漫独行
-- "WD-6", "WD-7", "WD-8",
}
end
if debug0416 then
now("公开招募刷新", "显示全部")
pause()
lua_exit()
end
if debug0415 then
now("轮次作战")
pause()
lua_exit()
end

if opt.now_enable:find("0") then now(opt.now) end
if #opt.cron > 0 then cron(opt.cron) end
102 changes: 51 additions & 51 deletions path.lua
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ path.轮次作战 = function()
end

jianpin2name = {
CMHB = "潮没海滨",
LMSQ = "龙门市区",
LMWH = "龙门外环",
QENBG = "切尔诺伯格",
Expand Down Expand Up @@ -588,9 +589,11 @@ path.作战 = function(x)
elseif f("OD-") then
path.源石尘行动(x)
elseif f("WD-") then
path.漫漫独行(x)
path.遗尘漫步(x)
elseif f("SV-") then
path.覆潮之下(x)
elseif f("PL-") then
path.灯火序曲(x)
else
path.主线(x)
end
Expand Down Expand Up @@ -824,7 +827,7 @@ path.物资芯片 = function(x)
tap("资源收集列表" .. index)
end,
["作战列表" .. x] = function()
tap("作战列表" .. x)
findTap("作战列表" .. x)
return true
end,
})
Expand All @@ -840,6 +843,7 @@ jmfight2area = {
切尔诺伯格 = "乌萨斯",
北原冰封废城 = "乌萨斯",
大骑士领郊外 = "卡西米尔",
潮没海滨 = "汐斯塔",
}
path.剿灭 = function(x)
-- 周一4点
Expand All @@ -860,7 +864,7 @@ path.剿灭 = function(x)
tap("每周部署")
tap("进入地图")
swipq(jmfight2area[x])
tap(jmfight2area[x])
findTap(jmfight2area[x])
sleep(2)
end,
["作战列表" .. x] = function()
Expand All @@ -869,7 +873,7 @@ path.剿灭 = function(x)
jwf.full = true
log("本周合成玉已满")
end
tap("作战列表" .. x)
findTap("作战列表" .. x)
return true
end,
})
Expand Down Expand Up @@ -1241,7 +1245,6 @@ path.生于黑夜 = function(x, hook)
else
tap("生于黑夜")
end

tap("进入活动")
swipq(x)
if not findTap("作战列表" .. x) then
Expand All @@ -1251,56 +1254,47 @@ path.生于黑夜 = function(x, hook)
return true
end,
["作战列表" .. x] = function()
tap("作战列表" .. x)
findTap("作战列表" .. x)
return true
end,
})
auto(p)
path.开始游戏(x)
end

path.骑兵与猎人 = function(x)
path.骑兵与猎人 = function(x, hook)
local p = update(path.base, {
面板 = function()
tap("面板作战")
tap("别传")
tap("骑兵与猎人")
tap("进入活动")
if hook ~= nil then
hook()
else
tap("骑兵与猎人")
tap("进入活动")
end
if not findTap("作战列表" .. x) then
log(x .. "未找到")
unfound_fight[x] = (unfound_fight[x] or 0) + 1
end
return true
end,
["作战列表" .. x] = function()
tap("作战列表" .. x)
findTap("作战列表" .. x)
return true
end,
})
auto(p)
path.开始游戏(x)
end

path.火蓝之心 = function(x)
local p = update(path.base, {
面板 = function()
tap("面板作战")
tap("别传")
tap("火蓝之心")
tap("进入活动")
tap("火蓝之心地区2")
if not findTap("作战列表" .. x) then
log(x .. "未找到")
unfound_fight[x] = (unfound_fight[x] or 0) + 1
end
return true
end,
["作战列表" .. x] = function()
tap("作战列表" .. x)
return true
end,
})
auto(p)
path.开始游戏(x)
path.骑兵与猎人(x, function()
tap("别传")
tap("火蓝之心")
tap("进入活动")
tap("火蓝之心地区2")
end)
end

path.沃伦姆德的薄暮 = function(x)
Expand Down Expand Up @@ -1388,30 +1382,12 @@ path.源石尘行动 = function(x)
path.开始游戏(x)
end

path.漫漫独行 = function(x)
path.生于黑夜(x, function() tap("漫漫独行") end)
path.遗尘漫步 = function(x)
path.生于黑夜(x, function() tap("遗尘漫步") end)
end

path.覆潮之下 = function(x)
local p = update(path.base, {
面板 = function()
tap("面板作战活动")
sleep(2)
tap("荒败盐风")
swipq(x)
if not findTap("作战列表" .. x) then
log(x .. "未找到")
unfound_fight[x] = (unfound_fight[x] or 0) + 1
end
return true
end,
["作战列表" .. x] = function()
findTap("作战列表" .. x)
return true
end,
})
auto(p)
path.开始游戏(x)
path.生于黑夜(x, function() tap("覆潮之下") end)
end

error = function()
Expand Down Expand Up @@ -1510,3 +1486,27 @@ update_app = function()
out_of_app = false
return true
end

path.灯火序曲 = function(x)
local p = update(path.base, {
面板 = function()
tap("面板作战活动")
sleep(2)
tap("路线安排")
sleep(1)
swipq(x)
sleep(1)
if not findTap("作战列表" .. x) then
log(x .. "未找到")
unfound_fight[x] = (unfound_fight[x] or 0) + 1
end
return true
end,
["作战列表" .. x] = function()
findTap("作战列表" .. x)
return true
end,
})
auto(p)
path.开始游戏(x)
end
Loading

0 comments on commit 46de1f7

Please sign in to comment.