2020-05-27 16:49:26 +00:00
|
|
|
from module.campaign.campaign_base import CampaignBase
|
|
|
|
from module.map.map_base import CampaignMap
|
|
|
|
|
|
|
|
MAP = CampaignMap('d2')
|
|
|
|
MAP.shape = 'I7'
|
2020-05-28 21:37:17 +00:00
|
|
|
MAP.camera_data = ['D2', 'D5', 'F3', 'F5']
|
2020-05-27 16:49:26 +00:00
|
|
|
MAP.map_data = '''
|
|
|
|
SP -- -- -- -- -- ME ++ MB
|
|
|
|
-- ME -- MS ME -- -- ++ --
|
|
|
|
-- -- ME ++ ++ ++ -- -- --
|
|
|
|
ME __ -- ME ME ME -- MS --
|
|
|
|
ME MS -- ++ ++ ++ -- -- --
|
|
|
|
-- ME -- ME -- -- -- ++ --
|
|
|
|
SP -- -- -- -- ME -- ++ MB
|
|
|
|
'''
|
2020-05-28 21:37:17 +00:00
|
|
|
MAP.weight_data = '''
|
|
|
|
10 10 10 10 10 10 10 10 10
|
|
|
|
10 10 10 10 10 10 10 10 10
|
|
|
|
10 10 10 10 10 10 10 10 10
|
|
|
|
10 10 10 10 20 10 10 10 10
|
|
|
|
10 10 10 10 10 10 10 10 10
|
|
|
|
10 10 10 10 10 10 10 10 10
|
|
|
|
10 10 10 10 10 10 10 10 10
|
|
|
|
'''
|
2020-05-28 00:56:32 +00:00
|
|
|
MAP.spawn_data = [
|
2020-05-28 21:37:17 +00:00
|
|
|
{'battle': 0, 'enemy': 2, 'siren': 2},
|
2020-05-28 00:56:32 +00:00
|
|
|
{'battle': 1, 'enemy': 1},
|
2020-05-28 21:37:17 +00:00
|
|
|
{'battle': 2, 'enemy': 2, 'siren': 1},
|
2020-05-28 00:56:32 +00:00
|
|
|
{'battle': 3, 'enemy': 1},
|
2020-05-28 21:37:17 +00:00
|
|
|
{'battle': 4, 'enemy': 1},
|
|
|
|
{'battle': 5},
|
2020-05-28 00:56:32 +00:00
|
|
|
{'battle': 6, 'boss': 1},
|
|
|
|
]
|
2020-05-27 16:49:26 +00:00
|
|
|
|
|
|
|
class Config:
|
2020-05-30 04:09:51 +00:00
|
|
|
SUBMARINE = 0
|
|
|
|
FLEET_BOSS = 0
|
2020-05-27 16:49:26 +00:00
|
|
|
MAP_HAS_AMBUSH = False
|
2020-05-27 23:47:48 +00:00
|
|
|
MAP_HAS_FLEET_STEP = False
|
|
|
|
MAP_HAS_MOVABLE_ENEMY = False
|
2020-05-27 16:49:26 +00:00
|
|
|
MAP_HAS_SIREN = True
|
2020-05-28 00:56:32 +00:00
|
|
|
MAP_HAS_DYNAMIC_RED_BORDER = False
|
2020-05-27 16:49:26 +00:00
|
|
|
MAP_SIREN_COUNT = 3
|
|
|
|
|
2020-05-28 21:37:17 +00:00
|
|
|
INTERNAL_LINES_HOUGHLINES_THRESHOLD = 50
|
|
|
|
EDGE_LINES_HOUGHLINES_THRESHOLD = 50
|
|
|
|
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
|
|
|
|
'height': (150, 255 - 24),
|
|
|
|
'width': (0.9, 10),
|
|
|
|
'prominence': 10,
|
|
|
|
'distance': 35,
|
|
|
|
}
|
|
|
|
EDGE_LINES_FIND_PEAKS_PARAMETERS = {
|
|
|
|
'height': (255 - 24, 255),
|
|
|
|
'prominence': 10,
|
|
|
|
'distance': 50,
|
|
|
|
'wlen': 1000
|
|
|
|
}
|
|
|
|
|
2020-05-27 23:47:48 +00:00
|
|
|
|
2020-05-27 16:49:26 +00:00
|
|
|
class Campaign(CampaignBase):
|
|
|
|
MAP = MAP
|
2020-05-28 00:56:32 +00:00
|
|
|
|
|
|
|
def battle_0(self):
|
|
|
|
if self.clear_siren():
|
|
|
|
return True
|
|
|
|
if self.clear_enemy(scale=(2, 3)):
|
|
|
|
return True
|
|
|
|
|
|
|
|
return self.battle_default()
|
|
|
|
|
|
|
|
def battle_5(self):
|
|
|
|
if self.clear_enemy(scale=(1,)):
|
|
|
|
return True
|
|
|
|
if self.clear_enemy(scale=(2,)):
|
|
|
|
return True
|
|
|
|
|
|
|
|
return self.battle_default()
|
|
|
|
|
|
|
|
def battle_6(self):
|
2020-05-28 21:37:17 +00:00
|
|
|
return self.fleet_2.clear_boss()
|