public void GivenFirstCharacterHasConstitutionWithNegative_5_ThenCharacterIsNotDeadInitially() { var game = new EvercraftGame(); game.Start("Jack", "Bob"); game.ApplyConstitution(1, game.Chars[0]); game.IsDead(game.Chars[0]).Should().Be(false); }
public void GivenSecondCharacterHasConstitutionWithNegative_5_ModifierWhenRollIsGreaterThanArmorThenSecondCharacterDies() { var game = new EvercraftGame(); game.Start("Jack", "Bob"); game.ApplyConstitution(1, game.Chars[1]); game.Attack(10, game.Chars[1]); game.IsDead(game.Chars[1]).Should().Be(true); }
public void GivenFirstCharacterHasConstitutionWithPositiveModifierWhenRollIsGreaterThanArmorThenFirstCharacterIsAliveAfterAttacks(int constitution, int attacks) { var game = new EvercraftGame(); game.Start("Jack", "Bob"); game.ApplyConstitution(constitution, game.Chars[0]); for (var i = 0; i < attacks; i++) { game.Attack(10, game.Chars[0]); } game.IsDead(game.Chars[0]).Should().Be(false); }
public void GivenCharacterHasOneHitPointLeftWhenRollIsGreaterThanArmorThenCharacterIsDead() { var game = new EvercraftGame(); game.Start("Jack", "Bob"); game.Attack(11, game.Chars[1]); game.Attack(11, game.Chars[1]); game.Attack(11, game.Chars[1]); game.Attack(11, game.Chars[1]); game.Attack(11, game.Chars[1]); game.Chars[1].HitPts.Should().Be(0); game.IsDead(game.Chars[1]).Should().Be(true); }