예제 #1
0
        private static IEnumerable <int> getMachineMoves(int species, int formnum)
        {
            PersonalInfo pkXY  = PersonalXY[PersonalXY[species].FormeIndex(species, formnum)];
            PersonalInfo pkAO  = PersonalAO[PersonalAO[species].FormeIndex(species, formnum)];
            List <int>   moves = new List <int>();

            moves.AddRange(TMHM_XY.Where((t, i) => pkXY.TMHM[i]));
            moves.AddRange(TMHM_AO.Where((t, i) => pkAO.TMHM[i]));
            return(moves);
        }
예제 #2
0
        private static int[] getMachineMoves(int species)
        {
            PersonalInfo pkXY  = PersonalXY[species];
            PersonalInfo pkAO  = PersonalAO[species];
            List <int>   moves = new List <int>();

            moves.AddRange(TMHM_XY.Where((t, i) => pkXY.TMHM[i]));
            moves.AddRange(TMHM_AO.Where((t, i) => pkAO.TMHM[i]));
            return(moves.ToArray());
        }
예제 #3
0
파일: Core.cs 프로젝트: 0ver-flow/PKHeX
        private static IEnumerable <int> getMoves(int species, int lvl, int form, bool ORASTutors, int Version, bool LVL, bool Tutor, bool Machine)
        {
            List <int> r = new List <int> {
                0
            };

            if (Version < 0 || Version == 0)
            {
                int          index = PersonalTable.XY.getFormeIndex(species, form);
                PersonalInfo pi    = PersonalTable.XY.getFormeEntry(species, form);

                if (LVL)
                {
                    r.AddRange(LevelUpXY[index].getMoves(lvl));
                }
                if (Tutor)
                {
                    r.AddRange(getTutorMoves(species, form, ORASTutors));
                }
                if (Machine)
                {
                    r.AddRange(TMHM_XY.Where((t, m) => pi.TMHM[m]));
                }
            }
            if (Version < 0 || Version == 1)
            {
                int          index = PersonalTable.AO.getFormeIndex(species, form);
                PersonalInfo pi    = PersonalTable.AO.getFormeEntry(species, form);

                if (LVL)
                {
                    r.AddRange(LevelUpAO[index].getMoves(lvl));
                }
                if (Tutor)
                {
                    r.AddRange(getTutorMoves(species, form, ORASTutors));
                }
                if (Machine)
                {
                    r.AddRange(TMHM_AO.Where((t, m) => pi.TMHM[m]));
                }
            }
            return(r);
        }
예제 #4
0
        private static IEnumerable <int> getMoves(PKM pkm, int species, int lvl, int form, bool moveTutor, GameVersion Version, bool LVL, bool specialTutors, bool Machine, int Generation, bool MoveReminder)
        {
            List <int> r = new List <int>();

            var ver = Version;

            switch (Generation)
            {
            case 6:
                switch (ver)
                {
                case GameVersion.Any:         // Start at the top, hit every table
                case GameVersion.X:
                case GameVersion.Y:
                case GameVersion.XY:
                {
                    int          index = PersonalTable.XY.getFormeIndex(species, form);
                    PersonalInfo pi    = PersonalTable.XY.getFormeEntry(species, form);

                    if (LVL)
                    {
                        r.AddRange(LevelUpXY[index].getMoves(lvl));
                    }
                    if (moveTutor)
                    {
                        r.AddRange(getTutorMoves(pkm, species, form, specialTutors));
                    }
                    if (Machine)
                    {
                        r.AddRange(TMHM_XY.Where((t, m) => pi.TMHM[m]));
                    }

                    if (ver == GameVersion.Any)         // Fall Through
                    {
                        goto case GameVersion.ORAS;
                    }
                    break;
                }

                case GameVersion.AS:
                case GameVersion.OR:
                case GameVersion.ORAS:
                {
                    int          index = PersonalTable.AO.getFormeIndex(species, form);
                    PersonalInfo pi    = PersonalTable.AO.getFormeEntry(species, form);

                    if (LVL)
                    {
                        r.AddRange(LevelUpAO[index].getMoves(lvl));
                    }
                    if (moveTutor)
                    {
                        r.AddRange(getTutorMoves(pkm, species, form, specialTutors));
                    }
                    if (Machine)
                    {
                        r.AddRange(TMHM_AO.Where((t, m) => pi.TMHM[m]));
                    }
                    break;
                }
                }
                break;

            case 7:
                switch (ver)
                {
                case GameVersion.Any:
                case GameVersion.SN:
                case GameVersion.MN:
                case GameVersion.SM:
                {
                    int          index = PersonalTable.SM.getFormeIndex(species, form);
                    PersonalInfo pi    = PersonalTable.SM.getFormeEntry(species, form);
                    if (MoveReminder)
                    {
                        lvl = 100;         // Move reminder can teach any level in movepool now!
                    }
                    if (LVL)
                    {
                        r.AddRange(LevelUpSM[index].getMoves(lvl));
                    }
                    if (moveTutor)
                    {
                        r.AddRange(getTutorMoves(pkm, species, form, specialTutors));
                    }
                    if (Machine)
                    {
                        r.AddRange(TMHM_SM.Where((t, m) => pi.TMHM[m]));
                    }
                    break;
                }
                }
                break;

            default:
                return(r);
            }
            return(r);
        }