Beispiel #1
0
        /// <inheritdoc />
        public DamageSummary SufferDamage(int damage)
        {
            var summary = new DamageSummary();

            // If we have a shield, remove it.
            if (_shield != null && _shield.StillAvailable())
            {
                _shield.DamageShield(damage);
            }
            else
            {
                summary.Damaged         = true;
                summary.InitialHealth   = _health.Total();
                summary.Defeated        = _health.Damage(damage);
                summary.RemainingHealth = _health.Total();
            }

            return(summary);
        }