Add: event page

This commit is contained in:
Hengyu 2023-08-15 04:16:31 +08:00
parent 5a06402d43
commit 19497ebb6a
5 changed files with 19 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -73,3 +73,13 @@ PAGE_CHOOSE_CURIO = ButtonWrapper(
button=(988, 17, 1028, 57), 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),
),
)

View File

@ -119,10 +119,11 @@ class RogueBlessingSelector(RogueSelector):
Case 1: back to main page Case 1: back to main page
Case 2: choose curio Case 2: choose curio
Case 3: another choose blessings, but no blessing is selected when the new selection page loaded 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() return (self.main.is_in_main() or self.main.is_page_choose_curio()
or (self.main.is_page_choose_blessing() and or (self.main.is_page_choose_blessing() and not is_card_selected(self.main, target, CONFIRM))
not is_card_selected(self.main, target, confirm_button=CONFIRM))) or self.main.is_page_event())
interval = Timer(1) interval = Timer(1)
enforce = False enforce = False

View File

@ -29,6 +29,7 @@ class RogueCurioOcr(Ocr):
if self.lang == 'ch': if self.lang == 'ch':
replace_pattern_dict = { replace_pattern_dict = {
"": "", "": "",
"漂灭": "湮灭",
} }
for pattern, replace in replace_pattern_dict.items(): for pattern, replace in replace_pattern_dict.items():
result = re.sub(pattern, replace, result) result = re.sub(pattern, replace, result)
@ -54,8 +55,9 @@ class RogueCurioSelector(RogueSelector):
def is_select_curio_complete(): def is_select_curio_complete():
""" """
Case 1: back to main page 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 enforce = False
if not target: if not target:

View File

@ -37,3 +37,6 @@ class RogueUI(UI):
def is_page_choose_bonus(self): def is_page_choose_bonus(self):
return self.appear(PAGE_CHOOSE_BONUS) return self.appear(PAGE_CHOOSE_BONUS)
def is_page_event(self):
return self.appear(PAGE_EVENT)