From f696d110af9c5da66fde348c71e796b75e6d1449 Mon Sep 17 00:00:00 2001 From: Cerz0 <62533167+Cerz0@users.noreply.github.com> Date: Wed, 3 Jun 2020 20:12:40 +0200 Subject: [PATCH 1/3] Create sp1.py --- campaign/event_20200603_en/sp1.py | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 campaign/event_20200603_en/sp1.py diff --git a/campaign/event_20200603_en/sp1.py b/campaign/event_20200603_en/sp1.py new file mode 100644 index 000000000..dee587b54 --- /dev/null +++ b/campaign/event_20200603_en/sp1.py @@ -0,0 +1,73 @@ +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 + + +MAP = CampaignMap() +MAP.shape = 'H5' +MAP.map_data = ''' + ++ ++ ++ -- ME ME -- ++ + -- -- -- ME -- ME -- -- + -- -- ++ -- ME ++ MB -- + -- -- -- ME -- ++ -- ME + -- -- -- -- ME -- ME -- +''' +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 10 + 10 10 10 10 10 10 10 10 +''' +#MAP.camera_data = ['D4'] +MAP.spawn_data = [ + {'battle': 0, 'enemy': 3}, + {'battle': 1, 'enemy': 1}, + {'battle': 2, 'enemy': 1}, + {'battle': 3, 'enemy': 1}, + {'battle': 4, 'enemy': 1, 'boss': 1}, + {'battle': 5, 'enemy': 0}, + {'battle': 6, 'enemy': 0}, + {'battle': 7, 'enemy': 0}, + ] + +A1, B1, C1, D1, E1, F1, G1, H1, \ +A2, B2, C2, D2, E2, F2, G2, H2, \ +A3, B3, C3, D3, E3, F3, G3, H3, \ +A4, B4, C4, D4, E4, F4, G4, H4, \ +A5, B5, C5, D5, E5, F5, G5, H5, \ + = MAP.flatten() + + + +class Config: + INTERNAL_LINES_HOUGHLINES_THRESHOLD = 40 + EDGE_LINES_HOUGHLINES_THRESHOLD = 40 + COINCIDENT_POINT_ENCOURAGE_DISTANCE = 1.5 + 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, + 'width': (0, 10), + 'wlen': 1000, + } + +class Campaign(CampaignBase): + MAP = MAP + + def battle_0(self): + return self.battle_default() + + def battle_7(self): + return self.fleet_boss.clear_boss() + + + + \ No newline at end of file From dded6eb752218a8734ce6068b4f24e915c6c53e3 Mon Sep 17 00:00:00 2001 From: Cerz0 <62533167+Cerz0@users.noreply.github.com> Date: Wed, 3 Jun 2020 23:57:54 +0200 Subject: [PATCH 2/3] Revert "Create sp1.py" This reverts commit f696d110af9c5da66fde348c71e796b75e6d1449. --- campaign/event_20200603_en/sp1.py | 73 ------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 campaign/event_20200603_en/sp1.py diff --git a/campaign/event_20200603_en/sp1.py b/campaign/event_20200603_en/sp1.py deleted file mode 100644 index dee587b54..000000000 --- a/campaign/event_20200603_en/sp1.py +++ /dev/null @@ -1,73 +0,0 @@ -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 - - -MAP = CampaignMap() -MAP.shape = 'H5' -MAP.map_data = ''' - ++ ++ ++ -- ME ME -- ++ - -- -- -- ME -- ME -- -- - -- -- ++ -- ME ++ MB -- - -- -- -- ME -- ++ -- ME - -- -- -- -- ME -- ME -- -''' -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 10 - 10 10 10 10 10 10 10 10 -''' -#MAP.camera_data = ['D4'] -MAP.spawn_data = [ - {'battle': 0, 'enemy': 3}, - {'battle': 1, 'enemy': 1}, - {'battle': 2, 'enemy': 1}, - {'battle': 3, 'enemy': 1}, - {'battle': 4, 'enemy': 1, 'boss': 1}, - {'battle': 5, 'enemy': 0}, - {'battle': 6, 'enemy': 0}, - {'battle': 7, 'enemy': 0}, - ] - -A1, B1, C1, D1, E1, F1, G1, H1, \ -A2, B2, C2, D2, E2, F2, G2, H2, \ -A3, B3, C3, D3, E3, F3, G3, H3, \ -A4, B4, C4, D4, E4, F4, G4, H4, \ -A5, B5, C5, D5, E5, F5, G5, H5, \ - = MAP.flatten() - - - -class Config: - INTERNAL_LINES_HOUGHLINES_THRESHOLD = 40 - EDGE_LINES_HOUGHLINES_THRESHOLD = 40 - COINCIDENT_POINT_ENCOURAGE_DISTANCE = 1.5 - 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, - 'width': (0, 10), - 'wlen': 1000, - } - -class Campaign(CampaignBase): - MAP = MAP - - def battle_0(self): - return self.battle_default() - - def battle_7(self): - return self.fleet_boss.clear_boss() - - - - \ No newline at end of file From 00b09b83699597ffb22d2cee7144a3e2b8da7c6a Mon Sep 17 00:00:00 2001 From: Cerz0 <62533167+Cerz0@users.noreply.github.com> Date: Thu, 4 Jun 2020 02:02:44 +0200 Subject: [PATCH 3/3] Update campaign_9_2.py --- campaign/campaign_main/campaign_9_2.py | 41 +++++++++++++++++++++----- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/campaign/campaign_main/campaign_9_2.py b/campaign/campaign_main/campaign_9_2.py index ecdd03710..d537d91bb 100644 --- a/campaign/campaign_main/campaign_9_2.py +++ b/campaign/campaign_main/campaign_9_2.py @@ -13,13 +13,13 @@ MAP.map_data = ''' -- ++ -- -- ++ SP -- ME -- -- ME -- SP ++ SP -- -- -- ''' -MAP.weight_data = ''' - 10 10 30 10 10 10 10 10 10 - 10 10 20 20 10 30 10 10 10 - 30 10 20 10 10 10 10 10 10 - 10 10 10 10 10 10 10 10 10 - 10 30 10 10 10 10 10 10 10 -''' +#MAP.weight_data = ''' +# 10 10 30 10 10 10 10 10 10 +# 10 10 20 30 10 30 10 10 10 +# 30 10 20 10 10 10 10 10 10 +# 10 10 10 10 10 10 10 10 10 +# 10 30 10 10 10 10 10 10 10 +#''' #MAP.camera_data = ['D4'] MAP.spawn_data = [ {'battle': 0, 'enemy': 3}, @@ -39,7 +39,10 @@ A5, B5, C5, D5, E5, F5, G5, H5, I5, \ road_main = RoadGrids([C3, C2, [C1, D2], F1, H1, H2, H3, H4]) + + class Config: + SUBMARINE = 0 INTERNAL_LINES_HOUGHLINES_THRESHOLD = 40 EDGE_LINES_HOUGHLINES_THRESHOLD = 40 COINCIDENT_POINT_ENCOURAGE_DISTANCE = 1.5 @@ -61,6 +64,30 @@ class Campaign(CampaignBase): MAP = MAP def battle_0(self): + if self.fleet_at(D5, fleet=2): + self.map.weight_data = ''' + 10 10 30 10 10 20 30 40 10 + 10 10 10 10 10 30 10 50 10 + 30 10 10 10 10 10 10 60 10 + 10 10 10 10 10 10 10 70 10 + 10 30 10 10 10 10 10 10 10 + ''' + if self.fleet_at(F4, fleet=2): + self.map.weight_data = ''' + 10 10 30 10 10 10 10 10 10 + 10 10 20 30 10 30 10 10 10 + 30 10 20 10 10 10 10 10 10 + 10 10 10 10 10 10 10 10 10 + 10 30 10 10 10 10 10 10 10 + ''' + if self.fleet_at(F5, fleet=2): + self.map.weight_data = ''' + 10 10 30 10 10 10 10 10 10 + 10 10 20 30 10 30 10 10 10 + 30 10 20 10 10 10 10 10 10 + 10 10 10 10 10 10 10 10 10 + 10 30 10 10 10 10 10 10 10 + ''' if self.clear_roadblocks([road_main]): return True if self.clear_potential_roadblocks([road_main]):