Each unit has WT.
When you use an attack, your Max WT for that turn is calculated as follows: max{floor["Base WT of skill" x (100 - "AGL") x 100], 0}
In other words, take the base WT of the move, then take away AGL% and round down. If your value is lower than 0, your max WT for that turn is 0.
The starting Current WT for that turn is just the Max WT, but take away 10% if it's an Attack move in Attack formation, and 20% if it's a MGC move in Magic formation. Either way, round down to the nearest integer.
When your WT is 0, it's your turn. Unless another unit hits 0 at the same time. I believe that the enemy has priority, and that if two units on the same side both have 0, then it is decided differently for each side.
For you, I think (untested) that the priority goes to the first unit you picked for that battle, then the second.
For your opponent, I think (partially tested) that the priority goes in the order that they're stored in the RAM: 246 <-Back 135 <-Front
The enemy with the lowest number goes first.
~~~

|