diff --git a/assets/share/rogue/blessing/OCR_RESET_COUNT.png b/assets/share/rogue/blessing/OCR_RESET_COUNT.png index 55de9d3ed..4a7884e81 100644 Binary files a/assets/share/rogue/blessing/OCR_RESET_COUNT.png and b/assets/share/rogue/blessing/OCR_RESET_COUNT.png differ diff --git a/assets/share/rogue/bonus/BONUS_BOTTOM_WHITE_BAR.png b/assets/share/rogue/bonus/BONUS_BOTTOM_WHITE_BAR.png index 2e8af8652..0f0894ff0 100644 Binary files a/assets/share/rogue/bonus/BONUS_BOTTOM_WHITE_BAR.png and b/assets/share/rogue/bonus/BONUS_BOTTOM_WHITE_BAR.png differ diff --git a/assets/share/rogue/ui/CONFIRM.png b/assets/share/rogue/ui/BLESSING_CONFIRM.png similarity index 100% rename from assets/share/rogue/ui/CONFIRM.png rename to assets/share/rogue/ui/BLESSING_CONFIRM.png diff --git a/assets/share/rogue/ui/PAGE_CHOOSE_BUFF.png b/assets/share/rogue/ui/PAGE_CHOOSE_BUFF.png index dd8e36da0..236d11db7 100644 Binary files a/assets/share/rogue/ui/PAGE_CHOOSE_BUFF.png and b/assets/share/rogue/ui/PAGE_CHOOSE_BUFF.png differ diff --git a/tasks/rogue/assets/assets_rogue_blessing.py b/tasks/rogue/assets/assets_rogue_blessing.py index ab91cda7a..211e00fdb 100644 --- a/tasks/rogue/assets/assets_rogue_blessing.py +++ b/tasks/rogue/assets/assets_rogue_blessing.py @@ -57,10 +57,10 @@ OCR_RESET_COUNT = ButtonWrapper( name='OCR_RESET_COUNT', share=Button( file='./assets/share/rogue/blessing/OCR_RESET_COUNT.png', - area=(714, 595, 824, 620), - search=(694, 575, 844, 640), - color=(37, 37, 41), - button=(714, 595, 824, 620), + area=(655, 593, 873, 623), + search=(635, 573, 893, 643), + color=(23, 24, 26), + button=(655, 593, 873, 623), ), ) OCR_ROGUE_BUFF = ButtonWrapper( diff --git a/tasks/rogue/assets/assets_rogue_bonus.py b/tasks/rogue/assets/assets_rogue_bonus.py index 42bcd9fb8..ab2f1f15e 100644 --- a/tasks/rogue/assets/assets_rogue_bonus.py +++ b/tasks/rogue/assets/assets_rogue_bonus.py @@ -7,10 +7,10 @@ BONUS_BOTTOM_WHITE_BAR = ButtonWrapper( name='BONUS_BOTTOM_WHITE_BAR', share=Button( file='./assets/share/rogue/bonus/BONUS_BOTTOM_WHITE_BAR.png', - area=(182, 568, 1098, 590), - search=(162, 548, 1118, 610), - color=(221, 221, 222), - button=(182, 568, 1098, 590), + area=(731, 568, 774, 590), + search=(711, 548, 794, 610), + color=(250, 250, 250), + button=(731, 568, 774, 590), ), ) BONUS_CONFIRM = ButtonWrapper( diff --git a/tasks/rogue/assets/assets_rogue_ui.py b/tasks/rogue/assets/assets_rogue_ui.py index 93aaa0bb7..6eccc8144 100644 --- a/tasks/rogue/assets/assets_rogue_ui.py +++ b/tasks/rogue/assets/assets_rogue_ui.py @@ -3,6 +3,16 @@ from module.base.button import Button, ButtonWrapper # This file was auto-generated, do not modify it manually. To generate: # ``` python -m dev_tools.button_extract ``` +BLESSING_CONFIRM = ButtonWrapper( + name='BLESSING_CONFIRM', + share=Button( + file='./assets/share/rogue/ui/BLESSING_CONFIRM.png', + area=(960, 629, 1233, 677), + search=(940, 609, 1253, 697), + color=(217, 218, 218), + button=(960, 629, 1233, 677), + ), +) CHECK_BLESSING = ButtonWrapper( name='CHECK_BLESSING', share=Button( @@ -13,16 +23,6 @@ CHECK_BLESSING = ButtonWrapper( button=(946, 17, 986, 57), ), ) -CONFIRM = ButtonWrapper( - name='CONFIRM', - share=Button( - file='./assets/share/rogue/ui/CONFIRM.png', - area=(960, 629, 1233, 677), - search=(940, 609, 1253, 697), - color=(217, 218, 218), - button=(960, 629, 1233, 677), - ), -) COSMIC_FRAGMENT = ButtonWrapper( name='COSMIC_FRAGMENT', share=Button( @@ -57,10 +57,10 @@ PAGE_CHOOSE_BUFF = ButtonWrapper( name='PAGE_CHOOSE_BUFF', share=Button( file='./assets/share/rogue/ui/PAGE_CHOOSE_BUFF.png', - area=(1105, 95, 1154, 113), - search=(1085, 75, 1174, 133), - color=(81, 82, 83), - button=(1105, 95, 1154, 113), + area=(1016, 94, 1135, 113), + search=(996, 74, 1155, 133), + color=(71, 71, 73), + button=(1016, 94, 1135, 113), ), ) PAGE_CHOOSE_CURIO = ButtonWrapper( diff --git a/tasks/rogue/blessing.py b/tasks/rogue/blessing.py index c35678374..5aac8fa26 100644 --- a/tasks/rogue/blessing.py +++ b/tasks/rogue/blessing.py @@ -9,7 +9,7 @@ from module.logger import logger from module.ocr.ocr import Ocr, OcrResultButton, DigitCounter, Digit from module.ocr.utils import split_and_pair_buttons from tasks.rogue.assets.assets_rogue_blessing import * -from tasks.rogue.assets.assets_rogue_ui import CONFIRM +from tasks.rogue.assets.assets_rogue_ui import BLESSING_CONFIRM from tasks.rogue.keywords import * from tasks.rogue.preset import * from tasks.rogue.selector import RogueSelector @@ -56,7 +56,7 @@ RESONANCE_FILTER = MultiLangFilter(FILETER_REGEX, (RESONANCE_ATTR_NAME,), RESONA class RogueBuffOcr(Ocr): - merge_thres_x = 40 + merge_thres_y = 40 def after_process(self, result): result = super().after_process(result) @@ -147,7 +147,8 @@ class RogueBlessingSelector(RogueSelector): Case 4: event ui """ return (self.main.is_in_main() or self.main.is_page_choose_curio() - or (self.main.is_page_choose_blessing() and not is_card_selected(self.main, target, CONFIRM)) + or (self.main.is_page_choose_blessing() and not is_card_selected(self.main, target, + BLESSING_CONFIRM)) or self.main.is_page_event()) interval = Timer(1) @@ -163,7 +164,7 @@ class RogueBlessingSelector(RogueSelector): else: self.main.device.screenshot() - if is_card_selected(self.main, target, confirm_button=CONFIRM): + if is_card_selected(self.main, target, confirm_button=BLESSING_CONFIRM): if enforce: logger.info("Buff selected (enforce)") else: @@ -187,7 +188,7 @@ class RogueBlessingSelector(RogueSelector): if is_select_blessing_complete(): break if interval.reached(): - self.main.device.click(CONFIRM) + self.main.device.click(BLESSING_CONFIRM) interval.reset() def _get_reset_count(self): diff --git a/tasks/rogue/curio.py b/tasks/rogue/curio.py index 40c874123..ad4ef61f0 100644 --- a/tasks/rogue/curio.py +++ b/tasks/rogue/curio.py @@ -8,7 +8,7 @@ from module.base.utils import get_color from module.logger import logger from module.ocr.ocr import Ocr, OcrResultButton from tasks.rogue.assets.assets_rogue_curio import * -from tasks.rogue.assets.assets_rogue_ui import CONFIRM +from tasks.rogue.assets.assets_rogue_ui import BLESSING_CONFIRM from tasks.rogue.keywords import RogueCurio from tasks.rogue.preset import CURIO_PRESET_1 from tasks.rogue.selector import RogueSelector @@ -24,6 +24,8 @@ CURIO_FILTER = MultiLangFilter(FILTER_REGEX, CURIO_FILTER_ATTR, CURIO_FILTER_PRE class RogueCurioOcr(Ocr): + merge_thres_y = 40 + def after_process(self, result): result = super().after_process(result) if self.lang == 'ch': @@ -94,7 +96,7 @@ class RogueCurioSelector(RogueSelector): if is_select_curio_complete(): break if interval.reached(): - self.main.device.click(CONFIRM) + self.main.device.click(BLESSING_CONFIRM) interval.reset() def try_select(self, option: OcrResultButton | str):