Skip to content

Commit 6a4c3a1

Browse files
committed
feat: randomize champ selection
1 parent c3f3bfc commit 6a4c3a1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lolbot/bot/bot.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ def accept_match(self) -> None:
193193
def champ_select(self) -> None:
194194
"""Handles the Champ Select Lobby."""
195195
log.info("Locking in champ")
196-
champ_index = -1
197196
logged = False
198197
while True:
199198
try:
@@ -205,8 +204,8 @@ def champ_select(self) -> None:
205204
for action in data["actions"][0]:
206205
if action["actorCellId"] == data["localPlayerCellId"]:
207206
if action["championId"] == 0: # No champ hovered. Hover a champion.
208-
champ_index += 1
209-
self.api.hover_champion(action["id"], champ_list[champ_index])
207+
champ = random.choice(champ_list)
208+
self.api.hover_champion(action["id"], champ)
210209
elif not action["completed"]: # Champ is hovered but not locked in.
211210
self.api.lock_in_champion(action["id"], action["championId"])
212211
else: # Champ is locked in. Nothing left to do.

0 commit comments

Comments
 (0)