From 89fbbd25959513fffe496bf14738f20676d78d6c Mon Sep 17 00:00:00 2001 From: "firedcto@gmail.com" Date: Sat, 19 Oct 2024 19:31:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=89=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E4=BB=A5=E4=B8=8A=E6=B2=BB=E7=96=97=E8=A7=92=E8=89=B2=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=87=AA=E5=8A=A8=E6=88=98=E6=96=97=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/zh_CN/LC_MESSAGES/ok.mo | Bin 8280 -> 8422 bytes i18n/zh_CN/LC_MESSAGES/ok.po | 5 ++++- src/char/BaseChar.py | 4 +++- src/char/Encore.py | 4 +++- src/task/BaseCombatTask.py | 7 +++++++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/i18n/zh_CN/LC_MESSAGES/ok.mo b/i18n/zh_CN/LC_MESSAGES/ok.mo index 81804db665eb43af46f00dd3efd5354b30ab6317..03937f84491ad1f42eea489d35d86f873a935415 100644 GIT binary patch delta 2215 zcmYM#e@xVM9LMp`5=DM$N-E@!Z;7?SYB+_=RA@Cz#hhAEv*M&9Esk?|heKO;&dp!w zEH{MFrHo~{+XBW>xzcX=hy7qVYOU;#FcVIgYyFtE==bwA-dpT@-^b_u`F?)9KcD-4 zjtga}^2orHv}VU&gwISqd1;EA%bxhZ>nP?BXJHl2!djez2QUxgn2AZ$IG^DZyn-3{ z2daGdZAGUan#m`$Dz;fE{!L9fSPQ}G! ztwbtN6IWTh71wInyD2QP541+9ENszCt9;ZD>_BW4q7pcacePziKeoJ4JTA1d*S zsPV6v>13n+1*jdJH;MgMhf*pu(JEvU+!LsQpR@Wfs^c!?atFC-fEa3LI#Cn$B6GP< zQT;CCU=C$s-bpn%pI@NU!qWvE0R#ksf<_0~sG106#y*TGFIOql2J zF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ration, 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}')