mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 00:35:34 +00:00
Add: event page
This commit is contained in:
parent
5a06402d43
commit
19497ebb6a
BIN
assets/share/rogue/ui/PAGE_EVENT.png
Normal file
BIN
assets/share/rogue/ui/PAGE_EVENT.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.0 KiB |
@ -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),
|
||||
),
|
||||
)
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user