Add: Map config MAP_SIREN_HAS_BOSS_ICON

This commit is contained in:
LmeSzinc 2024-08-16 12:16:54 +08:00
parent 14a3f57d78
commit 7c38091201
47 changed files with 87 additions and 181 deletions

View File

@ -1,28 +0,0 @@
from module.base.utils import color_similarity_2d
from module.campaign.campaign_base import CampaignBase as CampaignBase_
from module.map_detection.grid import Grid
from module.template.assets import TEMPLATE_ENEMY_BOSS
class EventGrid(Grid):
def predict_boss(self):
# Small boss icon
if self.relative_hsv_count(area=(0.03, -0.15, 0.63, 0.15), h=(358 - 3, 358 + 3), shape=(50, 20)) > 100:
image = self.relative_crop((0.03, -0.15, 0.63, 0.15), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 77, 82))
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.7):
return True
return False
def predict_enemy_genre(self):
image = self.relative_crop((-0.55, -0.2, 0.45, 0.2), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 150, 24))
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.75):
return 'Siren_Siren'
return super().predict_enemy_genre()
class CampaignBase(CampaignBase_):
grid_class = EventGrid

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
MAP = CampaignMap('SP1')
MAP.shape = 'H7'
@ -55,6 +55,7 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
MAP_SWIPE_MULTIPLY = (1.122, 1.143)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.085, 1.105)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.054, 1.073)

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from .sp1 import Config as ConfigBase
MAP = CampaignMap('SP2')

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from .sp1 import Config as ConfigBase
MAP = CampaignMap('SP3')

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase, EventGrid
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -54,6 +54,8 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (120, 255 - 49),
'width': (1.5, 10),
@ -75,7 +77,6 @@ class Config:
class Campaign(CampaignBase):
grid_class = EventGrid
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -58,6 +58,8 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = False
MAP_SIREN_HAS_BOSS_ICON_SMALL = False
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (120, 255 - 24),
'width': (1.5, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -58,6 +58,8 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = False
MAP_SIREN_HAS_BOSS_ICON_SMALL = False
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (120, 255 - 33),
'width': (1.5, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase, EventGrid
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -57,6 +57,8 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (120, 255 - 33),
'width': (1.5, 10),
@ -77,7 +79,6 @@ 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'

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase, EventGrid
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -54,6 +54,8 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
MAP_ENSURE_EDGE_INSIGHT_CORNER = 'bottom'
MAP_SWIPE_MULTIPLY = (1.084, 1.104)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.048, 1.067)
@ -61,7 +63,6 @@ class Config:
class Campaign(CampaignBase):
grid_class = EventGrid
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -58,6 +58,8 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = False
MAP_SIREN_HAS_BOSS_ICON_SMALL = False
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (120, 255 - 17),
'width': (1.5, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -59,6 +59,8 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = False
MAP_SIREN_HAS_BOSS_ICON_SMALL = False
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (120, 255 - 33),
'width': (1.5, 10),

View File

@ -1,31 +0,0 @@
from module.base.utils import color_similarity_2d
from module.campaign.campaign_base import CampaignBase as CampaignBase_
from module.map_detection.grid import Grid
from module.template.assets import TEMPLATE_ENEMY_BOSS
class EventGrid(Grid):
def predict_enemy_genre(self):
image = self.relative_crop((-0.55, -0.2, 0.45, 0.2), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 150, 24))
if image[image > 221].shape[0] > 200:
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.6):
return 'Siren_Siren'
# Small icon
if self.relative_hsv_count(area=(0.03, -0.15, 0.63, 0.15), h=(32 - 3, 32 + 3), shape=(50, 20)) > 100:
image = self.relative_crop((0.03, -0.15, 0.63, 0.15), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 150, 33))
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.7):
return 'Siren_Siren'
return super().predict_enemy_genre()
def predict_boss(self):
if self.enemy_genre == 'Siren_Siren':
return False
return super().predict_boss()
class CampaignBase(CampaignBase_):
pass

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase, EventGrid
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -58,6 +58,8 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (120, 255 - 33),
'width': (1.5, 10),
@ -78,7 +80,6 @@ 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'

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -57,6 +57,7 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 33),
'width': (1.5, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -58,6 +58,7 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 33),
'width': (1.5, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -57,6 +57,7 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 24),
'width': (1.5, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,27 +0,0 @@
from module.base.utils import color_similarity_2d
from module.campaign.campaign_base import CampaignBase as CampaignBase_
from module.map_detection.grid import Grid
from module.template.assets import TEMPLATE_ENEMY_BOSS
class EventGrid(Grid):
def predict_enemy_genre(self):
if self.enemy_scale:
return ''
image = self.relative_crop((-0.55, -0.2, 0.45, 0.2), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 150, 24))
if image[image > 221].shape[0] > 200:
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.6):
return 'Siren_Siren'
return super().predict_enemy_genre()
def predict_boss(self):
if self.enemy_genre == 'Siren_Siren':
return False
return super().predict_boss()
class CampaignBase(CampaignBase_):
grid_class = EventGrid

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -58,6 +58,7 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 24),
'width': (1.5, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -57,6 +57,7 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 17),
'width': (0.9, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -55,6 +55,7 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 17),
'width': (0.9, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -57,6 +57,7 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
MAP_SWIPE_MULTIPLY = (1.074, 1.095)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.039, 1.058)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.009, 1.027)

View File

@ -1,30 +0,0 @@
from module.base.utils import color_similarity_2d
from module.campaign.campaign_base import CampaignBase as CampaignBase_
from module.map_detection.grid import Grid
from module.template.assets import TEMPLATE_ENEMY_BOSS
class EventGrid(Grid):
def predict_enemy_genre(self):
if self.enemy_scale:
return ''
image = self.relative_crop((-0.55, -0.2, 0.45, 0.2), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 150, 24))
if image[image > 221].shape[0] > 200:
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.6):
return 'Siren_Siren'
return super().predict_enemy_genre()
def predict_boss(self):
if self.enemy_genre == 'Siren_Siren':
return False
return super().predict_boss()
class CampaignBase(CampaignBase_):
"""
Not all event maps use this, some are the same like the classics
"""
grid_class = EventGrid

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -55,6 +55,7 @@ class Config:
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 17),
'width': (0.9, 10),

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase
from module.campaign.campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

View File

@ -4,25 +4,6 @@ from module.map_detection.grid import Grid
from module.template.assets import TEMPLATE_ENEMY_BOSS
class EventGrid(Grid):
def predict_enemy_genre(self):
if self.enemy_scale:
return ''
image = self.relative_crop((-0.55, -0.2, 0.45, 0.2), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 150, 24))
if image[image > 221].shape[0] > 200:
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.6):
return 'Siren_Siren'
return super().predict_enemy_genre()
def predict_boss(self):
if self.enemy_genre == 'Siren_Siren':
return False
return super().predict_boss()
class CampaignBase(CampaignBase_):
STAGE_INCREASE = [
"""

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase, EventGrid
from .campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -58,6 +58,7 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
MAP_SWIPE_MULTIPLY = (1.223, 1.246)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.183, 1.205)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.149, 1.169)
@ -66,7 +67,6 @@ class Config(ConfigBase):
class Campaign(CampaignBase):
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
grid_class = EventGrid
def battle_0(self):
if self.clear_siren():

View File

@ -1,4 +1,4 @@
from .campaign_base import CampaignBase, EventGrid
from .campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
@ -66,6 +66,7 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SIREN_HAS_BOSS_ICON = True
MAP_SWIPE_MULTIPLY = (0.991, 1.009)
MAP_SWIPE_MULTIPLY_MINITOUCH = (0.958, 0.976)
MAP_SWIPE_MULTIPLY_MAATOUCH = (0.930, 0.947)
@ -74,7 +75,6 @@ class Config(ConfigBase):
class Campaign(CampaignBase):
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
grid_class = EventGrid
def battle_0(self):
if self.clear_siren():

View File

@ -140,6 +140,8 @@ class ManualConfig:
MAP_ENEMY_GENRE_SIMILARITY = 0.85
MAP_SIREN_MOVE_WAIT = 1.5 # The enemy moving takes about 1.2 ~ 1.5s.
MAP_SIREN_COUNT = 0
MAP_SIREN_HAS_BOSS_ICON = False # Anonymous siren with small boss icon at bottom-right
MAP_SIREN_HAS_BOSS_ICON_SMALL = False
MAP_HAS_MYSTERY = True
MAP_MYSTERY_MAP_CLICK = True
MAP_MYSTERY_HAS_CARRIER = False

View File

@ -187,6 +187,21 @@ class GridPredictor:
return scale
def predict_enemy_genre(self):
if self.config.MAP_SIREN_HAS_BOSS_ICON:
if self.enemy_scale:
return ''
image = self.relative_crop((-0.55, -0.2, 0.45, 0.2), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 150, 24))
if image[image > 221].shape[0] > 200:
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.6):
return 'Siren_Siren'
if self.config.MAP_SIREN_HAS_BOSS_ICON_SMALL:
if self.relative_hsv_count(area=(0.03, -0.15, 0.63, 0.15), h=(32 - 3, 32 + 3), shape=(50, 20)) > 100:
image = self.relative_crop((0.03, -0.15, 0.63, 0.15), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 150, 33))
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.7):
return 'Siren_Siren'
image_dic = {}
scaling_dic = self.config.MAP_ENEMY_GENRE_DETECTION_SCALING
for name, template in self.template_enemy_genre.items():
@ -210,6 +225,9 @@ class GridPredictor:
return None
def predict_boss(self):
if self.enemy_genre == 'Siren_Siren':
return False
image = self.relative_crop((-0.55, -0.2, 0.45, 0.2), shape=(50, 20))
image = color_similarity_2d(image, color=(255, 77, 82))
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.75):