Yes, it's a sad thing the scripting options are so limited.
For dominions 4, we should wish for the posibility to write complex scripts like pseudocode. Then it would be easy to for example:
Code:
start script "MyMage01"
if (distanceToNextEnemy < distanceToNextFriend) {
"here comes the anti-assasin script"
}
if ((round < 3) & (distanceToNextFriend < 6)) {
castSpell("Luck", gems=0, target HighHP first)
}
else use script "MyAttackMage01"
But as far as Dominions 3 goes, you just have to forget a bit, that the units are supposed to represent people and act like they are automatons, that perform actions based on what you tell them and some randomness but without intelligence.