From d2fad6bd450b965ae14efe37d6a4716e4abbf655 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:13:00 +0800 Subject: [PATCH] Fix: Combat auto on cloud game --- tasks/combat/state.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/combat/state.py b/tasks/combat/state.py index 9c21b3251..ed11c418f 100644 --- a/tasks/combat/state.py +++ b/tasks/combat/state.py @@ -54,6 +54,7 @@ class CombatState(UI): def combat_state_reset(self): self._combat_auto_checked = False self._combat_2x_checked = False + self._combat_click_interval.clear() def handle_combat_state(self, auto=True, speed_2x=True): """ @@ -65,6 +66,10 @@ class CombatState(UI): if self._combat_auto_checked and self._combat_2x_checked: return False if not self.is_combat_executing(): + if not self._combat_auto_checked and auto: + if self._combat_click_interval.started() and not self._combat_click_interval.reached(): + logger.info('Combat on going, _combat_auto_checked') + self._combat_auto_checked = True return False if not self._combat_2x_checked: