mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: GET_ITEMS_1 raises MapDetectionError
It was a quite rare case. The emulator sometimes treat a swipe as a click (mostly on potato pcs). If this happens while doing map_swipe(), the fleet might step on a mystery, then GET_ITEMS_1 would raise MapDetectionError.
This commit is contained in:
parent
02574d2ae5
commit
13d2a116cd
@ -1,5 +1,6 @@
|
||||
import numpy as np
|
||||
|
||||
from module.combat.assets import GET_ITEMS_1
|
||||
from module.exception import MapDetectionError, CampaignEnd
|
||||
from module.handler.assets import IN_MAP, GAME_TIPS
|
||||
from module.logger import logger
|
||||
@ -98,6 +99,10 @@ class Camera(MapOperation):
|
||||
logger.info('Perspective error cause by info bar. Waiting.')
|
||||
self.handle_info_bar()
|
||||
return self.update(camera=camera)
|
||||
elif self.appear(GET_ITEMS_1):
|
||||
logger.warning('Items got. Trying handling mystery.')
|
||||
self.handle_mystery()
|
||||
return self.update(camera=camera)
|
||||
elif self.is_in_stage():
|
||||
logger.warning('Image is in stage')
|
||||
raise CampaignEnd('Image is in stage')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user