Refactor: Correct fleet_2 and fleet_boss uses

This commit is contained in:
LmeSzinc 2023-01-29 12:38:57 +08:00
parent 2472ccbdc2
commit 41ac19345b
36 changed files with 36 additions and 36 deletions

View File

@ -69,4 +69,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -86,4 +86,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -85,4 +85,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -86,4 +86,4 @@ class Campaign(CampaignBase):
if self.clear_potential_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -68,4 +68,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -83,7 +83,7 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()
def handle_boss_appear_refocus(self, preset=(-3, -2)):
return super().handle_boss_appear_refocus(preset)

View File

@ -85,4 +85,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -65,4 +65,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -65,4 +65,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -52,7 +52,7 @@ class Campaign(CampaignBase):
def battle_5(self):
self.clear_all_mystery()
return self.fleet_2.brute_clear_boss()
return self.fleet_boss.brute_clear_boss()
def handle_boss_appear_refocus(self, preset=(-3, -2)):
return super().handle_boss_appear_refocus(preset)

View File

@ -87,4 +87,4 @@ class Campaign(CampaignBase):
if self.fleet_at(G3, fleet=2) and H3.is_mystery:
self.fleet_2.clear_chosen_mystery(H3)
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -71,4 +71,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -103,4 +103,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -79,4 +79,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -82,4 +82,4 @@ class Campaign(CampaignBase):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -84,4 +84,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_6(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -79,7 +79,7 @@ class Campaign(CampaignBase):
battle_4 = battle_0
def battle_5(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()
def handle_in_stage(self):
"""

View File

@ -52,4 +52,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -52,4 +52,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -80,4 +80,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_6(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -59,4 +59,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_6(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -81,4 +81,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_2.brute_clear_boss()
return self.fleet_boss.brute_clear_boss()

View File

@ -91,4 +91,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_6(self):
return self.fleet_2.brute_clear_boss()
return self.fleet_boss.brute_clear_boss()

View File

@ -73,5 +73,5 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -81,6 +81,6 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -78,4 +78,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_6(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -90,5 +90,5 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_6(self):
return self.fleet_2.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -44,4 +44,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_4(self):
return self.fleet_2.clear_potential_boss()
return self.fleet_boss.clear_potential_boss()

View File

@ -60,4 +60,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_2.brute_clear_boss()
return self.fleet_boss.brute_clear_boss()

View File

@ -74,4 +74,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_2.brute_clear_boss()
return self.fleet_boss.brute_clear_boss()

View File

@ -44,4 +44,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_2.brute_clear_boss()
return self.fleet_boss.brute_clear_boss()

View File

@ -81,4 +81,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
return self.fleet_2.brute_clear_boss()
return self.fleet_boss.brute_clear_boss()

View File

@ -100,4 +100,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_6(self):
return self.fleet_2.brute_clear_boss()
return self.fleet_boss.brute_clear_boss()

View File

@ -114,4 +114,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_6(self):
return self.fleet_2.brute_clear_boss()
return self.fleet_boss.brute_clear_boss()

View File

@ -33,7 +33,7 @@ class Fleet(Camera, AmbushHandler):
@property
def fleet_2(self):
if self.config.FLEET_2 and self.config.FLEET_BOSS == 2:
if self.config.FLEET_2:
if self.fleet_current_index != 2:
self.fleet_ensure(index=2)
return self

View File

@ -508,7 +508,7 @@ class Map(Fleet):
Returns:
bool: if clear an enemy.
"""
if self.fleet_boss_index != 2:
if not self.config.FLEET_2:
return False
for grid in grids:
if self.fleet_at(grid=grid, fleet=2):