Teach AI about using new heroes

In the beginning, heroes had one of three kinds of attacks:

  1. All targets (AoE)
  2. Single target
  3. Single target with minor to nearby (Splash)

The AI clearly chooses a single target of greatest interest, and aims the special or slash attack there. If the target is in the #1 or #5 slot, that wastes one of the splashes, but achieves the objective of hitting the most important target hardest.

Enter Falcon, followed by several other heroes, with a new kind of attack:
4. Hit target and nearby (Hit-3).

With a Hit-3 special, if the target is in #1, and there are also heroes in #2 and #3, then #2 should be targeted. Likewise if the target is in #5, and there are also heroes in #4 and #3, then #4 should be targeted. This strategy does just as much damage to the target as aiming directly at the target, but it also hits the tank.

This change seems like a straightforward addition of about 8 lines of code in the AI that would make heroes like Gravemaker, Thoth, and Falcon more effective on defense.

A second area where the AI is stupid is using the new “extra damage against [element]” feature of some HotM’s specials. I’m always amazed and grateful when an opposing Natalya fires at, say, Magni instead of Alberich, throwing away the “extra damage against Nature”. Whatever calculation the AI is making about who to target should be updated to consider the elemental match of these specials.