Fix: Handle curio obtained from occurrence

This commit is contained in:
LmeSzinc 2023-10-31 01:33:11 +08:00
parent 103f3b6fbe
commit 28a0d57950
4 changed files with 22 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -77,6 +77,23 @@ COSMIC_FRAGMENT = ButtonWrapper(
button=(1146, 19, 1181, 55),
),
)
CURIO_OBTAINED = ButtonWrapper(
name='CURIO_OBTAINED',
cn=Button(
file='./assets/cn/rogue/ui/CURIO_OBTAINED.png',
area=(643, 86, 708, 117),
search=(623, 66, 728, 137),
color=(125, 126, 134),
button=(643, 86, 708, 117),
),
en=Button(
file='./assets/en/rogue/ui/CURIO_OBTAINED.png',
area=(511, 88, 600, 116),
search=(491, 68, 620, 136),
color=(93, 95, 102),
button=(511, 88, 600, 116),
),
)
FLAG_UNRECORD = ButtonWrapper(
name='FLAG_UNRECORD',
share=Button(

View File

@ -75,4 +75,9 @@ class RogueUI(UI):
logger.info(f'{BLESSING_LOST} -> {BLESSING_CONFIRM}')
self.device.click(BLESSING_CONFIRM)
return True
# Obtain a curio from occurrence
if self.appear(CURIO_OBTAINED, interval=2):
logger.info(f'{CURIO_OBTAINED} -> {BLESSING_CONFIRM}')
self.device.click(BLESSING_CONFIRM)
return True
return False