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

Refactor explore_hard_task.py and explore_normal_task.py for clarity and maintainability #235

Merged
merged 15 commits into from
Jan 31, 2025

Conversation

Nanboom233
Copy link
Contributor

Fix static config loading and update package requirements.
Refactor module structure and validate chapter range dynamically.
Add validation for submission number range in explore_hard_task logic.
@Nanboom233 Nanboom233 changed the title Refactor explore_hard_task.py for clarity and maintainability Refactor explore_hard_task.py and explore_normal_task.py for clarity and maintainability Jan 29, 2025
@Nanboom233
Copy link
Contributor Author

注意:代码未完成且未经过完整测试

note:
1. [Global] and [JP] server
- normal_task_challenge2-finished
- normal_task_challenge2-unfinished
template do not exist since no such task open
@pur1fying
Copy link
Owner

三服检查challenge已适配并测试

@pur1fying
Copy link
Owner

后续打算:

  1. 简化普通推图配置,将普通图推图的 "强制打每一关" 和 "是否强制打到sss" 删除,用户只需指定推图区域,BAAS就可以自动检测区域内每个任务是否需要打

@Nanboom233
Copy link
Contributor Author

Nanboom233 commented Jan 30, 2025 via email

@pur1fying
Copy link
Owner

是的,打一次没sss那很可能是配置不够了,后续没必要再打了

Copy link
Contributor Author

@Nanboom233 Nanboom233 left a comment

Choose a reason for hiding this comment

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

hard task 的推图数据丢了 😂

@@ -85,8 +85,22 @@ def get_region_num(self, img, region, category=int, ratio=1.0):

if temp == '':
return "UNKNOWN"
# 不提倡返回值类型不统一
Copy link
Contributor Author

Choose a reason for hiding this comment

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

此处返回值不统一,这意味着调用这里必须加特判,否则很容易炸锅

@Nanboom233
Copy link
Contributor Author

Nanboom233 commented Jan 30, 2025

hard task 的推图数据是不是忘记添加了? @pur1fying

@pur1fying
Copy link
Owner

抱歉,没检查就提交了

@Nanboom233
Copy link
Contributor Author

后续打算:

  1. 简化普通推图配置,将普通图推图的 "强制打每一关" 和 "是否强制打到sss" 删除,用户只需指定推图区域,BAAS就可以自动检测区域内每个任务是否需要打

我将同步删除hard task配置,自动检测是否需要补task或者present

@pur1fying
Copy link
Owner

好的,我想最终效果应该是用户指只需要输入15, 16-1这样的关卡,不需要再指定挑战/sss/礼物

@Nanboom233
Copy link
Contributor Author

Nanboom233 commented Jan 31, 2025

@pur1fying

main_story.auto_fight(self) if self.config['manual_boss']: self.click(1235, 41) hard_task.to_hard_event(self) normal_task.to_normal_event(self, True)

求问在explore_normal_task 中执行to_hard_event的作用是什么?

@pur1fying
Copy link
Owner

@pur1fying

main_story.auto_fight(self) if self.config['manual_boss']: self.click(1235, 41) hard_task.to_hard_event(self) normal_task.to_normal_event(self, True)

求问在explore_normal_task 中执行to_hard_event的作用是什么?

打完一关后会解锁下一关,关卡列表会向下滑动,切到困难关这个动画就肯定结束了

…ng for better clarity.

BREAKING CHANGE: 基本完全重构
…eadability and efficiency.

2.refactor tasklist to avoid thread conflicts
@Nanboom233
Copy link
Contributor Author

Nanboom233 commented Jan 31, 2025

后续计划:

  • 1. 优化选队逻辑:依据 爆发 -> 神秘 -> (振动) -> 贯穿 -> 的循环链表优先级策略取代原有的选队优先级
  • 2. 选队不再分1/2队,只按属性计算
  • 3. 增加从预设中选取队伍的功能 优化推图配队方案 #223
  • 4. 在GUI中的用户设置适配更改,增加预设队伍属性的设置
  • 5. 增加normal推关对于-A关卡的支持(相当于sub任务)
  • 6. 最后进行完整的三服测试,修复出现的bug

@pur1fying pur1fying merged commit 57aa240 into pur1fying:master Jan 31, 2025
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