Ejemplo n.º 1
0
        public void TankDK_OverallCheck()
        {
            Rawr.TankDK.CalculationsTankDK CalcTankDK = new Rawr.TankDK.CalculationsTankDK();
            CalculationOptionsTankDK       calcOpts   = new CalculationOptionsTankDK();

            m_char.CalculationOptions = calcOpts;
            Item additionalItem = new Item("TestItem", ItemQuality.Common, ItemType.None, 102010, "", ItemSlot.Back, "", false,
                                           new Stats(), null,
                                           ItemSlot.None, ItemSlot.None, ItemSlot.None,
                                           0, 0, ItemDamageType.Physical, 0, "");

            CharacterCalculationsTankDK calcs = CalcTankDK.GetCharacterCalculations(m_char) as CharacterCalculationsTankDK;
            float OValueBase = calcs.OverallPoints;

            float[] SValueBase = calcs.SubPoints;

            // Setup the stats on what we want.
            additionalItem.Stats.Stamina = 5000;
            calcs = CalcTankDK.GetCharacterCalculations(m_char, additionalItem) as CharacterCalculationsTankDK;
            float OValueStam = calcs.OverallPoints;

            float[] SValueStam = calcs.SubPoints;
            additionalItem.Stats.Stamina = 0;
            Assert.IsTrue(OValueBase < OValueStam, "Stamina");

            additionalItem.Stats.DodgeRating = 5000;
            calcs = CalcTankDK.GetCharacterCalculations(m_char, additionalItem) as CharacterCalculationsTankDK;
            float OValueDodge = calcs.OverallPoints;

            float[] SValueDodge = calcs.SubPoints;
            additionalItem.Stats.DodgeRating = 0;

            additionalItem.Stats.DodgeRating = 10000;
            calcs = CalcTankDK.GetCharacterCalculations(m_char, additionalItem) as CharacterCalculationsTankDK;
            float OValueDodge2 = calcs.OverallPoints;

            float[] SValueDodge2 = calcs.SubPoints;
            additionalItem.Stats.DodgeRating = 0;
            Assert.IsTrue(OValueDodge < OValueDodge2, "Dodge2");
            Assert.IsTrue(SValueBase[0] < SValueDodge[0], "Dodge1"); // Due to inverse scaling between Burst & Avoidance, only check Mitigation improvement.

            additionalItem.Stats.ParryRating = 5000;
            calcs = CalcTankDK.GetCharacterCalculations(m_char, additionalItem) as CharacterCalculationsTankDK;
            float OValueParry = calcs.OverallPoints;

            float[] SValueParry = calcs.SubPoints;
            additionalItem.Stats.ParryRating = 0;
            Assert.IsTrue(SValueBase[0] < SValueParry[0], "Parry"); // Due to inverse scaling between Burst & Avoidance, only check Mitigation improvement.

            additionalItem.Stats.MasteryRating = 5000;
            calcs = CalcTankDK.GetCharacterCalculations(m_char, additionalItem) as CharacterCalculationsTankDK;
            float OValueMastery = calcs.OverallPoints;

            float[] SValueMastery = calcs.SubPoints;
            additionalItem.Stats.MasteryRating = 0;
            Assert.IsTrue(OValueBase < OValueMastery, "Mastery");
        }
Ejemplo n.º 2
0
        public void AbilityDKTest_PlagueStrike_BP()
        {
            // Needs AP passed in
            Stats FFTestStats = new Stats();

            FFTestStats.AttackPower = 100;

            Item i = new Item("Test", ItemQuality.Common, ItemType.Dagger, 1, "", ItemSlot.MainHand, "", false, new Stats(), new Stats(), ItemSlot.None, ItemSlot.None, ItemSlot.None, 10, 20, ItemDamageType.Physical, 2, "");
            CalculationOptionsTankDK c = new CalculationOptionsTankDK();

            c.talents = new DeathKnightTalents();
            Weapon w = new Weapon(i, FFTestStats, c, 0f);

            CombatState combatState = new CombatState();

            combatState.m_Stats   = FFTestStats;
            combatState.MH        = w;
            combatState.m_Talents = c.talents;

            AbilityDK_PlagueStrike PS = new AbilityDK_PlagueStrike(combatState);

            // Blood Plauge application.
            AbilityDK_BloodPlague BP = new AbilityDK_BloodPlague(combatState);

            // A disease dealing [0 + AP * 0.055 * 1.15] Shadow damage every 3 sec .
            // Base damage 0
            // Bonus from attack power [AP * 0.055 * 1.15]

            // Plague Strike Checking
            Assert.IsTrue(PS.szName == "Plague Strike", "Name");
            Assert.AreEqual(PS.AbilityCost[(int)DKCostTypes.Blood], 0, "Blood Rune");
            Assert.AreEqual(PS.AbilityCost[(int)DKCostTypes.Frost], 0, "Frost Rune");
            Assert.AreEqual(PS.AbilityCost[(int)DKCostTypes.UnHoly], 1, "UnHoly Rune");
            Assert.AreEqual(PS.AbilityCost[(int)DKCostTypes.RunicPower], -10, "RP");
            Assert.AreEqual(Math.Floor((378 + PS.wMH.damage) / 2), PS.uBaseDamage, "BaseDamage");
            Assert.AreEqual(Math.Floor((378 + PS.wMH.damage) / 2), PS.uBaseDamage, "Total Damage");
            Assert.AreEqual(PS.uRange, AbilityDK_Base.MELEE_RANGE, "Range");
            Assert.AreEqual(PS.tDamageType, ItemDamageType.Physical, "Damage Type");
            Assert.AreEqual(PS.Cooldown, 1500u, "Cooldown");

            // Blood Plague Checking
            Assert.IsTrue(BP.szName == "Blood Plague", "Name");
            Assert.AreEqual(BP.AbilityCost[(int)DKCostTypes.Blood], 0, "Blood Rune");
            Assert.AreEqual(BP.AbilityCost[(int)DKCostTypes.Frost], 0, "Frost Rune");
            Assert.AreEqual(BP.AbilityCost[(int)DKCostTypes.UnHoly], 0, "UnHoly Rune");
            Assert.AreEqual(BP.AbilityCost[(int)DKCostTypes.RunicPower], 0, "Runic Power");
            Assert.AreEqual(BP.uBaseDamage, 0u, "Damage");
            Assert.AreEqual(BP.tDamageType, ItemDamageType.Shadow, "Damage Type");
            // Not sure if this actually needs a Cooldown.
//            Assert.AreEqual(BP.Cooldown, 0u, "Cooldown");
            Assert.AreEqual(BP.uDuration, 15000u, "Duration");
            Assert.AreEqual(BP.uTickRate, 3000u, "TickRate");
            Assert.AreEqual((int)(FFTestStats.AttackPower * 0.055f * 1.15f), BP.GetTickDamage(), 0.1, "GetTickDamage");
            Assert.AreEqual((int)(BP.GetTickDamage() * (15 / 3)), BP.GetTotalDamage(), 0.1, "GetTotalDamage");
        }
Ejemplo n.º 3
0
        public void TankDK_BuildAcceptance()
        {
            Rawr.TankDK.CalculationsTankDK CalcTankDK = new Rawr.TankDK.CalculationsTankDK();

            CalculationOptionsTankDK calcOpts = new CalculationOptionsTankDK();

            m_char.CalculationOptions = calcOpts;
            this.testContextInstance.BeginTimer("GetCalc");
            CharacterCalculationsBase calcs = CalcTankDK.GetCharacterCalculations(m_char);

            calcs.GetCharacterDisplayCalculationValues();
            this.testContextInstance.EndTimer("GetCalc");
        }
Ejemplo n.º 4
0
        public void TankDK_Rotation()
        {
            Rawr.TankDK.CharacterCalculationsTankDK CalcTankDK = new Rawr.TankDK.CharacterCalculationsTankDK();
            CalculationOptionsTankDK calcOpts = new CalculationOptionsTankDK();

            Rawr.DK.StatsDK TotalStats = new Rawr.DK.StatsDK();

            Rawr.DPSDK.CharacterCalculationsDPSDK DPSCalcs = new Rawr.DPSDK.CharacterCalculationsDPSDK();
            Rawr.DPSDK.CalculationOptionsDPSDK    DPSopts  = new Rawr.DPSDK.CalculationOptionsDPSDK();

            Rawr.DK.DKCombatTable ct  = new Rawr.DK.DKCombatTable(m_char, TotalStats, DPSCalcs, DPSopts, m_char.BossOptions);
            Rawr.DK.Rotation      rot = new Rawr.DK.Rotation(ct, false);
            rot.PRE_BloodDiseased();
            Assert.IsTrue(rot.m_TPS > 0, "rotation BloodDiseased produces 0 DPS");
        }
Ejemplo n.º 5
0
        public void WeaponConstructorTest()
        {
            // Weapon takes an item object.
            // Refactor idea is for it to inherit from Item.
            Item  i     = new Item("Weapon Test", ItemQuality.Common, ItemType.OneHandMace, 101, null, ItemSlot.MainHand, null, false, null, null, ItemSlot.None, ItemSlot.None, ItemSlot.None, 10, 20, ItemDamageType.Physical, 2.0f, null);
            Stats stats = new Stats();

            stats.Stamina = 100;
            CalculationOptionsTankDK calcOpts = new CalculationOptionsTankDK();
//            calcOpts.talents = new DeathKnightTalents();
//            float expertise = 0F;
//            Weapon target = new Weapon(i, stats, calcOpts, expertise);
//            Assert.IsNotNull(target);
//            Assert.AreNotEqual(0, target.baseDamage, "basedamage");
//            Assert.AreNotEqual(0, target.damage, "adjusted damage");
//            Assert.AreNotEqual(0, target.DPS, "DPS");
        }