Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoubin-me committed Oct 23, 2021
1 parent 6ee8877 commit d48d7a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Binary file modified imgs/teleport.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions lushi.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,19 +231,24 @@ def run(self):
pyautogui.click(rect[0]+self.start_game_relative_loc[0], rect[1]+self.start_game_relative_loc[1])
continue

if 'surprise' in states and 'surprise_collected' not in states:
if 'surprise' in states and 'surprise_collected' in states:
surprise_loc = states['surprise'][0]
pyautogui.moveTo(surprise_loc)
pyautogui.click(clicks=2, interval=0.25)
surprise_collected_conf = states['surprise_collected'][1]
if surprise_collected_conf < 0.85:
pyautogui.moveTo(surprise_loc)
pyautogui.click(clicks=2, interval=0.25)

if 'map_not_ready' in states:
if 'surprise' in states:
surprise_loc = states['surprise'][0]
if surprise_loc is not None:
if surprise_loc[0] < self.start_point_relative_loc[0] + rect[0]:
side = 'left'
else:
side = 'right'

else:
side = 'right'
side = 'left'
side_loc = self.locs[side]
for loc in side_loc:
pyautogui.moveTo(loc[0] + rect[0], loc[1] + rect[1])
Expand Down Expand Up @@ -271,6 +276,7 @@ def find_icon_and_click_loc(self, icon, lushi, image):

def main():
pyautogui.confirm(text="请启动炉石,将炉石调至窗口模式,分辨率设为1600x900,画质设为高,语言设为简体中文; 程序目前只支持三个场上英雄,请确保上场英雄不会死且队伍满6人,否则脚本可能会出错;请参考config.txt修改配置文件")

with open('config.txt', 'r', encoding='utf-8') as f:
lines = f.readlines()

Expand Down

0 comments on commit d48d7a6

Please sign in to comment.