Esempio n. 1
0
 public BoxPokemon(PartyPokemon other)
 {
     IsEgg            = other.IsEgg;
     PID              = other.PID;
     Pokerus          = new Pokerus(other.Pokerus);
     OT               = other.OT;
     MetLocation      = other.MetLocation;
     MetLevel         = other.MetLevel;
     MetDate          = other.MetDate;
     Species          = other.Species;
     Form             = other.Form;
     Gender           = other.Gender;
     Nickname         = other.Nickname;
     Shiny            = other.Shiny;
     Level            = other.Level;
     EXP              = other.EXP;
     Friendship       = other.Friendship;
     CaughtBall       = other.CaughtBall;
     Item             = other.Item;
     AbilType         = other.AbilType;
     Ability          = other.Ability;
     Nature           = other.Nature;
     Moveset          = new BoxMoveset(other.Moveset);
     EffortValues     = other.EffortValues;
     IndividualValues = other.IndividualValues;
 }
Esempio n. 2
0
 public Moveset(BoxMoveset other)
 {
     _slots = new MovesetSlot[PkmnConstants.NumMoves];
     for (int i = 0; i < _slots.Length; i++)
     {
         _slots[i] = new MovesetSlot(other[i]);
     }
 }
        private void TeachNewMoves()
        {
            var lvlUpData = new LevelUpData(Pkmn.Species, Pkmn.Form);

            PBEMove[]  newMoves = lvlUpData.GetNewMoves(Pkmn.Level).Reverse().Take(PkmnConstants.NumMoves).ToArray();
            BoxMoveset moveset  = Pkmn.Moveset;

            for (int i = 0; i < newMoves.Length; i++)
            {
                int firstEmpty = moveset.GetFirstEmptySlot();
                BoxMoveset.BoxMovesetSlot slot;
                if (firstEmpty != -1)
                {
                    slot = moveset[firstEmpty];
                }
                else
                {
                    moveset.ShiftMovesUp();
                    slot = moveset[PkmnConstants.NumMoves - 1];
                }
                slot.Move  = newMoves[i];
                slot.PPUps = 0;
            }
        }