Fix: Fixed stuck at grand capture map

This commit is contained in:
whoamikyo 2020-07-22 02:27:48 -03:00
parent 79ceb6106b
commit 6931779064
4 changed files with 21 additions and 22 deletions

View File

@ -32,9 +32,10 @@ MAP.weight_data = """
MAP.spawn_data = [
{'battle': 0, 'enemy': 2, 'siren': 1},
{'battle': 1, 'enemy': 1},
{'battle': 2, 'enemy': 1},
{'battle': 2, 'enemy': 2},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'enemy': 1, 'boss': 1},
{'battle': 4, 'enemy': 2, 'boss': 1},
{'battle': 5, 'enemy': 1},
]
A1, B1, C1, D1, E1, F1, G1, H1, \
A2, B2, C2, D2, E2, F2, G2, H2, \
@ -57,14 +58,8 @@ class Campaign(CampaignBase):
def battle_0(self):
if self.clear_siren():
return True
return self.battle_default()
def battle_3(self):
self.fleet_boss.clear_enemy()
boss = self.map.select(is_boss=True)
if boss:
if not self.check_accessibility(boss[0], fleet='boss'):
return self.battle_default()
return self.fleet_boss.clear_boss()
def battle_5(self):
self.fleet_boss.capture_clear_boss()

View File

@ -6,16 +6,16 @@ from module.logger import logger
MAP = CampaignMap('B1')
MAP.camera_sight = (-4, -2, 4, 2)
MAP.shape = 'J7'
# MAP.camera_data = ['D2', 'D5', 'G2', 'G5']
MAP.camera_data = ['D2', 'D5', 'G2', 'G5']
MAP.camera_data_spawn_point = []
MAP.map_data = """
++ ++ ++ MS -- ME ++ ++ ++ ++
++ ++ ++ -- ME __ -- ++ ++ ++
++ ++ ++ __ -- ME -- -- ++ ++
++ ++ ++ Me ++ ++ ME -- ++ ++
++ ++ ++ ME ++ ++ ME -- ++ ++
-- MB -- -- ME ME -- ME -- SP
-- -- Me -- -- -- -- __ -- SP
++ ++ -- Me MS ME Me ++ ME --
-- -- ME -- -- -- -- __ -- SP
++ ++ -- ME MS ME ME ++ ME --
"""
MAP.weight_data = """
10 10 10 10 10 10 10 10 10 10
@ -43,6 +43,7 @@ A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, \
A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, \
= MAP.flatten()
road_main = RoadGrids([H5, G4, F3, E2, D4])
class Config:
SUBMARINE = 0
@ -55,6 +56,7 @@ class Config:
MAP_HAS_DYNAMIC_RED_BORDER = False
MAP_SIREN_COUNT = 1
MAP_HAS_PT_BONUS = True
# MAP_SIREN_TEMPLATE = ['DD', 'CL']
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (100, 255 - 24),
@ -78,15 +80,18 @@ class Config:
TRUST_EDGE_LINES = True
MAP_GRID_CENTER_TOLERANCE = 0.3
class Campaign(CampaignBase):
MAP = MAP
def battle_0(self):
if self.clear_siren():
return True
if self.clear_roadblocks([road_main]):
return True
if self.clear_potential_roadblocks([road_main]):
return True
return self.battle_default()
def battle_5(self):
return self.fleet_boss.clear_boss()
self.fleet_boss.capture_clear_boss()

View File

@ -7,7 +7,7 @@ from campaign.event_20200716_en.b1 import Config as ConfigBase
MAP = CampaignMap('B2')
MAP.camera_sight = (-4, -2, 4, 2)
MAP.shape = 'J8'
# MAP.camera_data = ['D2', 'D6', 'G2', 'G6']
MAP.camera_data = ['D2', 'D6', 'G2', 'G6']
MAP.camera_data_spawn_point = []
MAP.map_data = """
-- -- ++ ++ ++ ++ -- -- ++ ++
@ -62,4 +62,5 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_boss.clear_boss()
self.fleet_boss.capture_clear_boss()

View File

@ -43,11 +43,9 @@ A6, B6, C6, D6, E6, F6, G6, \
A7, B7, C7, D7, E7, F7, G7, \
= MAP.flatten()
class Config(ConfigBase):
pass
class Campaign(CampaignBase):
MAP = MAP
@ -58,4 +56,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_4(self):
return self.fleet_boss.clear_boss()
self.fleet_boss.capture_clear_boss()