Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Improvement in TH Attack module
#1
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
Reply
#2
nice...

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

Dev can include in the next version if it is good.
Reply
#3
you can put in dropbox and share link here.
If I helped you in some way, I woud Appreciate it if you gave me a Reputation. Smile
Reply
#4
good job! please upload it.
Reply
#5
Please post would be great (:
Reply
#6
Just upload it to whatever site you prefer and post the link here.
Reply
#7
so far all I see is members replying wanting the code, till a developer answers my question, I'll just wait.
Reply
#8
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.
Reply
#9
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.
Reply
#10
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]
Reply
 


Forum Jump:


Users browsing this thread: 2 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website