public void attackers_strength_modifier_adds_to_roll_when_attacking()
        {
            // +1 strength modifier
            calculator = new CombatCalculator(new Character(strength: 12));

            var opponent = new Character(armorClass: 10);
            calculator.Attack(opponent, 9).ShouldEqual(AttackResult.Hit);
        }
        public void attackers_strength_modifier_adds_to_damage_dealt_when_attacking()
        {
            // +1 strength modifier
            calculator = new CombatCalculator(new Character(strength: 12));

            var opponent = new Character(armorClass: 10, hitPoints: 5);
            calculator.Attack(opponent, 10);
            opponent.HitPoints.ShouldEqual(3);
        }
        public void opponents_dexterity_modifier_is_added_to_armor_class_when_attacking()
        {
            // A strength of 10 will give no bonus;
            calculator = new CombatCalculator(new Character(strength: 10));

            // A dexterity of 12 will give a +1 bonus.
            var opponent = new Character(armorClass: 10, dexterity: 12);
            calculator.Attack(opponent, 10).ShouldEqual(AttackResult.Miss);
        }
        public void minimum_damage_on_hit_when_attacking_is_1()
        {
            // -5 strength modifier
            calculator = new CombatCalculator(new Character(strength: 1));

            var opponent = new Character(armorClass: 10, hitPoints: 5);
            calculator.Attack(opponent, 15);
            opponent.HitPoints.ShouldEqual(4);
        }