|
@@ -203,6 +203,49 @@ class dongri_task:
|
|
|
def run(self):
|
|
|
print(f"Running task: {self.name}")
|
|
|
|
|
|
+class task_fight_yongbing(dongri_task):
|
|
|
+ def __init__(self, add_strengh):
|
|
|
+ super().__init__("战斗佣兵")
|
|
|
+ self.add_strengh = add_strengh
|
|
|
+
|
|
|
+ def run(self):
|
|
|
+ basic_operate.go_outside()
|
|
|
+
|
|
|
+ if False == waitFindImg_withBool(monster_img.enough_strengh, 2, 1):
|
|
|
+ if self.add_strengh:
|
|
|
+ basic_operate.add_strength()
|
|
|
+ basic_operate.go_outside()
|
|
|
+ else:
|
|
|
+ print("没有足够的体力了")
|
|
|
+ return False
|
|
|
+
|
|
|
+ if waitClickImg_noWait_withBool(check_img.yongbing, 2, 1) == False:
|
|
|
+ return False
|
|
|
+ if waitClickImg_noWait_withBool(check_img.detect, 2, 1) == False:
|
|
|
+ return False
|
|
|
+
|
|
|
+ if waitClickImg_noWait_withBool(check_img.yongbing_fight, 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.all_select, 2, 1) == False:
|
|
|
+ return False
|
|
|
+ waitClickImg_noWait_withBool(monster_img.all_select, 2, 1)
|
|
|
+
|
|
|
+ maxTryTimes = 3
|
|
|
+ while maxTryTimes > 0:
|
|
|
+ maxTryTimes -= 1
|
|
|
+ waitClickImg_withBool([monster_img.fight, monster_img.fight2], 2, 1)
|
|
|
+ waitClickImg_noWait_withBool(monster_img.all_select, 2, 1)
|
|
|
+
|
|
|
+ return True
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
class task_fight_jina(dongri_task):
|
|
|
def __init__(self, add_strengh):
|
|
|
super().__init__("战斗吉娜")
|
|
@@ -431,6 +474,8 @@ class task_checkStoreRoom(dongri_task):
|
|
|
if waitClickImg_noWait_withBool((check_img.storeroom, check_img.invite_free), 2, 1) == False:
|
|
|
return False
|
|
|
|
|
|
+ pcacc_mouse.quickclick_current()
|
|
|
+
|
|
|
waitClickImg_noWait_withBool(check_img.store_strength, 2, 1)
|
|
|
return True
|
|
|
|
|
@@ -674,8 +719,9 @@ if __name__ == '__main__':
|
|
|
#basic_operate.add_strength()
|
|
|
#task_fightMonster(False, True).run()
|
|
|
#task_checkHelp().run()
|
|
|
- #task_checkStoreRoom().run()
|
|
|
- task_collect([4,3,2,1]).run()
|
|
|
+ task_checkStoreRoom().run()
|
|
|
+ #task_fight_yongbing(True).run()
|
|
|
+ #task_collect([4,3,2,1]).run()
|
|
|
#task_train().run()
|
|
|
#task_information().run()
|
|
|
#check_buildOrResearch().run()
|