public void YouCanAddAnAdjustmentToAdjustTheTotals() { var score = new AbilityScore(AbilityScoreTypes.Strength, 15); var adj = new AbilityScoreAdjustment(); adj.AbilityName = AbilityScoreTypes.Strength; adj.Modifier = 2; score.AddModifier(adj); Assert.AreEqual(17, score.TotalValue); Assert.AreEqual(3, score.TotalModifier); }
public void YouCanAddAnAdjustmentToAdjustTheTotals() { var score = new AbilityScore(AbilityScoreTypes.Strength, 15); var adj = new ValueStatModifier( "Strength", 2, "racial" ); score.AddModifier(adj); Assert.Equal(17, score.TotalValue); Assert.Equal(3, score.TotalModifier); }
public void SkillsRecalculateWhenAbilityIsUpdated() { var skill = new Skill("Chew", AbilityScoreTypes.Strength, false); var ability = new AbilityScore(AbilityScoreTypes.Strength, 10); var charSkill = new CharacterSkill(skill, ability, false); var oldVal = charSkill.Score(); var adjustment = new ValueStatModifier(2); adjustment.Modifier = 6; ability.AddModifier(adjustment); Assert.True(charSkill.Score() > oldVal); }