From fdcd74e019688cfe13457e1c75332d0af506455c Mon Sep 17 00:00:00 2001 From: YangHu Date: Thu, 11 Jul 2019 15:26:40 +0800 Subject: [PATCH] hotfix #5 --- README.md | 4 +++- explore.py | 4 ++-- fighter_driver.py | 6 +++--- fighter_passenger.py | 6 +++--- game_ctl.py | 2 +- single_fight.py | 6 +++--- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 481f832..2123854 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,9 @@ v1.0.0.0625--增加了UI,目前在ui分支中。 v1.0.0.0707--根据[#4](https://github.com/AcademicDog/onmyoji_bot/issues/4),调整了UI设计。 -v1.0.0.0710--增加了单人探索的代码 +v1.0.0.0710--增加了单人探索的代码。 + +v1.0.0.0711--根据[#5](https://github.com/AcademicDog/onmyoji_bot/issues/5),调整了结算的点击周期和结算时间。 # 协议 (License) diff --git a/explore.py b/explore.py index ad90890..f4466ce 100644 --- a/explore.py +++ b/explore.py @@ -111,8 +111,8 @@ def fight_moster(self, mood1, mood2): # 在战斗结算页面 self.yys.mouse_click_bg(utilities.firstposition()) start_time = time.time() - while time.time() - start_time <= 10: - if(self.yys.wait_game_img('img\\YING-BING.png', mood2.get1mood()/1000, False)): + while time.time() - start_time <= 12: + if(self.yys.wait_game_img('img\\YING-BING.png', mood2.get1mood()/2000, False)): break # 点击结算 diff --git a/fighter_driver.py b/fighter_driver.py index f2a2809..c7ac8a9 100644 --- a/fighter_driver.py +++ b/fighter_driver.py @@ -15,7 +15,7 @@ def start(self): # 设定点击疲劳度 mood1 = utilities.Mood() mood2 = utilities.Mood() - mood3 = utilities.Mood(3) + mood3 = utilities.Mood() # 战斗主循环 self.yys.wait_game_img('img\\KAI-SHI-ZHAN-DOU.png') @@ -45,8 +45,8 @@ def start(self): # 在战斗结算页面 self.yys.mouse_click_bg(utilities.firstposition()) start_time = time.time() - while time.time() - start_time <= 10: - if(self.yys.wait_game_img('img\\KAI-SHI-ZHAN-DOU.png', mood3.get1mood()/1000, False)): + while time.time() - start_time <= 12: + if(self.yys.wait_game_img('img\\KAI-SHI-ZHAN-DOU.png', mood3.get1mood()/2000, False)): self.log.writeinfo('Driver: in team') break diff --git a/fighter_passenger.py b/fighter_passenger.py index 0774e03..ee80d4e 100644 --- a/fighter_passenger.py +++ b/fighter_passenger.py @@ -14,7 +14,7 @@ def start(self): '''单人御魂乘客''' # 设定点击疲劳度 mood2 = utilities.Mood() - mood3 = utilities.Mood(3) + mood3 = utilities.Mood() # 战斗主循环 while True: @@ -31,9 +31,9 @@ def start(self): # 在战斗结算页面 self.yys.mouse_click_bg(utilities.firstposition()) start_time = time.time() - while time.time() - start_time <= 10: + while time.time() - start_time <= 12: # 检测是否回到队伍中 - if(self.yys.wait_game_img('img\\LI-KAI-DUI-WU.png', mood3.get1mood()/1000, False)): + if(self.yys.wait_game_img('img\\LI-KAI-DUI-WU.png', mood3.get1mood()/2000, False)): self.log.writeinfo('Passenger: in team') break diff --git a/game_ctl.py b/game_ctl.py index b6309b8..64e9379 100644 --- a/game_ctl.py +++ b/game_ctl.py @@ -311,7 +311,7 @@ def find_game_img(self, img_path, part=0, pos1=None, pos2=None): :param part=0: 是否全屏查找,0为否,其他为是 :param pos1=None: 欲查找范围的左上角坐标 :param pos2=None: 欲查找范围的右下角坐标 - :param return: 查找成功返回True,否则返回False + :param return: 查找成功返回找到的坐标,否则返回False ''' self.rejectbounty() maxVal, maxLoc = self.find_img(img_path, part, pos1, pos2) diff --git a/single_fight.py b/single_fight.py index de076c5..56a947e 100644 --- a/single_fight.py +++ b/single_fight.py @@ -15,7 +15,7 @@ def start(self): '''单人战斗主循环''' mood1 = utilities.Mood() mood2 = utilities.Mood() - mood3 = utilities.Mood(3) + mood3 = utilities.Mood() while True: # 在御魂主选单,点击“挑战”按钮, 需要使用“阵容锁定”! self.yys.wait_game_img('img\\TIAO-ZHAN.png') @@ -36,8 +36,8 @@ def start(self): # 在战斗结算页面 self.yys.mouse_click_bg(utilities.firstposition()) start_time = time.time() - while time.time() - start_time <= 10: - if(self.yys.wait_game_img('img\\TIAO-ZHAN.png', mood3.get1mood()/1000, False)): + while time.time() - start_time <= 12: + if(self.yys.wait_game_img('img\\TIAO-ZHAN.png', mood3.get1mood()/2000, False)): break # 点击结算