mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 23:18:22 +08:00
Fix: ui_current unrecognised after raid
- Fix ui_ensure stop without error - Fix log string for callable expected_end
This commit is contained in:
@@ -3,6 +3,7 @@ from module.combat.combat import Combat
|
||||
from module.logger import logger
|
||||
from module.map.map_operation import MapOperation
|
||||
from module.raid.assets import *
|
||||
from module.ui.assets import RAID_CHECK
|
||||
|
||||
|
||||
class Raid(MapOperation, Combat):
|
||||
@@ -93,8 +94,11 @@ class Raid(MapOperation, Combat):
|
||||
if self.combat_appear():
|
||||
break
|
||||
|
||||
def raid_expected_end(self):
|
||||
return self.appear(RAID_CHECK, offset=(30, 30))
|
||||
|
||||
def raid_execute_once(self, mode):
|
||||
logger.hr('Raid Execute')
|
||||
self.raid_enter(mode=mode)
|
||||
self.combat(balance_hp=False, expected_end='in_ui')
|
||||
self.combat(balance_hp=False, expected_end=self.raid_expected_end)
|
||||
logger.hr('Raid End')
|
||||
|
||||
@@ -18,6 +18,10 @@ class RaidRun(Raid, CampaignRun):
|
||||
self.campaign = self # A trick to call CampaignRun
|
||||
self.campaign_name_set(f'{name}_{mode}')
|
||||
|
||||
# UI ensure
|
||||
self.device.screenshot()
|
||||
self.ui_ensure(page_raid)
|
||||
|
||||
self.run_count = 0
|
||||
while 1:
|
||||
if self.handle_app_restart():
|
||||
@@ -35,10 +39,6 @@ class RaidRun(Raid, CampaignRun):
|
||||
else:
|
||||
logger.info(f'Count: [{self.run_count}]')
|
||||
|
||||
# UI ensure
|
||||
self.device.screenshot()
|
||||
self.ui_ensure(page_raid)
|
||||
|
||||
# End
|
||||
if self.triggered_stop_condition():
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user