mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 05:08:19 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -8,7 +8,7 @@ from module.os_handler.assets import AUTO_SEARCH_REWARD, IN_MAP, ORDER_ENTER
|
||||
|
||||
class EnemySearchingHandler(EnemySearchingHandler_):
|
||||
def is_in_map(self):
|
||||
if self.appear(IN_MAP, offset=(200, 5)):
|
||||
if IN_MAP.match_luma(self.device.image, offset=(200, 5)):
|
||||
return True
|
||||
if self.appear(MAP_GOTO_GLOBE_FOG, offset=(5, 5)) and MAP_GOTO_GLOBE_FOG.match_appear_on(self.device.image):
|
||||
return True
|
||||
|
||||
@@ -164,7 +164,7 @@ class MapOrderHandler(MapOperation, ActionPointHandler, MapEventHandler, ZoneMan
|
||||
"""
|
||||
if not self.map_cat_attack_timer.reached():
|
||||
return False
|
||||
if np.sum(color_similarity_2d(self.image_crop(MAP_CAT_ATTACK), (255, 231, 123)) > 221) > 100:
|
||||
if np.sum(color_similarity_2d(self.image_crop(MAP_CAT_ATTACK, copy=False), (255, 231, 123)) > 221) > 100:
|
||||
logger.info('Skip map cat attack')
|
||||
self.device.click(CLICK_SAFE_AREA)
|
||||
self.map_cat_attack_timer.reset()
|
||||
|
||||
@@ -26,7 +26,7 @@ class MissionHandler(GlobeOperation, ZoneManager):
|
||||
"""
|
||||
area = (341, 72, 1217, 648)
|
||||
# Points of the yellow `!`
|
||||
image = color_similarity_2d(self.image_crop(area), color=(255, 207, 66))
|
||||
image = color_similarity_2d(self.image_crop(area, copy=False), color=(255, 207, 66))
|
||||
points = np.array(np.where(image > 235)).T[:, ::-1]
|
||||
if not len(points):
|
||||
logger.warning('Unable to find mission on OS mission map')
|
||||
|
||||
Reference in New Issue
Block a user