Пример #1
0
        public void SimAtk(Mortal Attacker, Mortal Reciever)
        {
            if (Reciever.Health >= 0)
            {
                UpdateStats();
                MakeSoundEffect();
                _counter             = 0;
                tmrAnimation.Enabled = true;
                tmrAnimation.Start();
                float prevEnemyHealth = Reciever.Health;
                Attacker.SimpleAttack(Reciever);
                PartyDamage         = +(float)Math.Round(prevEnemyHealth - Reciever.Health);
                MidFightlabel.Text += Attacker.Name + " attacked. ";
                if (enemy.Health <= 0)
                {
                    float X = enemy.XpDropped;
                    character.GainXP(X);
                    roll.GainXP(X);
                    rush.GainXP(X);
                    character.GainGb(enemy.GbDropped);
                    character.GainPt(enemy.PtDropped);

                    MidFightlabel.Text        += " Damage dealt by party = " + Math.Round(PartyDamage);
                    MidFightlabel.Visible      = true;
                    lblEndFightMessage.Text    = "You Gained " + Math.Round(enemy.XpDropped) + " xp and" + Math.Round(enemy.GbDropped) + " gb and" + Math.Round(enemy.PtDropped) + " Pt!";
                    lblEndFightMessage.Visible = true;
                    Refresh();
                    Thread.Sleep(1200);
                    EndFight();
                    LevelUpcheck();
                }
            }
        }