예제 #1
0
        public bool Attack(IDie die, Character attackedCharacter)
        {
            var rollTotal = die.GetRoll();
            var modifier  = AbilitiesScores.AbilityScore[this.strength];

            var didHit = CheckHit(rollTotal, modifier, attackedCharacter);

            if (didHit)
            {
                attackedCharacter.hitPoints -= CalculateDamage(rollTotal, modifier);
                this.XP       += 10;
                this.hitPoints = this.level * 5;
            }
            return(didHit);
        }