This one took a LOT of effort to resolve to some semblance of a satisfactory situation. I don't think it was an infinite loop but I think it was that the turn would've taken a very very very long time to resolve and may be causing a timeout somewhere in the operating system. Still takes a LONG time but not nearly as long. I advise turning on the ability to at least watch the battle as you wait. And give it some minutes to process when it gets to thinking through the odds of the battle being victorious.
I may well have fixed a lot here thanks to this, including a bug that may have kept a lot of rational attacks on cities from taking place due to the need to simply tear through a sufficient amount of the stack to get it done.
The battle, by the way, is absolutely EPIC! I would almost suggest posting this save in a hall of fame somewhere so that anyone can open it up and watch how this plays out. Over 600 units attacking over 100 units in the city. I won't tell you how it pans out but it's a pretty close call and a few decisions made before hitting end-turn would mean the random seed would be altered and that could change the whole outcome.
Amazing. What's more amazing is that the system can now get through the turn and hasn't sacrificed all that much in numeric evaluatory accuracy to do so. There's a few shortcuts like this but for the most part, a few huge volumes of redundant heavy processing checks were able to be eliminated and that did the trick.
There may well have been an infinite loop in there but it would be impossible to say since one loop alone would take hours to get through on the debug dll.
This turn takes about an hour to process on a normal dll as it is but I think it's worth the wait considering the epic clash it represents and that's the reason for the great turn time. It may process quicker if you don't watch the fight - but not nearly as entertaining
Update the SVN and do a recalc first then you are good to go.
Thanks for the challenge!