What happens when a Ditto battles against his second opponent after transformed to first one in GYM?

Here is the relevant portion of Niantic's Ditto announcement:

Ditto is also a unique Pokémon when you interact with Gyms. When training or battling at a Gym, Ditto will copy the appearance, types, and moves of the first Pokémon it sees, and it will stay that way through the remainder of those Gym battles.


Ditto will not transform anymore after it uses the "transform" attack unless it transformed into another ditto, which still have the "transform" attack. Defending dittos can use the "struggle" special attack with 5 special attack meters, but not for the attackers. The attacking struggle was changed and it costs no energy.

Tags:

Pokemon Go