Skip to content

Commit

Permalink
差分宇宙-新增自动战斗
Browse files Browse the repository at this point in the history
fix: 模拟宇宙-战斗失败
  • Loading branch information
CHNZYX committed Aug 29, 2024
1 parent 4c7f84d commit c047030
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 3 additions & 4 deletions diver.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def loop(self):
area_text = self.clean_text(self.ts.ocr_one_row(self.screen, [50, 350, 3, 35]), char=0)
if '位面' in area_text or '区域' in area_text or '第' in area_text:
self.area()
elif self.check("c", 0.9417, 0.1204, threshold=0.965):
self.press('v')
else:
text = self.merge_text(self.ts.find_with_box([400, 1920, 100, 600], redundancy=0))
if self.speed and '转化' in text and '继续战斗' not in text and ('数据' in text or '过量' in text):
Expand Down Expand Up @@ -730,10 +732,7 @@ def area(self):
self.portal_opening_days(static=1)
elif area_now == '首领':
if self.floor == 13 and self.area_state > 0:
if config.weekly_mode:
self.portal_opening_days(aimed=1)
else:
self.close_and_exit()
self.close_and_exit()
self.end_of_uni()
return
if self.area_state == 0:
Expand Down
Binary file added imgs/fail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion simul.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def route(self):
if self._stop:
break
self.get_screen()
#self.click_target('imgs/huangquan.jpg',0.9,True) # 如果需要输出某张图片在游戏窗口中的坐标,可以用这个
# self.click_target('imgs/fail.jpg',0.9,True) # 如果需要输出某张图片在游戏窗口中的坐标,可以用这个
"""
if begin and not self.check("f", 0.4437,0.4231) and not self.check("abyss/1",0.8568,0.6769):
begin = 0
Expand Down Expand Up @@ -708,6 +708,9 @@ def normal(self):
self.click((self.tx,self.ty))
time.sleep(1)
return 0
elif self.check("fail", 0.6276, 0.0843):
self.click((self.tx, self.ty))
time.sleep(1.8)
else:
return 0
return 1
Expand Down

0 comments on commit c047030

Please sign in to comment.