Compare commits
5 commits
eca58248f8
...
523fb8d5e4
Author | SHA1 | Date | |
---|---|---|---|
523fb8d5e4 | |||
9db50ca23a | |||
3fdf893d55 | |||
99c3cfa188 | |||
68496d1c86 |
21 changed files with 65 additions and 68 deletions
|
@ -1 +1 @@
|
|||
Subproject commit c28ad83dacbac1340173e3bf18da25ff24afebb1
|
||||
Subproject commit dafe8a527f8270392c3e901008bff733b5e8322e
|
|
@ -42,5 +42,4 @@ class BattleChooseSolver(SceneGraphSolver):
|
|||
elif scene in self.waiting_scene:
|
||||
self.waiting_solver()
|
||||
else:
|
||||
self.sleep(2) # 选完人后回到编队界面会过一会才变
|
||||
return True
|
||||
return not self.animation(((0, 0), (1920, 1080)))
|
||||
|
|
|
@ -190,10 +190,12 @@ class BattleAgentChooseSolver(SceneGraphSolver):
|
|||
return self.choose_agents()
|
||||
|
||||
elif scene == Scene.OPERATOR_SELECT:
|
||||
self.tap("choose_agent/fast_select")
|
||||
self.ctap("choose_agent/fast_select", 3)
|
||||
elif scene == Scene.SSS_SQUAD:
|
||||
self.tap("sss/choose/fast_select")
|
||||
self.ctap("sss/choose/fast_select", 3)
|
||||
elif scene in self.waiting_scene:
|
||||
self.waiting_solver()
|
||||
elif scene == Scene.OPERATOR_MANAGEMENT: # 动画中可能误识别
|
||||
return
|
||||
else:
|
||||
return True
|
||||
|
|
|
@ -179,14 +179,15 @@ class ChooseSupportSolver(SceneGraphSolver):
|
|||
self.swiped = False
|
||||
|
||||
elif scene == Scene.OPERATOR_SUPPORT_AGENT:
|
||||
if self.animation(((0, 0), (1920, 1080))):
|
||||
return
|
||||
if not self.find(
|
||||
"choose_agent/support_skill_be_choosen", scope=skill_pos[self.skill - 1]
|
||||
):
|
||||
self.tap(skill_pos[self.skill - 1])
|
||||
else:
|
||||
self.tap("fight/use")
|
||||
self.ctap("fight/use", 3)
|
||||
self.success = True
|
||||
self.sleep(1)
|
||||
|
||||
elif scene == Scene.OPERATOR_SELECT:
|
||||
if self.success:
|
||||
|
|
|
@ -104,7 +104,6 @@ class CopyWorksSolver(SceneGraphSolver):
|
|||
if self.conf.use_medicine:
|
||||
logger.info("体力不足,使用理智药")
|
||||
self.tap((1635, 865))
|
||||
self.sleep(1)
|
||||
return
|
||||
else:
|
||||
logger.info("体力不足,未设置使用理智药")
|
||||
|
|
|
@ -269,16 +269,19 @@ class FightMixin:
|
|||
|
||||
def use_skill(self, x, y):
|
||||
"开技能"
|
||||
start_time = datetime.now()
|
||||
if not self.Bullet_Time:
|
||||
self.select(x, y)
|
||||
if not self.check_operators(): # 利用这个空档期更新可部署干员
|
||||
self.update_operators()
|
||||
elapsed_time = datetime.now() - start_time
|
||||
remaining_time = max(timedelta(seconds=0.4) - elapsed_time, timedelta(0))
|
||||
self.sleep(remaining_time.total_seconds())
|
||||
else:
|
||||
self.Bullet_Time = False
|
||||
for _ in range(5):
|
||||
if flag := self.find("fight/attack") or self.find("fight/defend"):
|
||||
break
|
||||
else:
|
||||
self.sleep(0.2)
|
||||
if not flag:
|
||||
return False
|
||||
pos = self.calc.get_skill_screen_pos(x, y)
|
||||
pos = int(pos.x), int(pos.y)
|
||||
self.tap(pos)
|
||||
|
|
|
@ -70,7 +70,7 @@ class SSSSolver(SceneGraphSolver):
|
|||
deadline=self.deadline,
|
||||
):
|
||||
return
|
||||
self.tap("sss/settlement_commission")
|
||||
self.ctap("sss/settlement_commission", 3)
|
||||
|
||||
elif (
|
||||
scene == Scene.SSS_MAIN and config.conf.sss.finish_while_full and is_full()
|
||||
|
@ -101,7 +101,7 @@ class SSSSolver(SceneGraphSolver):
|
|||
elif scene == Scene.SSS_SQUAD:
|
||||
if config.conf.sss.choose_agent:
|
||||
SSSChooseSolver().run()
|
||||
self.tap("sss/squad")
|
||||
self.ctap("sss/squad", 3)
|
||||
|
||||
elif scene in self.waiting_scene:
|
||||
self.waiting_solver()
|
||||
|
|
|
@ -24,8 +24,8 @@ class SSSChooseSolver(SceneGraphSolver):
|
|||
|
||||
def transition(self):
|
||||
if (scene := self.scene()) == Scene.OPERATOR_AGENT_SELECT:
|
||||
self.tap("choose_agent/battle_confirm")
|
||||
self.ctap("choose_agent/battle_confirm", 3)
|
||||
elif scene in self.waiting_scene:
|
||||
self.waiting_solver()
|
||||
elif scene == Scene.SSS_SQUAD:
|
||||
else:
|
||||
return True
|
||||
|
|
|
@ -95,12 +95,10 @@ class SSSDROPSolver(SceneGraphSolver):
|
|||
if self.timeout():
|
||||
self.success = False
|
||||
return True
|
||||
if self.choose and (
|
||||
self.find("sss/drop_check") or self.find("sss/no_drop_check")
|
||||
):
|
||||
self.tap((1794, 900))
|
||||
self.choose = False
|
||||
self.sleep(2)
|
||||
if self.animation(((0, 300), (1920, 800))):
|
||||
return
|
||||
if self.find("sss/drop_check") or self.find("sss/no_drop_check"):
|
||||
self.ctap((1794, 900), 3)
|
||||
return
|
||||
else:
|
||||
opers = self.match_operators()
|
||||
|
@ -109,34 +107,34 @@ class SSSDROPSolver(SceneGraphSolver):
|
|||
|
||||
for drop in self.drops:
|
||||
if drop in opers:
|
||||
self.tap(opers[drop])
|
||||
self.choose = True
|
||||
self.ctap(opers[drop], 3)
|
||||
return
|
||||
if len(opers):
|
||||
self.tap(opers.popitem()[1])
|
||||
self.choose = True
|
||||
self.ctap(opers.popitem()[1], 3)
|
||||
return
|
||||
|
||||
elif scene == Scene.SSS_DROP_IN_FIGHT:
|
||||
for drop in self.drops:
|
||||
if drop not in agent:
|
||||
if pos := self.find_EC(drop, 29, ((510, 700), (1480, 770))):
|
||||
self.tap(pos)
|
||||
self.tap((1750, 550))
|
||||
self.ctap(pos, 3)
|
||||
self.ctap((1750, 550), 3)
|
||||
return
|
||||
else:
|
||||
if pos := self.find_PR_in_fight(drop, ((468, 735), (1321, 797))):
|
||||
self.tap(pos)
|
||||
self.tap((1750, 550))
|
||||
self.ctap(pos, 3)
|
||||
self.ctap((1750, 550), 3)
|
||||
return
|
||||
self.tap("sss/abandon")
|
||||
self.ctap("sss/abandon", 3)
|
||||
|
||||
elif scene == Scene.SSS_DROP_EC_BEFORE_FIGHT:
|
||||
if self.timeout():
|
||||
self.success = False
|
||||
return True
|
||||
if self.choose and self.find("sss/drop_check"):
|
||||
self.tap((1794, 900))
|
||||
if self.animation(((0, 300), (1920, 800))):
|
||||
return
|
||||
if self.find("sss/drop_check"):
|
||||
self.ctap((1794, 900), 3)
|
||||
return
|
||||
else:
|
||||
ec_pos = [((470, 400), (800, 450)), ((1200, 400), (1530, 450))]
|
||||
|
@ -146,15 +144,12 @@ class SSSDROPSolver(SceneGraphSolver):
|
|||
res[ocr_rec(img)] = pos
|
||||
for drop in self.drops:
|
||||
if drop in res:
|
||||
self.tap(res[drop])
|
||||
self.choose = True
|
||||
self.ctap(res[drop], 3)
|
||||
return
|
||||
|
||||
elif scene == Scene.SSS_ABANDON_DROP_IN_FIGHT:
|
||||
self.scene_graph_step(Scene.OPERATOR_FIGHT)
|
||||
|
||||
elif scene in [Scene.OPERATOR_FIGHT, Scene.SSS_ACTION]:
|
||||
return True
|
||||
|
||||
elif scene in self.waiting_scene:
|
||||
self.waiting_solver()
|
||||
|
||||
|
|
|
@ -147,14 +147,11 @@ class SSSFightSolver(SceneGraphSolver, FightMixin):
|
|||
Scene.SSS_DROP_EC_BEFORE_FIGHT,
|
||||
Scene.SSS_DROP_IN_FIGHT,
|
||||
]:
|
||||
self.sleep(2)
|
||||
if not SSSDROPSolver().run():
|
||||
self.scene_graph_navigation(Scene.SSS_DEPLOY)
|
||||
return True
|
||||
self.clear_op()
|
||||
elif scene == Scene.SSS_ACTION:
|
||||
self.tap((1651, 967))
|
||||
elif scene == Scene.SSS_ACCOMPLISHED:
|
||||
return True
|
||||
else:
|
||||
return True
|
||||
|
|
|
@ -72,37 +72,37 @@ class SSSNaviSolver(SceneGraphSolver):
|
|||
self.tap(va(pos, (-240, 0)))
|
||||
elif scene == Scene.SSS_START:
|
||||
if self.mode == "normal" and self.find("sss/switch_to_normal"):
|
||||
self.tap("sss/switch_to_normal")
|
||||
self.ctap("sss/switch_to_normal", 3)
|
||||
return
|
||||
elif self.mode == "ex" and self.find("sss/switch_to_ex"):
|
||||
self.tap("sss/switch_to_ex")
|
||||
self.ctap("sss/switch_to_ex", 3)
|
||||
return
|
||||
if config.conf.sss.finish_while_full and self.find("sss/ope/prts"):
|
||||
return True
|
||||
|
||||
self.tap((1555, 966))
|
||||
self.ctap((1555, 966), 3)
|
||||
elif scene == Scene.SSS_CHOOSE_EC:
|
||||
for scope in ec_pos:
|
||||
img = cropimg(config.recog.img, scope)
|
||||
if ocr_rec(img) == self.ec:
|
||||
self.tap(scope)
|
||||
self.ctap(scope, 3)
|
||||
return
|
||||
|
||||
elif scene == Scene.SSS_EC:
|
||||
self.tap("sss/ec")
|
||||
self.ctap("sss/ec", 3)
|
||||
elif scene == Scene.SSS_DEVICE:
|
||||
current = self.get_device()
|
||||
for i in range(8):
|
||||
if current[i] != self.device[i]:
|
||||
self.tap(sl[i])
|
||||
self.ctap(sl[i], 3)
|
||||
return
|
||||
self.ctap((1644, 969))
|
||||
elif scene == Scene.SSS_SQUAD:
|
||||
if config.conf.sss.choose_agent:
|
||||
return True
|
||||
self.tap("sss/squad")
|
||||
self.ctap("sss/squad", 3)
|
||||
elif scene == Scene.SSS_EC_EX:
|
||||
self.tap("sss/check_ex")
|
||||
self.ctap("sss/check_ex", 3)
|
||||
|
||||
else:
|
||||
self.scene_graph_step(Scene.SSS_MAIN)
|
||||
|
|
|
@ -17,12 +17,12 @@ class SSSOpeSolver(SceneGraphSolver):
|
|||
def transition(self):
|
||||
if (scene := self.scene()) == Scene.SSS_START:
|
||||
if self.find("sss/ope/prts") and not self.check:
|
||||
self.tap("sss/ope/prts")
|
||||
self.ctap("sss/ope/prts", 3)
|
||||
return
|
||||
elif self.find("sss/ope/elimi_agency_on") and self.check:
|
||||
self.tap("sss/ope/elimi_agency_on")
|
||||
self.ctap("sss/ope/elimi_agency_on", 3)
|
||||
return
|
||||
self.tap((1555, 966))
|
||||
self.ctap((1555, 966), 3)
|
||||
|
||||
elif scene in [Scene.SSS_EC, Scene.SSS_EC_EX] and self.check:
|
||||
return True
|
||||
|
|
BIN
mower/static/CONSUME.pkl
(Stored with Git LFS)
BIN
mower/static/CONSUME.pkl
(Stored with Git LFS)
Binary file not shown.
BIN
mower/static/MATERIAL.pkl
(Stored with Git LFS)
BIN
mower/static/MATERIAL.pkl
(Stored with Git LFS)
Binary file not shown.
BIN
mower/static/NORMAL.pkl
(Stored with Git LFS)
BIN
mower/static/NORMAL.pkl
(Stored with Git LFS)
Binary file not shown.
BIN
mower/static/avatar.pkl
(Stored with Git LFS)
BIN
mower/static/avatar.pkl
(Stored with Git LFS)
Binary file not shown.
BIN
mower/static/operator_room.model
(Stored with Git LFS)
BIN
mower/static/operator_room.model
(Stored with Git LFS)
Binary file not shown.
BIN
mower/static/portrait.pkl
(Stored with Git LFS)
BIN
mower/static/portrait.pkl
(Stored with Git LFS)
Binary file not shown.
BIN
mower/static/recruit_result.pkl
(Stored with Git LFS)
BIN
mower/static/recruit_result.pkl
(Stored with Git LFS)
Binary file not shown.
|
@ -19,6 +19,7 @@ def enter_sss(solver: BaseSolver):
|
|||
@edge(Scene.SSS_MAIN, Scene.TERMINAL_REGULAR)
|
||||
@edge(Scene.SSS_ACTION, Scene.SSS_DEPLOY)
|
||||
@edge(Scene.SSS_ACTION, Scene.SSS_REDEPLOY)
|
||||
@edge(Scene.SSS_CHOOSE_EC, Scene.SSS_EXIT_CONFIRM)
|
||||
@edge(Scene.SSS_START, Scene.SSS_MAIN)
|
||||
@edge(Scene.SSS_DROP_AGENT_BEFORE_FIGHT, Scene.SSS_DEPLOY)
|
||||
@edge(Scene.SSS_DEPLOY, Scene.SSS_MAIN)
|
||||
|
@ -30,7 +31,7 @@ def enter_sss(solver: BaseSolver):
|
|||
@edge(Scene.SSS_OPERATION_COMPLETE, Scene.SSS_DEPLOY)
|
||||
@edge(Scene.SSS_SQUAD, Scene.SSS_EXIT_CONFIRM)
|
||||
def sss_back(solver: BaseSolver):
|
||||
solver.back()
|
||||
solver.cback(2)
|
||||
|
||||
|
||||
@edge(Scene.SSS_TERMINATED, Scene.SSS_START)
|
||||
|
|
|
@ -156,7 +156,6 @@ color = {
|
|||
"sss/main": (1569, 256),
|
||||
"sss/no_drop_check": (1669, 865),
|
||||
"sss/ope/elimi_agency_on": (1653, 857),
|
||||
"sss/ope/prts": (1369, 857),
|
||||
"sss/ope/use": (1627, 965),
|
||||
"sss/redeploy": (1644, 970),
|
||||
"sss/redeploy_ex": (1642, 968),
|
||||
|
@ -315,6 +314,7 @@ template_matching = {
|
|||
"sss/drop/TANK": ((0, 745), (1920, 808)),
|
||||
"sss/drop/WARRIOR": ((0, 745), (1920, 808)),
|
||||
"sss/drop_EC": (48, 182),
|
||||
"sss/ope/prts": (1369, 857),
|
||||
"sss/operation_complete": (30, 770),
|
||||
"sss/terminated": (29, 241),
|
||||
"stone_fragment": None,
|
||||
|
|
Loading…
Add table
Reference in a new issue