Ejemplo n.º 1
0
        /// <summary>
        /// Lowers a monster's health by the amount of damage a weapon has, also adding the armor penetration bonus and monster's armor into the equation.
        /// </summary>
        /// <param name="weapon">The weapon hitting the monster.</param>
        /// <returns>The amount of damage taken.</returns>
        public double TakeHit(IWeapon weapon)
        {
            int finalDamage = weapon.Damage + weapon.ArmorPenetration() - this.Armor();

            this.Health -= finalDamage;

            return(finalDamage);
        }