Esempio n. 1
0
        public void CalcValueFromItems_LivingIsNull_ReturnZero()
        {
            StatCalculator statCalc = createStatCalculator();

            int actual = statCalc.CalcValueFromItems(null, eProperty.Constitution);

            Assert.AreEqual(0, actual);
        }
Esempio n. 2
0
        public void CalcValueFromItems_Level50Player150ConAnd100MythicalConCap_127()
        {
            var player = NewPlayer();

            player.Level = 50;
            player.ItemBonus[eProperty.MythicalConCapBonus] = 100;
            player.ItemBonus[eProperty.Constitution]        = 150;

            int actual = StatCalculator.CalcValueFromItems(player, eProperty.Constitution);

            Assert.AreEqual(127, actual);
        }
Esempio n. 3
0
        public void CalcValueFromItems_IntelligenceOfLevel50AnimistWith50AcuityFromItems_50()
        {
            var player = NewPlayer();

            player.fakeCharacterClass = new CharacterClassAnimist();
            player.Level = 50;
            player.ItemBonus[eProperty.Acuity] = 50;

            int actual = StatCalculator.CalcValueFromItems(player, eProperty.Intelligence);

            Assert.AreEqual(50, actual);
        }
Esempio n. 4
0
        public void CalcValueFromItems_IntelligenceOfLevel50AnimistWith50AcuityFromItems_Return50()
        {
            var player = Create.FakePlayer(new CharacterClassAnimist());

            player.Level = 50;
            player.ItemBonus[eProperty.Acuity] = 50;
            StatCalculator statCalc = createStatCalculator();

            int actual = statCalc.CalcValueFromItems(player, eProperty.Intelligence);

            Assert.AreEqual(50, actual);
        }
Esempio n. 5
0
        public void CalcValueFromItems_Level50Player100ConstFromItems_75()
        {
            var player = NewPlayer();

            player.Level = 50;
            player.ItemBonus[eProperty.Constitution] = 100;

            int actual = StatCalculator.CalcValueFromItems(player, eProperty.Constitution);

            int expected = (int)(1.5 * 50);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 6
0
        public void CalcValueFromItems_Level50Player150ConAnd100MythicalConCap_ReturnCapAt127()
        {
            var player = Create.FakePlayer();

            player.Level = 50;
            player.ItemBonus[eProperty.MythicalConCapBonus] = 100;
            player.ItemBonus[eProperty.Constitution]        = 150;
            StatCalculator statCalc = createStatCalculator();

            int actual = statCalc.CalcValueFromItems(player, eProperty.Constitution);

            Assert.AreEqual(127, actual);
        }
Esempio n. 7
0
        public void CalcValueFromItems_Level50NPC100ConstFromItems_75()
        {
            var stat = eProperty.Constitution;
            var npc  = NewNPC();

            npc.Level           = 50;
            npc.ItemBonus[stat] = 100;

            int actual = StatCalculator.CalcValueFromItems(npc, stat);

            int expected = (int)(1.5 * 50);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 8
0
        public void CalcValueFromItems_Level50Player100ConstFromItems_ReturnCapAt75()
        {
            var player = NewFakePlayer();

            player.Level = 50;
            player.ItemBonus[eProperty.Constitution] = 100;
            StatCalculator statCalc = createStatCalculator();

            int actual = statCalc.CalcValueFromItems(player, eProperty.Constitution);

            int expected = (int)(1.5 * 50);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 9
0
        public void CalcValueFromItems_Level50NPC100ConstFromItems_ReturnCapAt75()
        {
            var stat = eProperty.Constitution;
            var npc  = Create.FakeNPC();

            npc.Level           = 50;
            npc.ItemBonus[stat] = 100;
            StatCalculator statCalc = createStatCalculator();

            int actual = statCalc.CalcValueFromItems(npc, stat);

            int expected = (int)(1.5 * 50);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 10
0
        public void CalcValueFromItems_LivingIsNull_Zero()
        {
            int actual = StatCalculator.CalcValueFromItems(null, eProperty.Constitution);

            Assert.AreEqual(0, actual);
        }