diff --git a/assets/share/rogue/ui/PAGE_EVENT.png b/assets/share/rogue/ui/PAGE_EVENT.png new file mode 100644 index 000000000..c9c6abbff Binary files /dev/null and b/assets/share/rogue/ui/PAGE_EVENT.png differ diff --git a/tasks/rogue/assets/assets_rogue_ui.py b/tasks/rogue/assets/assets_rogue_ui.py index f534400cd..93aaa0bb7 100644 --- a/tasks/rogue/assets/assets_rogue_ui.py +++ b/tasks/rogue/assets/assets_rogue_ui.py @@ -73,3 +73,13 @@ PAGE_CHOOSE_CURIO = ButtonWrapper( button=(988, 17, 1028, 57), ), ) +PAGE_EVENT = ButtonWrapper( + name='PAGE_EVENT', + share=Button( + file='./assets/share/rogue/ui/PAGE_EVENT.png', + area=(983, 485, 1007, 509), + search=(963, 465, 1027, 529), + color=(51, 48, 42), + button=(983, 485, 1007, 509), + ), +) diff --git a/tasks/rogue/blessing.py b/tasks/rogue/blessing.py index 47a160ce3..b31c817cb 100644 --- a/tasks/rogue/blessing.py +++ b/tasks/rogue/blessing.py @@ -119,10 +119,11 @@ class RogueBlessingSelector(RogueSelector): Case 1: back to main page Case 2: choose curio Case 3: another choose blessings, but no blessing is selected when the new selection page loaded + 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_button=CONFIRM))) + or (self.main.is_page_choose_blessing() and not is_card_selected(self.main, target, CONFIRM)) + or self.main.is_page_event()) interval = Timer(1) enforce = False diff --git a/tasks/rogue/curio.py b/tasks/rogue/curio.py index 8589b75c5..40c874123 100644 --- a/tasks/rogue/curio.py +++ b/tasks/rogue/curio.py @@ -29,6 +29,7 @@ class RogueCurioOcr(Ocr): if self.lang == 'ch': replace_pattern_dict = { "般": "骰", + "漂灭": "湮灭", } for pattern, replace in replace_pattern_dict.items(): result = re.sub(pattern, replace, result) @@ -54,8 +55,9 @@ class RogueCurioSelector(RogueSelector): def is_select_curio_complete(): """ Case 1: back to main page + Case 2: event page """ - return self.main.is_in_main() + return self.main.is_in_main() or self.main.is_page_event() enforce = False if not target: diff --git a/tasks/rogue/ui.py b/tasks/rogue/ui.py index 5b6717b56..8e0a80229 100644 --- a/tasks/rogue/ui.py +++ b/tasks/rogue/ui.py @@ -37,3 +37,6 @@ class RogueUI(UI): def is_page_choose_bonus(self): return self.appear(PAGE_CHOOSE_BONUS) + + def is_page_event(self): + return self.appear(PAGE_EVENT)