コード例 #1
0
 public void ShouldNotBeAbleToTakeMultipleTopLevelPaths()
 {
     var p = new Player();
     p.SetLevel(2);
     p.ChooseSkill(new PathOfTheFighter());
     p.ChooseSkill(new PathOfTheWizard());
 }
コード例 #2
0
 public void ShouldAddModifiersToCharacterWhenSkillChosen()
 {
     var p = new Player();
     Assert.IsTrue(p.CharacterModifiers.Count == 0);
     p.LevelUp();
     p.ChooseSkill(new PathOfTheFighter());
     Assert.IsTrue(p.CharacterModifiers.Count > 0);
 }
コード例 #3
0
 public void ShouldAddActionsToCharacterWhenSkillChosen()
 {
     var p = new Player();
     p.LevelUp();
     Assert.IsFalse(p.GetActions(false).Exists(i => i is SpellSpear));
     p.ChooseSkill(new PathOfTheWizard());
     Assert.IsTrue(p.GetActions(false).Exists(i => i is SpellSpear));
 }
コード例 #4
0
 public void ShouldApplyPercentageMana()
 {
     var p = new Player();
     p.LevelUp();
     p.ChooseSkill(new PathOfTheWizard());
     p.GainMana(50);
     p.AddModifier(new ManaBonusPercentage(50));
     Assert.IsTrue(p.BonusMana == 100);
 }
コード例 #5
0
 public void ShouldApplyEquipmentModifiersToCharacter()
 {
     var c = new Player();
     c.LevelUp();
     c.ChooseSkill(new PathOfTheWizard());
     var e = new CastersShield();
     EquipmentHelper.EquipEquipment(c, e);
     Assert.IsTrue(c.CharacterModifiers.Exists(i => i is MagicDamagePercentage));
 }
コード例 #6
0
 public void ShouldTakeSecondSkillIfParentTaken()
 {
     var p = new Player();
     p.SetLevel(2);
     p.ChooseSkill(new PathOfTheFighter());
     p.ChooseSkill(new PathOfTheKnight());
     Assert.IsTrue(p.CurrentClass == SkillBranches.Knight);
 }
コード例 #7
0
 public void ShouldNotTakeSkillIfCharacterCannotAfford()
 {
     var p = new Player();
     p.ChooseSkill(new PathOfTheDarkKnight());
 }
コード例 #8
0
 public void ShouldNotBeAbleToTakeSkillWithoutParent()
 {
     var p = new Player();
     p.SetLevel(2);
     p.ChooseSkill(new PathOfTheBarbarian());
 }
コード例 #9
0
 public void ShouldNotBeAbleToTakeSkillAtLevelAbove()
 {
     var p = new Player();
     p.ChooseSkill(new PathOfTheKnight());
 }
コード例 #10
0
 public void ShouldNotBeAbleToTakeSkillAlreadyTaken()
 {
     var p = new Player();
     p.ChooseSkill(new PathOfTheFighter());
     p.ChooseSkill(new PathOfTheFighter());
 }