Skip to content

Commit

Permalink
encounter round shop delay and choose items popup
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony5301 authored Mar 26, 2024
1 parent c952df9 commit 45355e7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions arena.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def fix_bench_state(self) -> None:
)
self.champs_to_buy[champ_name] -= 1
else:
print(
f" The unknown champion {champ_name} not exists in comps, seeling it."
)
self.bench[index] = "?"
continue
if isinstance(slot, str) and not bench_occupied[index]:
Expand Down Expand Up @@ -360,6 +363,25 @@ def spend_gold(self, speedy=False) -> None:
print(" Rerolling shop")
shop: list = arena_functions.get_shop()
print(f" Shop: {shop}")

# For set 11 encounter round shop delay and choose items popup
if shop == [(1,""), (2,""), (3,""), (4,""), (5,"")]:
if speedy:
return
sleep(10)
anvil_msg: str = ocr.get_text(
screenxy=screen_coords.ANVIL_MSG_POS.get_coords(),
scale=3,
psm=7,
whitelist=ocr.ALPHABET_WHITELIST,
)
if anvil_msg == "ChooseOne":
print(" Choosing item")
mk_functions.left_click(screen_coords.BUY_LOC[2].get_coords())
sleep(1)
self.spend_gold(True)
return

for champion in shop:
if (
self.champs_to_buy.get(champion[1], -1) >= 0
Expand Down

0 comments on commit 45355e7

Please sign in to comment.