Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法收取自己的能量(自己主页能量检测不到) 和 无法收取别人能量(分析能量球位置超出布局界外) #321

Closed
AngelYHY opened this issue May 23, 2020 · 10 comments
Labels
Obsolete 🕳️ 远古 Issue creater doesn't provide more specific information within a long time (often one month) Proposal 💡 方案 Issue creater's own proposal which may be really helpful

Comments

@AngelYHY
Copy link

我也遇到了以上两个问题

1、自己主页能量检测不到 #312
if (waitForAction(_getBallsNum, 10e3, 60)) {
let _n = $$app.tool.stabilizer(_getBallsNum, _num, 120, 180);
if (!isNaN(_n) && _n > _num) {
_num = _n;
}
debugInfo("找到主页能量球: " + _num + "个");
return $$af.balls_nodes = _balls_nodes;
}
debugInfo("指定时间内未发现主页能量球");

根据关键字搜索找到以上代码 指定时间内未发现主页能量球
然后修改 waitForAction 方法中传入方法中的时间
原先是 if (waitForAction(_getBallsNum, own.tt, 60)) {
我改为了 waitForAction(_getBallsNum, 10e3, 60)

2、分析能量球位置超出布局界外 #316
function _addBalls() {
_balls.forEach((o) => {
// if (_isOrangeBall(o)) {
// return _addBall(o, "orange");
// }

根据关键字搜索找到以上代码 _isOrangeBall
把 _isOrangeBall 这几行代码注释了

@AngelYHY AngelYHY added the Enhancement 🛠️ 建议 New feature or request label May 23, 2020
@AngelYHY
Copy link
Author

Ant_Forest_Launcher.txt

这是修改后的文件,需要把后缀名改为 .js 然后覆盖了源文件

@zjfyly
Copy link

zjfyly commented May 23, 2020

多谢老哥,明天用着试试

@kkss2020
Copy link

我i也遇到了 而且现在不能添加锁屏密码 会崩溃 重新 初始化下载也是

@zjfyly
Copy link

zjfyly commented May 24, 2020

没问题了,谢谢老哥

@AngelYHY
Copy link
Author

我i也遇到了 而且现在不能添加锁屏密码 会崩溃 重新 初始化下载也是

我是自己写的解锁

@Sq-List
Copy link

Sq-List commented May 27, 2020

own.tt 这个值取得就是 setting -> 自收功能 -> 控件最大准备时间
部分手机收不到自己主页能量 是因为zfb把能量球的控件去掉了 导致拿不到能量球。(我的就是这样。

@iloveyou616
Copy link

Ant_Forest_Launcher.txt

这是修改后的文件,需要把后缀名改为 .js 然后覆盖了源文件

源文件链接点不进去,能否发个兰奏云

@luchangharry
Copy link

own.tt 这个值取得就是 setting -> 自收功能 -> 控件最大准备时间
部分手机收不到自己主页能量 是因为zfb把能量球的控件去掉了 导致拿不到能量球。(我的就是这样。

我好像也是,所以改的好像没啥用,有别的解决方案么

@jawn-ha
Copy link

jawn-ha commented Jun 2, 2020

需要参考置顶issue修改再结合楼主的修改 完美解决

@SuperMonster003 SuperMonster003 added Proposal 💡 方案 Issue creater's own proposal which may be really helpful and removed Enhancement 🛠️ 建议 New feature or request labels Jun 5, 2020
@SuperMonster003
Copy link
Owner

SuperMonster003 commented Jun 5, 2020

感谢提供方案

  1. 自己能量球检测不到

森林改版后
主页能量球控件的识别需要在近 10 秒钟后才会被识别到
之前是 1 秒内就能完成识别

上述方案将识别时间拉长 等到控件可识别后 脚本将继续正常执行
即使这样会牺牲一部分等待时间

新版本将放弃控件识别改用图像识别的方式
与好友森林能量球识别方式类似 (即霍夫变换)
并增加了浇水回赠的金色球识别和处理方案

  1. 分析能量球位置超出布局界外

问题根源出现在 cX() 的变换上 (<5310>)
因为 getDisplay() 方法重构导致 region 的处理结果出现偏差

橙色球是以圆形中心向右下方偏移一定的缩放坐标量后
按区域匹配橙色实现识别的

上述方案将橙色球识别方法注释掉
可避免偏移后的区域越界
虽然会导致脚本无法识别橙色球
但依然不影响点击与类型统计
因为橙色球的识别是在绿色球识别后的基础上进行的

经过上述处理 脚本会将橙色球识别为绿色球进行点击
而统计类型区分 是根据页面下方的动态列表内容区分的

目前区分橙色球的主要因素有

  • 优先点击绿色球再点击橙色球 (仅仅是逻辑上的设计)
  • 实现帮收功能的开关 (否则功能关闭后依然会收取橙色球)
  • 六球复查

新版修正了上述 cX() 变换问题
并在区域边界做了越界检测

再次感谢提供方案
❤️

@SuperMonster003 SuperMonster003 added the Feedback Awaited 🕒 等待反馈 Waiting for the feedback from issue creater and issue will be closed if duration is over one month label Jun 5, 2020
@SuperMonster003 SuperMonster003 added Obsolete 🕳️ 远古 Issue creater doesn't provide more specific information within a long time (often one month) and removed Feedback Awaited 🕒 等待反馈 Waiting for the feedback from issue creater and issue will be closed if duration is over one month labels Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Obsolete 🕳️ 远古 Issue creater doesn't provide more specific information within a long time (often one month) Proposal 💡 方案 Issue creater's own proposal which may be really helpful
Projects
None yet
Development

No branches or pull requests

8 participants