Repository navigation
Automated PR 2026.10.16 - #1941
github-actions[bot] wants to merge 33 commits into
Conversation
1. 修复 search_fail_timer 未启动即触发及与 swipe(interval=3) 时序冲突吞掉滑动指令导致误判滑到底退出的问题; 2. 将单屏找怪观察时间从 3.2s 缩短至 1.0s,并在滑屏后立即调用 is_swipe_unchanged 检测中上部背景(250,140,800,90)像素差,避开顶部跑马灯与右侧浮动鬼火干扰,到底即退; 3. 退出/切换探索场景时清理 swipe_background_right 点击历史记录,避免多轮翻找累计触发 GameTooManyClickError; 4. 修复 search_up_fight 在特定 UP 模式下未匹配到挑战图标时向下穿透到 UpType.ALL 的问题。
…ge check - Reset search_fail_timer and unchanged_swipe_cnt when clicking confirmation popups in Scene.MAIN - Re-check screenshot after a delayed swipe, ignore popups/scene changes, and require 2 consecutive unchanged swipes before quitting exploration - Clear S_SWIPE_BACKGROUND_RIGHT click records when swipes move the map or battles trigger to prevent false GameTooManyClickError during long searches
- 抽取 _reset_search_state 统一重置滑动计时器与刷新结算状态 - 抽取 _search_next_area 统一滑屏找怪与边界停滞检测判定 - 精简 run_solo 和 run_leader,去除重复实现,保持两处逻辑一致
- 特定UP模式(经验/金币/达摩):启用2次滑屏早退策略(MAX_SWIPE_COUNT = 2),覆盖前3屏无怪即早退重开 - 全部模式(UpType.ALL):不限制滑屏次数,支持滑至最右边缘以打完全部小怪并击杀首领 - 剔除失效的巡航常量与 current_swipe_interval 死代码,清理废弃的 _match_end.refresh() - 缓存滑屏位移判定,避免单次检测内重复计算图像差分与输出日志 - 成员化 search_fail_timer,消除 17 处冗余参数透传
邀请第二个队友时等待3s,解决邀请过快导致邀请失败的问题
章节列表滑动方向改为向下滑动,使能找到困28入口
- replace login cancel and mail confirmation assets with shared global UI assets - remove obsolete Restart image rules, metadata entries, and PNG files - update the main page hook to use the shared cancel asset
This reverts commit 54803c5.
This reverts commit 372ef8f.
fix:修复3人组队“邀请频繁”问题、修复向上滑动无法找到困28入口问题
按维护者意见:删掉手搓的等待循环,改用已有的 ui_click(click, stop, interval, timeout): - 由 base_task.ui_click 负责「截图 → 判 stop → 点一次」的节奏, 不再自己维护 Timer / sleep / 点击计数。 - interval=6 让两次点击之间留给开场动画加载,timeout=45 保留原超时; 「手动」按钮点不到时 ui_click 会在超时后返回,不会触发同键 guard。 - 保留 is_battle_end 提前结算的兜底:ui_click 超时返回后走原有 顶部结算分支,不再需要内联 break。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Removed commented code and added a reference link.
fix(Duel): 开战前等待增加超时与点击上限
fix(Exploration): 修复特定UP类型找怪提前退出及滑屏边缘检测问题
- Raise OCR click debounce on task name from 1s to 3s so page-transition double-clicks do not hit the top-right finish-for-jade button. - Prefer GlobalGame I_UI_CANCEL (default threshold) when the jade confirm modal appears, both while entering and while exiting an in-progress task. - Replace ui_click_until_disappear(I_D_BACK) with a timed back loop that clears blocking cancel modals, avoiding GameTooManyClickError restarts. - Add enter/start timeouts so stuck states fail closed instead of looping. Refs: #1162
处理爬塔和御魂本的御魂溢出
fix(Delegation): 修复误触勾玉立即完成及返回按钮死循环
- close the buff panel before clicking the prepare button\n- enable the 50% experience buff for EvoZone battles
…tion" This reverts commit c202347.
There was a problem hiding this comment.
嗨,我发现了 2 个问题
给 AI 智能体的提示
请处理此次代码审查中的评论:
## 单条评论
### 评论 1
<location path="tasks/Exploration/solo.py" line_range="101-103" />
<code_context>
+ unchanged = self.is_swipe_unchanged(before_image, self.device.image)
+
+ if (self.get_current_scene() != Scene.MAIN
+ or self.appear(self.I_UI_CONFIRM)
+ or self.appear(self.I_UI_CONFIRM_SAMLL)):
+ self.search_fail_timer.reset()
+ return
+
</code_context>
<issue_to_address>
**探索点击历史不断累积**
当后台滑动反复被场景切换或确认弹窗打断时,`_search_next_area` 会在调用该滑动对应的 `click_record_remove` 之前返回,导致设备的点击历史中不断留下记录,直到探索抛出 `GameTooManyClickError` 并停止。
在这条中断路径返回之前,从设备的点击历史中移除该滑动记录。
</issue_to_address>
### 评论 2
<location path="tasks/Exploration/solo.py" line_range="113" />
<code_context>
+ self.swipe(self.S_SWIPE_BACKGROUND_RIGHT)
+ sleep(0.3)
+ self.screenshot()
+ if self.is_swipe_unchanged(before_retry, self.device.image):
+ logger.info("Reached rightmost boundary (confirmed twice). Quitting exploration.")
+ self._reset_search_state(reset_swipe_cnt=True)
</code_context>
<issue_to_address>
**遇到弹窗时探索会退出**
如果重试期间出现确认弹窗或场景切换,且采样到的背景保持不变,`_search_next_area` 就会将重试图像未发生变化判定为地图边界,并在未再次检查场景或确认弹窗的情况下调用 `quit_explore()`,导致探索直接退出,而不是处理新的状态。
在重试滑动后、将图像未发生变化判定为地图边界之前,重新检查场景和确认弹窗。
</issue_to_address>Sourcery 评估
待批准。 请先处理 2 个问题。
阻塞性问题:tasks/Exploration/solo.py:103、tasks/Exploration/solo.py:113
Original comment in English
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tasks/Exploration/solo.py" line_range="101-103" />
<code_context>
+ unchanged = self.is_swipe_unchanged(before_image, self.device.image)
+
+ if (self.get_current_scene() != Scene.MAIN
+ or self.appear(self.I_UI_CONFIRM)
+ or self.appear(self.I_UI_CONFIRM_SAMLL)):
+ self.search_fail_timer.reset()
+ return
+
</code_context>
<issue_to_address>
**Exploration click history accumulates**
When a background swipe is repeatedly interrupted by a scene change or confirmation popup, `_search_next_area` returns before calling `click_record_remove` for the swipe, leaving entries in the device click history until exploration raises `GameTooManyClickError` and stops.
Remove the swipe from the device click history before returning from this interruption path.
</issue_to_address>
### Comment 2
<location path="tasks/Exploration/solo.py" line_range="113" />
<code_context>
+ self.swipe(self.S_SWIPE_BACKGROUND_RIGHT)
+ sleep(0.3)
+ self.screenshot()
+ if self.is_swipe_unchanged(before_retry, self.device.image):
+ logger.info("Reached rightmost boundary (confirmed twice). Quitting exploration.")
+ self._reset_search_state(reset_swipe_cnt=True)
</code_context>
<issue_to_address>
**Exploration exits on popup**
When a confirmation popup or scene transition appears during the retry and the sampled background remains unchanged, `_search_next_area` treats the unchanged retry image as a map boundary and calls `quit_explore()` without checking the scene or confirmation popups again, so exploration exits instead of handling the new state.
Recheck the scene and confirmation popups after the retry swipe and before treating an unchanged image as the map boundary.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: tasks/Exploration/solo.py:103, tasks/Exploration/solo.py:113
| or self.appear(self.I_UI_CONFIRM) | ||
| or self.appear(self.I_UI_CONFIRM_SAMLL)): | ||
| self.search_fail_timer.reset() |
There was a problem hiding this comment.
🟡 中 · 探索点击历史不断累积
当后台滑动反复被场景切换或确认弹窗打断时,_search_next_area 会在调用该滑动对应的 click_record_remove 之前返回,导致设备的点击历史中不断留下记录,直到探索抛出 GameTooManyClickError 并停止。
在这条中断路径返回之前,从设备的点击历史中移除该滑动记录。
给 AI 智能体的提示
在 `tasks/Exploration/solo.py` 第 101-103 行:
**探索点击历史不断累积**
当后台滑动反复被场景切换或确认弹窗打断时,`_search_next_area` 会在调用该滑动对应的 `click_record_remove` 之前返回,导致设备的点击历史中不断留下记录,直到探索抛出 `GameTooManyClickError` 并停止。
在这条中断路径返回之前,从设备的点击历史中移除该滑动记录。Original comment in English
🟡 Medium · Exploration click history accumulates
When a background swipe is repeatedly interrupted by a scene change or confirmation popup, _search_next_area returns before calling click_record_remove for the swipe, leaving entries in the device click history until exploration raises GameTooManyClickError and stops.
Remove the swipe from the device click history before returning from this interruption path.
Prompt for AI agents
In `tasks/Exploration/solo.py` at lines 101-103:
**Exploration click history accumulates**
When a background swipe is repeatedly interrupted by a scene change or confirmation popup, `_search_next_area` returns before calling `click_record_remove` for the swipe, leaving entries in the device click history until exploration raises `GameTooManyClickError` and stops.
Remove the swipe from the device click history before returning from this interruption path.| self.swipe(self.S_SWIPE_BACKGROUND_RIGHT) | ||
| sleep(0.3) | ||
| self.screenshot() | ||
| if self.is_swipe_unchanged(before_retry, self.device.image): |
There was a problem hiding this comment.
🟡 中 · 遇到弹窗时探索会退出
如果重试期间出现确认弹窗或场景切换,且采样到的背景保持不变,_search_next_area 就会将重试图像未发生变化判定为地图边界,并在未再次检查场景或确认弹窗的情况下调用 quit_explore(),导致探索直接退出,而不是处理新的状态。
在重试滑动后、将图像未发生变化判定为地图边界之前,重新检查场景和确认弹窗。
给 AI 智能体的提示
在 `tasks/Exploration/solo.py` 第 113 行:
**遇到弹窗时探索会退出**
如果重试期间出现确认弹窗或场景切换,且采样到的背景保持不变,`_search_next_area` 就会将重试图像未发生变化判定为地图边界,并在未再次检查场景或确认弹窗的情况下调用 `quit_explore()`,导致探索直接退出,而不是处理新的状态。
在重试滑动后、将图像未发生变化判定为地图边界之前,重新检查场景和确认弹窗。Original comment in English
🟡 Medium · Exploration exits on popup
When a confirmation popup or scene transition appears during the retry and the sampled background remains unchanged, _search_next_area treats the unchanged retry image as a map boundary and calls quit_explore() without checking the scene or confirmation popups again, so exploration exits instead of handling the new state.
Recheck the scene and confirmation popups after the retry swipe and before treating an unchanged image as the map boundary.
Prompt for AI agents
In `tasks/Exploration/solo.py` at line 113:
**Exploration exits on popup**
When a confirmation popup or scene transition appears during the retry and the sampled background remains unchanged, `_search_next_area` treats the unchanged retry image as a map boundary and calls `quit_explore()` without checking the scene or confirmation popups again, so exploration exits instead of handling the new state.
Recheck the scene and confirmation popups after the retry swipe and before treating an unchanged image as the map boundary.
Automated PR created by GitHub Actions. Merge dev into master
Sourcery 总结
提升战斗、探索、委托、登录和奖励处理等任务自动化流程的可靠性,并重新安排自动分支同步的时间。
Bug 修复:
功能增强:
CI:
杂项:
Original summary in English
Summary by Sourcery
Improve task automation reliability across battles, exploration, delegation, login, and reward handling while rescheduling automatic branch synchronization.
Bug Fixes:
Enhancements:
CI:
Chores: