Closed rand0mka closed 2 years ago
You're going too far. The bot is only meant to farm coins for upgrades, not fully play the game for you automatically. Unnecessary strain on the dev.
@T9es Ok, that's your opinion, but I think that it can increase speed of farming gold cards in pvp - so much gold in coop
I have thought about adding something like an auto leave based on your opponent/partner's units. Initially I wanted the bot to play support on like floor 10, and whenever you get a shaman mirror you pretty much always want to instantly leave. I haven't looked at it much because just having the bot solo floor 5 or 7 has been working well for me.
I think it would be relatively simple with a cropped icon of maybe just cultist/shaman in the opponents deck. Basically this region,
Just dropping that image in the icons folder should get the bot to scan for it every 8th merge loop and could exit the game then.
This is the part which restarts the game if the bot gets stuck in combat (or another user logs in). I don't know how exactly the 50 loops translates into time but if someone wants the bot to wait longer before trying to login again it can definitely be added to the config options. If you want to auto leave after a duration it would be just adding,
if combat>VALUE:
bot.restart_RR(quick_disconnect=True)
combat = 0
continue
After adding cultist to icons it should also be possible to add (output[0] == 'cultist.png').any(axis=None) and add that to the if statement.
I'll look into adding this when I have time.
I added a limit version of this in this commit
https://github.com/AxelBjork/Rush-Royale-Bot/commit/5e65be193fb01f79fd77ff2d6d8c5e59bbc29f8f
Setting require_shaman
to true in config.ini will make the bot autoleave any coop game where the opponent doesn't have shaman. max_loops
also allows you to increase/decrease the max number of loops in combat before leaving the game.
The rest is too niche of a use imo. Feel free to make your own modifications.
Idea for PVP mode - leave if opponent has cultist (variable) and battle continues more than 2 bosses.