Skip to content

Commit

Permalink
Merge pull request #295 from anthony5301/main
Browse files Browse the repository at this point in the history
Update pick_augment function to avoid changing board
  • Loading branch information
anthony5301 authored Feb 3, 2024
2 parents 6b6e1bf + bed101b commit f231140
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
13 changes: 11 additions & 2 deletions arena.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def buy_xp_round(self) -> None:
mk_functions.buy_xp()

def pick_augment(self) -> None:
"""Picks an augment from user defined augment priority list or defaults to first augment"""
"""Picks an augment from user defined augment priority list or defaults to the augment that not in AVOID list"""
while True:
sleep(1)
augments: list = []
Expand Down Expand Up @@ -461,11 +461,20 @@ def pick_augment(self) -> None:
mk_functions.left_click(screen_coords.AUGMENT_ROLL[i].get_coords())
self.augment_roll = False
self.pick_augment()
return

print(
" [!] No priority or backup augment found, undefined behavior may occur for the rest of the round"
)
mk_functions.left_click(screen_coords.AUGMENT_LOC[0].get_coords())

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())

def check_health(self) -> None:
"""Checks if current health is below 30 and conditionally activates spam roll"""
Expand Down
10 changes: 10 additions & 0 deletions comps.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@
"Axiom Arc",
]

AVOID_AUGMENTS: list[str] = [
"Stationary Support",
"Escort Quest",
"Scapegoat",
"AFK",
"Recombobulator",
"Blank Slate",
"Forge"
]


def champions_to_buy() -> dict:
"""Creates a list of champions to buy during the game"""
Expand Down

0 comments on commit f231140

Please sign in to comment.