Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor target selection to fix bugs and improve performance #314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

welwood08
Copy link

  • Fixes incorrectly using "displayed HP" which can be higher than real HP due to easing effect.
  • Fixes incorrectly choosing last spawner below %hp threshold when spawner with lower %hp exists.
  • Fixes incorrectly choosing last creep below %hp threshold when creep with lower %hp exists.
  • Fixes incorrectly choosing lane with highest (or equal highest) raining gold but no enemies when enemies (even bosses and treasures!) still alive in other lanes.
  • Fixes failing to choose highest raining gold lane when a spawner is alive with 100%hp in the same position in every lane and no other enemies exist.
  • Fixes failing to choose highest raining gold lane when a creep is alive with 100%hp in the same position in every lane and no other enemies exist.
  • Improves function performance more than 60% on average, sometimes up to 97%, by removing all the tightly nested loops and all the looping over the same things several times.

@welwood08 welwood08 force-pushed the fix-target-selection branch 3 times, most recently from 08f9ce4 to 41f32df Compare June 20, 2015 10:04
@welwood08
Copy link
Author

I believe this also fixes the need to buy 1 auto-cannon before lane switching works, but that may have come in with rebasing on newer code.

…rmance (the horrors of so many tightly nested loops)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant