Skip to content

Commit

Permalink
hotfix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
AcademicDog committed Jul 11, 2019
1 parent 8fdb201 commit fdcd74e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

# 点击结算
Expand Down
6 changes: 3 additions & 3 deletions fighter_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions fighter_passenger.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def start(self):
'''单人御魂乘客'''
# 设定点击疲劳度
mood2 = utilities.Mood()
mood3 = utilities.Mood(3)
mood3 = utilities.Mood()

# 战斗主循环
while True:
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion game_ctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions single_fight.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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

# 点击结算
Expand Down

0 comments on commit fdcd74e

Please sign in to comment.