diff --git a/tasks/combat/combat.py b/tasks/combat/combat.py index 312402b65..702d8dc0b 100644 --- a/tasks/combat/combat.py +++ b/tasks/combat/combat.py @@ -162,7 +162,8 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, MapControlJ return False # Click - if self.appear(COMBAT_AGAIN, interval=2): + # Game client might slow to response COMBAT_AGAIN clicks + if self.appear(COMBAT_AGAIN, interval=5): if self._combat_can_again(): self.device.click(COMBAT_AGAIN) else: diff --git a/tasks/combat/prepare.py b/tasks/combat/prepare.py index d41693b0e..14fb4432d 100644 --- a/tasks/combat/prepare.py +++ b/tasks/combat/prepare.py @@ -62,7 +62,10 @@ class CombatPrepare(UI): else: self.device.screenshot() - current, _, _ = TrailblazePowerOcr(OCR_TRAILBLAZE_POWER).ocr_single_line(self.device.image) + current, _, total = TrailblazePowerOcr(OCR_TRAILBLAZE_POWER).ocr_single_line(self.device.image) + # Empty result + if total == 0: + continue # Confirm if it is > 180, sometimes just OCR errors if current > 180 and timeout.reached(): break