The Bytecode Club

Full Version: Improvement in TH Attack module
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I got tired of the bugs in TH attack module and decided to try out my not used for 10 years programming brain.  

Rewrote the module with these updates:
1) BARCH troop placement is infinitely adjusted along the edge of the grass at positions closest to the TH using basic geometry and changes deployment edge based on quadrant location of the TH.
2) The troops are dispatched in 3 waves to trigger traps, with archers behind barbs for defense protection. Module can be adjusted manually and recompiled for more or less troops on TH, and then use excess on normal attack.
3) Troop drop location for waves 2 & 3 has adjustable spread in the on both sides of TH location, to better remove pesky trap tesla's.

Its working OK, tested by taking a TH6 (lvl3 troops) from silver 3 to gold 1, and couple of times on a TH8 (lvl5 troops) in masters. 

Like all code, still needs some improvement.

- The existing TH outside detection has not been updated, and is poor. It only checks position in the field and not the image for what is around TH. End up attacking many TH with walls or buildings in front of them.  This new attack strategy currently wins most of the time, unless there are more than 3-4 defenses protecting the TH from a BARCH attack.

- When the TH is located in the extreme right, left, or top corners it works well. BUT - When the TH is located at bottom center of the screen and troop deployment is below 547 pixels, the troops can't be deployed because the troop selection banner is in the way.  Just found out the root of the problem, and plan to add a skip if below X pixels in code, but then it misses a chance to attack an exposed TH.  The real fix is to change the zoom level, push the screen image up all the way and reprogram new coordinates. But if that is done, then it needs zoom back out for remaining troop attack to work correctly.  Its a lot of coding, but might work on this if I try later hacks at the code.

Since the development team is not using Github, I do not know how to share these changes.  
Please advise, post code here, Github, PM, or where?
Thanks in advance.

Shadehappy
nice...

Just post here .... everybody can pick it up, test and review.

Dev can include in the next version if it is good.
you can put in dropbox and share link here.
good job! please upload it.
Please post would be great (:
Just upload it to whatever site you prefer and post the link here.
so far all I see is members replying wanting the code, till a developer answers my question, I'll just wait.
If you note, a lot of folks post their mods here in the development section of the forum, which is exactly what it is for. You don't need developer permission to post code here in this section, this section is specifically for that purpose.
You could pm them with the link prior to posting it for permission. There was someone who posted version with a trojan a while back and they would probably appreciate it.
you don't need to wait. if you want to improve the project, just post the code here if there were no problem developers well add it to the bot.
[open source]
Pages: 1 2