Fix: Missing interval on MINIGAME_SCROLL drag

This commit is contained in:
LmeSzinc 2024-08-16 12:37:27 +08:00
parent 7c38091201
commit eefe5f1dff

View File

@ -36,6 +36,7 @@ class NewYearChallenge(MinigameRun):
return False
def choose_game(self, skip_first_screenshot=True):
self.interval_clear(page_game_room.check_button)
while 1:
if skip_first_screenshot:
skip_first_screenshot = False
@ -50,11 +51,12 @@ class NewYearChallenge(MinigameRun):
if self.appear_then_click(GOTO_CHOOSE_GAME, offset=(5, 5), interval=3):
continue
# choose game
if self.appear(NEW_YEAR_CHALLENGE_ENTRANCE, offset=(5, 50), interval=3):
if self.appear(NEW_YEAR_CHALLENGE_ENTRANCE, offset=(5, 500), interval=3):
self.device.click(NEW_YEAR_CHALLENGE_ENTRANCE)
self.interval_reset(page_game_room.check_button, interval=3)
continue
# swipe down
if self.ui_page_appear(page_game_room) and MINIGAME_SCROLL.appear(main=self) \
if self.ui_page_appear(page_game_room, interval=3) and MINIGAME_SCROLL.appear(main=self) \
and not MINIGAME_SCROLL.set(main=self, position=0.25, distance_check=False):
MINIGAME_SCROLL.set_bottom(main=self)
continue