Open Baymax2909 opened 4 months ago
Hello... currently I stopped working on this since I don't play anymore...maybe in the future I'll add more things
How were you thinking this might be implemented?
Basically send the troops out when an attack is incoming and cancel the command after some time. The result will be, that the troops are not in town during the attack. I will come with some advanced ideas over the weekend. I also will do 1 or 2 PR with some changes I did by myself and I already have tested the last few weeks :)
This will be a complete new module, so before starting it might make sense to think about that is the goal:
So I found some time to get into detail on this topic. I have to say, that I personally only look at the perspectiv of an conquest player myself. I think on conqest the goal is to not fight with troops if there is no conquest-attack.
In my mind this module could iterate each town on an intervall X and add the town to an data storage if there is at least one attack. Then a second job iterates over this data storage and perform some actions to make sure, that the troops are not hit by the enemy attack. Some of my thoughts:
Activate the miliz if the attack hits in less then X time
Send (offensive | ground | sea | all) troops to a (own | friendly | random [maybe next door]) town on the same island (maybe this could be configured by the player because it depends on the playstyle and type (conquest, revo)
Abort the mission of troops in this way that they are back in the secondes after the attack
check runtime for each newly discovered attack (there are attack warns, so this should be possible) and somehow mark and store the attack when it is a conquest-attack
time offensive troops with backtiming at the seconde after the conquest-attack (relevant for conqest only, configure option or can the bot check with type of world we have? Maybe through academy?)
time defensive troops with backtiming at the seconde bevore the conqest-atttack
I will continue to think about it, but maybe you can add some thoughts to my points above? I can implement the logic by myself, I have difficulties to make the acutal calls towards grepo backend and fake them as a user input.
I thought about this and I don't really like it, here is why:
Currently the bot automatize what is boring and provide help to keep the account more organized and more efficient. I created the bot for this reason, remove the hassle of this boring stuff so that people can focus on the best aspects of the game.
This feature doesn't really match with that, It's part of the game that when you receive an attack there is a chance that you cannot join and therefore your troops can be smashed. This is what I like.
By adding this functionality, that part is lost, this might benefit you but also will damage you when the opponent uses it.
I'm more willing to add something that allow to plan tasks and they get executed at the right time. For example you receive an attack, you look the kind of attack and then schedule to remove the troop at time X, then the bot perform the action. This could be uses for defending as well.
Hide troops automatically when an attack is incoming.
When I would code a little bit better in JS I would do it by myself...