Browse Source

!2 add auto_cure and auto invite hero

pcacc 5 months ago
parent
commit
5f34a6bcb3

+ 1 - 0
app_dongri.py

@@ -177,6 +177,7 @@ def add_auto_task(isMaxCollect, isSimple = False):
         if not isSimple:
             task_queue.appendleft(task_paticipateInTeam())
         task_queue.appendleft(check_buildOrResearch())
+        task_queue.appendleft(task_cure())
         if not isSimple:
             task_queue.appendleft(task_fightMonster(False, True, isSimple))
         task_queue.appendleft(task_collect(collectType, isSimple))

BIN
dongri_img/check/cure.png


BIN
dongri_img/check/help4.png


BIN
dongri_img/check/invite_free.png


BIN
dongri_img/check/soilder_cure.png


BIN
dongri_img/monster/line5.png


+ 5 - 0
dongri_pic.py

@@ -37,6 +37,7 @@ class monster_img:
     line2 = R'dongri_img\monster\line2.png'
     line3 = R'dongri_img\monster\line3.png'
     line4 = R'dongri_img\monster\line4.png'
+    line5 = R'dongri_img\monster\line5.png'
     all_select = R'dongri_img\monster\all_select.png'
     attack = R'dongri_img\monster\attack.png'
     enough_strengh = R'dongri_img\monster\enough_strengh.png'
@@ -80,6 +81,7 @@ class check_img:
     help = R'dongri_img\check\help.png'
     help2 = R'dongri_img\check\help2.png'
     help3 = R'dongri_img\check\help3.png'
+    help4 = R'dongri_img\check\help4.png'
     conflits = R'dongri_img\check\conflits.png'
     paticipate = R'dongri_img\check\paticipate.png'
     auto_confilit = R'dongri_img\check\auto_confilit.png'
@@ -91,6 +93,9 @@ class check_img:
     adventure = R'dongri_img\check\adventure.png'
     get = R'dongri_img\check\get.png'
     bigGet = R'dongri_img\check\bigGet.png'
+    invite_free = R'dongri_img\check\invite_free.png'
+    soilder_cure = R'dongri_img\check\soilder_cure.png'
+    cure = R'dongri_img\check\cure.png'
 
 class information_img:
     # = R'dongri_img\information\.png'

+ 23 - 7
dongri_task.py

@@ -259,11 +259,11 @@ class task_collect(dongri_task):
             super().__init__(f"采集木头")
         elif type == 3:
             self.type = monster_img.mine
-            self.line = None
+            self.line = monster_img.line4
             super().__init__(f"采矿石")
         elif type == 4:
             self.type = monster_img.iron
-            self.line = None
+            self.line = monster_img.line5
             super().__init__(f"采集铁矿石")
 
         if isSimple:
@@ -340,7 +340,7 @@ class task_checkHelp(dongri_task):
     
 class task_checkStoreRoom(dongri_task):
     def __init__(self):
-        super().__init__(f"检查仓库")
+        super().__init__(f"检查仓库或招募")
     def run(self):
         basic_operate.go_town()
         if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
@@ -348,11 +348,11 @@ class task_checkStoreRoom(dongri_task):
         
         myTimeSleep_big()
         yys_dragAuto(check_img.move_down)
-        if waitClickImg_noWait_withBool(train_img.train_success, 2, 1) == False:
+        if waitClickImg_noWait_withBool((train_img.train_success, check_img.needgo), 2, 1) == False:
             return False
         myTimeSleep_big()
         pcacc_mouse.quickclick_current()
-        if waitClickImg_noWait_withBool(check_img.storeroom, 2, 1) == False:
+        if waitClickImg_noWait_withBool((check_img.storeroom, check_img.invite_free), 2, 1) == False:
             return False
         return True
     
@@ -559,6 +559,21 @@ class task_paticipateInTeam(dongri_task):
                 break
         return True        
 
+class task_cure(dongri_task):
+    def __init__(self):
+        super().__init__(f"治疗")
+    def run(self):
+        basic_operate.go_outside()
+        if waitClickImg_noWait_withBool(check_img.soilder_cure, 2, 1) == False:
+            return False
+        
+        if waitClickImg_noWait_withBool(check_img.cure, 2, 1) == False:
+            return False
+        
+        if waitClickImg_noWait_withBool(check_img.help4, 2, 1) == False:
+            return False
+        return True
+
 
 
 
@@ -566,7 +581,7 @@ if __name__ == '__main__':
     #basic_operate.go_town()
     #task_fightMonster(False, True).run()
     #task_checkHelp().run()
-    #task_checkStoreRoom().run()
+    task_checkStoreRoom().run()
     #task_collect().run()
     #task_train().run()
     #task_information().run()
@@ -578,4 +593,5 @@ if __name__ == '__main__':
     #task_collect(4).run()
     #task_returnAllLine().run()
     #task_paticipateInTeam().run()
-    task_train(True).run()
+    #task_train(True).run()
+    #task_cure().run()