按台账修镜牢: 饰品弹窗兜底、按键扫描码、卡包按体系加分
按 docs/ISSUES.md 处理本机回归后待修/待数据的条目:
- I-06/R-04 开局「获得E.G.O饰品」弹窗死循环: 确认模板连续第 3 次命中起改点
按钮中心(勾号 +76/1440), 连续 20 次还在就记 [ERROR]、抛 TaskAbort 结束任务
(上游 continue 跳过了循环计数)。单测执行上游真实 select_init_ego_gift。
- I-05/R-03 键盘寻路 0 成功: 前台按键改发带扫描码和扩展键标志的 keybd_event,
各模式按住 0.12 秒(上游注释: Unity 6 校验扫描码/扩展键); 连续 3 个节点进不去
就本次任务停用键盘寻路(方案 B)。MCP key 工具前台同样处理。LCP_KEY_HOLD=0 关。
- I-07/R-02 事件表 6 -> 9 条: 蜘蛛巢、归乡路途两段(拿「归途」), 按 wiki.gg 核对结果;
全表按本机装的零协 release 2026111301 重新核对唯一性。
- I-13 复查 5992827: 「进入」先模板确认再 OCR(原来每轮都跑一次整屏 OCR);
选队页重试重新截图; 入场切队失败记 [ERROR] 且本局不再重翻列表。
- R-01/I-08 卡包按体系加分: wiki.gg 122 个卡包(楼层/专属饰品/Featured 分类) +
零协中文名生成 lc_mcp/data/theme_pack_systems.json(scripts/build_theme_pack_systems.py);
灰机 wiki 对云端 403、BWIKI 无卡包条目, 中文社区攻略用 codex CLI 联网检索,
推荐/避开并入表的 community。选卡包时临时加到 AALC 权重上, 按当前难度只看会出现
的卡包; 审计记 system_bonus。LCP_THEME_PACK_SYSTEMS=0 关。
- 文档: ISSUES/BACKLOG/README 更新, 新增 docs/feedback/2026-11-15/REGRESSION.md
(本轮回归清单)和 theme-pack-research.md(检索记录)。
单测 703 个全过(Linux)。实机未验。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+12
-3
@@ -9,7 +9,9 @@ import sys
|
|||||||
import tempfile
|
import tempfile
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
import types
|
||||||
import unittest
|
import unittest
|
||||||
|
from types import SimpleNamespace
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
@@ -387,12 +389,19 @@ class RuntimeTest(unittest.TestCase):
|
|||||||
mock.patch('lc_mcp.aalc_engine.time.sleep', side_effect=[None, RuntimeError('interrupted')]):
|
mock.patch('lc_mcp.aalc_engine.time.sleep', side_effect=[None, RuntimeError('interrupted')]):
|
||||||
with self.assertRaises(RuntimeError):
|
with self.assertRaises(RuntimeError):
|
||||||
engine.click(100, 200)
|
engine.click(100, 200)
|
||||||
with mock.patch.dict(sys.modules, pyautogui=pointer), \
|
user32 = mock.Mock()
|
||||||
mock.patch('lc_mcp.aalc_engine.time.sleep', side_effect=RuntimeError('interrupted')):
|
user32.MapVirtualKeyW.return_value = 0x1C
|
||||||
|
tables = types.ModuleType('module.automation.input_handlers.input')
|
||||||
|
tables.key_list, tables.EXTENDED_KEY_VKS = {'enter': 0x0D}, frozenset({0x26})
|
||||||
|
with mock.patch.dict(sys.modules, {'module.automation.input_handlers.input': tables}), \
|
||||||
|
mock.patch('ctypes.windll', SimpleNamespace(user32=user32), create=True), \
|
||||||
|
mock.patch('time.sleep', side_effect=RuntimeError('interrupted')):
|
||||||
with self.assertRaises(RuntimeError):
|
with self.assertRaises(RuntimeError):
|
||||||
engine.keypress('enter')
|
engine.keypress('enter')
|
||||||
pointer.mouseUp.assert_called_once_with(580, 657)
|
pointer.mouseUp.assert_called_once_with(580, 657)
|
||||||
pointer.keyUp.assert_called_once_with('enter')
|
# 前台按键带扫描码; 按住期间被打断也要抬起
|
||||||
|
self.assertEqual(user32.keybd_event.call_args_list, [mock.call(0x0D, 0x1C, 0, 0), mock.call(0x0D, 0x1C, 2, 0)])
|
||||||
|
pointer.keyDown.assert_not_called()
|
||||||
|
|
||||||
def test_foreground_move_settle_failure_sends_no_button_press(self):
|
def test_foreground_move_settle_failure_sends_no_button_press(self):
|
||||||
from lc_mcp.aalc_engine import AalcEngine
|
from lc_mcp.aalc_engine import AalcEngine
|
||||||
|
|||||||
Reference in New Issue
Block a user