mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
commit
9e999b0961
@ -64,13 +64,13 @@ class CombatPrepare(StaminaStatus):
|
|||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
data = self.update_stamina_status(image=self.device.image)
|
data = self.update_stamina_status(image=self.device.image)
|
||||||
|
if timeout.reached():
|
||||||
|
break
|
||||||
if data.stamina is None:
|
if data.stamina is None:
|
||||||
continue
|
continue
|
||||||
# Confirm if it is > 240, sometimes just OCR errors
|
# Confirm if it is > 240, sometimes just OCR errors
|
||||||
# if current > 240 and timeout.reached():
|
# if current > 240 and timeout.reached():
|
||||||
# break
|
# break
|
||||||
if expect_reduce and timeout.reached():
|
|
||||||
break
|
|
||||||
if expect_reduce and data.stamina >= before:
|
if expect_reduce and data.stamina >= before:
|
||||||
continue
|
continue
|
||||||
if data.stamina <= 240:
|
if data.stamina <= 240:
|
||||||
|
@ -20,6 +20,8 @@ class StaminaOcr(DigitCounter):
|
|||||||
result = re.sub(r'1240$', '/240', result)
|
result = re.sub(r'1240$', '/240', result)
|
||||||
# 0*0/24 -> 0/240
|
# 0*0/24 -> 0/240
|
||||||
result = re.sub(r'24$', '240', result)
|
result = re.sub(r'24$', '240', result)
|
||||||
|
# * 50/2401+)
|
||||||
|
result = result.replace('/2401', '/240')
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user