This is impossible in the way you describe it. However, there are other possibilities for restricting how many of each kind of unit you can field. As Azathoth says, we plan to restrict the units through the recruitment pools. To be precise, the replenishment of the pool.
Would the recruitment pools work for the AI as well?
It's extremely irritating coming up against stack after stack of Triarii when facing the Romani in EBI. If this could be fixed the gameplay would be greatly enhanced.
Bookmarks