mirror of
https://github.com/ok-oldking/ok-wuthering-waves.git
synced 2025-06-03 09:25:19 +00:00
修复F2打不开书
修复boss传送不了
This commit is contained in:
parent
777f295aa1
commit
1f2de04f01
@ -281,8 +281,8 @@ class BaseChar:
|
||||
self.logger.info(f'click_liberation end {duration}')
|
||||
return clicked
|
||||
|
||||
def add_freeze_duration(self, start, duration=-1, freeze_time=0.1):
|
||||
if duration == -1:
|
||||
def add_freeze_duration(self, start, duration=-1.0, freeze_time=0.1):
|
||||
if duration < 0:
|
||||
duration = time.time() - start
|
||||
if start > 0 and duration > freeze_time:
|
||||
current_time = time.time()
|
||||
|
@ -24,10 +24,11 @@ class Camellya(BaseChar):
|
||||
self.logger.error('wait wait_resonance_not_gray timed out')
|
||||
|
||||
def do_perform(self):
|
||||
if self.has_intro:
|
||||
self.continues_normal_attack(1.2)
|
||||
self.click_liberation()
|
||||
i = 0
|
||||
start_con = self.get_current_con()
|
||||
if start_con < 0.8:
|
||||
if start_con < 0.82:
|
||||
loop_time = 1.1
|
||||
else:
|
||||
loop_time = 4.1
|
||||
@ -46,19 +47,19 @@ class Camellya(BaseChar):
|
||||
loop_time = 1
|
||||
budding_start_time = time.time()
|
||||
start_con = current_con
|
||||
if self.resonance_available():
|
||||
self.send_resonance_key(interval=0.1)
|
||||
if self.get_current_con() < 0.7 and not budding:
|
||||
# self.task.screenshot(f'camellya_fast_end_{self.get_current_con()}')
|
||||
if self.click_liberation():
|
||||
pass
|
||||
elif self.click_resonance(send_click=False)[0]:
|
||||
if self.get_current_con() < 0.82 and not budding:
|
||||
self.click_echo()
|
||||
return self.switch_next_char()
|
||||
else:
|
||||
self.click(interval=0.1)
|
||||
self.task.next_frame()
|
||||
i += 1
|
||||
self.check_combat()
|
||||
if budding:
|
||||
self.click_resonance()
|
||||
self.click_echo()
|
||||
# self.task.screenshot(f'camellya_end_{self.get_current_con()}')
|
||||
self.switch_next_char()
|
||||
|
||||
# def handle_budding(self):
|
||||
|
@ -349,7 +349,11 @@ class BaseWWTask(BaseTask, FindFeature, OCR):
|
||||
self.log_info(f'teleport to {boss_name} index {index} in_dungeon {in_dungeon}')
|
||||
self.sleep(1)
|
||||
self.log_info('click f2 to open the book')
|
||||
self.send_key('f2')
|
||||
self.send_key_down('alt')
|
||||
self.sleep(0.1)
|
||||
self.click_relative(0.77, 0.05)
|
||||
self.send_key_up('alt')
|
||||
# self.send_key('F2')
|
||||
gray_book_boss = self.wait_book()
|
||||
if not gray_book_boss:
|
||||
self.log_error("can't find gray_book_boss, make sure f2 is the hotkey for book", notify=True)
|
||||
@ -377,19 +381,25 @@ class BaseWWTask(BaseTask, FindFeature, OCR):
|
||||
self.wait_in_team_and_world(time_out=120)
|
||||
|
||||
def click_traval_button(self):
|
||||
if self.find_one(['fast_travel_custom', 'remove_custom', 'gray_teleport'], threshold=0.6):
|
||||
self.click_relative(0.91, 0.92, after_sleep=1)
|
||||
if self.wait_click_feature(['confirm_btn_hcenter_vcenter', 'confirm_btn_highlight_hcenter_vcenter'],
|
||||
relative_x=-1, raise_if_not_found=False,
|
||||
threshold=0.7,
|
||||
time_out=4):
|
||||
self.wait_click_feature(['confirm_btn_hcenter_vcenter', 'confirm_btn_highlight_hcenter_vcenter'],
|
||||
relative_x=-1, raise_if_not_found=False,
|
||||
threshold=0.7,
|
||||
time_out=1)
|
||||
if feature := self.find_one(['fast_travel_custom', 'remove_custom', 'gray_teleport'], threshold=0.6):
|
||||
if feature.name == 'gray_teleport':
|
||||
if not self.wait_click_feature('custom_teleport_hcenter_vcenter', raise_if_not_found=False, time_out=2):
|
||||
self.click_relative(0.5, 0.5)
|
||||
self.wait_click_feature('gray_custom_way_point', raise_if_not_found=True)
|
||||
self.sleep(1)
|
||||
self.click_relative(0.91, 0.92, after_sleep=1)
|
||||
return True
|
||||
else:
|
||||
return True
|
||||
self.click_relative(0.91, 0.92, after_sleep=1)
|
||||
if self.wait_click_feature(['confirm_btn_hcenter_vcenter', 'confirm_btn_highlight_hcenter_vcenter'],
|
||||
relative_x=-1, raise_if_not_found=True,
|
||||
threshold=0.7,
|
||||
time_out=4):
|
||||
self.wait_click_feature(['confirm_btn_hcenter_vcenter', 'confirm_btn_highlight_hcenter_vcenter'],
|
||||
relative_x=-1, raise_if_not_found=False,
|
||||
threshold=0.7,
|
||||
time_out=1)
|
||||
return True
|
||||
elif btn := self.find_one('gray_teleport', threshold=0.7):
|
||||
return self.click_box(btn, relative_x=1)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user