예제 #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();
                }
            }
        }
예제 #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();
                }
            }
        }
예제 #3
0
        public override void Attack(IFighter victum)
        {
            double damage = this.damage;

            bool isPlayerDead = victum.TakeHit(damage);
        }
예제 #4
0
        public override void Attack(IFighter victum)
        {
            double damage = this.damage;

            bool isPlayerDead = victum.TakeHit(damage);
        }