|
@@ -226,7 +226,12 @@ class basic_operate:
|
|
|
mine_num = len(pcacc_img.find_all_image_locations(check_img.on_mine))
|
|
|
stone_num = len(pcacc_img.find_all_image_locations(check_img.on_stone))
|
|
|
return meat_num + wood_num + mine_num + stone_num
|
|
|
-
|
|
|
+
|
|
|
+ @staticmethod
|
|
|
+ def get_line_num_mix():
|
|
|
+ num1 = basic_operate.get_line_num()
|
|
|
+ num2 = basic_operate.get_line_num2()
|
|
|
+ return max(num1, num2)
|
|
|
|
|
|
|
|
|
|
|
@@ -314,7 +319,7 @@ class task_fight_yongbing(dongri_task):
|
|
|
return False
|
|
|
|
|
|
|
|
|
- if basic_operate.get_line_num() >= 6:
|
|
|
+ if basic_operate.get_line_num_mix() >= 6:
|
|
|
return False
|
|
|
|
|
|
if waitClickImg_noWait_withBool(check_img.yongbing, 2, 1) == False:
|
|
@@ -517,7 +522,7 @@ class task_fightMonster(dongri_task):
|
|
|
|
|
|
maxLineNum = 6
|
|
|
|
|
|
- if basic_operate.get_line_num() >= maxLineNum:
|
|
|
+ if basic_operate.get_line_num_mix() >= maxLineNum:
|
|
|
return False
|
|
|
|
|
|
if False == basic_operate.click_outside_search():
|
|
@@ -606,7 +611,7 @@ class task_collect(dongri_task):
|
|
|
maxLineNum -= 1
|
|
|
|
|
|
|
|
|
- if basic_operate.get_line_num() >= maxLineNum:
|
|
|
+ if basic_operate.get_line_num_mix() >= maxLineNum:
|
|
|
return False
|
|
|
|
|
|
if False == basic_operate.click_outside_search():
|
|
@@ -1001,7 +1006,7 @@ class task_information(dongri_task):
|
|
|
|
|
|
hero_arr = [information_img.hero0, information_img.hero1, information_img.hero2, information_img.hero3, information_img.hero4]
|
|
|
camp_arr = [information_img.camp1, information_img.camp2, information_img.camp3, information_img.camp4]
|
|
|
- wolf_arr = [information_img.wolf0, information_img.wolf1, information_img.wolf2, information_img.wolf3, information_img.wolf4, information_img.huojing1]
|
|
|
+ wolf_arr = [information_img.wolf0, information_img.wolf1, information_img.wolf2, information_img.wolf3, information_img.wolf4, information_img.huojing1, information_img.wolf5, information_img.wolf6, information_img.wolf7]
|
|
|
total_arr = hero_arr + camp_arr + wolf_arr
|
|
|
|
|
|
if waitFindImg_withBool(total_arr, 2, 1) == False:
|
|
@@ -1565,6 +1570,26 @@ class task_checkDiamond(dongri_task):
|
|
|
|
|
|
return True
|
|
|
|
|
|
+class task_invite_hero(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
|
|
|
+
|
|
|
+ if waitClickImg_noWait_withBool(check_img.build_hero, 2, 1) == False:
|
|
|
+ return False
|
|
|
+
|
|
|
+ if waitClickImg_noWait_withBool(check_img.invite_free, 2, 1) == False:
|
|
|
+ return False
|
|
|
+ return True
|
|
|
+
|
|
|
+
|
|
|
class task_fight_campion(dongri_task):
|
|
|
def __init__(self):
|
|
|
super().__init__(f"打竞技场")
|
|
@@ -1697,7 +1722,6 @@ class task_get_fire_crystal(dongri_task):
|
|
|
|
|
|
while waitClickImg_noWait_withBool(special_activity_img.fire_crystal_get, 2, 1, True) == True:
|
|
|
continue
|
|
|
-
|
|
|
return True
|
|
|
|
|
|
class task_zhuguang(dongri_task):
|
|
@@ -1731,7 +1755,8 @@ class task_testFun(dongri_task):
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
myTimeSleep_big()
|
|
|
- #print(basic_operate.get_line_num())
|
|
|
+ print(basic_operate.get_line_num_mix())
|
|
|
+ task_invite_hero().run()
|
|
|
#task_get_fire_crystal().run()
|
|
|
#task_checkPower().run()
|
|
|
#task_testFun().run()
|
|
@@ -1739,7 +1764,6 @@ if __name__ == '__main__':
|
|
|
#print(get_todo_time("巨熊行动"))
|
|
|
#task_check_Research().run()
|
|
|
#save_game_screen()
|
|
|
- #basic_operate.get_line_num()
|
|
|
#task_cure(True, 85).run()
|
|
|
#task_fight_enemy().run()
|
|
|
#task_fight_ranshuang().run()
|
|
@@ -1749,14 +1773,13 @@ if __name__ == '__main__':
|
|
|
#task_getStrength().run()
|
|
|
#task_checkActivities().run()
|
|
|
#task_checkMaster().run()
|
|
|
- #basic_operate.get_line_num()
|
|
|
#yys_ocrAuto(check_img.line_orc)
|
|
|
#basic_operate.go_town()
|
|
|
#basic_operate.add_strength()
|
|
|
#task_fightMonster(False, True,False).run()
|
|
|
#task_checkHelp().run()
|
|
|
#task_checkStoreRoom().run()
|
|
|
- task_start_game(1)
|
|
|
+ #task_start_game(1)
|
|
|
#check_safe_collect().run()
|
|
|
#task_fight_campion().run()
|
|
|
#task_activity_lianmeng().run()
|