Kaynağa Gözat

!2 speed up participate team

pcacc 3 ay önce
ebeveyn
işleme
c1ff83d115
1 değiştirilmiş dosya ile 9 ekleme ve 10 silme
  1. 9 10
      dongri_task.py

+ 9 - 10
dongri_task.py

@@ -894,7 +894,13 @@ class task_returnAllLine(dongri_task):
 
 class task_paticipateInTeam(dongri_task):
     def __init__(self):
-        super().__init__(f"参与队伍")
+        typeArr = [1,4]
+        type = typeArr[random.randint(0, len(typeArr) - 1)]
+        if type == 1:
+            self.line = monster_img.line1
+        elif type == 4:
+            self.line = monster_img.line4
+        super().__init__(f"参与队伍{type}")
     def run(self):
         basic_operate.go_outside()
         if waitClickImg_noWait_withBool(check_img.conflits, 2, 1) == False:
@@ -904,15 +910,8 @@ class task_paticipateInTeam(dongri_task):
             myTimeSleep_big()
             if waitClickImg_noWait_withBool(monster_img.participate, 1, 1, True) == False:
                 return False
-        
-        while True:
-            if waitClickImg_noWait_withBool(monster_img.line1, 0.1, 1) == False:
-                break
-            if waitFindImg_withBool(monster_img.no_hero, 0.1, 0.5) == False:
-                break
-            if waitClickImg_noWait_withBool(monster_img.line4, 0.1, 0.5) == False:
-                break
-            break
+            
+        waitClickImg_noWait_withBool(self.line, 0.1, 1)
 
         maxTryTimes = 3
         while maxTryTimes > 0: