You can also stay in the castle; a bug occurs if you place the hero in the top slot in the city before the siege. I fixed the bug.
So, initiative changes at the beginning of the battle, and then it just plays out, as far as I understand from my observations.
If we are in the top slot (staying in the city, not sticking out of the castle), then it's somehow better for us. At least, I tried it several times, both ways, with the Engineer and with Gilva.
The Engineer starts moving before the ballista at the beginning of the battle, and in general, I arranged my units and made the initial moves in the same way, and depending on whether we are hidden in the castle or sticking out, the Engineer moves differently. I only managed to win without losses by staying deep inside the castle with a specific sequence of my moves. I don't know why this is happening; it seems like the game is just like that.
And this friend of mine is also doing well. If I stay in the castle, her catapult doesn't immediately destroy the wall; on the next turn, I eliminate her and the ballista. And I stay behind the walls. Plus, the storm wind, and her minions have to fly over the walls. The only problem is that she casts poison, and my unicorns can't handle it.
If I stick out of the castle, the catapult immediately breaks the gate and part of the wall, and the undead immediately rush in. I don't know yet if this is good or bad.
I'll probably wait for the next version of the map with fixes. As far as I understand, some of the nice little features will be removed, and I'm not sure if I'll be able to complete it with a hero; there's too much going on with the Necromancers.