mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-30 03:56:02 +08:00
Add: The Flame-Touched Dagger (event_20211111_cn)
- Fix: Force to use fleet2 when MAP_CLEAR_ALL_THIS_TIME is True
This commit is contained in:
28
campaign/event_20211111_cn/campaign_base.py
Normal file
28
campaign/event_20211111_cn/campaign_base.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from module.campaign.campaign_base import CampaignBase as CampaignBase_
|
||||
from module.base.utils import color_similarity_2d
|
||||
from module.template.assets import TEMPLATE_ENEMY_BOSS
|
||||
from module.map_detection.grid import Grid
|
||||
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user