As part of a GSoC proposal I added a new aspect so a scenario editor can control advancements in two ways:
1. Define a aspect with a string-value like "Swordsman, Knight", so the units of interesst will always advance to this
2. Use the LUA-Engine and return a function of the form advance(x, y) which will itself return a string-value
like "Swordsman, Knight". Everytime a ai-unit advances advance(x, y) will be called.
The corresponding wikipage (http://wiki.wesnoth.org/AiWML) is going to be updated soon.
If set, AI leaders do not move to the closest keep at the beginning of
the turn. Instead, they participate in the move_to_targets candidate
action (and all other CAs in which they already participated anyway,
of course). The default value is 'no', which leaves the default
behavior unchanged.