Add: CoalitionSp task

This commit is contained in:
LmeSzinc 2023-03-24 04:55:34 +08:00
parent 7ecf3ac502
commit 8c8d44a09f
4 changed files with 26 additions and 2 deletions

View File

@ -361,6 +361,10 @@ class AzurLaneAutoScript:
from module.coalition.coalition import Coalition
Coalition(config=self.config, device=self.device).run()
def coalition_sp(self):
from module.coalition.coalition_sp import CoalitionSP
CoalitionSP(config=self.config, device=self.device).run()
def c72_mystery_farming(self):
from module.campaign.run import CampaignRun
CampaignRun(config=self.config, device=self.device).run(

View File

@ -66,8 +66,13 @@ class Coalition(CoalitionCombat, CampaignEvent):
self.config.override(
Campaign_Name=f'{event}_{stage}',
Campaign_UseAutoSearch=False,
Fleet_FleetOrder='fleet1_all_fleet2_standby'
Fleet_FleetOrder='fleet1_all_fleet2_standby',
)
if stage == 'sp':
# Multiple fleets are required in SP
self.config.override(
Coalition_Fleet='multi',
)
self.emotion.check_reduce(battle=self.coalition_get_battles(stage))
self.enter_map(stage=stage, fleet=fleet)

View File

@ -0,0 +1,15 @@
from module.coalition.coalition import Coalition
from module.config.config import TaskEnd
class CoalitionSP(Coalition):
def run(self, *args, **kwargs):
try:
super().run(stage='sp', total=1)
except TaskEnd:
# Catch task switch
pass
if self.run_count > 0:
self.config.task_delay(server_update=True)
else:
self.config.task_stop()

View File

@ -95,7 +95,7 @@ class CoalitionUI(Combat):
stage = stage.lower()
# No fleet switch in TC1
if stage == 'tc1':
if stage in ['tc1', 'sp']:
return False
self.coalition_ensure_fleet(fleet)