Exemple #1
0
        public void Attack(Character character)
        {
            this.Alive();
            character.Alive();
            if (character == this)
            {
                throw new InvalidOperationException(OutputMessages.CantAttackSelf());
            }
            if (character.Faction == this.Faction)
            {
                throw new ArgumentException(string.Format(OutputMessages.SameFaction(), this.Faction));
            }

            character.TakeDamage(this.AbilityPoints);
        }