|
@@ -1048,7 +1048,7 @@ class task_fight_ranshuang(dongri_task):
|
|
def run(self):
|
|
def run(self):
|
|
basic_operate.backToGame()
|
|
basic_operate.backToGame()
|
|
maxTime = 4
|
|
maxTime = 4
|
|
- while waitClickImg_noWait_withBool((monster_img.ranshuang_attack, monster_img.ranshuang_search), 1, 1) and maxTime > 0:
|
|
|
|
|
|
+ while waitClickImg_noWait_withBool([monster_img.ranshuang_attack, monster_img.ranshuang_search], 1, 1) and maxTime > 0:
|
|
maxTime -= 1
|
|
maxTime -= 1
|
|
continue
|
|
continue
|
|
|
|
|
|
@@ -1056,6 +1056,40 @@ class task_fight_ranshuang(dongri_task):
|
|
if waitClickImg_noWait_withBool([monster_img.fight, monster_img.fight2], 1, 1) == False:
|
|
if waitClickImg_noWait_withBool([monster_img.fight, monster_img.fight2], 1, 1) == False:
|
|
return False
|
|
return False
|
|
return True
|
|
return True
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+class task_fight_enemy(dongri_task):
|
|
|
|
+ def __init__(self):
|
|
|
|
+ super().__init__(f"打敌人or王城")
|
|
|
|
+ def run(self):
|
|
|
|
+ basic_operate.go_town()
|
|
|
|
+ basic_operate.go_outside()
|
|
|
|
+ if waitClickImg_noWait_withBool(special_activity_img.collection, 2, 1) == False:
|
|
|
|
+ return False
|
|
|
|
+ if waitClickImg_noWait_withBool(special_activity_img.enemy, 2, 1) == False:
|
|
|
|
+ return False
|
|
|
|
+
|
|
|
|
+ myTimeSleep_big()
|
|
|
|
+ firstPos = get_yys_random_point(special_activity_img.first_enemy_region)
|
|
|
|
+ pcacc_mouse.click(firstPos[0], firstPos[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([monster_img.attack, monster_img.attack2, monster_img.ranshuang_attack], 2, 1) == False:
|
|
|
|
+ return False
|
|
|
|
+ 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.fight, monster_img.fight2], 2, 1) == False:
|
|
|
|
+ return False
|
|
|
|
+ return True
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1064,7 +1098,8 @@ class task_fight_ranshuang(dongri_task):
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
- task_fight_ranshuang().run()
|
|
|
|
|
|
+ task_fight_enemy().run()
|
|
|
|
+ #task_fight_ranshuang().run()
|
|
#task_gotoTree().run()
|
|
#task_gotoTree().run()
|
|
#task_fight_jina_only().run()
|
|
#task_fight_jina_only().run()
|
|
#task_checkConfilits().run()
|
|
#task_checkConfilits().run()
|