Skip to content
Binary file added assets/share/daily/trial/BEGINNER_GACHA_CHECK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions tasks/daily/assets/assets_daily_trial.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
# This file was auto-generated, do not modify it manually. To generate:
# ``` python -m dev_tools.button_extract ```

BEGINNER_GACHA_CHECK = ButtonWrapper(
name='BEGINNER_GACHA_CHECK',
share=Button(
file='./assets/share/daily/trial/BEGINNER_GACHA_CHECK.png',
area=(209, 428, 309, 460),
search=(189, 408, 329, 480),
color=(87, 139, 198),
button=(209, 428, 309, 460),
),
)
CHARACTER_TRIAL = ButtonWrapper(
name='CHARACTER_TRIAL',
share=Button(
Expand Down
9 changes: 9 additions & 0 deletions tasks/daily/trail.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def enter_himeko_trial(self):
and self.match_color(CHARACTER_TRIAL, interval=2):
self.device.click(CHARACTER_TRIAL)
continue
# Switch to regular gacha
if self.match_template_color(REGULAR_GACHA_CLICK, interval=2):
# Poor sleep indeed, clicks won't be response unless other elements are loaded
# Waiting for gacha banner moving
Expand All @@ -74,6 +75,14 @@ def enter_himeko_trial(self):
first_gacha = False
self.device.click(REGULAR_GACHA_CLICK)
continue
# Slide down to find regular gacha if beginner gacha found
if self.match_template_color(BEGINNER_GACHA_CHECK,interval=4):
swipe_vector = (0, -4*REGULAR_GACHA_CLICK.height)
self.device.swipe_vector(swipe_vector, box=REGULAR_GACHA_CLICK.search,
random_range=(-10, -10, 10, 10), name='FIND_REGULAR_GACHA_DRAG')
continue
Comment on lines +78 to +83
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

格式化代码 遵循PEP8




def exit_trial(self, skip_first_screenshot=True):
"""
Expand Down