代理作战相关ctap
All checks were successful
ci/woodpecker/push/check_format Pipeline was successful

This commit is contained in:
Elaina 2024-12-17 23:18:36 +08:00
parent e87a03015f
commit 47f10cc2d1

View file

@ -137,11 +137,11 @@ class OperationSolver(BaseSolver):
if config.recog.gray[65][1333] < 200: # 演习券
return
if config.recog.gray[907][1600] < 127: # 代理指挥
self.tap((1776, 908))
self.ctap((1776, 908), 3)
return
if self.number(((1520, 890), (1545, 930)), 28) > 1:
self.tap((1500, 910))
self.tap((1500, 801))
self.ctap((1500, 910), 3)
self.ctap((1500, 801), 3)
return
self.ope_start()
elif scene == Scene.OPERATOR_SELECT:
@ -158,18 +158,18 @@ class OperationSolver(BaseSolver):
return True
elif scene == Scene.OPERATOR_ONGOING:
if self.find("ope_agency_fail"):
self.tap((121, 79))
self.ctap((121, 79), 3)
else:
self.sleep(10)
elif scene == Scene.OPERATOR_GIVEUP:
self.tap("fight/give_up")
self.ctap("fight/give_up", 3)
elif scene == Scene.OPERATOR_RECOVER_POTION:
confirm = (1635, 865)
if config.conf.use_all_medicine:
if self.check_timeout():
return True
logger.info("自动使用全部理智药")
self.tap(confirm)
self.ctap(confirm, 3)
return
use_medicine = False
# 先看设置是否吃药
@ -189,7 +189,7 @@ class OperationSolver(BaseSolver):
if self.check_timeout():
return True
logger.info("使用即将过期的理智药")
self.tap(confirm)
self.ctap(confirm, 3)
return
self.sanity_drain = True
return True
@ -204,14 +204,14 @@ class OperationSolver(BaseSolver):
logger.info("本周剿灭已完成")
return True
if pos := self.find("ope_elimi_agency"):
self.tap(pos)
self.ctap(pos, 3)
return
self.ope_start()
elif scene == Scene.OPERATOR_ELIMINATE_AGENCY:
if self.find("can_not_use_ope"):
notify("当期剿灭代理获取合成玉数量为0", "WARNING")
return True
self.tap("ope_elimi_agency_confirm")
self.ctap("ope_elimi_agency_confirm", 3)
elif scene == Scene.UPGRADE:
self.tap((960, 540))
elif scene in self.waiting_scene: