diff --git a/assets/share/rogue/path/PATH_LOADED_CHECK.png b/assets/share/rogue/path/PATH_LOADED_CHECK.png new file mode 100644 index 000000000..14e7eae56 Binary files /dev/null and b/assets/share/rogue/path/PATH_LOADED_CHECK.png differ diff --git a/tasks/rogue/assets/assets_rogue_path.py b/tasks/rogue/assets/assets_rogue_path.py index 5dcf2d590..013112c5f 100644 --- a/tasks/rogue/assets/assets_rogue_path.py +++ b/tasks/rogue/assets/assets_rogue_path.py @@ -238,3 +238,13 @@ PAGE_ROGUE_PATH = ButtonWrapper( button=(606, 89, 656, 108), ), ) +PATH_LOADED_CHECK = ButtonWrapper( + name='PATH_LOADED_CHECK', + share=Button( + file='./assets/share/rogue/path/PATH_LOADED_CHECK.png', + area=(989, 18, 1175, 59), + search=(969, 0, 1195, 79), + color=(45, 45, 47), + button=(989, 18, 1175, 59), + ), +) diff --git a/tasks/rogue/blessing/ui.py b/tasks/rogue/blessing/ui.py index 1cab486a4..db9970726 100644 --- a/tasks/rogue/blessing/ui.py +++ b/tasks/rogue/blessing/ui.py @@ -4,8 +4,8 @@ from module.base.utils import area_offset from module.logger import logger from module.ocr.ocr import Digit, Ocr, OcrResultButton from tasks.base.ui import UI -from tasks.rogue.assets.assets_rogue_weekly import REWARD_ENTER from tasks.rogue.assets.assets_rogue_ui import * +from tasks.rogue.assets.assets_rogue_weekly import REWARD_ENTER from tasks.rogue.keywords import RoguePath diff --git a/tasks/rogue/entry/entry.py b/tasks/rogue/entry/entry.py index 58dc40a66..3b4b2a72a 100644 --- a/tasks/rogue/entry/entry.py +++ b/tasks/rogue/entry/entry.py @@ -250,6 +250,9 @@ class RogueEntry(RouteBase, RogueRewardHandler, RoguePathHandler, DungeonUI): self.interval_reset(REWARD_ENTER, interval=2) continue if self.match_template_color(LEVEL_CONFIRM, interval=2): + if not self.image_color_count(LEVEL_CONFIRM, color=(223, 223, 225), threshold=240, count=50): + self.interval_clear(LEVEL_CONFIRM) + continue self.dungeon_update_stamina() self.check_stop_condition() self.device.click(LEVEL_CONFIRM) diff --git a/tasks/rogue/entry/path.py b/tasks/rogue/entry/path.py index 2d3af237c..ae1016357 100644 --- a/tasks/rogue/entry/path.py +++ b/tasks/rogue/entry/path.py @@ -206,6 +206,9 @@ class RoguePathHandler(RogueUI): break if self.match_template_color(ROGUE_LAUNCH, interval=2): + if not self.image_color_count(ROGUE_LAUNCH, color=(223, 223, 225), threshold=240, count=50): + self.interval_clear(ROGUE_LAUNCH) + continue if not self._is_team_prepared(): raise RogueTeamNotPrepared self.device.click(ROGUE_LAUNCH) @@ -216,11 +219,19 @@ class RoguePathHandler(RogueUI): continue # Select path if self.interval_is_reached(entry, interval=2) and self._is_page_rogue_path(): - if self.appear_then_click(entry, interval=2): + if not self.image_color_count(PATH_LOADED_CHECK, color=(246, 246, 246), threshold=240, count=50): + self.interval_clear(entry) + continue + if self.appear(entry): + self.device.click(entry) self.interval_reset(entry, interval=2) continue # Confirm path if self.appear(CONFIRM_PATH, interval=2): + if not self.image_color_count(CONFIRM_PATH, color=(223, 223, 225), threshold=240, count=50): + self.interval_clear(CONFIRM_PATH) + continue if self._change_confirm_path(path): self.device.click(CONFIRM_PATH) + self.interval_reset(CONFIRM_PATH) continue