How can I model armies attacking each other in an RTS?
I know how I would do it if it is an RPG game. Character has few stats that affect damage/defense and then compare it with enemy character and make calculations.
But what to do when you have an RTS game with lets say 3 kind of units (archers,knights,cavalry).
How would you do a calculation:
eg. 3 archers, 2 horsemen, 4 knights attack 3 knights and 5 horsemen?
One idea I had was to model units as having a certain amount of attack/defense against other units.
eg. Archer - 70% damage against knight, 10% defense against knight (90% damage against horseman (higher chance to hit bigger object)) (10% defense against horseman (if he comes closer))
Knight - 30% damage against archer, 20% defense against archer (50% damage against horseman, 40% defense against horseman)
Horsemen - 90% damage against archer, 20% defense against archer (70% damage against knight, 70% defense against knight)
In my game, players control armies (groups of units), which they send to attack enemy towns. At that point, I need to calculate how much damage the attacking army inflicted on the town (and vice-versa). I'm looking for some sort of formula or algorithm to help determine this.