Пример #1
0
 public Pokemon()
 {
     Level = 1;
     Species = new PokemonType();
     Nature = Nature.Hardy;
     HeldItem = Items.None;
 }
Пример #2
0
 protected bool Equals(PokemonType other)
 {
     return DexNumber == other.DexNumber && string.Equals(Name, other.Name);
 }
Пример #3
0
        public void Defeat(PokemonType pokemonType)
        {
            var dict = pokemonType.GivenEffortValues;

            if (dict.ContainsKey(Stat.HP))
            {
                UpdateStat(Stat.HP, dict[Stat.HP]);
            }
            if (dict.ContainsKey(Stat.Attack))
            {
                UpdateStat(Stat.Attack, dict[Stat.Attack]);
            }
            if (dict.ContainsKey(Stat.Defence))
            {
                UpdateStat(Stat.Defence, dict[Stat.Defence]);
            }
            if (dict.ContainsKey(Stat.SpecialAttack))
            {
                UpdateStat(Stat.SpecialAttack, dict[Stat.SpecialAttack]);
            }
            if (dict.ContainsKey(Stat.SpecialDefence))
            {
                UpdateStat(Stat.SpecialDefence, dict[Stat.SpecialDefence]);
            }
            if (dict.ContainsKey(Stat.Speed))
            {
                UpdateStat(Stat.Speed, dict[Stat.Speed]);
            }

            ApplyItem(HeldItem);
            OnPropertyChangeStat();
        }