mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-15 22:19:18 +00:00
Fix: Increase retry interval of COMBAT_AGAIN
This commit is contained in:
parent
e9a02da75b
commit
abfd96a344
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user