Allow usage of technique points for Ruan Mei in simulated universe#345
Allow usage of technique points for Ruan Mei in simulated universe#345JerryLingjieMei wants to merge 15 commits intoLmeSzinc:masterfrom
Conversation
…ing consistent OCR results for buttons.
LmeSzinc
left a comment
There was a problem hiding this comment.
- Make 2 PRs, one fixes the technique points detection, another adds new feature
- Add a GUI option to toggle using techniques
| TECHNIQUE_POINT_STRICT_1 = ButtonWrapper( | ||
| name='TECHNIQUE_POINT_STRICT_1', | ||
| share=Button( | ||
| file='./assets/share/map/control/TECHNIQUE_POINT_1.png', |
There was a problem hiding this comment.
Assets files are auto generated, don't modify it manaully
There was a problem hiding this comment.
This button wrapper is to ensure a horizontal search area where technique_point_strict_1 can be found.
tasks/map/control/joystick.py
Outdated
| TECHNIQUE_POINT_STRICT_1.match_template(self.device.image) | ||
| points = [] | ||
| for button in [ | ||
| TECHNIQUE_POINT_STRICT_1, | ||
| TECHNIQUE_POINT_STRICT_2, | ||
| TECHNIQUE_POINT_STRICT_3, | ||
| TECHNIQUE_POINT_STRICT_4, | ||
| TECHNIQUE_POINT_STRICT_5, | ||
| ]: | ||
| button.load_offset(TECHNIQUE_POINT_STRICT_1) | ||
| points.append(self.image_color_count(button, color=(255, 255, 255), threshold=221, count=20, offset=True)) |
There was a problem hiding this comment.
- TECHNIQUE_POINT_1 cannot detect empty technique points, add another template for that case
image_color_count()accepts area tuple, usebutton.buttoninstead of adding argumentoffset
tasks/rogue/route/base.py
Outdated
| # Use techniques before enemy | ||
| logger.info('Trying to use technique') | ||
| UseTechniqueUI(self.config, self.device).use_technique_(1) |
There was a problem hiding this comment.
Check if current character is in LIST_ROGUE_SPECIAL_TECHNIQUE_RANGES before using techniques
| # Use techniques before BOSS | ||
| logger.info('Trying to use technique') | ||
| UseTechniqueUI(self.config, self.device).use_technique_(1) | ||
|
|
||
| logger.hr('Clear elite', level=1) | ||
| waypoints = ensure_waypoints(waypoints) | ||
| end_point = waypoints[-1] | ||
| end_point.speed = 'run_2x' | ||
|
|
||
| # TODO: Use techniques before BOSS | ||
| pass | ||
|
|
There was a problem hiding this comment.
Use techinique from multiple characters to empty technique points before boss
There was a problem hiding this comment.
I would refrain from using all technique pts for at least the first elite enemy since it might run out later.
tasks/character/keywords/__init__.py
Outdated
| # Special character that has special effects in rogues | ||
| LIST_ROGUE_SPECIAL_TECHNIQUE_RANGES = [ | ||
| RuanMei, TopazNumby, FuXuan, BlackSwan | ||
| ] No newline at end of file |
There was a problem hiding this comment.
Make a full list of characters with useful techniques
…re allowing consistent OCR results for buttons." This reverts commit 5afa62b.
The program can run well under python 3.10, addressing issues in #344 and #338 .
Ruan Mei is switched to the current character at the start of the rogue trial. Each time an enemy or elite enemy is cleared, the current character will try to use technique points once. The technique points are now detected using a horizontal search around its suggested location.