I think you meant to link to the Ability Insight Document? Your link doesn't seem to work for me (but it is pretty easy to find with a search).
You're right that it's now possible to reverse engineer the abilities using the leaked debug symbols. If you dig down into the Thunder Clap ability, it has a function named "CompAI" that determines when the AI chooses to use Thunder Clap. However, this function is only called in two different cases: when the Hero takes damage, or when a nearby ally takes damage. So it appears the hero would not use Thunder Clap when attacking a passive enemy.
Once it gets into the CompAI function, Thunder Clap's logic works out like this:
- Check the "Allow Time" timer for the ability. This timer appears to prevent the AI from using the same ability again within 0.5 seconds, even if it has no cooldown.
- Check the cooldown of the ability, doing nothing if the ability is on cooldown.
- Count the number of units in the AOE of the ability and store them.
- If the Hero is under attack (basically, if CompAI was called from the hero itself taking damage):
- If the Hero's life is under the "DYING_HERO" threshold (which appears to be a constant of some sort, but doesn't seem to be used by any other abilities)
- If there are 2 or more ground enemies in the area (including buildings)
- CAST
- If there are 3 or more ground enemies in the area (not including buildings) AND there are more attacking enemies than there are allies in the area (not including enemy buildings)
- CAST