mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-15 13:27:20 +08:00
Add Ospi Hazard1Leveling settings
This commit is contained in:
@@ -435,7 +435,8 @@ class OSMap(OSFleet, Map, GlobeCamera, StrategicSearchHandler):
|
||||
Keeping enough startup AP to run CL1.
|
||||
"""
|
||||
if self.is_cl1_enabled and get_os_reset_remain() > 2 \
|
||||
and self.get_yellow_coins() > self.config.OS_CL1_YELLOW_COINS_PRESERVE:
|
||||
and self.get_yellow_coins() > self.config.cross_get(
|
||||
keys="OpsiHazard1Leveling.OpsiHazard1Leveling.OperationCoinsPreserve"):
|
||||
logger.info('Keep 1000 AP when CL1 available')
|
||||
if not self.action_point_check(1000):
|
||||
self.config.opsi_task_delay(cl1_preserve=True)
|
||||
|
||||
@@ -322,10 +322,11 @@ class OperationSiren(OSMap):
|
||||
if self.is_cl1_enabled and self.config.OpsiMeowfficerFarming_ActionPointPreserve < 1000:
|
||||
logger.info('With CL1 leveling enabled, set action point preserve to 1000')
|
||||
self.config.OpsiMeowfficerFarming_ActionPointPreserve = 1000
|
||||
preserve = min(self.get_action_point_limit(), self.config.OpsiMeowfficerFarming_ActionPointPreserve, 2000)
|
||||
preserve = min(self.get_action_point_limit(), self.config.OpsiMeowfficerFarming_ActionPointPreserve)
|
||||
if preserve == 0:
|
||||
self.config.override(OpsiFleet_Submarine=False)
|
||||
if self.is_cl1_enabled:
|
||||
OperationCoins_Preserve = self.config.cross_get(keys="OpsiHazard1Leveling.OpsiHazard1Leveling.OperationCoinsPreserve")
|
||||
# Without these enabled, CL1 gains 0 profits
|
||||
self.config.override(
|
||||
OpsiGeneral_DoRandomMapEvent=True,
|
||||
@@ -362,7 +363,7 @@ class OperationSiren(OSMap):
|
||||
check_rest_ap = True
|
||||
if not self.is_cl1_enabled and self.config.OpsiGeneral_BuyActionPointLimit > 0:
|
||||
keep_current_ap = False
|
||||
if self.is_cl1_enabled and self.get_yellow_coins() >= self.config.OS_CL1_YELLOW_COINS_PRESERVE:
|
||||
if self.is_cl1_enabled and self.get_yellow_coins() >= OperationCoins_Preserve:
|
||||
check_rest_ap = False
|
||||
try:
|
||||
self.action_point_set(cost=0, keep_current_ap=keep_current_ap, check_rest_ap=check_rest_ap)
|
||||
@@ -427,8 +428,8 @@ class OperationSiren(OSMap):
|
||||
self.config.OS_ACTION_POINT_PRESERVE = 0
|
||||
logger.attr('OS_ACTION_POINT_PRESERVE', self.config.OS_ACTION_POINT_PRESERVE)
|
||||
|
||||
if self.get_yellow_coins() < self.config.OS_CL1_YELLOW_COINS_PRESERVE:
|
||||
logger.info(f'Reach the limit of yellow coins, preserve={self.config.OS_CL1_YELLOW_COINS_PRESERVE}')
|
||||
if self.get_yellow_coins() < self.config.OpsiHazard1Leveling_OperationCoinsPreserve:
|
||||
logger.info(f'Reach the limit of yellow coins, preserve={self.config.OpsiHazard1Leveling_OperationCoinsPreserve}')
|
||||
with self.config.multi_set():
|
||||
self.config.task_delay(server_update=True)
|
||||
if not self.is_in_opsi_explore():
|
||||
@@ -443,7 +444,7 @@ class OperationSiren(OSMap):
|
||||
if self.config.OpsiGeneral_BuyActionPointLimit > 0:
|
||||
keep_current_ap = False
|
||||
self.action_point_set(cost=70, keep_current_ap=keep_current_ap, check_rest_ap=True)
|
||||
if self._action_point_total >= 3000:
|
||||
if not self.config.OpsiHazard1Leveling_DisableMeowfficerFarming and self._action_point_total >= 3000:
|
||||
with self.config.multi_set():
|
||||
self.config.task_delay(server_update=True)
|
||||
if not self.is_in_opsi_explore():
|
||||
|
||||
Reference in New Issue
Block a user