Exemple #1
0
        public void Attack(IFighter victum)
        {
            // TODO: Attack logic and calculate damage
            double damage = this.damage;

            bool isDead = victum.TakeHit(damage);
            // TODO: Killed monster logic - exp gain

            if (isDead)
            {
                int expReward = BaseExp * victum.Level;
                bool isLevelUp = this.GainExpirience(expReward);
                if (isLevelUp)
                {
                    this.LevelUp();
                }
            }
        }
Exemple #2
0
        public void Attack(IFighter victum)
        {
            // TODO: Attack logic and calculate damage
            double damage = this.damage;

            bool isDead = victum.TakeHit(damage);

            // TODO: Killed monster logic - exp gain

            if (isDead)
            {
                int  expReward = BaseExp * victum.Level;
                bool isLevelUp = this.GainExpirience(expReward);
                if (isLevelUp)
                {
                    this.LevelUp();
                }
            }
        }
        public override void Attack(IFighter victum)
        {
            double damage = this.damage;

            bool isPlayerDead = victum.TakeHit(damage);
        }
        public override void Attack(IFighter victum)
        {
            double damage = this.damage;

            bool isPlayerDead = victum.TakeHit(damage);
        }