After 3 hours of replaying this turns again and again, I beleive I have found it.ORIGINAL: Itdepends
Looks like it is something like that- the second and third replay appear to be the same.
There is one global variable that is not getting set for sub attacks under some conditions - it starts out as 0 when game is first started.
As save is played the value gets updated.
But the next loaded save is using the last value stored in that global variable. That variable is then changing the order randoms are being used between the two runs.
I have set the global value when sub attack first starts so it will be set no matter where it is to be used in the function.
And this seems to make the turns play out the same.