Fix: Blessing obtained and lost

This commit is contained in:
LmeSzinc 2023-10-22 23:43:56 +08:00
parent 4d464aad75
commit f383a041d0
13 changed files with 28 additions and 39 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

View File

@ -25,31 +25,36 @@ BLESSING_ENHANCED = ButtonWrapper(
)
BLESSING_LOST = ButtonWrapper(
name='BLESSING_LOST',
share=[
Button(
file='./assets/share/rogue/ui/BLESSING_LOST.png',
area=(51, 530, 81, 552),
search=(31, 510, 101, 572),
color=(248, 248, 248),
button=(51, 530, 81, 552),
),
Button(
file='./assets/share/rogue/ui/BLESSING_LOST.2.png',
area=(315, 530, 340, 552),
search=(31, 510, 101, 572),
color=(246, 246, 246),
button=(315, 530, 340, 552),
),
],
cn=Button(
file='./assets/cn/rogue/ui/BLESSING_LOST.png',
area=(579, 44, 637, 72),
search=(565, 31, 652, 124),
color=(125, 38, 32),
button=(579, 44, 637, 72),
),
en=Button(
file='./assets/en/rogue/ui/BLESSING_LOST.png',
area=(681, 47, 744, 71),
search=(633, 35, 792, 124),
color=(130, 59, 55),
button=(681, 47, 744, 71),
),
)
BLESSING_OBTAINED = ButtonWrapper(
name='BLESSING_OBTAINED',
share=Button(
file='./assets/share/rogue/ui/BLESSING_OBTAINED.png',
area=(733, 561, 765, 583),
search=(710, 551, 777, 593),
color=(248, 248, 248),
button=(733, 561, 765, 583),
cn=Button(
file='./assets/cn/rogue/ui/BLESSING_OBTAINED.png',
area=(578, 44, 638, 72),
search=(565, 31, 652, 124),
color=(139, 124, 92),
button=(578, 44, 638, 72),
),
en=Button(
file='./assets/en/rogue/ui/BLESSING_OBTAINED.png',
area=(645, 46, 779, 71),
search=(633, 35, 792, 124),
color=(129, 116, 91),
button=(645, 46, 779, 71),
),
)
CHECK_BLESSING = ButtonWrapper(
@ -82,16 +87,6 @@ FLAG_UNRECORD = ButtonWrapper(
button=(746, 149, 778, 181),
),
)
OBTAIN_ITEM_POPUP = ButtonWrapper(
name='OBTAIN_ITEM_POPUP',
share=Button(
file='./assets/share/rogue/ui/OBTAIN_ITEM_POPUP.png',
area=(180, 573, 432, 720),
search=(160, 553, 452, 720),
color=(131, 109, 73),
button=(180, 573, 432, 720),
),
)
OCR_COSMIC_FRAGMENT = ButtonWrapper(
name='OCR_COSMIC_FRAGMENT',
share=Button(

View File

@ -69,7 +69,7 @@ class RogueBuffOcr(Ocr):
"天[培梧]步危": "天棓步危",
"云[摘销锅]?逐步离": "云镝逐步离",
"制桑": "制穹桑",
"乌号[綦基]?箭?": "乌号綦箭",
"乌号[綦基]*箭?": "乌号綦箭",
"流岚追摩?物": "流岚追孽物",
"特月": "狩月",
"彤弓素.*": "彤弓素矰",

View File

@ -52,12 +52,6 @@ class RogueUI(UI):
def is_page_rogue_launch(self):
return self.match_template_color(ROGUE_LAUNCH)
def handle_obtain_item_popup(self, interval=5) -> bool:
"""After selecting some curio (e.g. Sealing_Wax_of_*), there will be a popup after back to main page"""
if self.appear_then_click(OBTAIN_ITEM_POPUP, interval=interval):
return True
return False
def is_unrecorded(self, target: OcrResultButton, relative_area):
"""
To check a rogue keyword is not record in game index by finding template