Auto-translated
An idea for balancing the turn order of enemy units when their movement range is the same. (It is designed so that even in enemy armies, there will be the same unit with the same number of soldiers in it, or two identical units in one army.)
1. The unit with the naturally longer movement range goes first (i.e., as if without a hero). The influence of the terrain on which the battle takes place is taken into account (i.e., the bonus for fighting in the desert is not removed from nomads).
If, after point 1, the movement range of the units is still the same, then:
2. Units move in descending order: a) teleporting -> b) flying -> c) walking.
If, after point 2, the units have the same movement type, then:
3. Units of higher rank move.
If, after point 3, the units have the same rank, then:
4. The unit with the smallest number of soldiers moves (there are fewer of them, which means less time to change formation :).
If, after point 4, the number of units is the same, then:
5. The unit of the most experienced hero moves.
If, after point 5, the heroes have the same experience, then:
6. The unit of the attacking hero moves. And in one army, the unit that is closer to its hero goes first (if there are 2 or more identical units in the army) (it will hear the hero's order first :).
And for the entire army, there are 2 ways to calculate:
A. For all units, according to the above.
B. For the first unit, according to the above, and then alternate for different sides. (The fastest unit moves -> The fastest enemy unit -> The less fast unit -> The less fast enemy unit).
For this method, hypnosis and similar spells (including blindness) do not change the turn order.
I also suggest giving the Bastion's commander the Quicksand magic spell.