فهرست منبع

!2 check collect status

pcacc 4 ماه پیش
والد
کامیت
f857dae589

BIN
dongri_img/check/add_benefit.png


BIN
dongri_img/check/benefit_buy.png


BIN
dongri_img/check/benefit_collect.png


BIN
dongri_img/check/benefit_collect_info.png


BIN
dongri_img/check/benefit_evolve.png


BIN
dongri_img/check/buy_enter.png


BIN
dongri_img/monster/outside_attack.png


BIN
dongri_img/special_activity/visit_island.png


+ 12 - 0
dongri_pic.py

@@ -52,6 +52,7 @@ class monster_img:
     move_left = (135, 616, 418, 604)
     ranshuang_search = R'dongri_img\monster\ranshuang_search.png'
     ranshuang_attack = R'dongri_img\monster\ranshuang_attack.png'
+    outside_attack = R'dongri_img\monster\outside_attack.png'
 
 class train_img:
     # = R'dongri_img\game\.png' 
@@ -165,6 +166,16 @@ class check_img:
     mail_system = R'dongri_img\check\mail_system.png'
     mail_union = R'dongri_img\check\mail_union.png'
     mail_read = R'dongri_img\check\mail_read.png'
+    # benefit
+    benefit_collect = R'dongri_img\check\benefit_collect.png'
+    add_benefit = R'dongri_img\check\add_benefit.png'
+    benefit_evolve = R'dongri_img\check\benefit_evolve.png'
+    benefit_collect_info = R'dongri_img\check\benefit_collect_info.png'
+    benefit_use_region = (411, 469, 479, 493)
+    benefit_buy = R'dongri_img\check\benefit_buy.png'
+    buy_enter = R'dongri_img\check\buy_enter.png'
+
+
 
 
 
@@ -221,6 +232,7 @@ class special_activity_img:
     done_immediately = R'dongri_img\special_activity\done_immediately.png'
     quick_choose = R'dongri_img\special_activity\quick_choose.png'
     choose_zero = R'dongri_img\special_activity\choose_zero.png'
+    visit_island = R'dongri_img\special_activity\visit_island.png'
 
     ## 红包
     red_package = R'dongri_img\special_activity\red_package.png'

+ 30 - 6
dongri_task.py

@@ -1129,18 +1129,19 @@ class task_fight_enemy(dongri_task):
         firstPos = get_yys_random_point(special_activity_img.first_enemy_region)
         pcacc_mouse.click(firstPos[0], firstPos[1])
         maxTryTimes = 5
-        while waitFindImg_withBool(attackArr, 2, 1) == False and maxTryTimes > 0:
+        if waitFindImg_withBool(special_activity_img.visit_island, 1, 1) == True:
+            return False
+        while waitFindImg_withBool(attackArr, 1, 0) == False and maxTryTimes > 0:
             maxTryTimes -= 1
             myTimeSleep_big()
             mid_enemy_pos = get_yys_random_point(special_activity_img.mid_enemy_region)
             pcacc_mouse.click(mid_enemy_pos[0], mid_enemy_pos[1])
             myTimeSleep_big()
-
-        if waitClickImg_noWait_withBool(attackArr, 2, 1) == False:
+        if waitFindImg_withBool(special_activity_img.visit_island, 1, 1) == True:
             return False
-        if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
+        if waitClickImg_noWait_withBool(attackArr, 1, 0) == False:
             return False
-        if waitFindImg_withBool(monster_img.no_hero, 2, 1) == True:
+        if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
             return False
 
         if waitClickImg_noWait_withBool([monster_img.fight, monster_img.fight2], 2, 1) == False:
@@ -1186,6 +1187,28 @@ class task_read_mails(dongri_task):
         if waitClickImg_noWait_withBool(check_img.mail_read, 2, 1) == False:
             return False
         return True
+    
+class task_checkBenifitStatus(dongri_task):
+    def __init__(self):
+        super().__init__(f"查看增益状态")
+    def run(self):
+        basic_operate.go_town()
+        if waitFindImg_withBool(check_img.benefit_collect, 2, 1) == True:
+            return True
+        if waitClickImg_noWait_withBool(check_img.add_benefit, 2, 1) == False:
+            return False
+        waitClickImg_noWait_withBool(check_img.benefit_evolve, 2, 1)
+        if waitClickImg_noWait_withBool(check_img.benefit_collect_info, 2, 1) == False:
+            return False
+        myTimeSleep_big()
+        dstPos = get_yys_random_point(check_img.benefit_use_region)
+        pcacc_mouse.click(dstPos[0], dstPos[1])
+        myTimeSleep_big()
+        if waitClickImg_noWait_withBool(check_img.benefit_buy, 2, 1) == False:
+            return False
+        waitClickImg_noWait_withBool(check_img.buy_enter, 2, 1)
+        
+        return True
 
 
 if __name__ == '__main__':
@@ -1219,4 +1242,5 @@ if __name__ == '__main__':
     #task_paticipateInTeam().run()
     #task_fight_jina(True).run()
     #task_get_redPackage().run()
-    task_read_mails().run()
+    #task_read_mails().run()
+    task_checkBenifitStatus().run()