コード例 #1
0
ファイル: PCBoxes.cs プロジェクト: Kermalis/PokemonGameEngine
 public int Add(PartyPokemon pkmn)
 {
     for (int i = 0; i < PkmnConstants.NumBoxes; i++)
     {
         if (_boxes[i].Add(pkmn))
         {
             return(i);
         }
     }
     return(-1);
 }
コード例 #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);
        }
コード例 #3
0
 public DaycarePokemon(PartyPokemon pkmn)
 {
     Pkmn = new BoxPokemon(pkmn);
 }