public void CanAddPerformCharacterSkills() { var bard = CharacterTestTemplates.BardyBard().WithSkills(new string[] { "Perform (Oratory)" }); var versatilePerformance = new VersatilePerformance(); versatilePerformance.AddSkill(bard.SkillRanks.GetSkill("Perform (Oratory)")); AssertExtensions.Contains(bard.SkillRanks.GetSkill("Perform (Oratory)"), versatilePerformance.Skills); }
public void GrantsABonusOfOneAtFirstLevel() { var inspire = new InspireCourage(); var bard = CharacterTestTemplates.BardyBard(); bard.Add(inspire); Assert.Equal(1, inspire.Bonus); Assert.Equal("Inspire Courage +1", inspire.Description); }
public void WillOnlyAllowPerformSkillsToBeSelected() { var bard = CharacterTestTemplates.BardyBard().WithSkills(new string[] { "Bluff" }); var versatilePerformance = new VersatilePerformance(); Assert.Throws(typeof(ArgumentException), () => { versatilePerformance.AddSkill(bard.SkillRanks.GetSkill("Bluff")); }); }
public void EachLevelAfterOneAddsTwoToTheRoundsPerDay() { var bard = CharacterTestTemplates.BardyBard(); var performance = new BardicPerformanceAbility(); bard.Add(performance); bard.SetLevel(3); Assert.Equal(8, performance.RoundsPerDay); }
public SpellCastingTests() { spellList = SpellList.CreateForTesting("bard"); spellList.Add(1, "magic missile"); var gateway = EntityGateway <SpellList> .LoadWithSingleItem(spellList); bard = CharacterTestTemplates.BardyBard(); spellCasting = new SpellCasting(configuration, gateway); bard.Add(spellCasting); }
public void LoreMasterHasSomeUsesPerDay() { var bard = CharacterTestTemplates.BardyBard(); var loremaster = new LoreMaster(); bard.Add(new BasicStat(loremaster.UsesPerDayStatName(), 1)); bard.Add(loremaster); Assert.Equal(1, loremaster.UsesPerDay); Assert.Equal("Lore Master 1/day", loremaster.DisplayString()); }
public void GrantsABonusOfTwoAtThirdLeel() { var inspire = new InspireCompetence(); var bard = CharacterTestTemplates.BardyBard(); bard.SetLevel(3); bard.Add(inspire); Assert.Equal(2, inspire.Bonus); Assert.Equal("Inspire Competence +2", inspire.Description); }
public void BardCanUseAbilityForFourPlusCharismaModifierRounds() { var bard = CharacterTestTemplates.BardyBard(); var performance = new BardicPerformanceAbility(); bard.Add(performance); Assert.Equal(4, performance.RoundsPerDay); bard.AbilityScores.SetScore(AbilityScoreTypes.Charisma, 16); Assert.Equal(7, performance.RoundsPerDay); }
public void FindsAnyBardicPerformancesAndCanUtilizeThem() { var bard = CharacterTestTemplates.BardyBard(); var performance = new BardicPerformanceAbility(); bard.Add(performance); var countersong = new Countersong(); bard.Add(countersong); AssertExtensions.Contains(countersong, performance.Performances); Assert.Equal("Bardic Performance 4 rnds/day (Countersong)", performance.DisplayString()); }
public SpontaneousCastingTests() { spellList = SpellList.CreateForTesting("bard"); spellList.Add(0, "cantrip1"); spellList.Add(0, "cantrip2"); spellList.Add(1, "level1.1"); spellList.Add(1, "level1.2"); spellList.Add(2, "level2.1"); spellList.Add(2, "level2.2"); bard = CharacterTestTemplates.BardyBard(); spellCasting = new SpontaneousCasting(configuration, EntityGateway <SpellList> .LoadWithSingleItem(spellList)); bard.Add(spellCasting); }
public void ChoosesTheHighestPerformanceSkillFirstThenSelectsADifferentSkill() { var bard = CharacterTestTemplates.BardyBard().WithSkills(new string[] { "Perform (Comedy)", "Perform (Percussion)" }); var versatilePerformance = new VersatilePerformance(); bard.Add(versatilePerformance); bard.SkillRanks.GetSkill("Perform (Comedy)").AddRank(); var selector = new SelectVersatilePerformance(); selector.ExecuteStep(bard); AssertExtensions.Contains(bard.SkillRanks.GetSkill("Perform (Comedy)"), versatilePerformance.Skills); selector.ExecuteStep(bard); AssertExtensions.Contains(bard.SkillRanks.GetSkill("Perform (Percussion)"), versatilePerformance.Skills); }
public void AddLevel16AllSkillsAreClassSkills() { var bard = CharacterTestTemplates.BardyBard().WithSkills( new string[] { "Perception", "Climb" }); var jack = new JackOfAllTrades(); bard.Add(jack); bard.SetLevel(16); jack.LeveledUp(bard.Components); Assert.True(bard.SkillRanks.GetSkill("Perception").ClassSkill); Assert.True(bard.SkillRanks.GetSkill("Climb").ClassSkill); }
public void ImprovesAtSpecificLevels() { var inspire = new InspireCompetence(); var bard = CharacterTestTemplates.BardyBard(); bard.Add(inspire); bard.SetLevel(7); Assert.Equal(3, inspire.Bonus); Assert.Equal("Inspire Competence +3", inspire.Description); bard.SetLevel(11); Assert.Equal(4, inspire.Bonus); Assert.Equal("Inspire Competence +4", inspire.Description); bard.SetLevel(15); Assert.Equal(5, inspire.Bonus); Assert.Equal("Inspire Competence +5", inspire.Description); }
public void DoNotSelectTheSameSpellTwice() { var bard = CharacterTestTemplates.BardyBard().WithSpontaneousCasting(6); var selector = new SelectNewKnownSpells(); selector.ExecuteStep(bard); bard.SetLevel(2); selector.ExecuteStep(bard); bard.SetLevel(3); selector.ExecuteStep(bard); var spellCasting = bard.Get <SpontaneousCasting>(); Assert.NotEmpty(spellCasting.GetReadySpells(0)); Assert.NotEmpty(spellCasting.GetReadySpells(1)); AssertExtensions.ListIsUnique(spellCasting.GetReadySpells(0)); AssertExtensions.ListIsUnique(spellCasting.GetReadySpells(1)); }
public void SelectsSpellsForEachLevelUntilAllAvailableSlotsAreFilled() { var bard = CharacterTestTemplates.BardyBard().WithSpontaneousCasting(); var selector = new SelectNewKnownSpells(); selector.ExecuteStep(bard); var spellCasting = bard.Get <SpontaneousCasting>(); Assert.Equal(spellCasting.GetKnownSpellCount(0), spellCasting.GetReadySpells(0).Count()); Assert.Equal(spellCasting.GetKnownSpellCount(1), spellCasting.GetReadySpells(1).Count()); Assert.Equal(spellCasting.GetKnownSpellCount(2), spellCasting.GetReadySpells(2).Count()); bard.SetLevel(3); selector.ExecuteStep(bard); Assert.Equal(spellCasting.GetKnownSpellCount(0), spellCasting.GetReadySpells(0).Count()); Assert.Equal(spellCasting.GetKnownSpellCount(1), spellCasting.GetReadySpells(1).Count()); Assert.Equal(spellCasting.GetKnownSpellCount(2), spellCasting.GetReadySpells(2).Count()); }
public void CanSpecifyTheLevelToStartCountingFrom() { string yaml = @"--- name: strength modifier-type: bonus rate: 3 start-level: 5 minimum: 0 class: bard"; var modifier = new ClassLevelModifier(yaml.ParseYaml()); var character = CharacterTestTemplates.BardyBard(); character.Add(modifier); Assert.Equal(0, modifier.Modifier); character.SetLevel(3); Assert.Equal(0, modifier.Modifier); character.SetLevel(8); Assert.Equal(1, modifier.Modifier); character.SetLevel(14); Assert.Equal(3, modifier.Modifier); }
public void AtTenthLevelCanUseAllSkills() { var bard = CharacterTestTemplates.BardyBard().WithSkills( new string[] { "Training 1", "Training 2" } ); bard.SkillRanks.GetSkill("Training 1").Skill.RequireTraining(true); bard.SkillRanks.GetSkill("Training 2").Skill.RequireTraining(true); var jack = new JackOfAllTrades(); bard.Add(jack); bard.SetLevel(9); Assert.False(bard.SkillRanks.GetSkill("Training 1").AbleToUse); Assert.False(bard.SkillRanks.GetSkill("Training 2").AbleToUse); bard.SetLevel(10); jack.LeveledUp(bard.Components); Assert.True(bard.SkillRanks.GetSkill("Training 1").AbleToUse); Assert.True(bard.SkillRanks.GetSkill("Training 2").AbleToUse); }