/// <summary>
 /// Transforms into <paramref name="target"/> and sets <see cref="PBEStatus2.Transformed"/>.
 /// </summary>
 /// <param name="target">The Pokémon to transform into.</param>
 /// <remarks>Frees the Pokémon of its <see cref="ChoiceLockedMove"/>.</remarks>
 public void Transform(PBEPokemon target)
 {
     if (Team != target.Team)
     {
         KnownAbility = target.KnownAbility = Ability = target.Ability;
         KnownType1   = target.KnownType1 = Type1 = target.Type1;
         KnownType2   = target.KnownType2 = Type2 = target.Type2;
         KnownWeight  = target.KnownWeight = Weight = target.Weight;
     }
     else
     {
         Ability      = target.Ability;
         KnownAbility = target.KnownAbility;
         Type1        = target.Type1;
         KnownType1   = target.KnownType1;
         Type2        = target.Type2;
         KnownType2   = target.KnownType2;
         Weight       = target.Weight;
         KnownWeight  = target.KnownWeight;
     }
     KnownGender       = target.KnownGender = target.Gender;
     KnownShiny        = target.KnownShiny = target.Shiny;
     KnownSpecies      = target.KnownSpecies = Species = target.Species;
     Attack            = target.Attack;
     Defense           = target.Defense;
     SpAttack          = target.SpAttack;
     SpDefense         = target.SpDefense;
     Speed             = target.Speed;
     AttackChange      = target.AttackChange;
     DefenseChange     = target.DefenseChange;
     SpAttackChange    = target.SpAttackChange;
     SpDefenseChange   = target.SpDefenseChange;
     SpeedChange       = target.SpeedChange;
     AccuracyChange    = target.AccuracyChange;
     EvasionChange     = target.EvasionChange;
     PreTransformMoves = (PBEMove[])Moves.Clone();
     PreTransformPP    = (byte[])PP.Clone();
     PreTransformMaxPP = (byte[])MaxPP.Clone();
     for (int i = 0; i < Team.Battle.Settings.NumMoves; i++)
     {
         if (Team != target.Team)
         {
             KnownMoves[i] = target.KnownMoves[i] = Moves[i] = target.Moves[i];
         }
         else
         {
             Moves[i]      = target.Moves[i];
             KnownMoves[i] = target.KnownMoves[i];
         }
         if (Id != byte.MaxValue) // Don't set PP if this is a client's unknown remote Pokémon
         {
             PP[i] = MaxPP[i] = (byte)(Moves[i] == PBEMove.None ? 0 : PBEMoveData.Data[Moves[i]].PPTier == 0 ? 1 : Team.Battle.Settings.PPMultiplier);
         }
     }
     if (!Moves.Contains(ChoiceLockedMove))
     {
         ChoiceLockedMove = PBEMove.None;
     }
     Status2 |= PBEStatus2.Transformed;
 }