Unfortunately I don't know the exact math. In the TAS, anything that can happen can be manipulated to happen so I was concerned with if it
could happen. I was also concerned with approximately how likely it was so I could have an idea of how many delay frames I might expect to get. Odds were a secondary concern.
If you want to try to reverse engineer the math, you can find all my scripts and understanding of the RAM
here
Specifically
these ram addresses
They show that there are 8 battle slots that are rolled at the beginning of the round. Once set, they stay that way for the entirety of the round. Agility of the characters/enemies absolutely is a factor. It's possible the enemies have other factors that force some odds.
The way I tested what was possible was by getting to a specific point with a savestate, stopping my movie, setting up and running
this
I'd be happy to work with you on how to use this script.