The ancient secondary attack, or better said multiple attack, patch.
The core of this patch are the two following changes:
1) treat "Capture" as a damageType just as Hack and such.
2) Merge the different AttackTypes of the attack template into one, and allowing any number of them. With that comes a way to choose between the attackTypes for attacks triggered by losRangeQueries from the unitAI, this is achieved by a DPS/range calculation.
The two things above give the way to handle multiple attacks from the sim and gui, however I am not happy with the way currently commands are handled (neither the AI or players'), the way that is here implemented (with the prefAttackTypes) hardcode the attackTypes too much. In order to fix this one could think of making two arguments ("capture" and "projectile") which will prefer/exclude attackType that can/can't capture or have/haven't a projectile. This would invalidate rP19528 (while it actually was done for this patch, time has changed some ideas...) However if there are some other suggestion I am very open to those.
This patch gives the persian champion as a test case.