mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-08-13 19:14:29 +08:00
Merge branch 'master' of https://github.com/LmeSzinc/AzurLaneAutoScript
This commit is contained in:
@@ -1022,10 +1022,26 @@ class OSMap(OSFleet, Map, GlobeCamera, StorageHandler, StrategicSearchHandler):
|
||||
Returns:
|
||||
bool: If solved a map random event
|
||||
"""
|
||||
grids = self.view.select(is_exploration_container=True)
|
||||
if 'is_exploration_container' not in self._solved_map_event \
|
||||
and grids and grids[0].is_exploration_container:
|
||||
grid = grids[0]
|
||||
logger.info(f'Found exploration container on {grid}')
|
||||
self.device.click(grid)
|
||||
with self.config.temporary(STORY_ALLOW_SKIP=False, STORY_OPTION=1):
|
||||
result = self.wait_until_walk_stable(
|
||||
drop=drop, walk_out_of_step=False, confirm_timer=Timer(1.5, count=4))
|
||||
if 'event' in result:
|
||||
self._solved_map_event.add('is_exploration_container')
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
grids = self.view.select(is_exploration_reward=True)
|
||||
if 'is_exploration_reward' not in self._solved_map_event and grids and grids[0].is_exploration_reward:
|
||||
grid = grids[0]
|
||||
logger.info(f'Found exploration reward on {grid}')
|
||||
self.device.click(grid)
|
||||
result = self.wait_until_walk_stable(drop=drop, walk_out_of_step=False, confirm_timer=Timer(1.5, count=4))
|
||||
if 'event' in result:
|
||||
self._solved_map_event.add('is_exploration_reward')
|
||||
|
||||
Reference in New Issue
Block a user