moj0 / lor-bot Goto Github PK
View Code? Open in Web Editor NEWBot for Legends of Runeterra
License: MIT License
Bot for Legends of Runeterra
License: MIT License
Several keyerrors, I believe due to new cards in game.
When one of my cards was stunned the bot was trying to play it till the round ran out of time.
It attempts to download the cards then crashes, closes. itself
The beginning loop now does not exit out of the victory screen for AI battles, since the bot is using preset x,y values it should be an easy fix to add an extra couple of values for the bot to click on when the match ends.
Hi, nice bot you made I like it, but it's best use would just be farming xp in AI games overnight for cards, now it plays decent enough with a suggested deck but it has a major flaw. Since card data is static it has a big problem with defending against units that don't have fearsome/elusive as a keyword by default but they get it from some effect. This causes the bot to get stuck in a loop of just attempting to place a unit to block it, and the msg this unit can't be blocked being played on repeat. I spent a lot of time with your bot and that is #1 point of failure. Since AI games don't have time limits for your turn it just bricks the bot.
I'm not the best with python, so I'm just gonna throw my suggestion and ask you to help me make it work for me.
Fix 1. When it's players turn, if more than x time passes just pass the turn. 3-5 minutes would be okay.
Fix 2. Just never block. If you don't plan to implement a way to pass to prevent the loop, can you please help me just make it so that AI just never places any units to block?
I'm now getting this issue any help?
Apoligies I'm very new to this I downloaded ecerything made sure the prereqs were done properly but when I try to run it I get the errno2 error any advice?
Instructions were followed exactly and yet the mana issue still happens randomly.
second after a game ends the bot will randomly not understand that it has ended and get stuck in the screen with the play button visible but not continue
Mojo added on discord - pengy
Hi, first of all thank you for making this.
I have trouble getting the bot to run past the select a deck part. I tried both in PVP and noPVP mode.
The bot selects the deck and launches the game just fine. But then I run into one of these issues (I don't know what causes the one or the other):
-Either the bot moves the cursor to the center of the screen when the mulligan screen appears, then stops doing anything. In the console it repeats "Unknown mana..." over and over.
-Or, the bot repeats the movements to select a deck and launch a game, even though the game has already been launched. In the console it repeats "Selecting deck..." over and over.
In any case I have not been able to go past the mulligan screen with the bot... Do you know what is going wrong ?
Hi, I was wondering if there would be a simple code change so the bot would choose the VS AI instead of play. Even If I manually click on vs ai for the first game, afterwards it goes back again to choose play.
Nvm , I am an idiot. Just saw the closed issue
the edit to 261 did not fix the issue
Hello!
Overall the bot works fine for me, except for when it plays a spell that needs a target (e.g. an ally).
The cursor just sits on the middle of the screen and doesnt choose any target.
Everything about the bot other than passing turn works well, when it runs out of moves it throws the "06IO014" card set error. This doesn't always happen however, and in the beginning of a game it often times doesn't throw any error, and just stalls, making me think the two issues are unrelated. I have deleted the card_sets folder and re downloaded, as well as making sure I have all dependencies installed. Unfortunately this bot is useless without the ability to pass turns. It still maintains the ability to pass after blockers and attacking.
Hello, I've got the program up and running but just can't seem to find how to solely play against bots? In the instructions it says to run "python LOR_Bot.py noPVP" but I'm unable to find out how.
Bot Always put my 2/3 (stats) to block Fearsome Enemy Card
Not an issue. More like a discussion. Just want to know what decks you guys are using.
Any recommended standard deck?
Also.. maybe not be a bad idea if we can have a discord channel to discuss the deck, an improvement on the bot, etc.
Thanks for making this bot works. Helps a ton
"Unknown mana..." whatever my video resolution setting is
Hello everybody,
first of all, thanks for creating this piece of code!
I'm having a lot of fun developing new "automated" strategies and decks.
I've had a look at the code but I don't see any nexus health acknowledgment function:
this would be very useful to recognize lethal situations in which to try to defend yourself by blocking with all your mobs or to make an open attack / decimate only when strictly necessary;
do you plan to develop this feature?
I'd like to help out but I guess there's screen recognition involved again and I'd need to practice a little :)
requests.get("https://dd.b.pvp.net/latest/set1/en_us/data/set1-en_us.json")
Sometimes the bot is running fine but after 2-3 or even 5 games the cmd is spammed with unknown mana is that something that should happen?
pls update
Bot is fine on selecting a deck but after it select the deck and game starts it just stops here, it was working fine before though.
PS C:\LoR-Bot> python .\LOR_Bot.py
PvP Mode
SELECTING DECK NOW!
SELECTING DECK NOW!
Unknown mana...
Unknown mana...
Unknown mana...
Exception in thread Thread-1 (run):
Traceback (most recent call last):
File "C:\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Python311\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "C:\LoR-Bot\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:\LoR-Bot\StateMachine.py", line 78, in get_game_info
self.game_state = self._get_game_state(self.frames, image)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\LoR-Bot\StateMachine.py", line 151, in _get_game_state
self._get_deck_type()
File "C:\LoR-Bot\StateMachine.py", line 204, in _get_deck_type
self.deck = tuple(self.all_cards[cardCode] for cardCode, num_cards in self.cards_data["CardsInDeck"].items()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\LoR-Bot\StateMachine.py", line 204, in <genexpr>
self.deck = tuple(self.all_cards[cardCode] for cardCode, num_cards in self.cards_data["CardsInDeck"].items()
~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: '06PZ007'
Hey, I just wanted to ask if you are looking for fellow contributors. I find your project incredibly interesting and would love to work on it!
If yes, feel free to hmu on discord at: Mustasz#1138
first of all thanks for the bot.
please add a logic in the 'download_card_sets.py' file.
add '(http://dd.b.pvp.net/latest/set6cde/en_us/data/set6cde-en_us.json)' to 'card_sets'.
'cde'
The bot always tries to play The Harrowing on mana 6, even though it's not possible to do so (It costs 10 mana since patch 3.16). It then abruptly ends the turn without doing anything, wasting all its mana and eventually losing the game.
first of all thanks for the bot , the problem is after join a game , i get the error " unknow mana " and the bot just afking not playing , how can i fix that ?
Keep getting a key error after one battle. It doesn't autoplay anymore. You need to update the code.
When Enemy Freeze Card Before Battle . Bot did't care 0 atk then Bot put 0 atk to battle board
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.