@ilteroi, can you give us a little rundown on the function?
Should be just levels, since it is "getLevel()"
Should we separately measure the value of each promotion? Although measuring levels is close enough, various promotions aren't exactly equal in worth. For a level 4 unit, it could either be:
- Archer: 3 Volley + Range
- Archer: 2 Barrage + 2 Defense
How quantifiable is promotions such as "Logistic" (Attack twice) and "2 Cover"? Should we give an exact value to these promotions? Or should we use it to multiply the iPower score (calculated by base combat strength and levels)?
With reference to ilteroi and Omen_Of_Peace 's model and considering only one unit, should we get something like this?
- Spearman (11) x Level 4 (1.36) x Stalwart (1.2)
- Spearman (11) x Level 4 (1.36) x Cover (1.1) x Cover(1.1)
As can be seen in this example, Stalwart and cover have situational use. Covers are available eariler and good against ranged units but does not aid melee defense. Stalwart on the other hand is more well-rounded, provide defense to all attacks and give 1 more level or Drill. Maybe also separately consider the "Shock" or "Drill" promotions?
The issue with hardcoding promotions like that is its not very flexible for mod mods and the like. For example, one of the reasons that G likes the happiness system is its flexibility if other people change elements of the game. I think the same would apply here, you wouldn't want the power coding to go nuts just because someone change some promotions with a mod mod.