Skip to content

Commit

Permalink
Fix: break down relicset
Browse files Browse the repository at this point in the history
  • Loading branch information
moesnow committed Sep 3, 2024
1 parent 444e2a1 commit 71a50a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/setting_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __initCard(self):
self.breakDownLevelFourRelicsetEnableCard = SwitchSettingCard1(
FIF.FILTER,
self.tr('自动分解四星遗器'),
self.tr('侵蚀隧洞、历战余响和模拟宇宙(开启领取沉浸奖励)完成后自动分解四星及以下遗器'),
self.tr('侵蚀隧洞、饰品提取、历战余响和模拟宇宙完成后自动分解四星及以下遗器'),
"break_down_level_four_relicset"
)
self.instanceTeamEnableCard = SwitchSettingCardTeam(
Expand Down
2 changes: 1 addition & 1 deletion assets/config/config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ instance_names:
历战余响: 毁灭的开端 # 配置各副本类型的名称。

# 分解设置
break_down_level_four_relicset: false # 完成侵蚀隧洞和模拟宇宙后是否自动分解四星及以下遗器。true 开启,false 关闭。
break_down_level_four_relicset: false # 完成侵蚀隧洞、饰品提取、历战余响和模拟宇宙后是否自动分解四星及以下遗器。true 开启,false 关闭。

# 队伍配置
instance_team_enable: false # 是否在打副本时自动切换队伍。true 开启,false 关闭。
Expand Down
5 changes: 4 additions & 1 deletion tasks/power/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ def start_instance(instance_type, power_need):

if auto.click_element("开始挑战", "text", max_retries=10, need_ocr=True):
time.sleep(2)
if auto.find_element("开始挑战", "text", max_retries=10, need_ocr=True):
Base.send_notification_with_screenshot(cfg.notify_template['InstanceNotCompleted'].format(error="无法开始挑战"))
return False
if auto.find_element("差分宇宙", "text", max_retries=60, crop=(8.0 / 1920, 5.0 / 1080, 157.0 / 1920, 38.0 / 1080), include=True):
time.sleep(1)

Expand Down Expand Up @@ -196,7 +199,7 @@ def complete_run(instance_type):
# 从副本返回主界面后,按esc太快无效
time.sleep(2)

if ("侵蚀隧洞" or "历战余响") in instance_type and cfg.break_down_level_four_relicset:
if ("侵蚀隧洞" in instance_type or "饰品提取" in instance_type or "历战余响" in instance_type) and cfg.break_down_level_four_relicset:
Relicset.run()

@staticmethod
Expand Down

0 comments on commit 71a50a9

Please sign in to comment.