Esempio n. 1
0
 /// <summary>
 /// Set Moves, EVs and Items for a specific PKM. These should not affect legality after being vetted by GeneratePKMs
 /// </summary>
 /// <param name="pk">PKM to modify</param>
 /// <param name="set">Showdown Set to refer</param>
 public static void SetMovesEVsItems(this PKM pk, ShowdownSet set)
 {
     pk.SetMoves(set.Moves, true);
     pk.CurrentFriendship = set.Friendship;
     if (pk is IAwakened pb7)
     {
         pb7.SetSuggestedAwakenedValues(pk);
     }
     else
     {
         pk.EVs = set.EVs;
         pk.ApplyHeldItem(set.HeldItem, set.Format);
         var la = new LegalityAnalysis(pk);
         if (la.Parsed && !pk.WasEvent)
         {
             pk.SetRelearnMoves(la.GetSuggestedRelearnMoves());
         }
     }
 }