Using the new <enhancements> feature I discovered a problem where if you refer to a unit in one <enhancement> and then again in another, the last <enhancement> read will only be applied. For example:
<enhancements>
<enhancement>
<affects>
<unit name="werewolf"/>
<unit name="werewolf_ravager"/>
<unit name="werewolf_reaper"/>
</affects>
<effects>
<static-modifiers>
<move-speed value="20"/>
</static-modifiers>
</effects>
</enhancement>
<enhancement>
<affects>
<unit name="werewolf_ravager"/>
</affects>
<effects>
<static-modifiers>
<attack-speed value="20"/>
</static-modifiers>
</effects>
</enhancement>
<enhancement>
<affects>
<unit name="werewolf_reaper"/>
</affects>
<effects>
<static-modifiers>
<attack-strength value="20"/>
</static-modifiers>
</effects>
</enhancement>
</enhancements>
In the xml above, all three werewolf units should get +20 to their move speed, then ravagers will also get +20 attack speed and reapers +20 attack damage. This is not the case however as ravagers only get their attack speed and reapers only get their attack damage where as the standard werewolves get the movement speed. To me it looks like its applying the upgrade to all three units, then overwriting the ravager upgrade with a new one and then the same with the reaper.
This xml fixes the problem:
<enhancements>
<enhancement>
<affects>
<unit name="werewolf"/>
</affects>
<effects>
<static-modifiers>
<move-speed value="20"/>
</static-modifiers>
</effects>
</enhancement>
<enhancement>
<affects>
<unit name="werewolf_ravager"/>
</affects>
<effects>
<static-modifiers>
<move-speed value="20"/>
<attack-speed value="20"/>
</static-modifiers>
</effects>
</enhancement>
<enhancement>
<affects>
<unit name="werewolf_reaper"/>
</affects>
<effects>
<static-modifiers>
<move-speed value="20"/>
<attack-strength value="20"/>
</static-modifiers>
</effects>
</enhancement>
</enhancements>
With this, I have instead defined the upgrade for each unit separately.
I'm not sure if this is a bug or intentional as it could be quite useful for large upgrades to have enhancements that overwrite previous enhancements. Perhaps add a flag of some kind like: <enhancement overwrite="true">
Edit by Omega: Renamed thread "[To Hard?]" -> "[Too Hard?]" (hurt my eyes)