pcacc пре 5 месеци
родитељ
комит
668db91c81
2 измењених фајлова са 17 додато и 10 уклоњено
  1. 6 5
      app_dongri.py
  2. 11 5
      dongri_task.py

+ 6 - 5
app_dongri.py

@@ -171,18 +171,19 @@ def add_auto_task(isMaxCollect, isSimple = False):
         collectType = 5
     times = 0
     while not event.is_set():
-        task_queue.appendleft(task_information())
+        if not isSimple:
+            task_queue.appendleft(task_information())
         task_queue.appendleft(task_checkHelp(False))
         if not isSimple:
             task_queue.appendleft(task_paticipateInTeam())
         task_queue.appendleft(check_buildOrResearch())
         if not isSimple:
-            task_queue.appendleft(task_fightMonster(False, True))
-        task_queue.appendleft(task_collect(collectType))
+            task_queue.appendleft(task_fightMonster(False, True, isSimple))
+        task_queue.appendleft(task_collect(collectType, isSimple))
         task_queue.appendleft(task_train(False))
-        task_queue.appendleft(task_collect(collectType))
+        task_queue.appendleft(task_collect(collectType, isSimple))
         task_queue.appendleft(task_train(False))
-        task_queue.appendleft(task_collect(collectType))
+        task_queue.appendleft(task_collect(collectType, isSimple))
         task_queue.appendleft(task_checkStoreRoom())
         if not isSimple:
             task_queue.appendleft(task_checkConfilits())

+ 11 - 5
dongri_task.py

@@ -64,7 +64,7 @@ class basic_operate:
             return
         ret, pos = waitFindImg(place_img.title, 1, 0)
         if ret:
-            pcacc_mouse.click(pos[0], pos[1] + 40)
+            pcacc_mouse.click(pos[0], pos[1] + 80)
 
 
     def backToGame(preTime = 0):
@@ -190,9 +190,10 @@ class dongri_task:
 
 
 class task_fightMonster(dongri_task):
-    def __init__(self, add_strengh, fight_bigMonster):
+    def __init__(self, add_strengh, fight_bigMonster, isSimple):
         super().__init__(f"战斗怪物")
         self.add_strengh = add_strengh
+        self.isSimple = isSimple
         if fight_bigMonster == True:
             self.monster = monster_img.bigMonster
             self.attack = monster_img.muti_team
@@ -220,8 +221,9 @@ class task_fightMonster(dongri_task):
         if waitClickImg_noWait_withBool(self.attack, 2, 1) == False:
             return False
         waitClickImg_noWait_withBool(monster_img.begin_multi, 2, 1)
-        if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
-            return False
+        if not self.isSimple:
+            if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
+                return False
         if waitFindImg_withBool(monster_img.no_hero, 2, 1) == True:
             return False
         if waitClickImg_noWait_withBool(monster_img.all_select, 2, 1) == False:
@@ -238,7 +240,8 @@ class task_fightMonster(dongri_task):
         
 
 class task_collect(dongri_task):
-    def __init__(self, type = 0):
+    def __init__(self, type = 0, isSimple = False):
+        self.isSimple = isSimple
         if type == 0:
             typeArr = [4,3,2,1]
             type = typeArr[random.randint(0, len(typeArr) - 1)]
@@ -262,6 +265,9 @@ class task_collect(dongri_task):
             self.type = monster_img.iron
             self.line = None
             super().__init__(f"采集铁矿石")
+
+        if isSimple:
+            self.line = None
         
 
     def run(self):