소스 검색

!2 save champion fight

pcacc 3 달 전
부모
커밋
50eeb4fdc4
2개의 변경된 파일39개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      dongri_pic.py
  2. 38 3
      dongri_task.py

+ 1 - 1
dongri_pic.py

@@ -267,7 +267,7 @@ class special_activity_img:
     champion_fight = R'dongri_img\special_activity\champion_fight.png'
     champion_fight2 = R'dongri_img\special_activity\champion_fight2.png'
     enter_champion = R'dongri_img\special_activity\enter_champion.png'
-    champion_move = (476,471,387,467)
+    champion_move = (476,471,357,467)
     fight_last = (451,547,481,575)
     
 def change_direction(direction):

+ 38 - 3
dongri_task.py

@@ -1268,12 +1268,46 @@ class task_checkDiamond(dongri_task):
             return False
 
         return True
-            
+
+class task_fight_campion(dongri_task):
+    def __init__(self):
+        super().__init__(f"打竞技场")
+    def run(self):
+        basic_operate.go_town()
+        if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
+            return False
+        
+        myTimeSleep_big()
+        if waitClickImg_noWait_withBool(special_activity_img.goto_arrow, 2, 1) == False:
+            return False
+        myTimeSleep_big()
+        maxMoveTimes = 2
+        while maxMoveTimes > 0:
+            maxMoveTimes -= 1
+            yys_dragAuto(special_activity_img.champion_move)
+            myTimeSleep_big()
+            if waitClickImg_noWait_withBool(special_activity_img.enter_champion, 2, 1) == True:
+                break
+        
+        if waitClickImg_noWait_withBool(special_activity_img.champion_fight, 2, 1) == False:
+            return False
+        myTimeSleep_big()
+
+        dstPos = get_yys_random_point(special_activity_img.fight_last)
+        pcacc_mouse.click(dstPos[0], dstPos[1])
+        myTimeSleep_big()
+
+        if waitClickImg_noWait_withBool(special_activity_img.champion_fight2, 2, 1) == False:
+            return False
+        return True
+
+
+
             
 
 
 if __name__ == '__main__':
-    save_game_screen()
+    #save_game_screen()
     #basic_operate.get_line_num()
     #task_cure(True, 85).run()
     #task_fight_enemy().run()
@@ -1291,7 +1325,8 @@ if __name__ == '__main__':
     #task_checkHelp().run()
     #task_checkStoreRoom().run()
     #task_start_game(0)
-    task_activity_lianmeng().run()
+    task_fight_campion().run()
+    #task_activity_lianmeng().run()
     #task_fight_yongbing(True).run()
     #task_collect([4,3,2,1]).run()
     #task_train("upgrade").run()