Пример #1
0
        public PK1 convertToPK1()
        {
            PK1 pk1 = new PK1(null, Identifier, Japanese);

            Array.Copy(Data, 0x1, pk1.Data, 0x7, 0x1A);
            pk1.Species        = Species; // This will take care of Typing :)
            pk1.Stat_HPCurrent = Stat_HPCurrent;
            pk1.Stat_Level     = Stat_Level;
            // Status = 0
            Array.Copy(otname, 0, pk1.otname, 0, otname.Length);
            Array.Copy(nick, 0, pk1.nick, 0, nick.Length);

            int[] newMoves = pk1.Moves;
            for (int i = 0; i < 4; i++)
            {
                if (newMoves[i] > 165) // not present in Gen 1
                {
                    newMoves[i] = 0;
                }
            }
            pk1.Moves = newMoves;
            pk1.FixMoves();

            return(pk1);
        }
Пример #2
0
Файл: PK2.cs Проект: kwsch/PKHeX
        public PK1 convertToPK1()
        {
            PK1 pk1 = new PK1(null, Identifier, Japanese);
            Array.Copy(Data, 0x1, pk1.Data, 0x7, 0x1A);
            pk1.Species = Species; // This will take care of Typing :)
            pk1.Stat_HPCurrent = Stat_HPCurrent;
            pk1.Stat_Level = Stat_Level;
            // Status = 0
            Array.Copy(otname, 0, pk1.otname, 0, otname.Length);
            Array.Copy(nick, 0, pk1.nick, 0, nick.Length);

            int[] newMoves = pk1.Moves;
            for (int i = 0; i < 4; i++)
                if (newMoves[i] > 165) // not present in Gen 1
                    newMoves[i] = 0;
            pk1.Moves = newMoves;
            pk1.FixMoves();

            return pk1;
        }