Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -1943,6 +1943,7 @@
"CustomFilter": "DailyEvent > Gem-4 > Gem-2 > Gem-8 > ExtraCube-0:30\n> UrgentCube-1:30 > UrgentCube-1:45 > UrgentCube-3\n> ExtraDrill-5:20 > ExtraDrill-2 > ExtraDrill-3:20\n> UrgentCube-2:15 > UrgentCube-4\n> ExtraDrill-1 > UrgentCube-6 > ExtraCube-1:30\n> ExtraDrill-2:40 > ExtraDrill-0:20\n> Major > DailyChip > DailyResource\n> ExtraPart-0:30 > ExtraOil-1 > UrgentBox-6\n> ExtraCube-3 > ExtraPart-1 > UrgentBox-3\n> ExtraCube-4 > ExtraPart-1:30 > ExtraOil-4\n> UrgentBox-1 > ExtraCube-5 > UrgentBox-1\n> ExtraCube-8 > ExtraOil-8\n> UrgentDrill-4 > UrgentDrill-2:40 > UrgentDrill-2\n> UrgentDrill-1 > UrgentDrill-1:30 > UrgentDrill-1:10\n> Extra-0:20 > Extra-0:30 > Extra-1:00 > Extra-1:30 > Extra-2:00\n> shortest",
"Blacklist": null,
"DoMajorCommission": false,
"NotifyRewardCube": false,
"NotifyReward": true,
"NotifyRewardStatistics": true,
"GemNotify": true,
Expand Down Expand Up @@ -2790,7 +2791,10 @@
"MonthEndActionPointCleanupEnable": false,
"MonthEndActionPointCleanupDays": 0,
"MonthEndActionPointPreserve": 0,
"MonthEndShopPurchase": true
"MonthEndShopPurchase": true,
"BuyActionPointMode": "off",
"BuyActionPointUpperThreshold": 200,
"BuyActionPointLowerThreshold": 100
},
"Storage": {
"Storage": {}
Expand Down
17 changes: 17 additions & 0 deletions module/config/argument/args.json
Original file line number Diff line number Diff line change
Expand Up @@ -14108,6 +14108,23 @@
true,
false
]
},
"BuyActionPointMode": {
"type": "select",
"value": "off",
"option": [
"off",
"hazard1_leveling",
"meowfficer_farming"
]
},
"BuyActionPointUpperThreshold": {
"type": "input",
"value": 200
},
"BuyActionPointLowerThreshold": {
"type": "input",
"value": 100
}
},
"Storage": {
Expand Down
8 changes: 8 additions & 0 deletions module/config/argument/argument.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,14 @@ OpsiScheduling:
MonthEndShopPurchase:
value: true
option: [true, false]
# ===== 新增:买行动力双模式 =====
BuyActionPointMode:
value: "off"
option: ["off", hazard1_leveling, meowfficer_farming]
BuyActionPointUpperThreshold:
value: 200
BuyActionPointLowerThreshold:
value: 100
OpsiPreventActionPointOverflow:
Task:
value: OpsiScheduling
Expand Down
3 changes: 3 additions & 0 deletions module/config/config_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,9 @@ class GeneratedConfig:
OpsiScheduling_MonthEndActionPointCleanupDays = 0
OpsiScheduling_MonthEndActionPointPreserve = 0
OpsiScheduling_MonthEndShopPurchase = True # True, False
OpsiScheduling_BuyActionPointMode = 'off' # off, hazard1_leveling, meowfficer_farming
OpsiScheduling_BuyActionPointUpperThreshold = 200
OpsiScheduling_BuyActionPointLowerThreshold = 100

# 配置组 `OpsiPreventActionPointOverflow`
OpsiPreventActionPointOverflow_Task = 'OpsiScheduling' # OpsiScheduling, OpsiHazard1Leveling, OpsiMeowfficerFarming
Expand Down
15 changes: 15 additions & 0 deletions module/config/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -3587,6 +3587,21 @@
"help": "OpsiScheduling.MonthEndShopPurchase.help",
"True": "True",
"False": "False"
},
"BuyActionPointMode": {
"name": "Buy Action Point Mode",
"help": "Dedicated mode for buying action points, mutually exclusive with existing coin/AP scheduling. When enabled, will use oil to buy action points and execute corresponding tasks. Set weekly purchase limit in 'Opsi General -> Buy Action Point X times' first.",
"off": "Off",
"hazard1_leveling": "Hazard 1 Leveling",
"meowfficer_farming": "Meowfficer Farming"
},
"BuyActionPointUpperThreshold": {
"name": "Buy AP Upper Threshold",
"help": "Only for 'Meowfficer Farming' mode. When current AP exceeds this value, skip purchase and execute sea zone tasks directly. Default 200 (natural AP recovery cap)."
},
"BuyActionPointLowerThreshold": {
"name": "Buy AP Lower Threshold",
"help": "Only for 'Meowfficer Farming' mode. When current AP falls below this value, stop executing sea zone tasks and return to purchase step. Default 100."
}
},
"OpsiPreventActionPointOverflow": {
Expand Down
22 changes: 22 additions & 0 deletions module/config/i18n/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -2014,6 +2014,13 @@
"name": "ダイヤ委託統計詳細",
"help": "オンにすると、報酬通知にダイヤ委託の統計(成功率、累積報酬など)を付加します"
},
"NotifyRewardStatistics": {
"name": "ダイヤモンド通知の詳細",
"help": "オンにすると、AzurPilotは今回の委託で取得したダイヤモンドの数量と同時に、当日/今週/今月のダイヤモンド取得数量も通知します"
},
"NotifyRewardCube": {
"name": "Commission.CommissionNotifyRewardCube.name",
"help": "Commission.CommissionNotifyRewardCube.help"
"GemStatisticsPeriod": {
"name": "ダイヤ委託統計期間",
"help": "ダイヤ委託報酬の統計期間",
Expand Down Expand Up @@ -3587,6 +3594,21 @@
"help": "OpsiScheduling.MonthEndShopPurchase.help",
"True": "True",
"False": "False"
},
"BuyActionPointMode": {
"name": "行動力購入モード",
"help": "行動力購入専用モード。既存のコイン/行動力スケジューリングと排他。有効化すると石油で行動力を購入し対応任務を実行。事前に「大世界一般設定 → 行動力X回購入」で週間購入上限を設定してください。",
"off": "オフ",
"hazard1_leveling": "危険1練級",
"meowfficer_farming": "指揮猫牧場"
},
"BuyActionPointUpperThreshold": {
"name": "行動力購入上限閾値",
"help": "「指揮猫牧場」モードのみ使用。現在行動力がこの値を超えると購入をスキップし海域任務を直接実行。デフォルト200(大世界行動力自然回復上限)。"
},
"BuyActionPointLowerThreshold": {
"name": "行動力購入下限閾値",
"help": "「指揮猫牧場」モードのみ使用。現在行動力がこの値を下回ると海域任務の実行を停止し購入ステップに戻る。デフォルト100。"
}
},
"OpsiPreventActionPointOverflow": {
Expand Down
15 changes: 15 additions & 0 deletions module/config/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -3587,6 +3587,21 @@
"help": "月末清理行动力时是否执行大世界商店购买。关闭后月末清理循环将跳过商店购买步骤。",
"True": "True",
"False": "False"
},
"BuyActionPointMode": {
"name": "买行动力模式",
"help": "购买行动力专用模式,与现有黄币/行动力调度互斥。开启后将用石油购买行动力并执行对应任务。需先在「大世界通用设置 → 买行动力X次」设置每周购买上限。",
"off": "关闭",
"hazard1_leveling": "侵蚀1练级",
"meowfficer_farming": "短猫补黄币"
},
"BuyActionPointUpperThreshold": {
"name": "买行动力上限阈值",
"help": "仅「短猫补黄币」模式使用。当前真实行动力超过此值时跳过购买,直接执行海域任务。默认 200(大世界行动力自然回复上限)。"
},
"BuyActionPointLowerThreshold": {
"name": "买行动力下限阈值",
"help": "仅「短猫补黄币」模式使用。当前真实行动力低于此值时停止执行海域任务,回到购买步骤。默认 100。"
}
},
"OpsiPreventActionPointOverflow": {
Expand Down
18 changes: 18 additions & 0 deletions module/config/i18n/zh-MIAO.json
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,9 @@
"name": "钻石推送详情喵",
"help": "开启后,AzurPilot在推送本次委托获取钻石数量的同时推送当日/本周/本月的钻石获取数量喵。 (´・ω・`)"
},
"NotifyRewardCube": {
"name": "Commission.CommissionNotifyRewardCube.name",
"help": "Commission.CommissionNotifyRewardCube.help"
"GemNotify": {
"name": "钻石委托执行通知喵",
"help": "开始新的钻石委托后,把当前所有正在执行中的钻石委托列表推给主人喵~"
Expand Down Expand Up @@ -3587,6 +3590,21 @@
"help": "OpsiScheduling.MonthEndShopPurchase.help",
"True": "True",
"False": "False"
},
"BuyActionPointMode": {
"name": "买行动力模式喵~",
"help": "购买行动力专用模式喵,与现有黄币/行动力调度互斥喵~ 开启后将用石油购买行动力并执行对应任务喵。需先在「大世界通用设置 → 买行动力X次」设置每周购买上限喵~",
"off": "关闭喵",
"hazard1_leveling": "侵蚀1练级喵",
"meowfficer_farming": "短猫补黄币喵"
},
"BuyActionPointUpperThreshold": {
"name": "买行动力上限阈值喵~",
"help": "仅「短猫补黄币」模式使用喵~ 当前真实行动力超过此值时跳过购买,直接执行海域任务喵。默认 200(大世界行动力自然回复上限)喵~"
},
"BuyActionPointLowerThreshold": {
"name": "买行动力下限阈值喵~",
"help": "仅「短猫补黄币」模式使用喵~ 当前真实行动力低于此值时停止执行海域任务,回到购买步骤喵。默认 100 喵~"
}
},
"OpsiPreventActionPointOverflow": {
Expand Down
18 changes: 18 additions & 0 deletions module/config/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,9 @@
"name": "獎勵推送詳情",
"help": "開啟後,AzurPilot在推送本次委託獲取鑽石數量的同時推送當日/本週/本月的鑽石獲取數量"
},
"NotifyRewardCube": {
"name": "Commission.CommissionNotifyRewardCube.name",
"help": "Commission.CommissionNotifyRewardCube.help"
"GemNotify": {
"name": "鑽石委託執行通知",
"help": "開始新的鑽石委託後,推送當前所有正在執行中的鑽石委託列表"
Expand Down Expand Up @@ -3587,6 +3590,21 @@
"help": "OpsiScheduling.MonthEndShopPurchase.help",
"True": "True",
"False": "False"
},
"BuyActionPointMode": {
"name": "買行動力模式",
"help": "購買行動力專用模式,與現有黃幣/行動力調度互斥。開啟後將用石油購買行動力並執行對應任務。需先在「大世界通用設定 → 買行動力X次」設定每週購買上限。",
"off": "關閉",
"hazard1_leveling": "侵蝕1練級",
"meowfficer_farming": "短貓補黃幣"
},
"BuyActionPointUpperThreshold": {
"name": "買行動力上限閾值",
"help": "僅「短貓補黃幣」模式使用。當前真實行動力超過此值時跳過購買,直接執行海域任務。預設 200(大世界行動力自然回覆上限)。"
},
"BuyActionPointLowerThreshold": {
"name": "買行動力下限閾值",
"help": "僅「短貓補黃幣」模式使用。當前真實行動力低於此值時停止執行海域任務,回到購買步驟。預設 100。"
}
},
"OpsiPreventActionPointOverflow": {
Expand Down
4 changes: 2 additions & 2 deletions module/daily/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Daily(Combat):
emergency_module_development (bool): 是否为紧急模块开发任务。
"""
daily_current: int
daily_checked: list
daily_checked: list[int]
emergency_module_development = False

def is_active(self):
Expand Down Expand Up @@ -289,7 +289,7 @@ def daily_enter(self, button, skip_first_screenshot=True):
def daily_check(self, n=None):
if not n:
n = self.daily_current
self.daily_checked.append(n)
self.daily_checked.append(int(n))
logger.info(f'已检查每日 {n}')
logger.info(f'已检查列表: {self.daily_checked}')

Expand Down
7 changes: 7 additions & 0 deletions module/os/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,13 @@ def on_meow_search_start(self):
):
return

# 智能调度+上下文外层已查询行动力,跳过搜敌前的冗余弹窗刷新
if getattr(self, "_smart_scheduling_context", False) \
or getattr(self.config, "_smart_scheduling_context", False):
self._meow_search_start_time = time.time()
self._meow_search_start_ap = getattr(self, "_action_point_current", None)
return

# 将计时器存储在地图对象上,因为匹配的结束钩子可能在自动搜索、重扫或事件处理后才到达。
self._meow_search_start_time, self._meow_search_start_ap = (
start_meow_search_timer(self)
Expand Down
10 changes: 6 additions & 4 deletions module/os/tasks/hazard_leveling.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def run_hazard1_leveling(self):
self.run_hazard1_leveling_once()
self.config.check_task_switch()

def run_hazard1_leveling_once(self, ap_preserve=None):
def run_hazard1_leveling_once(self, ap_preserve=None, ap_checked=False):
"""执行一轮侵蚀 1 练级,由独立任务或 OpsiScheduling 调用。"""
# 启用随机事件以获得收益。调度器直接调用单轮时也需要保持该行为。
self.config.override(
Expand Down Expand Up @@ -174,9 +174,11 @@ def run_hazard1_leveling_once(self, ap_preserve=None):
raise

# 侵蚀 1 练级时,行动力优先用于此任务,而非耄耋相接。
self.action_point_set(
cost=120, keep_current_ap=True, check_rest_ap=True
)
# ap_checked=True 表示调度器已确认行动力充足(>=120),无需重复弹窗
if not ap_checked:
self.action_point_set(
cost=120, keep_current_ap=True, check_rest_ap=True
)

yellow_coins = self.get_yellow_coins()
if not self.is_running_smart_scheduling_task():
Expand Down
4 changes: 3 additions & 1 deletion module/os/tasks/meowfficer_farming.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ def _meow_handle_stay_in_zone(self, zone):
if self.zone.zone_id != zone.zone_id or not self.is_zone_name_hidden:
self.globe_goto(zone, types='SAFE', refresh=True)

self.action_point_set(cost=120, keep_current_ap=True, check_rest_ap=True)
# 智能调度+上下文外层已查询行动力,跳过冗余弹窗
if not self.is_running_smart_scheduling_task():
self.action_point_set(cost=120, keep_current_ap=True, check_rest_ap=True)
self.fleet_set(self.config.OpsiFleet_Fleet)
self.os_order_execute(recon_scan=False, submarine_call=self.config.OpsiFleet_Submarine)

Expand Down
Loading
Loading