Skip to content

Commit

Permalink
fix: purefiction
Browse files Browse the repository at this point in the history
  • Loading branch information
moesnow committed Jan 9, 2024
1 parent d61b32a commit 665cdbe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Binary file modified assets/images/screen/purefiction/purefiction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions tasks/weekly/forgottenhall.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ def prepare():
else:
break
if auto.click_element("传送", "text", max_retries=10, need_ocr=False):
auto.click_element("./assets/images/forgottenhall/memory_of_chaos.png", "image",
0.95, max_retries=2, crop=(470 / 1920, 0, 970 / 1920, 114 / 1080))
# auto.click_element("./assets/images/forgottenhall/memory_of_chaos.png", "image",
# 0.95, max_retries=2, crop=(470 / 1920, 0, 970 / 1920, 114 / 1080))
if auto.click_element("./assets/images/screen/forgottenhall/memory_of_chaos.png", "image",
0.95, max_retries=10, crop=(36 / 1920, 25 / 1080, 170 / 1920, 80 / 1080)):
0.95, max_retries=20, crop=(36 / 1920, 25 / 1080, 170 / 1920, 80 / 1080)):
flag = True

if not flag:
Expand All @@ -307,7 +307,6 @@ def prepare():

ForgottenHall.run()

screen.change_to('main')
return True

@staticmethod
Expand Down
11 changes: 7 additions & 4 deletions tasks/weekly/purefiction.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ def prepare():
auto.find_element("虚构叙事", "text", max_retries=10, crop=(
689.0 / 1920, 285.0 / 1080, 970.0 / 1920, 474.0 / 1080), include=True)
for box in auto.ocr_result:
break
text = box[1][0]
if "/12" in text:
logger.info(_("星数:{text}").format(text=text))
Expand All @@ -255,7 +256,8 @@ def prepare():
else:
break
if auto.click_element("传送", "text", max_retries=10, need_ocr=False):
if auto.click_element("./assets/images/screen/purefiction/purefiction.png", "image", 0.8, max_retries=10, action="move"):
if auto.click_element("虚构叙事", "text", max_retries=20, include=True, action="move", crop=(0.0 / 1920, 1.0 / 1080, 552.0 / 1920, 212.0 / 1080)):
# if auto.click_element("./assets/images/screen/purefiction/purefiction.png", "image", 0.8, max_retries=10, action="move"):
flag = True

if not flag:
Expand All @@ -265,12 +267,13 @@ def prepare():
# 刷新后打开会出现本期buff的弹窗
time.sleep(2)
if auto.click_element("./assets/images/purefiction/start_story.png", "image", 0.8):
auto.click_element("./assets/images/screen/purefiction/purefiction.png",
"image", 0.8, max_retries=10, action="move")
auto.click_element("虚构叙事", "text", max_retries=10, include=True, action="move", crop=(
0.0 / 1920, 1.0 / 1080, 552.0 / 1920, 212.0 / 1080))
# auto.click_element("./assets/images/screen/purefiction/purefiction.png",
# "image", 0.8, max_retries=10, action="move")

PureFiction.run()

screen.change_to('main')
return True

@staticmethod
Expand Down

0 comments on commit 665cdbe

Please sign in to comment.