0
0
mirror of https://github.com/ok-oldking/ok-wuthering-waves.git synced 2025-06-03 09:25:19 +00:00

转圈搜索使用A+视角重置替换WASD

鸣潮的A和D并不是径直左右走,而是边走边以每秒10°向左/右偏。按此方法WASD循环会导致轨迹逐渐右偏,搜索范围分布不均。这个PR改用A+鼠标中键重置视角,保证转向均为90°且每段轨迹为直线。
This commit is contained in:
NBOOK 2024-09-16 04:38:02 -04:00 committed by GitHub
parent 7b6de7745d
commit 5bf6c00536
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,8 +78,8 @@ class BaseCombatTask(BaseWWTask, FindFeature, OCR, CombatCheck):
self.sleep(0.2)
def run_in_circle_to_find_echo(self, circle_count=3):
directions = ['w', 'a', 's', 'd']
step = 1.2
directions = ['w', 'w', 'w', 'w']
step = 0.8
duration = 0.8
total_index = 0
for count in range(circle_count):
@ -92,6 +92,15 @@ class BaseCombatTask(BaseWWTask, FindFeature, OCR, CombatCheck):
if picked:
self.mouse_up(key="right")
return True
self.sleep(0.1)
self.send_key_down('a')
self.sleep(0.01)
self.send_key_up('a')
self.sleep(0.1)
self.middle_click()
self.sleep(1)
total_index += 1
def switch_next_char(self, current_char, post_action=None, free_intro=False, target_low_con=False):