예제 #1
0
        internal static EncounterStatic?GetStaticLocation(PKM pkm, int species = -1)
        {
            switch (pkm.GenNumber)
            {
            case 1:
                return(EncounterStatic7.GetVC1(species, pkm.Met_Level));

            case 2:
                return(EncounterStatic7.GetVC2(species, pkm.Met_Level));

            default:
                var dl = EvolutionChain.GetValidPreEvolutions(pkm, maxLevel: 100, skipChecks: true);
                return(GetPossible(pkm, dl).FirstOrDefault());
            }
        }
예제 #2
0
        internal static EncounterStatic7 GetVCStaticTransferEncounter(PKM pkm, IEncounterable enc)
        {
            var species = pkm.Species;
            var met     = pkm.Met_Level;

            if (pkm.VC1)
            {
                return(EncounterStatic7.GetVC1(species > MaxSpeciesID_1 ? enc.Species : species, met));
            }
            if (pkm.VC2)
            {
                return(EncounterStatic7.GetVC2(species > MaxSpeciesID_2 ? enc.Species : species, met));
            }

            // Should never reach here.
            throw new ArgumentException(nameof(pkm.Version));
        }