public void When_AddingDuplicateSkill_Then_NoErrorNoDuplicate()
            {
                // Arrange
                var skillset = new SkillSet();

                skillset.Add(new Skill("id1", "name"));
                skillset.Add(new Skill("id2", "name"));
                skillset.Add(new Skill("id2", "name"));
                var sut = new SkillSet();

                // Act
                sut.LoadFrom(skillset);

                // Assert
                sut.Should().HaveCount(2);
            }
            public void When_SkillSetHasSkills_Then_SkillSetShouldHaveSameSkills()
            {
                // Arrange
                var skillset = new SkillSet();

                skillset.Add(new Skill("id", "name"));
                var sut = new SkillSet();

                // Act
                sut.LoadFrom(skillset);

                // Assert
                sut.Should().HaveCount(1);
            }
Exemplo n.º 3
0
        public override void InitSkills()
        {
            SkillSet.Add("Attack", BaseSkills.AttackSkill(DamageType.Physical, () => Strength));

            SkillSet.Add("Heal", new Skill(targets =>
            {
                targets.ForEach(target => target.CurrentHealth += Intelligence);
                return(Intelligence);
            })
            {
                TargetingType  = TargetingType.OneAlly,
                DisplayMessage = "{SELF} heals {TARGET} for {AMOUNT} health!",
                ManaCost       = 10,
            });
        }