mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-28 14:58:10 +08:00
Add: Parallel Superimposition chapter A
This commit is contained in:
24
campaign/event_20221222_cn/campaign_base.py
Normal file
24
campaign/event_20221222_cn/campaign_base.py
Normal file
@@ -0,0 +1,24 @@
|
||||
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'
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user