From ffabd8cb9247012feeb13819dbd5aba20bb0dee7 Mon Sep 17 00:00:00 2001 From: "firedcto@gmail.com" Date: Fri, 27 Dec 2024 17:13:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=90=AF=E5=8A=A8=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main_debug.py | 2 +- requirements.txt | 2 +- src/task/BaseCombatTask.py | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/main_debug.py b/main_debug.py index fb3fcde..b4bf265 100644 --- a/main_debug.py +++ b/main_debug.py @@ -1,6 +1,6 @@ if __name__ == '__main__': from config import config - from ok.OK import OK + from ok import OK config = config config['debug'] = True diff --git a/requirements.txt b/requirements.txt index 14bea15..6fae401 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,7 +29,7 @@ numpy==1.26.4 # openvino # rapidocr-openvino # shapely -ok-script==0.0.412 +ok-script==0.0.413 # via -r .\requirements.in opencv-contrib-python==4.10.0.84 # via -r .\requirements.in diff --git a/src/task/BaseCombatTask.py b/src/task/BaseCombatTask.py index a66c757..0e7608f 100644 --- a/src/task/BaseCombatTask.py +++ b/src/task/BaseCombatTask.py @@ -26,7 +26,7 @@ class CharDeadException(NotInCombatException): key_config_option = ConfigOption('Game Hotkey Config', { - 'HotKey Verify': True, + 'HotKey Verify': False, 'Echo Key': 'q', 'Liberation Key': 'r', 'Resonance Key': 'e', @@ -45,6 +45,7 @@ class BaseCombatTask(CombatCheck): self.combat_start = 0 self.char_texts = ['char_1_text', 'char_2_text', 'char_3_text'] + self.add_text_fix({'E':'e'}) def send_key_and_wait_animation(self, key, check_function, total_wait=7, enter_animation_wait=0.7): start = time.time() @@ -303,11 +304,11 @@ class BaseCombatTask(CombatCheck): if not self.key_config['HotKey Verify'] or force: resonance_key = self.ocr(0.82, 0.92, 0.85, 0.96, match=re.compile(r'^[a-zA-Z]$'), threshold=0.8, - name='resonance_key', use_grayscale=True) + name='resonance_key',log=True) echo_key = self.ocr(0.88, 0.92, 0.90, 0.96, match=re.compile(r'^[a-zA-Z]$'), threshold=0.8, - name='echo_key') + name='echo_key',log=True) liberation_key = self.ocr(0.93, 0.92, 0.96, 0.96, match=re.compile(r'^[a-zA-Z]$'), threshold=0.8, - name='liberation_key') + name='liberation_key',log=True) keys_str = str(resonance_key) + str(echo_key) + str(liberation_key) if echo_key: