예제 #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);
        }
예제 #2
0
 public void GiveCharacterItem(Item item, Character character)
 {
     this.Alive();
     character.Alive();
     character.ReceiveItem(item);
 }