1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 06:18:21 +08:00
This commit is contained in:
GH Action - Upstream Sync
2026-02-18 20:51:23 +00:00
6 changed files with 67 additions and 49 deletions

View File

@@ -15,6 +15,15 @@ from module.ui.assets import BACK_ARROW, RAID_CHECK
from module.ui.page import page_rpg_stage
class RaidCounterPostMixin(DigitCounter):
def after_process(self, result):
# fix result like "915/", "1515"
result = result.strip('/')
if result.isdigit() and len(result) > 2 and result.endswith('15'):
result = f'{result[:-2]}/15'
return result
class RaidCounter(DigitCounter):
def pre_process(self, image):
image = super().pre_process(image)
@@ -165,7 +174,7 @@ def raid_ocr(raid, mode):
if mode == 'ex':
return Digit(button, letter=(255, 239, 215), threshold=128)
else:
return DigitCounter(button, lang='cnocr', letter=(154, 148, 133), threshold=128)
return RaidCounterPostMixin(button, lang='cnocr', letter=(154, 148, 133), threshold=128)
def pt_ocr(raid):

View File

@@ -95,7 +95,7 @@ class RaidRun(Raid, CampaignEvent):
# UI switches
if not self._raid_has_oil_icon:
self.ui_goto(page_campaign_menu)
self.ui_ensure(page_campaign_menu)
if self.triggered_stop_condition(oil_check=True, coin_check=True):
break