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

添加专武等级识别 #498

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ShinaKaria
Copy link

想把数据识别的结果 批量导入到某个网站的时候 发现并没有识别专武等级 顺手做了个

Copy link
Collaborator

@TheAutumnOfRice TheAutumnOfRice left a comment

Choose a reason for hiding this comment

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

感谢贡献!不过如果要合并的话,有几个地方有空的话最好还可以微调一下。

  1. 可以使用PCRElement打包元素,见批注。
  2. 专武识别确实可以完善角色识别,但也增加了一定的截图工作量。如果只需要做刷图规划,那么专武信息是不需要的。可以在jueseshibie函数中增加一个是否识别专武的参数,默认为关闭。关于任务入口的写法可以见core/validtask.py
  3. 更新时希望可以修改readme.md开头的版本号,readme.md末尾的更新日志(格式仿照之前即可),main_new.py开头的版本字符串。

@@ -674,6 +677,13 @@ def get_zhuanwu_status(self, screen=None):
else:
return 1

def get_zhuanwu_isEquip(self, screen=None):
if self.is_exists(img="img/juese/zhuanwu_isEquip.bmp", at=(876, 127, 886, 137), screen=screen, method="sq",
Copy link
Collaborator

Choose a reason for hiding this comment

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

建议这边把img="img/juese/zhuanwu_isEquip.bmp", at=(876, 127, 886, 137) 打包成PCRElement放到core/constant.py中。这样有利于资源缺失检测以及代码复用。调用时直接self.is_exists(PCRElement)即可。

Copy link
Author

Choose a reason for hiding this comment

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

这只是抽空写的一点,没有看太多源码。临近新年比较忙,后续有空的话我在看一下改一下。

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