Essentially some units, usually Super Units and Heroes, have the ability to use a "secondary" attack. For instance, the Persian Super Unit 1 "The Immortal" has a melee (spear) primary attack and a ranged (bow) secondary attack. What I suggest is that we use the 'Alt' key to toggle between attack typesThe ancient secondary attack, similar to Rome:Total War.or better said multiple attack, What we will need (that I can foresee) are these changes/features:patch.
Actor support for this. A way to dictate in the actor when to switch between animations and props for each attack type (I suspect very similar to the way we now tell the actor how to switch animations and props for various resource gathering methods)The core of this patch are the two following changes:
1) treat "Capture" as a damageType just as Hack and such.
Entity code support2) 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. A way to dictate in the unit's entity XML file the difference between the primary and secondary attacks (the statsThis would invalidate rP19528 (while it actually was done for this patch, as well as which attack is which)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.