Exemplo n.º 1
0
        private void Debug_GiveRandomPokemon(bool egg)
        {
            (PBESpecies species, PBEForm form) = PBEDataProvider.GlobalRandom.RandomSpecies(true);
            PartyPokemon pkmn;

            if (egg)
            {
                pkmn = PartyPokemon.CreateDefaultEgg(species, form);
            }
            else
            {
                byte level = (byte)PBEDataProvider.GlobalRandom.RandomInt(PkmnConstants.MinLevel, PkmnConstants.MaxLevel);
                pkmn      = PartyPokemon.CreatePlayerOwnedMon(species, form, level);
                pkmn.Item = (ItemType)PBEDataProvider.GlobalRandom.RandomElement(PBEDataUtils.GetValidItems(pkmn.Species, pkmn.Form));
                pkmn.Debug_RandomizeMoves();
            }
            GivePokemon(pkmn);
        }
Exemplo n.º 2
0
        private static PartyPokemon GetTest(PBESpecies species, PBEForm form, byte level)
        {
            var pData = PBEPokemonData.GetData(species, form);
            var p     = new PartyPokemon
            {
                Status1          = PBEStatus1.Paralyzed,
                Moveset          = new Moveset(),
                Species          = species,
                Form             = form,
                Nickname         = PBELocalizedString.GetSpeciesName(species).English,
                Shiny            = PBEUtils.GlobalRandom.RandomShiny(),
                Level            = level,
                Item             = PBEUtils.GlobalRandom.RandomElement(PBEDataUtils.GetValidItems(species, form)),
                Ability          = PBEUtils.GlobalRandom.RandomElement(pData.Abilities),
                Gender           = PBEUtils.GlobalRandom.RandomGender(pData.GenderRatio),
                Nature           = PBEUtils.GlobalRandom.RandomElement(PBEDataUtils.AllNatures),
                EffortValues     = new EVs(),
                IndividualValues = new IVs()
            };

            p.SetMaxHP(pData);
            p.RandomizeMoves();
            return(p);
        }