Beispiel #1
0
        public PKM ConvertToPKM(ITrainerInfo sav, EncounterCriteria criteria)
        {
            var pk = PKMConverter.GetBlank(Generation, Version);

            sav.ApplyTo(pk);

            ApplyDetails(sav, criteria, pk);
            return(pk);
        }
Beispiel #2
0
        public PKM ConvertToPKM(ITrainerInfo sav, EncounterCriteria criteria)
        {
            int gen     = Generation;
            var version = Version;
            var pk      = PKMConverter.GetBlank(gen, version);

            sav.ApplyTo(pk);

            pk.Species       = Species;
            pk.Nickname      = SpeciesName.GetSpeciesNameGeneration(Species, sav.Language, gen);
            pk.CurrentLevel  = Level;
            pk.Version       = (int)version;
            pk.Ball          = (int)Ball.Poke;
            pk.OT_Friendship = pk.PersonalInfo.BaseFriendship;

            int[] moves = SetEncounterMoves(pk, version);
            SetPINGA(pk, criteria);

            if (gen <= 2 && version != GameVersion.C)
            {
                return(pk);
            }

            SetMetData(pk);

            if (gen < 3)
            {
                return(pk);
            }

            if (gen >= 4)
            {
                pk.SetEggMetData(version, (GameVersion)sav.Game);
            }

            if (gen < 6)
            {
                return(pk);
            }
            if (gen == 6)
            {
                pk.SetHatchMemory6();
            }

            SetAltForm(pk, sav);

            pk.SetRandomEC();
            pk.RelearnMoves = moves;

            return(pk);
        }