mirror of
https://github.com/ok-oldking/ok-wuthering-waves.git
synced 2025-06-05 08:25:28 +00:00
优化战斗退出检查, 优先检查倒计时
This commit is contained in:
parent
9c3813a8e7
commit
6637575311
@ -4,6 +4,7 @@ from src.char.BaseChar import BaseChar
|
||||
class Calcharo(BaseChar):
|
||||
def do_perform(self):
|
||||
if self.has_intro:
|
||||
self.logger.debug('Calcharo wait intro animation')
|
||||
self.sleep(1)
|
||||
self.task.wait_in_team_and_world(time_out=3, raise_if_not_found=False)
|
||||
self.check_combat()
|
||||
|
@ -151,13 +151,13 @@ class CombatCheck:
|
||||
in_team = self.in_team()[0]
|
||||
if not in_team:
|
||||
return self.reset_to_false(recheck=False, reason="not in team")
|
||||
if self.check_count_down():
|
||||
return True
|
||||
if self.boss_lv_template is not None:
|
||||
if self.check_boss(in_team):
|
||||
return True
|
||||
else:
|
||||
return self.reset_to_false(recheck=False, reason="boss disappear")
|
||||
if self.check_count_down():
|
||||
return True
|
||||
if not self.check_health_bar():
|
||||
logger.debug('not in team or no health bar')
|
||||
if not self.target_enemy():
|
||||
|
@ -168,8 +168,8 @@ class BaseCombatTask(BaseTask, FindFeature, OCR, CombatCheck):
|
||||
y = self.height_of_screen(0.5)
|
||||
return super().click(x, y, move_back, name, interval)
|
||||
|
||||
def wait_in_team_and_world(self, time_out=10):
|
||||
return self.wait_until(self.in_team_and_world, time_out=time_out, raise_if_not_found=True)
|
||||
def wait_in_team_and_world(self, time_out=10, raise_if_not_found=True):
|
||||
return self.wait_until(self.in_team_and_world, time_out=time_out, raise_if_not_found=raise_if_not_found)
|
||||
|
||||
def in_team_and_world(self):
|
||||
return self.in_team()[
|
||||
|
Loading…
x
Reference in New Issue
Block a user