1
0
mirror of https://github.com/sui-feng-cb/AzurLaneAutoScript1.git synced 2026-08-15 03:40:37 +08:00

Opt: call all ap consuming tasks when cl1 cannot continue (#4928)

* Opt: call all ap consuming tasks when cl1 cannot continue

* Opt: call cl1 if ActionPointLimit and cl1 enabled in ap consuming tasks
This commit is contained in:
guoh064
2026-08-09 15:06:14 +08:00
committed by GitHub
parent 29bf47bfd0
commit 56841cc0b0
2 changed files with 19 additions and 0 deletions

View File

@@ -69,6 +69,9 @@ class OSCampaignRun(OSMapOperation):
campaign.os_obscure()
except ActionPointLimit:
self.config.opsi_task_delay(ap_limit=True)
if self.config.is_task_enabled('OpsiHazard1Leveling') \
and self.get_yellow_coins() > self.config.OS_CL1_YELLOW_COINS_PRESERVE:
self.config.task_call('OpsiHazard1Leveling')
def opsi_month_boss(self):
if self.config.SERVER in ['tw']:
@@ -89,6 +92,9 @@ class OSCampaignRun(OSMapOperation):
campaign.os_abyssal()
except ActionPointLimit:
self.config.opsi_task_delay(ap_limit=True)
if self.config.is_task_enabled('OpsiHazard1Leveling') \
and self.get_yellow_coins() > self.config.OS_CL1_YELLOW_COINS_PRESERVE:
self.config.task_call('OpsiHazard1Leveling')
def opsi_archive(self):
try:
@@ -103,6 +109,9 @@ class OSCampaignRun(OSMapOperation):
campaign.os_stronghold()
except ActionPointLimit:
self.config.opsi_task_delay(ap_limit=True)
if self.config.is_task_enabled('OpsiHazard1Leveling') \
and self.get_yellow_coins() > self.config.OS_CL1_YELLOW_COINS_PRESERVE:
self.config.task_call('OpsiHazard1Leveling')
def opsi_cross_month(self):
campaign = self.load_campaign()

View File

@@ -27,6 +27,11 @@ class OpsiHazard1Leveling(OSMap):
with self.config.multi_set():
self.config.task_delay(server_update=True)
if not self.is_in_opsi_explore():
cd = self.nearest_task_cooling_down
if cd is None:
for task in ['OpsiAbyssal', 'OpsiStronghold', 'OpsiObscure']:
if self.config.is_task_enabled(task):
self.config.task_call(task)
self.config.task_call('OpsiMeowfficerFarming')
self.config.task_stop()
@@ -42,6 +47,11 @@ class OpsiHazard1Leveling(OSMap):
with self.config.multi_set():
self.config.task_delay(server_update=True)
if not self.is_in_opsi_explore():
cd = self.nearest_task_cooling_down
if cd is None:
for task in ['OpsiAbyssal', 'OpsiStronghold', 'OpsiObscure']:
if self.config.is_task_enabled(task):
self.config.task_call(task)
self.config.task_call('OpsiMeowfficerFarming')
self.config.task_stop()