When enemy's move: Ally Switch takes effect in double battle, the target of my moves will some times goes wrong.
It makes it possible for me to attack the original target after Ally Switch takes effect.
For example, my enemy sends out Arceus and Shedinja, I send out Regigigas and Gardevoir. All pixelmons are at level 100, random ivs, without any evs. Gardevoir can only use Confusion, Regigigas can only use Crush Grip, as well as Arceus can only use Tackle, Shedinja can only use Ally Switch.
The first round I take Shedinja as my target and let my Gardevoir use Confusion, Regigigas use Crush Grip. My enemy's Arceus uses Tackle while the Shedinja uses Ally Switch. My moves hit Arceus afer my opponent's Ally Switch, everything goes well.
The second round I take Arceus as my target and use the same moves as round 1, my enemy's Arceus uses Tackle and the Shedinja uses Ally Switch. My moves should hit Shedinja, but they hit Arceus instead.
It seems to be a logic issue, not a big problem. Hope that you can solve it breezily :)