Przeglądaj źródła

fix(Component): switch soul do not take effect

runhey 3 lat temu
rodzic
commit
8cdf50c481

BIN
tasks/Component/SwitchSoul/ss/ss_sou_check_group_2.png


BIN
tasks/Component/SwitchSoul/ss/ss_sou_check_group_3.png


BIN
tasks/Component/SwitchSoul/ss/ss_sou_check_group_4.png


BIN
tasks/Component/SwitchSoul/ss/ss_sou_check_group_5.png


BIN
tasks/Component/SwitchSoul/ss/ss_sou_check_group_6.png


BIN
tasks/Component/SwitchSoul/ss/ss_sou_check_group_7.png


BIN
tasks/Component/SwitchSoul/ss/ss_sou_switch_1.png


BIN
tasks/Component/SwitchSoul/ss/ss_sou_switch_2.png


BIN
tasks/Component/SwitchSoul/ss/ss_sou_switch_3.png


BIN
tasks/Component/SwitchSoul/ss/ss_sou_switch_4.png


+ 5 - 3
tasks/Component/SwitchSoul/switch_soul.py

@@ -86,13 +86,15 @@ class SwitchSoul(BaseTask, SwitchSoulAssets):
             raise ValueError('Switch soul_one group must be in [1-7]')
             raise ValueError('Switch soul_one group must be in [1-7]')
         if team < 1 or team > 4:
         if team < 1 or team > 4:
             raise ValueError('Switch soul_one team must be in [1-4]')
             raise ValueError('Switch soul_one team must be in [1-4]')
+        # 这一步是选择组
         target_click, target_check = get_group_assets(group)
         target_click, target_check = get_group_assets(group)
         while 1:
         while 1:
             self.screenshot()
             self.screenshot()
+            if self.click(target_click, interval=1):
+                continue
             if self.appear(target_check):
             if self.appear(target_check):
                 break
                 break
-            if self.appear_then_click(target_click, interval=1):
-                continue
+
         # 点击队伍
         # 点击队伍
         target_team = get_team_asset(team)
         target_team = get_team_asset(team)
         for i in range(3):
         for i in range(3):
@@ -228,4 +230,4 @@ if __name__ == '__main__':
     s = SwitchSoul(c, d)
     s = SwitchSoul(c, d)
 
 
     s.click_preset()
     s.click_preset()
-    s.switch_soul_one(7, 2)
+    s.switch_soul_one(2, 1)