Fix: [CN] Handle curio fixed

TODO: [EN] Update CURIO_FIXED
This commit is contained in:
LmeSzinc 2024-05-14 01:59:47 +08:00
parent b784c17ac0
commit e0707b8286
3 changed files with 16 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -77,6 +77,17 @@ COSMIC_FRAGMENT = ButtonWrapper(
button=(1146, 19, 1181, 55),
),
)
CURIO_FIXED = ButtonWrapper(
name='CURIO_FIXED',
cn=Button(
file='./assets/cn/rogue/ui/CURIO_FIXED.png',
area=(558, 54, 626, 75),
search=(538, 34, 646, 95),
color=(126, 123, 122),
button=(558, 54, 626, 75),
),
en=None,
)
CURIO_OBTAINED = ButtonWrapper(
name='CURIO_OBTAINED',
cn=[

View File

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