mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-08 12:27:33 +08:00
Fix: Handle map_clear_mode (#2675)
Co-authored-by: LmeSzinc <lmeszincsales@gmail.com>
This commit is contained in:
parent
d63a03ed6d
commit
1497c75923
@ -110,6 +110,9 @@ def parse_move(movement: str, step: int):
|
|||||||
class Campaign(CampaignBase):
|
class Campaign(CampaignBase):
|
||||||
MAP = MAP
|
MAP = MAP
|
||||||
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
|
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
|
||||||
|
siren_list = [C7, D6, G6, H7]
|
||||||
|
patched = False
|
||||||
|
action = []
|
||||||
|
|
||||||
def execute_actions(self, step):
|
def execute_actions(self, step):
|
||||||
for action in self.action[step]:
|
for action in self.action[step]:
|
||||||
@ -140,26 +143,22 @@ class Campaign(CampaignBase):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def battle_0(self):
|
def battle_0(self):
|
||||||
self.action = actions[self.fleet_1_location[0]]
|
if not self.patched:
|
||||||
return self.execute_actions(0)
|
for battle_count in range(1, 7):
|
||||||
|
setattr(self, f'battle_{battle_count}', self.battle_0)
|
||||||
|
self.patched = True
|
||||||
|
|
||||||
def battle_1(self):
|
if self.map_is_clear_mode:
|
||||||
return self.execute_actions(1)
|
if self.siren_list:
|
||||||
|
self.fleet_1.clear_chosen_enemy(self.siren_list.pop())
|
||||||
def battle_2(self):
|
return True
|
||||||
return self.execute_actions(2)
|
else:
|
||||||
|
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
|
||||||
def battle_3(self):
|
return True
|
||||||
return self.execute_actions(3)
|
else:
|
||||||
|
if not self.action:
|
||||||
def battle_4(self):
|
self.action = actions[self.fleet_1_location[0]]
|
||||||
return self.execute_actions(4)
|
return self.execute_actions(self.battle_count)
|
||||||
|
|
||||||
def battle_5(self):
|
|
||||||
return self.execute_actions(5)
|
|
||||||
|
|
||||||
def battle_6(self):
|
|
||||||
return self.execute_actions(6)
|
|
||||||
|
|
||||||
def battle_7(self):
|
def battle_7(self):
|
||||||
return self.fleet_boss.clear_boss()
|
return self.fleet_boss.clear_boss()
|
||||||
|
Loading…
Reference in New Issue
Block a user