Today I've spent some time making this intermediately impressive turn-based battle example.
It supports infinite number of unit "teams", configurable properties, inheritance, and more.
Built-in system will also attempt to reduce chances of developer (you) accidentally messing up something.
And there's easily configurable AI built-in too.
Overall, I somewhat got carried away while making original example, which was planned just include turns with unit selection.