MCPcopy Create free account
hub / github.com/runhey/OnmyojiAutoScript / check_lock

Method check_lock

tasks/Orochi/script_task.py:93–113  ·  view source on GitHub ↗

检查是否锁定阵容, 要求在八岐大蛇界面 :param lock: :return:

(self, lock: bool = True)

Source from the content-addressed store, hash-verified

91 return True
92
93 def check_lock(self, lock: bool = True) -> bool:
94 """
95 检查是否锁定阵容, 要求在八岐大蛇界面
96 :param lock:
97 :return:
98 """
99 logger.info('Check lock: %s', lock)
100 if lock:
101 while 1:
102 self.screenshot()
103 if self.appear(self.I_OROCHI_LOCK):
104 return True
105 if self.appear_then_click(self.I_OROCHI_UNLOCK, interval=1):
106 continue
107 else:
108 while 1:
109 self.screenshot()
110 if self.appear(self.I_OROCHI_UNLOCK):
111 return True
112 if self.appear_then_click(self.I_OROCHI_LOCK, interval=1):
113 continue
114
115
116

Callers 6

runMethod · 0.95
runMethod · 0.95
run_leaderMethod · 0.95
run_aloneMethod · 0.95
run_wildMethod · 0.95
runMethod · 0.95

Calls 3

appearMethod · 0.80
appear_then_clickMethod · 0.80
screenshotMethod · 0.45

Tested by

no test coverage detected