MOj0/LoR-Bot

Code doesn't work anymore after Runeterra patch 3.14 release

Closed this issue · 3 comments

Keep getting a key error after one battle. It doesn't autoplay anymore. You need to update the code.

MOj0 commented

Hi, try deleting the card_sets folder, it will then download all the card sets again (might take a while), but at that point it should work.

I did as you suggested. It didn't work, getting the same error. I am pasting the error that is shown on the console:

Thinking about mulligan...
Confirming mulligan
Exception in thread Thread-1 (run):
Traceback (most recent call last):
File "C:\Users\Name\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\Name\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "C:\Riot Games\LoR-Bot-master\LoR-Bot-master\Bot.py", line 52, in run
self.game_state, self.cards_on_board, self.deck_type, self.n_games, self.games_won = self.state_machine.get_game_info()
File "C:\Riot Games\LoR-Bot-master\LoR-Bot-master\StateMachine.py", line 76, in get_game_info
self._get_cards_on_board()
File "C:\Riot Games\LoR-Bot-master\LoR-Bot-master\StateMachine.py", line 116, in _get_cards_on_board
c = self.all_cards[card_code]
KeyError: '06FR004'

This is from another game:

Thinking about mulligan...
Confirming mulligan
Playing card: InGameCard(Card(Shadow Fiend (1) T: Unit A: 4 H: 3) -- top_center:((1129, 19)); is_local:True)
to be spawned: 0
spawn on attack: 0
Playing card: InGameCard(Card(Soul Shepherd (2) T: Unit A: 2 H: 3) -- top_center:((623, 18)); is_local:True)
Playing card: InGameCard(Card(Darkwater Scourge (3) T: Unit A: 5 H: 5) -- top_center:((959, 23)); is_local:True)
Exception in thread Thread-1 (run):
Traceback (most recent call last):
File "C:\Users\Name\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\Name\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "C:\Riot Games\LoR-Bot-master\LoR-Bot-master\Bot.py", line 52, in run
self.game_state, self.cards_on_board, self.deck_type, self.n_games, self.games_won = self.state_machine.get_game_info()
File "C:\Riot Games\LoR-Bot-master\LoR-Bot-master\StateMachine.py", line 76, in get_game_info
self._get_cards_on_board()
File "C:\Riot Games\LoR-Bot-master\LoR-Bot-master\StateMachine.py", line 116, in _get_cards_on_board
c = self.all_cards[card_code]
KeyError: '06SH005'

Basically, I can only run 1 game. Maybe something in the new patch broke your code.

MOj0 commented

So normally new expansions should be handled and the bot should download new card sets, except Riot decided to do a little trolling (second time this has happend IIRC). What happened was, instead of naming their new set set7 (last one was set6), they named it set6cde for some reason. I've added it manually, so it works now, just make sure to pull the latest commit. Also for future reference, I'm downloading card sets from here under the Set Bundles section.