adamqqqplay / dota2ai

Ranked Matchmaking AI: An improved Dota2 AI based on Valve's default AI. Has more than 3 million subscribers on Steam.
http://steamcommunity.com/sharedfiles/filedetails/?id=855965029
GNU General Public License v3.0
310 stars 85 forks source link

Fix skywrath mage error when rooted / ancient seal when retreating #107

Closed JoshdanG closed 1 year ago

JoshdanG commented 1 year ago
  1. Fixes skywrath runtime errors, and skywrath will now cast ancient seal at the most dangerous enemy when retreating. a. When considering ancient seal during retreat, the range calculation was wrong, and had a negative range unless movement speed was 0.
    b. When this happened (e.g. when rooted), it returned all nearby enemies instead of one target, causing an error (and preventing any ability use).
  2. Moved GetMostDangerousEnemy to a separate function since it is used in two places.
  3. Added comments with ability names