mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-07 07:07:15 +08:00
Fix: Fleet position initialize in war archive Visitors Dyed in Red (#2000)
This commit is contained in:
parent
d621a48ebc
commit
114ccf2386
@ -4,10 +4,13 @@ from module.map.map_grids import RoadGrids, SelectedGrids
|
||||
|
||||
from ..campaign_war_archives.campaign_base import CampaignBase
|
||||
|
||||
from module.map_detection.grid import Grid
|
||||
from module.template.assets import TEMPLATE_FLEET_CURRENT
|
||||
|
||||
MAP = CampaignMap('A1')
|
||||
MAP.shape = 'H5'
|
||||
MAP.camera_data = ['D2', 'D3', 'E2', 'E3']
|
||||
MAP.camera_data_spawn_point = ['D3', 'D2']
|
||||
MAP.camera_data_spawn_point = ['D3', 'C1']
|
||||
MAP.map_data = """
|
||||
SP -- -- ++ ++ ++ ++ ++
|
||||
-- ++ ME Me ME -- Me ++
|
||||
@ -38,6 +41,20 @@ A5, B5, C5, D5, E5, F5, G5, H5, \
|
||||
= MAP.flatten()
|
||||
|
||||
|
||||
class EventGrid(Grid):
|
||||
def predict_current_fleet(self):
|
||||
count = self.relative_hsv_count(area=(-0.5, -3.5, 0.5, -2.5), h=(141 - 3, 141 + 10), shape=(50, 50))
|
||||
if count < 200:
|
||||
return False
|
||||
|
||||
# image = self.relative_crop((-0.5, -3.5, 0.5, -2.5), shape=(60, 60))
|
||||
# image = color_similarity_2d(image, color=(24, 255, 107))
|
||||
# if not TEMPLATE_FLEET_CURRENT.match(image, similarity=0.75):
|
||||
# return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class Config:
|
||||
# ===== Start of generated config =====
|
||||
MAP_HAS_MAP_STORY = True
|
||||
@ -48,6 +65,7 @@ class Config:
|
||||
|
||||
|
||||
class Campaign(CampaignBase):
|
||||
grid_class = EventGrid
|
||||
MAP = MAP
|
||||
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
|
||||
|
||||
|
@ -4,11 +4,12 @@ from module.map.map_grids import RoadGrids, SelectedGrids
|
||||
|
||||
from ..campaign_war_archives.campaign_base import CampaignBase
|
||||
from .a1 import Config as ConfigBase
|
||||
from .a1 import EventGrid
|
||||
|
||||
MAP = CampaignMap('A3')
|
||||
MAP.shape = 'H7'
|
||||
MAP.camera_data = ['D2', 'D5', 'E2', 'E5']
|
||||
MAP.camera_data_spawn_point = ['D2']
|
||||
MAP.camera_data_spawn_point = ['C1']
|
||||
MAP.map_data = """
|
||||
SP -- -- ++ ++ ++ ++ ++
|
||||
-- ++ Me -- ME -- -- ++
|
||||
@ -56,6 +57,7 @@ class Config(ConfigBase):
|
||||
|
||||
|
||||
class Campaign(CampaignBase):
|
||||
grid_class = EventGrid
|
||||
MAP = MAP
|
||||
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
|
||||
|
||||
|
@ -3,11 +3,12 @@ from module.map.map_base import CampaignMap
|
||||
from module.map.map_grids import RoadGrids, SelectedGrids
|
||||
|
||||
from ..campaign_war_archives.campaign_base import CampaignBase
|
||||
from .a1 import EventGrid
|
||||
|
||||
MAP = CampaignMap('C1')
|
||||
MAP.shape = 'H5'
|
||||
MAP.camera_data = ['D2', 'D3', 'E2', 'E3']
|
||||
MAP.camera_data_spawn_point = ['D3', 'D2']
|
||||
MAP.camera_data_spawn_point = ['D3', 'C1']
|
||||
MAP.map_data = """
|
||||
SP -- -- ++ ++ ++ ++ ++
|
||||
-- ++ ME Me ME -- Me ++
|
||||
@ -48,6 +49,7 @@ class Config:
|
||||
|
||||
|
||||
class Campaign(CampaignBase):
|
||||
grid_class = EventGrid
|
||||
MAP = MAP
|
||||
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
|
||||
|
||||
|
@ -4,11 +4,12 @@ from module.map.map_grids import RoadGrids, SelectedGrids
|
||||
|
||||
from ..campaign_war_archives.campaign_base import CampaignBase
|
||||
from .c1 import Config as ConfigBase
|
||||
from .a1 import EventGrid
|
||||
|
||||
MAP = CampaignMap('C3')
|
||||
MAP.shape = 'H7'
|
||||
MAP.camera_data = ['D2', 'D5', 'E2', 'E5']
|
||||
MAP.camera_data_spawn_point = ['D2']
|
||||
MAP.camera_data_spawn_point = ['C1']
|
||||
MAP.map_data = """
|
||||
SP -- -- ++ ++ ++ ++ ++
|
||||
-- ++ Me -- ME -- -- ++
|
||||
@ -56,6 +57,7 @@ class Config(ConfigBase):
|
||||
|
||||
|
||||
class Campaign(CampaignBase):
|
||||
grid_class = EventGrid
|
||||
MAP = MAP
|
||||
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user