Fix: Increase retry interval of COMBAT_AGAIN

This commit is contained in:
LmeSzinc 2023-07-06 00:37:21 +08:00
parent e9a02da75b
commit abfd96a344
2 changed files with 6 additions and 2 deletions

View File

@ -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:

View File

@ -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