Skip to content

Commit

Permalink
Merge pull request #296 from anthony5301/main
Browse files Browse the repository at this point in the history
Fix pick_augment did the exactly opposite thing in last change and add string error tolerance
  • Loading branch information
anthony5301 authored Feb 6, 2024
2 parents f231140 + ce2498e commit 1f3aabd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 9 additions & 8 deletions arena.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,15 @@ def pick_augment(self) -> None:
" [!] No priority or backup augment found, undefined behavior may occur for the rest of the round"
)

for augment in augments:
if augment in comps.AVOID_AUGMENTS:
mk_functions.left_click(
screen_coords.AUGMENT_LOC[augments.index(augment)].get_coords()
)
break
else:
mk_functions.left_click(screen_coords.AUGMENT_LOC[0].get_coords())
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()
)
break
else:
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"""
Expand Down
2 changes: 2 additions & 0 deletions comps.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
# No logic for certain augments meaning the bot won't know what to do if they are included in here
# (Anything that changes gameplay or adds something to the bench).
# The ones on the top will be prioritized for selection.
# For those augments names with suffixes like I, II, III, such as 'Cybernetic Uplink II',
# You only need to add 'Cybernetic Uplink' in the list to cover all three levels.
AUGMENTS: list[str] = [
"That's Jazz Baby!",
"You Have My Bow",
Expand Down

0 comments on commit 1f3aabd

Please sign in to comment.