public void ClassSkillsGetOneTimeBonus() { var skill = new Skill( "Climb", AbilityScoreTypes.Strength, false ); var charSkill = new CharacterSkill(skill, new AbilityScore(AbilityScoreTypes.Strength, 10), true); charSkill.ClassSkill = true; charSkill.AddRank(); Assert.Equal(4, charSkill.Score()); charSkill.AddRank(); Assert.Equal(5, charSkill.Score()); }
public void AddingPointsToSkillsIncreasesTheirScore() { var skill = new Skill( "Swim", AbilityScoreTypes.Strength, false ); var charSkill = new CharacterSkill(skill, new AbilityScore(AbilityScoreTypes.Strength, 15), false); var baseValue = charSkill.Score(); charSkill.AddRank(); Assert.Equal(1, charSkill.Ranks); Assert.Equal(baseValue + 1, charSkill.Score()); }
public void AddingARankAllowsToUseTrainingSkill() { var skill = new Skill( "Spellcraft", AbilityScoreTypes.Intelligence, true ); var charSkill = new CharacterSkill(skill, new AbilityScore(AbilityScoreTypes.Intelligence, 15), false); Assert.False(charSkill.AbleToUse); charSkill.AddRank(); Assert.True(charSkill.AbleToUse); Assert.Equal(3, charSkill.Score()); }
public void ConditionalModifiersAndRanksAreCountedOnlyOnce() { var skill = new Skill("Eat", AbilityScoreTypes.Intelligence, false); var ability = new AbilityScore(AbilityScoreTypes.Intelligence, 10); var charSkill = new CharacterSkill(skill, ability, false); charSkill.AddRank(); var adj = new ConditionalStatModifier(new ValueStatModifier("Eat", 3, "bonus"), "Celery"); charSkill.AddModifier(adj); Assert.Equal(1, charSkill.ConditionalModifiers.Count()); Assert.Equal(4, charSkill.GetConditionalValue("Celery")); Assert.Equal(1, charSkill.Score()); Assert.Equal("Eat +1 (+4 Celery)", charSkill.ToString()); }