|
@@ -293,8 +293,9 @@ class task_collect(dongri_task):
|
|
return True
|
|
return True
|
|
|
|
|
|
class task_train(dongri_task):
|
|
class task_train(dongri_task):
|
|
- def __init__(self):
|
|
|
|
|
|
+ def __init__(self, force_lv1 = False):
|
|
super().__init__(f"检查训练")
|
|
super().__init__(f"检查训练")
|
|
|
|
+ self.force_lv1 = force_lv1
|
|
def run(self):
|
|
def run(self):
|
|
basic_operate.go_town()
|
|
basic_operate.go_town()
|
|
if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
|
|
if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
|
|
@@ -308,6 +309,13 @@ class task_train(dongri_task):
|
|
|
|
|
|
if waitClickImg_noWait_withBool(train_img.train, 2, 1):
|
|
if waitClickImg_noWait_withBool(train_img.train, 2, 1):
|
|
break
|
|
break
|
|
|
|
+
|
|
|
|
+ if self.force_lv1:
|
|
|
|
+ myTimeSleep_big()
|
|
|
|
+ yys_dragAuto(train_img.move_left)
|
|
|
|
+ yys_dragAuto(train_img.move_left)
|
|
|
|
+ waitClickImg_noWait_withBool(train_img.soilder_lv1, 2, 1)
|
|
|
|
+
|
|
return basic_operate.enter_auto_supply_resource(train_img.begin_train)
|
|
return basic_operate.enter_auto_supply_resource(train_img.begin_train)
|
|
|
|
|
|
class task_checkHelp(dongri_task):
|
|
class task_checkHelp(dongri_task):
|
|
@@ -436,7 +444,11 @@ class check_buildOrResearch(dongri_task):
|
|
print('没有找到建筑或研究')
|
|
print('没有找到建筑或研究')
|
|
return False
|
|
return False
|
|
elif dstType == 'build':
|
|
elif dstType == 'build':
|
|
|
|
+ buildtimes = 4
|
|
while basic_operate.enter_auto_supply_resource([check_img.upgrade_done, check_img.upgrade_done2, check_img.upgrade_done3, check_img.upgrade_next]):
|
|
while basic_operate.enter_auto_supply_resource([check_img.upgrade_done, check_img.upgrade_done2, check_img.upgrade_done3, check_img.upgrade_next]):
|
|
|
|
+ buildtimes -= 1
|
|
|
|
+ if buildtimes == 0:
|
|
|
|
+ break
|
|
continue
|
|
continue
|
|
elif dstType == 'research':
|
|
elif dstType == 'research':
|
|
if waitClickImg_withBool([check_img.research_type1, check_img.research_type2], 2, 1) == False:
|
|
if waitClickImg_withBool([check_img.research_type1, check_img.research_type2], 2, 1) == False:
|
|
@@ -452,15 +464,15 @@ class task_information(dongri_task):
|
|
super().__init__(f"检查情报")
|
|
super().__init__(f"检查情报")
|
|
def run(self):
|
|
def run(self):
|
|
basic_operate.go_outside()
|
|
basic_operate.go_outside()
|
|
- if waitClickImg_noWait_withBool(information_img.information, 2, 1) == False:
|
|
|
|
|
|
+ if waitClickImg_noWait_withBool(information_img.information, 1, 1) == False:
|
|
return False
|
|
return False
|
|
|
|
|
|
- if waitClickImg_noWait_withBool([information_img.hero0, information_img.hero1, information_img.hero2], 2, 1):
|
|
|
|
- if waitClickImg_noWait_withBool(information_img.gotosee, 2, 1) == False:
|
|
|
|
|
|
+ if waitClickImg_noWait_withBool([information_img.hero0, information_img.hero1, information_img.hero2], 0.5, 0.5):
|
|
|
|
+ if waitClickImg_noWait_withBool(information_img.gotosee, 1, 1) == False:
|
|
return False
|
|
return False
|
|
- if waitClickImg_noWait_withBool(information_img.explore, 2, 1) == False:
|
|
|
|
|
|
+ if waitClickImg_noWait_withBool(information_img.explore, 1, 1) == False:
|
|
return False
|
|
return False
|
|
- if waitClickImg_noWait_withBool(information_img.hero_fight, 2, 1) == False:
|
|
|
|
|
|
+ if waitClickImg_noWait_withBool(information_img.hero_fight, 1, 1) == False:
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
@@ -468,23 +480,23 @@ class task_information(dongri_task):
|
|
|
|
|
|
myTimeSleep_big()
|
|
myTimeSleep_big()
|
|
return True
|
|
return True
|
|
- elif waitClickImg_noWait_withBool([information_img.camp1, information_img.camp2], 2, 1):
|
|
|
|
- if waitClickImg_noWait_withBool(information_img.gotosee, 2, 1) == False:
|
|
|
|
|
|
+ elif waitClickImg_noWait_withBool([information_img.camp1, information_img.camp2], 0.5, 0.5):
|
|
|
|
+ if waitClickImg_noWait_withBool(information_img.gotosee, 1, 1) == False:
|
|
return False
|
|
return False
|
|
- if waitClickImg_noWait_withBool(information_img.survive, 2, 1) == False:
|
|
|
|
|
|
+ if waitClickImg_noWait_withBool(information_img.survive, 1, 1) == False:
|
|
return False
|
|
return False
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
return True
|
|
return True
|
|
- elif waitClickImg_noWait_withBool([information_img.wolf0, information_img.wolf1, information_img.wolf2], 2, 1):
|
|
|
|
- if waitClickImg_noWait_withBool(information_img.gotosee, 2, 1) == False:
|
|
|
|
|
|
+ elif waitClickImg_noWait_withBool([information_img.wolf0, information_img.wolf1, information_img.wolf2], 0.5, 0.5):
|
|
|
|
+ if waitClickImg_noWait_withBool(information_img.gotosee, 1, 1) == False:
|
|
return False
|
|
return False
|
|
- if waitClickImg_noWait_withBool(information_img.fight, 2, 1) == False:
|
|
|
|
|
|
+ if waitClickImg_noWait_withBool(information_img.fight, 1, 1) == False:
|
|
return False
|
|
return False
|
|
- if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
|
|
|
|
|
|
+ if waitClickImg_noWait_withBool(monster_img.line1, 1, 1) == False:
|
|
return False
|
|
return False
|
|
- if waitClickImg_withBool([monster_img.fight, monster_img.fight2], 2, 1) == False:
|
|
|
|
|
|
+ if waitClickImg_withBool([monster_img.fight, monster_img.fight2], 1, 1) == False:
|
|
return False
|
|
return False
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
waitClickImg_noWait(information_img.add_strength, 1, 1)
|
|
@@ -550,10 +562,11 @@ if __name__ == '__main__':
|
|
#task_train().run()
|
|
#task_train().run()
|
|
#task_information().run()
|
|
#task_information().run()
|
|
#check_buildOrResearch().run()
|
|
#check_buildOrResearch().run()
|
|
- task_checkDonata().run()
|
|
|
|
|
|
+ #task_checkDonata().run()
|
|
#task_collect(1).run()
|
|
#task_collect(1).run()
|
|
#task_collect(2).run()
|
|
#task_collect(2).run()
|
|
#task_collect(3).run()
|
|
#task_collect(3).run()
|
|
#task_collect(4).run()
|
|
#task_collect(4).run()
|
|
#task_returnAllLine().run()
|
|
#task_returnAllLine().run()
|
|
- #task_paticipateInTeam().run()
|
|
|
|
|
|
+ #task_paticipateInTeam().run()
|
|
|
|
+ task_train(True).run()
|