@@ -110,6 +110,9 @@ def parse_move(movement: str, step: int):
110110class Campaign (CampaignBase ):
111111 MAP = MAP
112112 ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
113+ siren_list = [C7 , D6 , G6 , H7 ]
114+ patched = False
115+ action = []
113116
114117 def execute_actions (self , step ):
115118 for action in self .action [step ]:
@@ -140,26 +143,22 @@ def execute_actions(self, step):
140143 return True
141144
142145 def battle_0 (self ):
143- self .action = actions [self .fleet_1_location [0 ]]
144- return self .execute_actions (0 )
145-
146- def battle_1 (self ):
147- return self .execute_actions (1 )
148-
149- def battle_2 (self ):
150- return self .execute_actions (2 )
151-
152- def battle_3 (self ):
153- return self .execute_actions (3 )
154-
155- def battle_4 (self ):
156- return self .execute_actions (4 )
157-
158- def battle_5 (self ):
159- return self .execute_actions (5 )
160-
161- def battle_6 (self ):
162- return self .execute_actions (6 )
146+ if not self .patched :
147+ for battle_count in range (1 , 7 ):
148+ setattr (self , f'battle_{ battle_count } ' , self .battle_0 )
149+ self .patched = True
150+
151+ if self .map_is_clear_mode :
152+ if self .siren_list :
153+ self .fleet_1 .clear_chosen_enemy (self .siren_list .pop ())
154+ return True
155+ else :
156+ if self .clear_filter_enemy (self .ENEMY_FILTER , preserve = 0 ):
157+ return True
158+ else :
159+ if not self .action :
160+ self .action = actions [self .fleet_1_location [0 ]]
161+ return self .execute_actions (self .battle_count )
163162
164163 def battle_7 (self ):
165164 return self .fleet_boss .clear_boss ()
0 commit comments