Ejemplo n.º 1
0
        /// <summary>
        /// This a basic rotation
        /// </summary>
        public void PRE_Unholy_dynamic() // Expensive
        {
            /*
            if (_RotCacheType == Type.Unholy
                && _RotCache.Count > 100
                && Math.Abs(_cachedHaste - m_CT.m_CState.m_Stats.PhysicalHaste) <= 0.05f ) // Haste is within 5% of the cached Haste.
            {
                ml_Rot = _RotCache;
                foreach (AbilityDK_Base ab in ml_Rot)
                {
                    ab.UpdateCombatState(m_CT.m_CState);
                }
                BuildCosts();
                return;
            }
             * */
            // Because, really, Unholy should be in Unholy Presence. 
            // m_CT.m_Opts.presence = Presence.Unholy;
            m_szRotationName = "Unholy Rotation";

            ResetRotation();
            // Setup an instance of each ability.
            // No runes:
            AbilityDK_Outbreak Outbreak = new AbilityDK_Outbreak(m_CT.m_CState);
            // Single Runes:
//            AbilityDK_IcyTouch IT = new AbilityDK_IcyTouch(m_CT.m_CState);
            AbilityDK_FrostFever FF = new AbilityDK_FrostFever(m_CT.m_CState);
//            AbilityDK_PlagueStrike PS = new AbilityDK_PlagueStrike(m_CT.m_CState);
            AbilityDK_BloodPlague BP = new AbilityDK_BloodPlague(m_CT.m_CState);
            // AbilityDK_BloodStrike BS = new AbilityDK_BloodStrike(m_CT.m_CState);
            // AbilityDK_HeartStrike HS = new AbilityDK_HeartStrike(m_CT.m_CState);
            // AbilityDK_NecroticStrike NS = new AbilityDK_NecroticStrike(m_CT.m_CState);
            // AbilityDK_Pestilence Pest = new AbilityDK_Pestilence(m_CT.m_CState);
            // AbilityDK_BloodBoil BB = new AbilityDK_BloodBoil(m_CT.m_CState);
            // AbilityDK_HowlingBlast HB = new AbilityDK_HowlingBlast(m_CT.m_CState);
            // AbilityDK_ScourgeStrike SS = new AbilityDK_ScourgeStrike(m_CT.m_CState);
            // AbilityDK_DeathNDecay DnD = new AbilityDK_DeathNDecay(m_CT.m_CState);
            // Multi Runes:
            // AbilityDK_DeathStrike DS = new AbilityDK_DeathStrike(m_CT.m_CState);
            AbilityDK_FesteringStrike Fest = new AbilityDK_FesteringStrike(m_CT.m_CState);
            // AbilityDK_Obliterate OB = new AbilityDK_Obliterate(m_CT.m_CState);
            // RP:  Unlikely to start w/ RP abilities to open.
            // AbilityDK_RuneStrike RS = new AbilityDK_RuneStrike(m_CT.m_CState);
            // each RS gives a 45% chance to renew a fully depleted runes.
            // thus 20 RSs gets us 9 extra runes.
            // Same is true for DC & FS
            AbilityDK_DeathCoil DC = new AbilityDK_DeathCoil(m_CT.m_CState);
            AbilityDK_UnholyBlight UB = null;
            if (DC.ml_TriggeredAbility.Length > 0) UB = DC.ml_TriggeredAbility[0] as AbilityDK_UnholyBlight;
            // AbilityDK_FrostStrike FS = new AbilityDK_FrostStrike(m_CT.m_CState);
            DarkTranformation Dark = new DarkTranformation(m_CT.m_CState);

            // Simple ITx1, PSx1, BSx1, SSx4 & Festx4.
            // Initial rotation build.
            int[] AvailableResources = new int[EnumHelper.GetCount(typeof(DKCostTypes))];
            AvailableResources[(int)DKCostTypes.Blood] = 2;
            AvailableResources[(int)DKCostTypes.Frost] = 2;
            AvailableResources[(int)DKCostTypes.UnHoly] = 2;
            if (m_CT.m_CState.m_Talents.DarkTransformation > 0)
            {
                // this won't be there if they're not spec'd for it.
                ml_Rot.Add(Dark); // Dark Transformation.
                ProcessRunningRunes(AvailableResources, Dark.AbilityCost);
            }
            uint subrotDuration = 0;
            uint GCDdur = MIN_GCD_MS;
            // Fill the 3 mins duration 
            if (m_CT.m_Opts.presence == Presence.Unholy)
                GCDdur = MIN_GCD_MS_UH;

            subrotDuration = Outbreak.Cooldown;
            uint diseaseGCDs = 0;
            for (int count = (int)(Dark.Cooldown / subrotDuration); count > 0; count--)
            {
                if (m_CT.m_CState.m_Stats.RPp5 > 0)
                    AvailableResources[(int)DKCostTypes.RunicPower] += (int)((subrotDuration / 5000) * m_CT.m_CState.m_Stats.RPp5);
                // TODO: This still assumes that we're filling every GCD w/ an ability. 
                // We know that's not the case in most situations.
                ml_Rot.Add(Outbreak); // 60 sec CD.
                ProcessRunningRunes(AvailableResources, Outbreak.AbilityCost);
                ml_Rot.Add(FF);
                ml_Rot.Add(BP);
                // 1 GCDs

                // Fill the disease.
                diseaseGCDs = Outbreak.Cooldown / GCDdur; 
                
                float MaxRP = 100 + m_CT.m_CState.m_Stats.BonusMaxRunicPower;

                List<AbilityDK_Base> l_Abilities;

                for (; diseaseGCDs > 0; )
                {
                    bool bEnoughRP = (-1 * AvailableResources[(int)DKCostTypes.RunicPower]) > DC.RunicPower;
                    bool bOverCapRP = (AvailableResources[(int)DKCostTypes.RunicPower] + Fest.RunicPower) > MaxRP;

                    if ( (!bEnoughRP 
                        && !bOverCapRP) ) 
                    {
                        l_Abilities = GetFilteredListOfAbilities(AvailableResources, m_CT.m_CState);
                        if (l_Abilities.Count > 0)
                        {
                            foreach (AbilityDK_Base ab in l_Abilities)
                            {
                                ab.UpdateCombatState(m_CT.m_CState);
                            }
                            l_Abilities.Sort(AbilityDK_Base.CompareDPSByRunes);
                            if (l_Abilities[0].AbilityIndex == (int)DKability.BloodStrike ||
                                l_Abilities[0].AbilityIndex == (int)DKability.IcyTouch)
                            {
                                l_Abilities[0] = GetAbilityOfType(l_Abilities, DKability.FesteringStrike);
                            }
                            ProcessRunningRunes(AvailableResources, l_Abilities[0].AbilityCost);
                            ml_Rot.Add(l_Abilities[0]);

                        }
                        else
                        {
                            // If the list is 0, means all the runes have been used. 
                            // Reset runes
                            AvailableResources[(int)DKCostTypes.Blood] = 2;
                            AvailableResources[(int)DKCostTypes.Frost] = 2;
                            AvailableResources[(int)DKCostTypes.UnHoly] = 2;
                        }
                    }
                    else
                    {
                        ml_Rot.Add(DC);
                        ProcessRunningRunes(AvailableResources, DC.AbilityCost);
                    }
                    diseaseGCDs--;
                }
            }

            // How much RP do we have left at this point?
            foreach (AbilityDK_Base ab in ml_Rot)
                m_RunicPower += ab.RunicPower;

            BuildCosts();

            // subsequent:
            #region Unholy Blight
            if (UB != null)
            {
                uint mSecperDC = (uint)m_RotationDuration / Count(DKability.DeathCoil);
                uint UBCount = (uint)m_RotationDuration / Math.Max(UB.Cooldown, mSecperDC);
                for (; UBCount > 0; UBCount--)
                {
                    ml_Rot.Add(UB);
                }
            }
            #endregion
            /*
            _cachedHaste = m_CT.m_CState.m_Stats.PhysicalHaste;
            _RotCacheType = Type.Unholy;
            _RotCache = ml_Rot;
             * */
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This is my fire 1 of everything rotation.
        /// </summary>
        public void PRE_OneEachRot()
        {
            m_szRotationName = "One Each Rotation";
            ResetRotation();
            // Setup an instance of each ability.
            // No runes:
            AbilityDK_Outbreak OutB = new AbilityDK_Outbreak(m_CT.m_CState);
            // Single Runes:
            AbilityDK_IcyTouch IT = new AbilityDK_IcyTouch(m_CT.m_CState);
            AbilityDK_FrostFever FF = new AbilityDK_FrostFever(m_CT.m_CState);
            AbilityDK_PlagueStrike PS = new AbilityDK_PlagueStrike(m_CT.m_CState);
            AbilityDK_BloodPlague BP = new AbilityDK_BloodPlague(m_CT.m_CState);
            AbilityDK_BloodStrike BS = new AbilityDK_BloodStrike(m_CT.m_CState);
            AbilityDK_HeartStrike HS = new AbilityDK_HeartStrike(m_CT.m_CState);
            AbilityDK_NecroticStrike NS = new AbilityDK_NecroticStrike(m_CT.m_CState);
            AbilityDK_Pestilence Pest = new AbilityDK_Pestilence(m_CT.m_CState);
            AbilityDK_BloodBoil BB = new AbilityDK_BloodBoil(m_CT.m_CState);
            AbilityDK_HowlingBlast HB = new AbilityDK_HowlingBlast(m_CT.m_CState);
            AbilityDK_ScourgeStrike SS = new AbilityDK_ScourgeStrike(m_CT.m_CState);
            AbilityDK_DeathNDecay DnD = new AbilityDK_DeathNDecay(m_CT.m_CState);
            // Multi Runes:
            AbilityDK_DeathStrike DS = new AbilityDK_DeathStrike(m_CT.m_CState);
            AbilityDK_FesteringStrike Fest = new AbilityDK_FesteringStrike(m_CT.m_CState);
            AbilityDK_Obliterate OB = new AbilityDK_Obliterate(m_CT.m_CState);
            // RP:  Unlikely to start w/ RP abilities to open.
            AbilityDK_RuneStrike RS = new AbilityDK_RuneStrike(m_CT.m_CState);
            AbilityDK_DeathCoil DC = new AbilityDK_DeathCoil(m_CT.m_CState);
            AbilityDK_FrostStrike FS = new AbilityDK_FrostStrike(m_CT.m_CState);

            // For now, let's just blow everything in here one each.
            ml_Rot.Add(IT);
            ml_Rot.Add(FF);
            ml_Rot.Add(PS);
            ml_Rot.Add(BP);
            ml_Rot.Add(BS);
            ml_Rot.Add(HS);
            ml_Rot.Add(BB);
            ml_Rot.Add(NS);
            ml_Rot.Add(HB);
            ml_Rot.Add(SS);
            ml_Rot.Add(DnD);

            ml_Rot.Add(DS);
            ml_Rot.Add(OB);
            ml_Rot.Add(Fest);

            ml_Rot.Add(RS);
            ml_Rot.Add(DC);
            ml_Rot.Add(FS);

            BuildCosts();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Generate a rotation based on available resources.
        /// </summary>
        public void PostAbilitiesSingleUse(bool bThreat)
        {
            // Setup an instance of each ability.
            // No runes:
            AbilityDK_Outbreak OutB = new AbilityDK_Outbreak(m_CState);
            // Single Runes:
            AbilityDK_IcyTouch IT = new AbilityDK_IcyTouch(m_CState);

            PostData(IT);
            AbilityDK_FrostFever FF = new AbilityDK_FrostFever(m_CState);

            PostData(FF);
            AbilityDK_PlagueStrike PS = new AbilityDK_PlagueStrike(m_CState);

            PostData(PS);
            AbilityDK_BloodPlague BP = new AbilityDK_BloodPlague(m_CState);

            PostData(BP);
            AbilityDK_BloodStrike BS = new AbilityDK_BloodStrike(m_CState);

            PostData(BS);
            AbilityDK_HeartStrike HS = new AbilityDK_HeartStrike(m_CState);

            PostData(HS);
            AbilityDK_NecroticStrike NS = new AbilityDK_NecroticStrike(m_CState);

            PostData(NS);
//            AbilityDK_Pestilence Pest = new AbilityDK_Pestilence(m_CState);
            AbilityDK_BloodBoil BB = new AbilityDK_BloodBoil(m_CState);

            PostData(BB);
            AbilityDK_HowlingBlast HB = new AbilityDK_HowlingBlast(m_CState);

            PostData(HB);
            AbilityDK_ScourgeStrike SS = new AbilityDK_ScourgeStrike(m_CState);

            PostData(SS);
            AbilityDK_DeathNDecay DnD = new AbilityDK_DeathNDecay(m_CState);

            PostData(DnD);
            // Multi Runes:
            AbilityDK_DeathStrike DS = new AbilityDK_DeathStrike(m_CState);

            PostData(DS);
            AbilityDK_FesteringStrike Fest = new AbilityDK_FesteringStrike(m_CState);

            PostData(Fest);
            AbilityDK_Obliterate OB = new AbilityDK_Obliterate(m_CState);

            PostData(OB);
            // RP:
            AbilityDK_RuneStrike RS = new AbilityDK_RuneStrike(m_CState);

            PostData(RS);
            AbilityDK_DeathCoil DC = new AbilityDK_DeathCoil(m_CState);

            PostData(DC);
            AbilityDK_FrostStrike FS = new AbilityDK_FrostStrike(m_CState);

            PostData(FS);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// This a more basic rotation that assumes Dark Tranformations will be rolled in
        /// </summary>
        public void PRE_Unholy_short()
        {
            ResetRotation();

            m_szRotationName = "Unholy Rotation";
            // Because, really, Unholy should be in Unholy Presence. 
            if (m_CT.m_Opts.presence != Presence.Unholy)
            {
                m_szRotationName += "\nYou should be in Unholy Presence.";
            }
            // Setup an instance of each ability.
            // No runes:
            AbilityDK_Outbreak Outbreak = new AbilityDK_Outbreak(m_CT.m_CState);
            // Single Runes:
            //            AbilityDK_IcyTouch IT = new AbilityDK_IcyTouch(m_CT.m_CState);
            AbilityDK_FrostFever FF = new AbilityDK_FrostFever(m_CT.m_CState);
            //            AbilityDK_PlagueStrike PS = new AbilityDK_PlagueStrike(m_CT.m_CState);
            AbilityDK_BloodPlague BP = new AbilityDK_BloodPlague(m_CT.m_CState);
            // AbilityDK_BloodStrike BS = new AbilityDK_BloodStrike(m_CT.m_CState);
            AbilityDK_ScourgeStrike SS = new AbilityDK_ScourgeStrike(m_CT.m_CState);
            AbilityDK_FesteringStrike Fest = new AbilityDK_FesteringStrike(m_CT.m_CState);
            AbilityDK_DeathCoil DC = new AbilityDK_DeathCoil(m_CT.m_CState);
            AbilityDK_UnholyBlight UB = null;
            if (DC.ml_TriggeredAbility != null && DC.ml_TriggeredAbility.Length > 0) UB = DC.ml_TriggeredAbility[0] as AbilityDK_UnholyBlight;
            AbilityDK_DeathNDecay DnD = new AbilityDK_DeathNDecay(m_CT.m_CState);

            // Simple outbreak, Festx2 DnD, SSx5 & Fill w/ DCs
            int[] AvailableResources = new int[EnumHelper.GetCount(typeof(DKCostTypes))];
            uint subrotDuration = 0;
            uint GCDdur = MIN_GCD_MS;
            // Fill the 3 mins duration 
            if (m_CT.m_Opts.presence == Presence.Unholy)
                GCDdur = MIN_GCD_MS_UH;

            subrotDuration = Outbreak.Cooldown;
            uint diseaseGCDs = Outbreak.Cooldown / GCDdur;
            if (m_CT.m_CState.m_Stats.RPp5 > 0)
                AvailableResources[(int)DKCostTypes.RunicPower] += (int)((subrotDuration / 5000) * m_CT.m_CState.m_Stats.RPp5);
            // TODO: This still assumes that we're filling every GCD w/ an ability. 
            // We know that's not the case in most situations.
            ml_Rot.Add(Outbreak); // 60 sec CD.
            ProcessRunningRunes(AvailableResources, Outbreak.AbilityCost);
            ml_Rot.Add(FF);
            ml_Rot.Add(BP);
            // 1 GCDs

            // Fill the disease.
            for (uint i = 3; i > 0; i--)
            {
                ml_Rot.Add(DnD); diseaseGCDs--;
                ProcessRunningRunes(AvailableResources, DnD.AbilityCost);
                ml_Rot.Add(SS); diseaseGCDs--;
                ProcessRunningRunes(AvailableResources, SS.AbilityCost);
                ml_Rot.Add(Fest); diseaseGCDs--;
                ProcessRunningRunes(AvailableResources, Fest.AbilityCost);
                ml_Rot.Add(Fest); diseaseGCDs--;
                ProcessRunningRunes(AvailableResources, Fest.AbilityCost);
                ml_Rot.Add(SS); diseaseGCDs--;
                ProcessRunningRunes(AvailableResources, SS.AbilityCost);
                ml_Rot.Add(SS); diseaseGCDs--;
                ProcessRunningRunes(AvailableResources, SS.AbilityCost);
                ml_Rot.Add(SS); diseaseGCDs--;
                ProcessRunningRunes(AvailableResources, SS.AbilityCost);
                ml_Rot.Add(SS); diseaseGCDs--;
                ProcessRunningRunes(AvailableResources, SS.AbilityCost);
                while (AvailableResources[(int)DKCostTypes.RunicPower] > DC.RunicPower
                    && diseaseGCDs > 0)
                {
                    ml_Rot.Add(DC); diseaseGCDs--;
                    ProcessRunningRunes(AvailableResources, DC.AbilityCost);
                }
                BuildCosts();
            }
            m_RunicPower = -1 * AvailableResources[(int)DKCostTypes.RunicPower];
            if (m_RunicPower < 0)
            {
                AbilityDK_DeathCoil DCP = new AbilityDK_DeathCoil(m_CT.m_CState);
                DCP.szName = "DC (RP_Partial)";
                DCP.bPartial = true;
                DCP.fPartialValue = (float)Math.Abs(m_RunicPower) / (float)DCP.RunicPower;
                DCP.RunicPower = (int)((float)DCP.RunicPower * DCP.fPartialValue);
                ml_Rot.Add(DCP);
                m_RunicPower += DCP.RunicPower;
            }
            BuildCosts();

            #region Sudden Doom
            if (m_CT.m_CState.m_Talents.SuddenDoom > 0)
            {
                AbilityDK_Base ability;
                float fRimeMod = this.Count(DKability.White) * (.05f * (float)m_CT.m_CState.m_Talents.SuddenDoom);
                if (fRimeMod > 1)
                {
                    for (; fRimeMod > 1; fRimeMod--)
                    {
                        ability = new AbilityDK_DeathCoil(m_CT.m_CState);
                        ability.szName = "DC (SuddenDoom)";
                        // These are free DCs.
                        ability.AbilityCost[(int)DKCostTypes.Blood] = 0;
                        ability.AbilityCost[(int)DKCostTypes.Frost] = 0;
                        ability.AbilityCost[(int)DKCostTypes.UnHoly] = 0;
                        ability.AbilityCost[(int)DKCostTypes.Death] = 0;
                        ability.AbilityCost[(int)DKCostTypes.RunicPower] = 0;
                        ml_Rot.Add(ability);
                    }
                }
                if (fRimeMod > 0 && fRimeMod < 1)
                {
                    // we want 1 full use, and then any sub values.
                    ability = new AbilityDK_DeathCoil(m_CT.m_CState);
                    ability.szName = "DC (SD_Partial)";
                    ability.bPartial = true;
                    ability.fPartialValue = fRimeMod;
                    // These are free DCs.
                    ability.AbilityCost[(int)DKCostTypes.Blood] = 0;
                    ability.AbilityCost[(int)DKCostTypes.Frost] = 0;
                    ability.AbilityCost[(int)DKCostTypes.UnHoly] = 0;
                    ability.AbilityCost[(int)DKCostTypes.Death] = 0;
                    ability.AbilityCost[(int)DKCostTypes.RunicPower] = 0;
                    ml_Rot.Add(ability);
                }
            }
            #endregion

            #region Unholy Blight
            if (UB != null)
            {
                uint mSecperDC = (uint)m_RotationDuration / Count(DKability.DeathCoil);
                uint UBCount = (uint)m_RotationDuration / Math.Max(UB.uDuration, mSecperDC);
                for (; UBCount > 0; UBCount--)
                {
                    ml_Rot.Add(UB);
                }
            }
            #endregion
            BuildCosts();

        }
Ejemplo n.º 5
0
        /// <summary>
        /// Generate a rotation based on available resources.
        /// </summary>
        public void PostAbilitiesSingleUse(bool bThreat)
        {
            // Setup an instance of each ability.
            // No runes:
            AbilityDK_Outbreak OutB = new AbilityDK_Outbreak(m_CState);
            // Single Runes:
            AbilityDK_IcyTouch IT = new AbilityDK_IcyTouch(m_CState);
            PostData(IT);
            AbilityDK_FrostFever FF = new AbilityDK_FrostFever(m_CState);
            PostData(FF);
            AbilityDK_PlagueStrike PS = new AbilityDK_PlagueStrike(m_CState);
            PostData(PS);
            AbilityDK_BloodPlague BP = new AbilityDK_BloodPlague(m_CState);
            PostData(BP);
            AbilityDK_BloodStrike BS = new AbilityDK_BloodStrike(m_CState);
            PostData(BS);
            AbilityDK_HeartStrike HS = new AbilityDK_HeartStrike(m_CState);
            PostData(HS);
            AbilityDK_NecroticStrike NS = new AbilityDK_NecroticStrike(m_CState);
            PostData(NS);
//            AbilityDK_Pestilence Pest = new AbilityDK_Pestilence(m_CState);
            AbilityDK_BloodBoil BB = new AbilityDK_BloodBoil(m_CState);
            PostData(BB);
            AbilityDK_HowlingBlast HB = new AbilityDK_HowlingBlast(m_CState);
            PostData(HB);
            AbilityDK_ScourgeStrike SS = new AbilityDK_ScourgeStrike(m_CState);
            PostData(SS);
            AbilityDK_DeathNDecay DnD = new AbilityDK_DeathNDecay(m_CState);
            PostData(DnD);
            // Multi Runes:
            AbilityDK_DeathStrike DS = new AbilityDK_DeathStrike(m_CState);
            PostData(DS);
            AbilityDK_FesteringStrike Fest = new AbilityDK_FesteringStrike(m_CState);
            PostData(Fest);
            AbilityDK_Obliterate OB = new AbilityDK_Obliterate(m_CState);
            PostData(OB);
            // RP:
            AbilityDK_RuneStrike RS = new AbilityDK_RuneStrike(m_CState);
            PostData(RS);
            AbilityDK_DeathCoil DC = new AbilityDK_DeathCoil(m_CState);
            PostData(DC);
            AbilityDK_FrostStrike FS = new AbilityDK_FrostStrike(m_CState);
            PostData(FS);
        }