From 7d0a300bca8bde5c09a75b4783491c43280440f2 Mon Sep 17 00:00:00 2001 From: Enterly <36875936+anthony5301@users.noreply.github.com> Date: Thu, 8 Feb 2024 00:34:12 +0800 Subject: [PATCH 1/3] Fix avoid_augments in pick_augment brain dead yesterday, this is the real fix --- arena.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arena.py b/arena.py index b18a748..6fbc81d 100644 --- a/arena.py +++ b/arena.py @@ -467,15 +467,16 @@ def pick_augment(self) -> None: " [!] No priority or backup augment found, undefined behavior may occur for the rest of the round" ) - for potential in comps.AVOID_AUGMENTS: - for augment in augments: - if potential in augment: - mk_functions.left_click( - screen_coords.AUGMENT_LOC[augments.index(augment)].get_coords() - ) + for augment in augments: + found = False + for potential in comps.AVOID_AUGMENTS: + if SequenceMatcher(None, augment, potential).ratio() > 0.8: + found = True break - else: - mk_functions.left_click(screen_coords.AUGMENT_LOC[0].get_coords()) + if not found: + mk_functions.left_click(screen_coords.AUGMENT_LOC[augments.index(augment)].get_coords()) + return + mk_functions.left_click(screen_coords.AUGMENT_LOC[0].get_coords()) def check_health(self) -> None: """Checks if current health is below 30 and conditionally activates spam roll""" From c4806506f11ec925c645a89e3c5b958ee4f58852 Mon Sep 17 00:00:00 2001 From: Enterly <36875936+anthony5301@users.noreply.github.com> Date: Thu, 8 Feb 2024 00:37:06 +0800 Subject: [PATCH 2/3] Fix avoid_augments in pick_augment brain dead yesterday and made a wrong commit, this is the real fix --- arena.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arena.py b/arena.py index 6fbc81d..7219111 100644 --- a/arena.py +++ b/arena.py @@ -3,6 +3,7 @@ other variables used by the bot to make decisions """ +from difflib import SequenceMatcher from time import sleep import game_assets import mk_functions @@ -474,7 +475,9 @@ def pick_augment(self) -> None: found = True break if not found: - mk_functions.left_click(screen_coords.AUGMENT_LOC[augments.index(augment)].get_coords()) + mk_functions.left_click( + screen_coords.AUGMENT_LOC[augments.index(augment)].get_coords() + ) return mk_functions.left_click(screen_coords.AUGMENT_LOC[0].get_coords()) From 8786d6c72129cd22b97c48f0da6930f4eaca7ceb Mon Sep 17 00:00:00 2001 From: Enterly <36875936+anthony5301@users.noreply.github.com> Date: Thu, 8 Feb 2024 00:41:45 +0800 Subject: [PATCH 3/3] Fix avoid_augments in pick_augment brain dead yesterday and made a wrong commit, this is the real fix --- arena.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arena.py b/arena.py index 7219111..c16d597 100644 --- a/arena.py +++ b/arena.py @@ -3,7 +3,6 @@ other variables used by the bot to make decisions """ -from difflib import SequenceMatcher from time import sleep import game_assets import mk_functions @@ -471,7 +470,7 @@ def pick_augment(self) -> None: for augment in augments: found = False for potential in comps.AVOID_AUGMENTS: - if SequenceMatcher(None, augment, potential).ratio() > 0.8: + if potential in augment: found = True break if not found: