镜牢兔子洞速刷: 每场第一回合超频「空洞」、攻略路线卡包加分
run_task(task="mirror", strategy="rabbit_hole") 时生效, 不带 strategy 时不装: - 选队按 rabbit_hole.json 的编队名(默认「兔子洞」); - 每回合 P → 长按浮士德打开 E.G.O 列表 → OCR 找「空洞」, 第一回合长按卡片超频 (侵蚀「空洞」直接打人; 普通「空洞」只叠弹孔), 其余回合单击 → Enter; 审计 battle/hollow 记 overclock/ego/ego_unavailable/no_option; - 路线卡包加分: 赌徒 → 地狱鸡 → 去·海·边 → 憎恶与绝望 → 2号线(OurPlay 全程困难路线), 按 AALC 默认权重模拟每层都选到路线卡包。 长按点 press_at 出厂未校准: 只记 [ERROR], 照常 P+Enter。 机制和超频操作按零协游戏文本/教程核实; 编队、路线按 codex 检索的 OurPlay/Reddit 攻略。 实机校准步骤见 docs/feedback/2026-11-15/RABBIT-HOLE.md, 台账 R-08。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+36
-4
@@ -11,7 +11,8 @@ import sys
|
|||||||
|
|
||||||
from . import killswitch, preflight
|
from . import killswitch, preflight
|
||||||
from .aalc_engine import bootstrap
|
from .aalc_engine import bootstrap
|
||||||
from .aalc_patches import (TaskAbort, WindowGuard, driver_click_tasks, headless_hdr_warning,
|
from .aalc_patches import (TaskAbort, WindowGuard, driver_click_tasks, headless_hdr_warning, install_rabbit_hole,
|
||||||
|
load_rabbit_hole,
|
||||||
install_default_battle_team, install_event_choices, install_exact_team_match,
|
install_default_battle_team, install_event_choices, install_exact_team_match,
|
||||||
install_gift_confirm_guard, install_gift_preference, install_key_hold,
|
install_gift_confirm_guard, install_gift_preference, install_key_hold,
|
||||||
install_robust_set_foreground, install_shop_audit, install_shop_by_name,
|
install_robust_set_foreground, install_shop_audit, install_shop_by_name,
|
||||||
@@ -29,6 +30,10 @@ TASKS = {
|
|||||||
'enkephalin': {'times': 'set_lunacy_to_enkephalin'},
|
'enkephalin': {'times': 'set_lunacy_to_enkephalin'},
|
||||||
'mirror': {'count': 'set_mirror_count'},
|
'mirror': {'count': 'set_mirror_count'},
|
||||||
}
|
}
|
||||||
|
# 任务 -> {选项名: 允许的值}; 不对应 AALC 配置项, 只决定本次装哪些补丁
|
||||||
|
TASK_OPTIONS = {
|
||||||
|
'mirror': {'strategy': ('rabbit_hole',)}, # rabbit_hole: 兔子洞速刷, 见 lc_mcp/data/rabbit_hole.json
|
||||||
|
}
|
||||||
# 用户给了镜牢次数时一并临时关闭的配置: 开着无限刷牢, AALC 会把次数改成 9999
|
# 用户给了镜牢次数时一并临时关闭的配置: 开着无限刷牢, AALC 会把次数改成 9999
|
||||||
EXPLICIT_COUNT_OVERRIDES = {'mirror': {'count': {'infinite_dungeons': False}}}
|
EXPLICIT_COUNT_OVERRIDES = {'mirror': {'count': {'infinite_dungeons': False}}}
|
||||||
RESTORE_ENV = 'LCP_RESTORE_FILE'
|
RESTORE_ENV = 'LCP_RESTORE_FILE'
|
||||||
@@ -104,7 +109,23 @@ def run(task, params):
|
|||||||
return PREFLIGHT_EXIT
|
return PREFLIGHT_EXIT
|
||||||
|
|
||||||
|
|
||||||
|
def split_options(task, params):
|
||||||
|
"""把任务选项(TASK_OPTIONS)从参数里拆出来, 返回 (次数类参数, 选项)。"""
|
||||||
|
allowed = TASK_OPTIONS.get(task, {})
|
||||||
|
params = dict(params)
|
||||||
|
options = {k: params.pop(k) for k in list(params) if k in allowed}
|
||||||
|
return params, options
|
||||||
|
|
||||||
|
|
||||||
def _run(task, params):
|
def _run(task, params):
|
||||||
|
params, options = split_options(task, params)
|
||||||
|
rabbit = None
|
||||||
|
if options.get('strategy') == 'rabbit_hole':
|
||||||
|
try:
|
||||||
|
rabbit = load_rabbit_hole()
|
||||||
|
except (OSError, ValueError) as e:
|
||||||
|
log('[ERROR] [lc_mcp] 兔子洞配置读不了: %s' % e)
|
||||||
|
return PREFLIGHT_EXIT
|
||||||
bootstrap()
|
bootstrap()
|
||||||
from module.automation import auto
|
from module.automation import auto
|
||||||
from module.config import cfg
|
from module.config import cfg
|
||||||
@@ -133,7 +154,7 @@ def _run(task, params):
|
|||||||
install_default_battle_team(scheme, log=log)
|
install_default_battle_team(scheme, log=log)
|
||||||
# 镜牢: 编队是自定义名字(体系名), AALC 只会找 "编队#N"; 改成按体系名点选。
|
# 镜牢: 编队是自定义名字(体系名), AALC 只会找 "编队#N"; 改成按体系名点选。
|
||||||
if task in ('mirror', 'all'):
|
if task in ('mirror', 'all'):
|
||||||
install_system_team_selection(log=log)
|
install_system_team_selection(log=log, names=rabbit['team_names'] if rabbit else None)
|
||||||
install_team_screen_guard(log=log)
|
install_team_screen_guard(log=log)
|
||||||
install_gift_confirm_guard(log=log) # 「获得E.G.O饰品」点不关时换落点/结束任务(ISSUES I-06)
|
install_gift_confirm_guard(log=log) # 「获得E.G.O饰品」点不关时换落点/结束任务(ISSUES I-06)
|
||||||
install_typed_keyboard_road(log=log)
|
install_typed_keyboard_road(log=log)
|
||||||
@@ -141,8 +162,13 @@ def _run(task, params):
|
|||||||
install_event_choices(log=log)
|
install_event_choices(log=log)
|
||||||
install_shop_audit(log=log)
|
install_shop_audit(log=log)
|
||||||
install_shop_by_name(log=log) # 装在审计之后(包在外层), 审计才看得到按名字点的那一下
|
install_shop_by_name(log=log) # 装在审计之后(包在外层), 审计才看得到按名字点的那一下
|
||||||
install_theme_pack_systems(log=log) # 卡包按体系加分(BACKLOG R-01)
|
if rabbit: # 卡包按体系加分(BACKLOG R-01); 兔子洞再给攻略路线上的卡包加分
|
||||||
|
install_theme_pack_systems(log=log, route=rabbit['theme_packs'], route_name='兔子洞路线')
|
||||||
|
else:
|
||||||
|
install_theme_pack_systems(log=log)
|
||||||
install_theme_pack_audit(log=log) # 装在加分之后(包在外层), 审计记得到加分
|
install_theme_pack_audit(log=log) # 装在加分之后(包在外层), 审计记得到加分
|
||||||
|
if rabbit:
|
||||||
|
install_rabbit_hole(log=log, config=rabbit)
|
||||||
guard = WindowGuard(screen, cfg, log=log)
|
guard = WindowGuard(screen, cfg, log=log)
|
||||||
guard.start()
|
guard.start()
|
||||||
restore_path = os.environ.get(RESTORE_ENV)
|
restore_path = os.environ.get(RESTORE_ENV)
|
||||||
@@ -189,10 +215,16 @@ def main(argv):
|
|||||||
return 2
|
return 2
|
||||||
task = argv[1]
|
task = argv[1]
|
||||||
params = json.loads(argv[2]) if len(argv) > 2 else {}
|
params = json.loads(argv[2]) if len(argv) > 2 else {}
|
||||||
unknown = set(params) - set(TASKS[task])
|
options = TASK_OPTIONS.get(task, {})
|
||||||
|
unknown = set(params) - set(TASKS[task]) - set(options)
|
||||||
if unknown:
|
if unknown:
|
||||||
print('unknown params for %s: %s' % (task, ', '.join(sorted(unknown))), file=sys.stderr)
|
print('unknown params for %s: %s' % (task, ', '.join(sorted(unknown))), file=sys.stderr)
|
||||||
return 2
|
return 2
|
||||||
|
bad = {k: v for k, v in params.items() if k in options and v not in options[k]}
|
||||||
|
if bad:
|
||||||
|
print('bad option for %s: %s' % (task, ', '.join('%s=%r' % kv for kv in sorted(bad.items()))),
|
||||||
|
file=sys.stderr)
|
||||||
|
return 2
|
||||||
print('[lc_mcp] task %s start %s' % (task, json.dumps(params)), flush=True)
|
print('[lc_mcp] task %s start %s' % (task, json.dumps(params)), flush=True)
|
||||||
code = run(task, params)
|
code = run(task, params)
|
||||||
if code:
|
if code:
|
||||||
|
|||||||
Reference in New Issue
Block a user