예제 #1
0
        public void TestCanUse(bool canUseUntrained, uint ranks, bool expectedCanUse)
        {
            var character = new Character();

            var skill = new Skill("test", "Test", Abilities.Wisdom, canUseUntrained);
            var skillScore = new SkillScore(character, skill, ranks);

            Assert.That(skillScore.CanUse, Is.EqualTo(expectedCanUse));
        }
예제 #2
0
        public void TestScore()
        {
            var character = new Character { Intelligence = { Ranks = 12 } };

            var skill = new Skill("test", "Test", Abilities.Intelligence, true);
            var skillScore = new SkillScore(character, skill, 2);

            Assert.That(character.Intelligence.Modifier, Is.EqualTo(1));
            Assert.That(skillScore.BaseScore, Is.EqualTo(3));
        }
예제 #3
0
 public void TestName(string baseName, string variant, string expectedName)
 {
     var skill = new Skill("test", baseName, variant, Abilities.Constitution, true);
     Assert.That(skill.Name, Is.EqualTo(expectedName));
 }
예제 #4
0
 public void TestKey(string baseKey, string variant, string expectedKey)
 {
     var skill = new Skill(baseKey, "Test", variant, Abilities.Constitution, true);
     Assert.That(skill.Key, Is.EqualTo(expectedKey));
 }
예제 #5
0
 public SkillScore(Character character, Skill skill, uint ranks = 0)
     : base(character, ranks, new[] { "Class Skill", "Race" }, null)
 {
     AbilityScore = character.GetAttributeScore(skill.Ability);
     Skill = skill;
 }