mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-09 05:47:30 +08:00
Add: CoalitionSp task
This commit is contained in:
parent
7ecf3ac502
commit
8c8d44a09f
4
alas.py
4
alas.py
@ -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(
|
||||
|
@ -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)
|
||||
|
15
module/coalition/coalition_sp.py
Normal file
15
module/coalition/coalition_sp.py
Normal 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()
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user