Пример #1
0
        public void ClickTurn()
        {
            if (!WasAttacked)
            {
                NonDmgHit();
            }
            WasAttacked = false;

            if (IsMisted)
            {
                MistTurns++;
                if (MistTurns == 5)
                {
                    IsMisted  = false;
                    MistTurns = 0;
                }
            }

            if (Dancing)
            {
                DanceTurns++;
                if (DanceTurns == DanceTurnSeed)
                {
                    Dancing = false;
                    if (!_iConfused)
                    {
                        Displayer.RelayMessage("Pokemon confused due to fatigue");
                        TakeConfusion(3);
                    }
                }
            }
        }
Пример #2
0
        public virtual int LeechSeedDmg()
        {
            int dmg = _HealthPoints / 8;

            Displayer.RelayMessage($"Leech seed drained damage from {Name}");
            TakeDamage(dmg);
            return(dmg);
        }
Пример #3
0
 protected void TakeDamage(int dmg)
 {
     _subHPRemaining -= dmg;
     if (_subHPRemaining <= 0)
     {
         _subHPRemaining = 0;
         _isAlive        = false;
         Displayer.Fainted(OwnerCall, _name);
     }
 }
Пример #4
0
        public virtual void BadlyPoisonDmg()
        {
            int dmg = (_HealthPoints * T) / 16;

            dmg = dmg == 0 ? 1 : dmg;
            Displayer.RelayMessage($"{Name} took poison damage");
            TakeDamage(dmg);

            T++;
        }
Пример #5
0
        public void HealDamage(int dmg)
        {
            if (_subHPRemaining == _HealthPoints)
            {
                Displayer.FullHealth(OwnerCall, _name);
                return;
            }

            _subHPRemaining += dmg;

            if (_subHPRemaining >= _HealthPoints)
            {
                _subHPRemaining = _HealthPoints;
            }
            Displayer.HealDamage(OwnerCall, _name, dmg);
        }
Пример #6
0
        private int CappedAdd(int addend, int offset, string name)
        {
            addend += offset;

            if (addend > 6 || addend < -6)
            {
                Displayer.TooFat(addend);
            }
            else
            {
                Displayer.Statup(offset, name);
            }

            addend = addend < -6 ? addend = -6 : addend;
            addend = addend > 6 ? addend = 6 : addend;

            return(addend);
        }
Пример #7
0
 public int PokemonBide()
 {
     if (BidTurns == 0)
     {
         Displayer.RelayMessage("Bide start");
     }
     else if (BidTurns == 1)
     {
         Displayer.RelayMessage("Pokemon storing energy");
     }
     else if (BidTurns == 2)
     {
         Biding   = false;
         BidTurns = 0;
         return(DamageBugger.Sum());
     }
     BidTurns++;
     return(0);
 }
Пример #8
0
        public void TakeDamage(int dmg, bool physical, float multiplier = 1, bool ignore = false)
        {
            if (LightScreen && !physical && !ignore)
            {
                dmg = dmg / 2;
            }
            else if (Reflect && physical && !ignore)
            {
                dmg = dmg / 2;
            }

            DamageBugger.Add(dmg);

            LastDmg = dmg;

            if (_activeSub)
            {
                SubstituteHP -= dmg;
                if (SubstituteHP <= 0)
                {
                    _activeSub = false;
                    Displayer.RelayMessage("Substitute broke");
                }
                dmg = 0;
            }


            _subHPRemaining -= dmg;

            Displayer.SuperEffective(multiplier);
            if (_subHPRemaining <= 0)
            {
                _subHPRemaining = 0;
                _isAlive        = false;
                Displayer.Fainted(OwnerCall, _name);
            }
            else
            {
                Displayer.ReceiveDamage(OwnerCall, _name, dmg);
            }
        }
Пример #9
0
 public virtual void BurnDmg()
 {
     TakeDamage(_HealthPoints / 8);
     Displayer.RelayMessage($"{Name} took burn damage");
 }
Пример #10
0
 public virtual void NormalPoisonDmg()
 {
     Displayer.RelayMessage($"{Name} took poison damage");
     TakeDamage(_HealthPoints / 8);
 }