Skip to content

fix(Exploration): 修正选关滑动方向并标定为每次两章 - #1908

Closed
m123711 wants to merge 1 commit into
runhey:devfrom
m123711:fix/exploration-swipe-direction
Closed

m123711 wants to merge 1 commit into
runhey:devfrom
m123711:fix/exploration-swipe-direction

Conversation

@m123711

@m123711 m123711 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

问题

探索「选关」阶段要滑动右侧章节列表找到配置的第二十八章,但 S_SWIPE_LEVEL_UP 的滑动方向反了、步长也偏小,15 次滑动后仍然找不到,报:

GameStuckError: Swiped too many times (15), seems stuck in exploration level selection

(参考用户侧日志 log/error/1791614154415、1791609172251、1791617732371、1791645503807;每次日志里 15 次滑动的 OCR 结果都是 ['第一章', '第二章', '第三章'],即列表完全没动。)

1)方向反了

规则描述写的是"向上滑动章节",但坐标 (1142,328) → (1143,444) 实为手指向下拖。在 1280×720 实机上用 adb 验证(章节列表停在第一~四章):

动作 章节列表区域像素变化 结果
手指向下 (1152,338)→(1154,454)(现有规则) 0.28 列表完全没动(已在顶部,该方向是往回翻)
手指向上 (1154,454)→(1152,338) 第 1/2/3 次 40.08 / 42.19 / 43.20 每次都正常滚动(3 次滚到第五~七章)
列表滚下后再手指向下 43.25 / 42.25 也能滚回来 → 两个方向都正常,之前不动纯粹是方向反了

2)步长偏小

116px 一次约翻 1.3 章,而第一章到第二十八章需要约 20 次,超过 swipeCount >= 15 的上限。

修改

  • tasks/Exploration/assets.py + tasks/Exploration/res/swipe.json:
    S_SWIPE_LEVEL_UP 改为 (1152,430) → (1152,280),即手指向上 150px;
    配对的 S_SWIPE_LEVEL_DOWN 同步镜像为 (1152,280) → (1152,430),保持上下成对;
  • tasks/Exploration/base.py:滑动次数上限 15 → 30(给标定误差留余量)。

验证

同一台模拟器上 adb 实测标定:

拖动距离 实测结果 每次翻几章
116px(原规则) 3 次:第一章 → 第五章 ≈1.3 章
232px 2 次:第一章 → 第八章 ≈3.5 章(偏多)
150px 第八→第十;第十→第十二 正好 2 章 ✅

为什么选 2 章/次而不是更快:章节名 OCR 窗口一次显示 3 章,步长 2 章时相邻两次截图有 1 章重叠,目标章节不会落在两次截图之间的空档里;若一次 3.5 章则会出现 0.5 章空档,可能直接跳过第二十八章。

按 2 章/次计算:27 章 ÷ 2 ≈ 14 次 < 上限 30 ✓。

  • 语法检查:tasks/Exploration/assets.py、tasks/Exploration/base.py 均 py_compile OK;
  • 未改动场景判定与其它流程;OCR 相关素材正常(I_CHECK_EXPLORATION 在该画面上 0.968、章节名 OCR 正常)。

备注

只修正选关滑动的方向、步长与次数上限,不改判定逻辑。

Sourcery 总结

通过校准滑动操作并允许更多次尝试以达到配置的章节级别,修复探索章节导航问题。

错误修复:

  • 修正探索章节选择的滑动方向和距离,使列表能够可靠地向后续章节推进。

功能增强:

  • 提高章节选择滑动的重试次数上限,以支持到达较远章节,同时保留现有的选择逻辑。
Original summary in English

Summary by Sourcery

Fix exploration chapter navigation by calibrating swipe movement and allowing additional attempts to reach the configured level.

Bug Fixes:

  • Correct the exploration chapter-selection swipe direction and distance so the list advances reliably toward later chapters.

Enhancements:

  • Increase the chapter-selection swipe retry limit to accommodate reaching distant chapters while preserving existing selection logic.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好——我已经审查了你的更改,看起来很棒!

Sourcery 评估

已批准。


Sourcery 对开源项目免费——如果你喜欢我们的评审,请考虑分享它们 ✨
Original comment in English

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@github-actions

Copy link
Copy Markdown
Contributor

Findings

  • 未发现未通过项

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by PR Review Checklist for #1908 · codex · gpt56 · 9.71 AIC · ⌖ 2.38 AIC · ⊞ 12.1K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants