mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 16:29:25 +08:00
OS change
This commit is contained in:
@@ -54,7 +54,11 @@ class OSCampaignRun(OSMapOperation):
|
||||
self.load_campaign()
|
||||
self.campaign.os_meowfficer_farming()
|
||||
except ActionPointLimit:
|
||||
if get_os_reset_remain() > 0:
|
||||
if self.is_cl1_enabled and get_os_reset_remain() > 2 \
|
||||
and self.get_yellow_coins() > self.config.OS_CL1_YELLOW_COINS_PRESERVE:
|
||||
self.config.task_delay(server_update=True)
|
||||
self.config.task_call('OpsiHazard1Leveling')
|
||||
elif get_os_reset_remain() > 0:
|
||||
self.config.task_delay(server_update=True)
|
||||
self.config.task_call('Reward')
|
||||
else:
|
||||
|
||||
@@ -328,7 +328,7 @@ class ManualConfig:
|
||||
"""
|
||||
OS_ACTION_POINT_BOX_USE = True
|
||||
OS_ACTION_POINT_PRESERVE = 0
|
||||
OS_CL1_YELLOW_COINS_PRESERVE = 100000
|
||||
OS_CL1_YELLOW_COINS_PRESERVE = 35000
|
||||
OS_NORMAL_YELLOW_COINS_PRESERVE = 35000
|
||||
OS_NORMAL_PURPLE_COINS_PRESERVE = 100
|
||||
|
||||
|
||||
@@ -3114,7 +3114,7 @@
|
||||
"OpsiObscure": {
|
||||
"_info": {
|
||||
"name": "隐秘海域",
|
||||
"help": "每隔27分钟清理一个隐秘海域,以保证空域搜索冷却\n使用此功能前必须满足以下条件:\n- 通关大世界主线并完成模拟战+塞壬试验场\n- 启用大世界开荒任务或使用战役信息记录仪(5000油道具)"
|
||||
"help": "每隔27分钟清理一个隐秘海域,以保证空域搜索冷却\n行动力低于短猫设置保留的行动力会推迟运行\n使用此功能前必须满足以下条件:\n- 通关大世界主线并完成模拟战+塞壬试验场\n- 启用大世界开荒任务或使用战役信息记录仪(5000油道具)"
|
||||
},
|
||||
"ForceRun": {
|
||||
"name": "无视运行间隔强制运行",
|
||||
@@ -3124,7 +3124,7 @@
|
||||
"OpsiAbyssal": {
|
||||
"_info": {
|
||||
"name": "深渊海域",
|
||||
"help": "清理仓库中的深渊海域坐标\n使用此功能前必须满足以下条件:\n- 通关大世界主线并完成模拟战+塞壬试验场\n- 启用大世界开荒任务或使用战役信息记录仪(5000油道具)"
|
||||
"help": "清理仓库中的深渊海域坐标\n行动力低于短猫设置保留的行动力会推迟运行\n使用此功能前必须满足以下条件:\n- 通关大世界主线并完成模拟战+塞壬试验场\n- 启用大世界开荒任务或使用战役信息记录仪(5000油道具)"
|
||||
},
|
||||
"ForceRun": {
|
||||
"name": "无视运行间隔强制运行",
|
||||
@@ -3134,7 +3134,7 @@
|
||||
"OpsiStronghold": {
|
||||
"_info": {
|
||||
"name": "塞壬要塞",
|
||||
"help": "清理每周的塞壬要塞\n使用此功能前必须满足以下条件:\n- 通关大世界主线并完成模拟战+塞壬试验场\n- 启用大世界开荒任务或使用战役信息记录仪(5000油道具)"
|
||||
"help": "清理每周的塞壬要塞\n行动力低于短猫设置保留的行动力会推迟运行\n使用此功能前必须满足以下条件:\n- 通关大世界主线并完成模拟战+塞壬试验场\n- 启用大世界开荒任务或使用战役信息记录仪(5000油道具)"
|
||||
},
|
||||
"ForceRun": {
|
||||
"name": "无视运行间隔强制运行",
|
||||
@@ -3168,7 +3168,7 @@
|
||||
},
|
||||
"ActionPointPreserve": {
|
||||
"name": "保留 X 点行动力",
|
||||
"help": "行动力低于 X 后停止,自动打开行动力箱子,X 包含箱子中的行动力,建议保留1000行动力给侵蚀1练级\n这个值将在大世界重置前3天自动减少至200点,如果启用侵蚀1练级则改为1000点,并在最后一天自动减少至0点"
|
||||
"help": "行动力低于 X 后停止,自动打开行动力箱子,X 包含箱子中的行动力,建议保留2000以上行动力给侵蚀1练级\n这个值将在大世界重置前3天自动减少至200点,如果启用侵蚀1练级则改为1000点,并在最后一天自动减少至0点"
|
||||
},
|
||||
"HazardLevel": {
|
||||
"name": "侵蚀等级",
|
||||
@@ -3197,7 +3197,7 @@
|
||||
"OpsiHazard1Leveling": {
|
||||
"_info": {
|
||||
"name": "侵蚀1练级",
|
||||
"help": "消耗作战补给凭证以获取大量经验和少量行动力\n推荐携带1-2艘预装填航母以获取最高的时均收益\n\n为了避免无法购买港口商店的商品,Alas会保留100000作战补给凭证\n由于在神秘商店购买行动力需要大量作战补给凭证,启用本功能后会使用溢出行动力运行短猫相接来补充"
|
||||
"help": "消耗作战补给凭证以获取大量经验和少量行动力\n推荐携带1-2艘预装填航母以获取最高的时均收益\n\n为了避免无法购买茗喵商店的行动力箱,Alas会保留35000作战补给凭证\n由于在神秘商店购买行动力需要大量作战补给凭证,启用本功能后会使用溢出行动力运行短猫相接来补充"
|
||||
},
|
||||
"TargetZone": {
|
||||
"name": "指定海域",
|
||||
|
||||
@@ -437,10 +437,24 @@ class OSMap(OSFleet, Map, GlobeCamera, StrategicSearchHandler):
|
||||
"""
|
||||
Keeping enough startup AP to run CL1.
|
||||
"""
|
||||
preserve = deep_get(self.config.data, "OpsiMeowfficerFarming.OpsiMeowfficerFarming.ActionPointPreserve", 1000)
|
||||
ap_preserve = min(max(preserve, 1000, key=int), 10000, key=int)
|
||||
if self.is_cl1_enabled and get_os_reset_remain() > 2:
|
||||
logger.info(f'Keep {ap_preserve} AP when CL1 available')
|
||||
if not self.action_point_check(ap_preserve):
|
||||
self.config.opsi_task_delay(cl1_preserve=True)
|
||||
self.config.task_stop()
|
||||
|
||||
def cl1_ap_preserve_os_obscure(self):
|
||||
"""
|
||||
Keeping enough startup AP to run CL1.
|
||||
"""
|
||||
preserve = deep_get(self.config.data, "OpsiMeowfficerFarming.OpsiMeowfficerFarming.ActionPointPreserve", 1000)
|
||||
ap_preserve_os_obscure = min(max(preserve - 200, 1000, key=int), 10000, key=int)
|
||||
if self.is_cl1_enabled and get_os_reset_remain() > 2 \
|
||||
and self.get_yellow_coins() > self.config.OS_CL1_YELLOW_COINS_PRESERVE:
|
||||
logger.info('Keep 1000 AP when CL1 available')
|
||||
if not self.action_point_check(1000):
|
||||
logger.info(f'Keep {ap_preserve_os_obscure} AP when CL1 available')
|
||||
if not self.action_point_check(ap_preserve_os_obscure):
|
||||
self.config.opsi_task_delay(cl1_preserve=True)
|
||||
self.config.task_stop()
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ 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, 10000)
|
||||
if preserve == 0:
|
||||
self.config.override(OpsiFleet_Submarine=False)
|
||||
if self.is_cl1_enabled:
|
||||
@@ -425,6 +425,10 @@ class OperationSiren(OSMap):
|
||||
while 1:
|
||||
# Limited action point preserve of hazard 1 to 200
|
||||
self.config.OS_ACTION_POINT_PRESERVE = 200
|
||||
preserve = deep_get(self.config.data, "OpsiMeowfficerFarming.OpsiMeowfficerFarming.ActionPointPreserve", 1000)
|
||||
ap_preserve = min(self.get_action_point_limit(), max(preserve, 1000, key=int), 10000, key=int)
|
||||
if self.is_in_opsi_explore():
|
||||
self.config.OS_ACTION_POINT_PRESERVE = ap_preserve
|
||||
if self.config.is_task_enabled('OpsiAshBeacon') \
|
||||
and not self._ash_fully_collected \
|
||||
and self.config.OpsiAshBeacon_EnsureFullyCollected:
|
||||
@@ -451,12 +455,17 @@ class OperationSiren(OSMap):
|
||||
keep_current_ap = True
|
||||
if self.config.OpsiGeneral_BuyActionPointLimit > 0:
|
||||
keep_current_ap = False
|
||||
next_run = deep_get(self.config.data, "OpsiMeowfficerFarming.Scheduler.NextRun", default=DEFAULT_TIME)
|
||||
self.action_point_set(cost=70, keep_current_ap=keep_current_ap, check_rest_ap=True)
|
||||
if self._action_point_total >= 3000 and not IsDisableOpsiMeowfficerFarming:
|
||||
if self._action_point_total >= (ap_preserve + 1200) \
|
||||
and not IsDisableOpsiMeowfficerFarming \
|
||||
and not self.is_in_opsi_explore() \
|
||||
and next_run - datetime.now() > timedelta(minutes=27):
|
||||
with self.config.multi_set():
|
||||
self.config.task_delay(server_update=True)
|
||||
if not self.is_in_opsi_explore():
|
||||
self.config.task_call('OpsiMeowfficerFarming')
|
||||
self.config.task_call('OpsiAbyssal')
|
||||
self.config.task_call('OpsiStronghold')
|
||||
self.config.task_call('OpsiObscure')
|
||||
self.config.task_call('OpsiMeowfficerFarming')
|
||||
self.config.task_stop()
|
||||
|
||||
if self.config.OpsiHazard1Leveling_TargetZone != 0:
|
||||
@@ -572,7 +581,7 @@ class OperationSiren(OSMap):
|
||||
ActionPointLimit:
|
||||
"""
|
||||
logger.hr('OS clear obscure', level=1)
|
||||
self.cl1_ap_preserve()
|
||||
self.cl1_ap_preserve_os_obscure()
|
||||
if self.config.OpsiObscure_ForceRun:
|
||||
logger.info('OS obscure finish is under force run')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user