The base game's AI has proven to cause enemies' turns to time-out relatively often, so this will be wonderful in addressing even just that.
If it's related to failing movement, it will probably help.
Elric will be testing with your scripting once I have this next patch uploaded, then
All right. He'll probably choose other test situations than I did. Will human or AI succeed?
I've made one little change to the script above. Just an adjustment in FindValidPosition for the temporary target (from 2.5 range to 4).
I'm uncertain if I should set the priorities of 'GetClose' and 'MoveItems' to 0 OnTurn. Not sure if it's needed to prevent characters from continuing actions they couldn't finish on their last turn (due to missing action points) although the situation was already solved by another character. And it would ensure that there's never an issue with unintentionally remaining priorities. If Elric observes behaviour of this kind, it should be added.