Esempio n. 1
0
        private static List <int>[] GetExclusiveMovesG1(int species1, int species2, IEnumerable <int> tmhm, IEnumerable <int> moves)
        {
            // Return from two species the exclusive moves that only one could learn and also the current pokemon have it in its current moveset
            var moves1 = MoveLevelUp.GetMovesLevelUp1(species1, 0, 1, 100);
            var moves2 = MoveLevelUp.GetMovesLevelUp1(species2, 0, 1, 100);

            // Remove common moves and remove tmhm, remove not learned moves
            var common    = new HashSet <int>(moves1.Intersect(moves2).Concat(tmhm));
            var hashMoves = new HashSet <int>(moves);

            moves1.RemoveAll(x => !hashMoves.Contains(x) || common.Contains(x));
            moves2.RemoveAll(x => !hashMoves.Contains(x) || common.Contains(x));
            return(new[] { moves1, moves2 });
        }
Esempio n. 2
0
        private static List <int> GetRequiredMoveCountLevel(PKM pk)
        {
            int species     = pk.Species;
            int basespecies = EvoBase.GetBaseSpecies(pk).Species;
            int maxlevel    = 1;
            int minlevel    = 1;

            if (species == (int)Species.Tangela) // Tangela moves before level 32 are different in RB vs Y
            {
                minlevel = 32;
                maxlevel = pk.CurrentLevel;
            }
            else if ((int)Species.NidoranF <= species && species <= (int)Species.Nidoking && pk.CurrentLevel >= 8)
            {
                maxlevel = 8; // Always learns a third move at level 8
            }

            if (minlevel > pk.CurrentLevel)
            {
                return(new List <int>());
            }

            return(MoveLevelUp.GetMovesLevelUp1(basespecies, 0, maxlevel, minlevel));
        }