Skip to content

Commit

Permalink
Improve encounter round shop delay
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony5301 authored Apr 3, 2024
1 parent d6a0b14 commit c33fbc6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 33 deletions.
4 changes: 3 additions & 1 deletion arena.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,13 @@ def spend_gold(self, speedy=False) -> None:
mk_functions.reroll()
print(" Rerolling shop")
shop: list = arena_functions.get_shop()
print(f" Shop: {shop}")

# For set 11 encounter round shop delay and choose items popup
for _ in range(15):
if speedy:
return
if all(champ[1] == "" for champ in shop):
print(" Waiting encounter round animation ends")
sleep(1)
anvil_msg: str = ocr.get_text(
screenxy=screen_coords.ANVIL_MSG_POS.get_coords(),
Expand All @@ -377,6 +377,7 @@ def spend_gold(self, speedy=False) -> None:
whitelist=ocr.ALPHABET_WHITELIST,
)
if anvil_msg in ["ChooseOne", "Feelinglucky"]:
sleep(2)
print(" Choosing item")
mk_functions.left_click(screen_coords.BUY_LOC[2].get_coords())
sleep(1.5)
Expand All @@ -386,6 +387,7 @@ def spend_gold(self, speedy=False) -> None:
else:
break

print(f" Shop: {shop}")
for champion in shop:
if (
self.champs_to_buy.get(champion[1], -1) >= 0
Expand Down
63 changes: 31 additions & 32 deletions comps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,66 @@
Team composition used by the bot
Comps come from https://tftactics.gg/tierlist/team-comps
Items are in camel case and a-Z
The "headliner" tag represents a trait from bottom to top.
Set to True if you want it in your team.
Only final comp champion will become headliner and need to set the corresponding 'headliner' tag to True.
e.g. Only want "Sentinel" Ekko, set it to "headliner": [True, False, False]
e.g.2 want either "Sentinel" or "True Damage" Ekko, set it to "headliner": [True, False, True]
Items will be placed on the top champion first, and prioritize building items on the left.
"""

COMP = {
"Irelia": {
"Tristana": {
"board_position": 6,
"items": ["GiantSlayer", "GuinsoosRageblade", "InfinityEdge"],
"items": ["GuinsoosRageblade", "InfinityEdge", "LastWhisper"],
"level": 3,
"final_comp": True
},
"Galio": {
"board_position": 25,
"items": ["BrambleVest", "DragonsClaw", "WarmogsArmor"],
"Volibear": {
"board_position": 27,
"items": ["Bloodthirster", "TitansResolve", "WarmogsArmor"],
"level": 3,
"final_comp": True
},
"Sivir": {
"board_position": 5,
"Irelia": {
"board_position": 0,
"items": ["GiantSlayer", "GuinsoosRageblade", "InfinityEdge"],
"level": 2,
"final_comp": True
},
"Zoe": {
"board_position": 4,
"items": ["JeweledGauntlet","RabadonsDeathcap","SpearofShojin"],
"Wukong": {
"board_position": 22,
"items": ["HandofJustice"],
"level": 2,
"final_comp": True
},
"Illaoi": {
"board_position": 23,
"items": ["BrambleVest", "DragonsClaw", "WarmogsArmor"],
"LeeSin": {
"board_position": 25,
"items": [],
"level": 2,
"final_comp": True
},
"Zyra": {
"board_position": 1,
"items": [],
"Diana": {
"board_position": 26,
"items": ["BrambleVest", "DragonsClaw", "WarmogsArmor"],
"level": 2,
"final_comp": True
},
"Riven": {
"board_position": 27,
"items": ["ThiefsGloves"],
"Qiyana": {
"board_position": 24,
"items": [],
"level": 2,
"final_comp": True
},
"Garen": {
"board_position": 21,
"Darius": {
"board_position": 23,
"items": [],
"level": 2,
"final_comp": True
},
"Kobuko": {
"board_position": 22,
"Yorick": {
"board_position": 20,
"items": [],
"level": 2,
"final_comp": False
},
"Teemo": {
"board_position": 13,
"Yasuo": {
"board_position": 19,
"items": [],
"level": 2,
"final_comp": False
Expand All @@ -78,7 +74,9 @@
# 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!",
"Tiny but Deadly",
"Pumping up",
"Extended Duel",
"You Have My Bow",
"Blistering Strikes",
"Buried Treasures",
Expand Down Expand Up @@ -133,7 +131,8 @@
"Scapegoat",
"Wandering Trainer",
"Recombobulator",
"Forge"
"Forge",
"Crest Test Dummies"
]


Expand Down

0 comments on commit c33fbc6

Please sign in to comment.