Пример #1
0
        public void Heal(Character character)
        {
            if (!this.IsAlive)
            {
                throw new InvalidOperationException(OutputMessages.CharacterMustBeAlive);
            }

            if (!character.IsAlive)
            {
                throw new InvalidOperationException(OutputMessages.CharacterMustBeAlive);
            }

            if (this.Faction != character.Faction)
            {
                throw new InvalidOperationException(OutputMessages.CannotHealEnemy);
            }

            character.IncreaseCharacterHealth(this.AbilityPoints);
        }