Пример #1
0
        public void Heal(Character character)
        {
            if (this.IsAlive == false)
            {
                throw new InvalidOperationException("Invalid Operation: Must be alive to perform this action!");
            }

            if (character.IsAlive == false)
            {
                throw new InvalidOperationException("Invalid Operation: Must be alive to perform this action!");
            }

            if (this.Faction != character.Faction)
            {
                throw new InvalidOperationException("Invalid Operation: Cannot heal enemy character!");
            }

            character.RecieveHeal(this.AbilityPoints);
        }