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)); }
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)); }
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)); }
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)); }
public SkillScore(Character character, Skill skill, uint ranks = 0) : base(character, ranks, new[] { "Class Skill", "Race" }, null) { AbilityScore = character.GetAttributeScore(skill.Ability); Skill = skill; }