diff --git a/i18n/zh_CN/LC_MESSAGES/ok.mo b/i18n/zh_CN/LC_MESSAGES/ok.mo index 81804db..03937f8 100644 Binary files a/i18n/zh_CN/LC_MESSAGES/ok.mo and b/i18n/zh_CN/LC_MESSAGES/ok.mo differ diff --git a/i18n/zh_CN/LC_MESSAGES/ok.po b/i18n/zh_CN/LC_MESSAGES/ok.po index 035899b..f5a3c04 100644 --- a/i18n/zh_CN/LC_MESSAGES/ok.po +++ b/i18n/zh_CN/LC_MESSAGES/ok.po @@ -388,4 +388,7 @@ msgid "Auto Login Success" msgstr "自动登录成功" msgid "Must choose at least 2 Boss to Farm" -msgstr "必须至少选择两个Boss" \ No newline at end of file +msgstr "必须至少选择两个Boss" + +msgid "Can not auto combat because team can only have one healer at most" +msgstr "无法自动战斗, 队伍最多只能有一个治疗角色" \ No newline at end of file diff --git a/src/char/BaseChar.py b/src/char/BaseChar.py index f371c41..3d7913c 100644 --- a/src/char/BaseChar.py +++ b/src/char/BaseChar.py @@ -281,7 +281,7 @@ def click_liberation(self, con_less_than=-1, send_click=False, wait_if_cd_ready= self.logger.info(f'click_liberation end {duration}') return clicked - def add_freeze_duration(self, start, duration=-1, freeze_time=0.2): + def add_freeze_duration(self, start, duration=-1, freeze_time=0.1): if duration == -1: duration = time.time() - start if start > 0 and duration > freeze_time: @@ -294,6 +294,8 @@ def time_elapsed_accounting_for_freeze(self, start): for freeze_start, duration, freeze_time in self.freeze_durations: if start < freeze_start: to_minus += duration - freeze_time + if to_minus != 0: + self.logger.debug(f'time_elapsed_accounting_for_freeze to_minus {to_minus}') return time.time() - start - to_minus def get_liberation_key(self): diff --git a/src/char/Encore.py b/src/char/Encore.py index fe1d3f8..28b2f9a 100644 --- a/src/char/Encore.py +++ b/src/char/Encore.py @@ -55,7 +55,9 @@ def can_resonance_step2(self, delay=2): return self.time_elapsed_accounting_for_freeze(self.last_resonance) < delay def do_get_switch_priority(self, current_char: BaseChar, has_intro=False, target_low_con=False): - if self.time_elapsed_accounting_for_freeze(self.last_heavy) < 4: + self.logger.debug( + f'encore last heavy time {self.last_heavy} {self.time_elapsed_accounting_for_freeze(self.last_heavy)}') + if self.time_elapsed_accounting_for_freeze(self.last_heavy) < 4.5: return Priority.MIN elif self.still_in_liberation() or self.can_resonance_step2(): self.logger.info( diff --git a/src/task/BaseCombatTask.py b/src/task/BaseCombatTask.py index 7040bbf..b94f981 100644 --- a/src/task/BaseCombatTask.py +++ b/src/task/BaseCombatTask.py @@ -14,6 +14,7 @@ from src.char import BaseChar from src.char.BaseChar import Priority, dot_color from src.char.CharFactory import get_char_by_pos +from src.char.Healer import Healer from src.combat.CombatCheck import CombatCheck from src.task.BaseWWTask import BaseWWTask @@ -349,13 +350,19 @@ def load_chars(self): self.chars = self.chars[:2] logger.info(f'team size changed to 2') + healer_count = 0 for char in self.chars: if char is not None: char.reset_state() + if isinstance(char, Healer): + healer_count += 1 if char.index == current_index: char.is_current_char = True else: char.is_current_char = False + if healer_count >= 2: + self.log_error(f"Can not auto combat because team can only have one healer at most", notify=True, tray=True) + self.pause() self.combat_start = time.time() self.log_info(f'load chars success {self.chars}')