Ejemplo n.º 1
0
        public void CalculateDamageVariance_SpellLineIsCombatStyleEffects_MaxIs150Percent()
        {
            var spellLine    = new SpellLine("Combat Style Effects", "", "", false);
            var spellHandler = new SpellHandler(null, null, spellLine);

            spellHandler.CalculateDamageVariance(null, out double ignoredValue, out double actual);

            Assert.AreEqual(1.5, actual);
        }
Ejemplo n.º 2
0
        public void CalculateDamageVariance_SpellLineIsItemEffects_MinIs100Percent()
        {
            var spellLine    = new SpellLine("Item Effects", "", "", false);
            var spellHandler = new SpellHandler(null, null, spellLine);

            spellHandler.CalculateDamageVariance(null, out double actual, out double ignoredValue);

            Assert.AreEqual(1.00, actual);
        }
Ejemplo n.º 3
0
        public void CalculateDamageVariance_SpellLineIsReservedSpells_MinAndMaxIs100Percent()
        {
            var spellLine    = new SpellLine("Reserved Spells", "", "", false);
            var spellHandler = new SpellHandler(null, null, spellLine);

            spellHandler.CalculateDamageVariance(null, out double actualMin, out double actualMax);

            Assert.AreEqual(1.0, actualMin);
            Assert.AreEqual(1.0, actualMax);
        }
Ejemplo n.º 4
0
        public void CalculateDamageVariance_TargetIsGameLiving_MaxIs125Percent()
        {
            var target       = NewFakeLiving();
            var spellLine    = NewSpellLine();
            var spellHandler = new SpellHandler(null, null, spellLine);

            spellHandler.CalculateDamageVariance(target, out double ignoredValue, out double actual);

            Assert.AreEqual(1.25, actual);
        }
Ejemplo n.º 5
0
        public void CalculateDamageVariance_TargetIsGameLiving_MinIs125Percent()
        {
            var target       = Substitute.For <GameLiving>();
            var spellLine    = new SpellLine("", "", "", false);
            var spellHandler = new SpellHandler(null, null, spellLine);

            spellHandler.CalculateDamageVariance(target, out double actual, out double ignoredValue);

            Assert.AreEqual(1.25, actual);
        }
Ejemplo n.º 6
0
        public void CalculateDamageVariance_NoSpecButSourceHasTwiceTheTargetLevel_MaxIs155Percente()
        {
            var source = new FakePlayer();
            var target = NewFakeLiving();

            source.modifiedSpecLevel = 1;
            source.Level             = 30;
            target.Level             = 15;
            var spellLine    = NewSpellLine();
            var spellHandler = new SpellHandler(source, null, spellLine);

            spellHandler.CalculateDamageVariance(target, out double ignoredValue, out double actual);

            Assert.AreEqual(1.55, actual);
        }
Ejemplo n.º 7
0
        public void CalculateDamageVariance_SameLevelButFiveSpecLevelOverTargetLevel_MinIs127Percent()
        {
            var source = new FakePlayer();
            var target = NewFakeLiving();

            source.modifiedSpecLevel = 35;
            source.Level             = 30;
            target.Level             = 30;
            var spellLine    = NewSpellLine();
            var spellHandler = new SpellHandler(source, null, spellLine);

            spellHandler.CalculateDamageVariance(target, out double actual, out double ignoredValue);

            Assert.AreEqual(1.27, actual);
        }
Ejemplo n.º 8
0
        public void CalculateDamageVariance_SourceAndTargetLevel30AndSpecLevel16_MinIs75Percent()
        {
            var source = new FakePlayer();
            var target = NewFakeLiving();

            source.modifiedSpecLevel = 16;
            source.Level             = 30;
            target.Level             = 30;
            var spellLine    = NewSpellLine();
            var spellHandler = new SpellHandler(source, null, spellLine);

            spellHandler.CalculateDamageVariance(target, out double actual, out double ignoredValue);

            Assert.AreEqual(0.75, actual);
        }
Ejemplo n.º 9
0
        public void CalculateDamageVariance_SameLevelButNoSpec_MinIs25Percent()
        {
            var source = new FakePlayer();
            var target = Substitute.For <GameLiving>();

            source.modifiedSpecLevel = 1;
            source.Level             = 30;
            target.Level             = 30;
            var spellLine    = new SpellLine("", "", "", false);
            var spellHandler = new SpellHandler(source, null, spellLine);

            spellHandler.CalculateDamageVariance(target, out double actual, out double ignoredValue);

            Assert.AreEqual(0.25, actual);
        }