pcacc 2 сар өмнө
parent
commit
2d38913832

+ 7 - 0
app_dongri.py

@@ -314,6 +314,13 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
                 task_queue.appendleft(task_paticipateInTeam())
                 task_queue.appendleft(task_paticipateInTeam())
                 task_queue.appendleft(task_paticipateInTeam())
+                task_queue.appendleft(task_paticipateInTeam())
+                task_queue.appendleft(task_paticipateInTeam())
+                task_queue.appendleft(task_paticipateInTeam())
+                task_queue.appendleft(task_paticipateInTeam())
+                task_queue.appendleft(task_paticipateInTeam())
+                task_queue.appendleft(task_paticipateInTeam())
+                
             myTimeSleep_big()
             send_status(f'巨熊行动中')
             continue

BIN
dongri_img/special_activity/power0.png


+ 4 - 0
dongri_pic.py

@@ -317,6 +317,10 @@ class special_activity_img:
     duanwu_auto_attack = R'dongri_img\special_activity\duanwu_auto_attack.png'
     duanwu_auto_use = R'dongri_img\special_activity\duanwu_auto_use.png'
     duanwu_end = R'dongri_img\special_activity\duanwu_end.png'
+
+    # participate
+    orc_power = (424,148,502,170)
+    power0 = R'dongri_img\special_activity\power0.png'
     
 def change_direction(direction):
     if len(direction) == 4:

+ 42 - 10
dongri_task.py

@@ -1019,10 +1019,14 @@ class task_returnAllLine(dongri_task):
 
 class task_paticipateInTeam(dongri_task):
     def __init__(self):
-        typeArr = [1,4]
+        typeArr = [1,3,4]
         type = typeArr[random.randint(0, len(typeArr) - 1)]
         if type == 1:
             self.line = monster_img.line1
+        elif type == 2:
+            self.line = monster_img.line2
+        elif type == 3:
+            self.line = monster_img.line3
         elif type == 4:
             self.line = monster_img.line4
         super().__init__(f"参与队伍{type}")
@@ -1041,9 +1045,25 @@ class task_paticipateInTeam(dongri_task):
         maxTryTimes = 3
         while maxTryTimes > 0:
             maxTryTimes -= 1
-            waitClickImg_withBool([monster_img.fight, monster_img.fight2, monster_img.fight3], 1, 0.5)
-            if False == waitClickImg_noWait_withBool(monster_img.all_select, 1, 0.5):
-                break
+            if waitFindImg_withBool(special_activity_img.power0, 1, 0) == False:# 实力不为0
+                countStr = yys_ocrAuto(special_activity_img.orc_power)
+                count = 0
+                if len(countStr) == 0:
+                    count = 0
+                    return False
+                cleaned_text = countStr[0].replace('.', '')
+                cleaned_text = cleaned_text.replace(',', '')
+                try:
+                    count = int(cleaned_text)
+                except:
+                    return False
+                print("current power:", count)
+                if count < 15000000:
+                    return False
+                waitClickImg_withBool([monster_img.fight, monster_img.fight2, monster_img.fight3], 1, 0.5)
+            else:
+                if False == waitClickImg_noWait_withBool(monster_img.all_select, 1, 0.5):
+                    break
         return True        
 
 class task_cure(dongri_task):
@@ -1519,15 +1539,27 @@ class task_duanwu(dongri_task):
             except:
                 continue
             print("current count:", count)
-
-
-
-
         return True
 
-
+class task_checkPower(dongri_task):
+    def __init__(self):
+        super().__init__(f"检查实力")
+    def run(self):
+        countStr = yys_ocrAuto(special_activity_img.orc_power)
+        if len(countStr) == 0:
+            count = 0
+            return False
+        cleaned_text = countStr[0].replace('.', '')
+        cleaned_text = cleaned_text.replace(',', '')
+        try:
+            count = int(cleaned_text)
+        except:
+            return False
+        print("current count:", count)
+        return True
 
 if __name__ == '__main__':
+    task_checkPower().run()
     #task_checkActivities().run()
     #print(get_todo_time("巨熊行动"))
     #task_check_Research().run()
@@ -1552,7 +1584,7 @@ if __name__ == '__main__':
     #task_start_game(0)
     #check_safe_collect().run()
     #task_fight_campion().run()
-    task_activity_lianmeng().run()
+    #task_activity_lianmeng().run()
     #task_fight_yongbing(True).run()
     #task_collect([4,3,2,1]).run()
     #task_train("upgrade").run()