Пример #1
0
        public void NonDefaultSkillLevel()
        {
            Character character = new Character();
            character.StrengthPoints = 1;
            character.DexterityPoints = 2;
            character.IntelligencePoints = 3;
            character.HealthPoints = 4;

            Skill target;

            target = new Skill("abc", "def", SkillStat.Intelligence, SkillDifficulty.Easy);
            Assert.IsNull(target.Level(character));
            target.RelativeLevel = 2;
            Assert.AreEqual(15, target.Level(character));

            target = new Skill("abc", "def", SkillStat.Dexterity, SkillDifficulty.Average);
            Assert.IsNull(target.Level(character));
            target.RelativeLevel = 0;
            Assert.AreEqual(12, target.Level(character));

            target = new Skill("abc", "def", SkillStat.Health, SkillDifficulty.VeryHard);
            Assert.IsNull(target.Level(character));
            target.RelativeLevel = -1;
            Assert.AreEqual(13, target.Level(character));

            target = new Skill("abc", "def", SkillStat.Strength, SkillDifficulty.Hard);
            Assert.IsNull(target.Level(character));
            target.RelativeLevel = 3;
            Assert.AreEqual(14, target.Level(character));
        }
Пример #2
0
        public void DefaultSkillLevel()
        {
            Character character = new Character();
            character.StrengthPoints = 1;
            character.DexterityPoints = 2;
            character.IntelligencePoints = 3;
            character.HealthPoints = 4;

            Skill target;

            target = new Skill("abc", "def", SkillStat.Intelligence, SkillDifficulty.Easy);
            target.DefaultRelativeLevel = -4;
            Assert.AreEqual(9, target.Level(character));
        }