From 4f25dc4225476346a3598fd788049ed15113e5e7 Mon Sep 17 00:00:00 2001 From: "firedcto@gmail.com" Date: Wed, 31 Jul 2024 09:02:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D=E6=9C=88?= =?UTF-8?q?=E5=8D=A1=E9=97=AE=E9=A2=98=20=E4=BC=98=E5=8C=96=E4=BB=8A?= =?UTF-8?q?=E6=B1=90=E6=B8=8A=E6=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/char/Jinhsi.py | 12 +++++++++--- src/char/Yuanwu.py | 5 ++++- src/task/BaseWWTask.py | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/char/Jinhsi.py b/src/char/Jinhsi.py index a7c850a..f83a932 100644 --- a/src/char/Jinhsi.py +++ b/src/char/Jinhsi.py @@ -11,15 +11,20 @@ class Jinhsi(BaseChar): self.has_free_intro = False self.incarnation = False self.incarnation_cd = False + self.last_fly_e_time = time.time() def do_perform(self): if self.incarnation: self.handle_incarnation() - return self.switch_next_char() - if self.has_intro or self.incarnation_cd: + elif self.has_intro or self.incarnation_cd: self.handle_intro() return self.switch_next_char() - self.click_echo() + elif self.click_echo(): + pass + elif self.time_elapsed_accounting_for_freeze(self.last_free_intro) < 8 and self.click_resonance()[0]: + pass + else: + self.normal_attack() return self.switch_next_char() def reset_state(self): @@ -95,6 +100,7 @@ class Jinhsi(BaseChar): if not self.click_echo(): self.task.click() return + self.last_fly_e_time = start if self.click_liberation(send_click=True): self.continues_normal_attack(0.3) else: diff --git a/src/char/Yuanwu.py b/src/char/Yuanwu.py index bfac2a2..e5b5d69 100644 --- a/src/char/Yuanwu.py +++ b/src/char/Yuanwu.py @@ -16,5 +16,8 @@ class Yuanwu(BaseChar): self.click_liberation(con_less_than=1) if self.is_forte_full(): self.send_resonance_key(down_time=0.6, post_sleep=0.2) - self.click_echo() + elif self.click_echo(): + pass + else: + self.continues_normal_attack(0.2) self.switch_next_char() diff --git a/src/task/BaseWWTask.py b/src/task/BaseWWTask.py index a0b7eef..db89e22 100644 --- a/src/task/BaseWWTask.py +++ b/src/task/BaseWWTask.py @@ -97,15 +97,15 @@ class BaseWWTask(BaseTask, FindFeature, OCR): if self.should_check_monthly_card(): start = time.time() logger.info(f'check_for_monthly_card start check') - if self.check_combat(): + if self.in_combat(): logger.info(f'check_for_monthly_card in combat return') return time.time() - start if self.in_team_and_world(): logger.info(f'check_for_monthly_card in team send sleep until monthly card popup') monthly_card = self.wait_until(self.handle_monthly_card, time_out=120, raise_if_not_found=False) logger.info(f'wait monthly card end {monthly_card}') - cost = time.time() - start - return cost + cost = time.time() - start + return cost return 0 def should_check_monthly_card(self):