mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 00:28:20 +08:00
Add: 适配穹顶下的圣咏曲AC图
- 修复UI导致的动态边缘识别出错 - 修复只识别出一队时的处理逻辑 - 修复处理战斗结束后跳出的剧情 - 修复辅助点击报CampaignEnd - 修复游戏出现白屏bug时, 连续点击使用紧急维修 - 增加地图全清时, 使用二队打BOSS, 忽略FLEET_BOSS - 增加被精英抓住的识别, 暂时还用不到
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
|
||||
from module.base.utils import area_in_area
|
||||
from module.config.config import AzurLaneConfig
|
||||
@@ -14,10 +15,9 @@ class Grids(Perspective):
|
||||
image:
|
||||
config(AzurLaneConfig):
|
||||
"""
|
||||
self.image = image
|
||||
self.config = config
|
||||
# try:
|
||||
super().__init__(image, config)
|
||||
self.image = self._image_clear_ui(image)
|
||||
|
||||
self.grids = {}
|
||||
for grid in self._gen():
|
||||
@@ -104,6 +104,15 @@ class Grids(Perspective):
|
||||
# break
|
||||
|
||||
def update(self, image):
|
||||
image = self._image_clear_ui(image)
|
||||
self.image = image
|
||||
for grid in self:
|
||||
grid.image = image
|
||||
|
||||
def _image_clear_ui(self, image):
|
||||
if not self.config.MAP_HAS_DYNAMIC_RED_BORDER:
|
||||
return image
|
||||
|
||||
new = Image.new('RGB', self.config.SCREEN_SIZE, (0, 0, 0))
|
||||
new.paste(image.crop(self.config.DETECTING_AREA), box=self.config.DETECTING_AREA, mask=self.config.UI_MASK_PIL)
|
||||
return new
|
||||
|
||||
Reference in New Issue
Block a user