예제 #1
0
파일: CombatTable2.cs 프로젝트: rakot/rawr
        private void PostData(AbilityDK_Base ability)
        {
            int i = ability.AbilityIndex;

            m_Calcs.DPUdamSub[i]    = ability.GetTotalDamage();
            m_Calcs.DPUthreatSub[i] = ability.GetTotalThreat();
            m_Calcs.DPUdpsSub[i]    = ability.GetDPS();
            m_Calcs.DPUtpsSub[i]    = ability.GetTPS();
        }
예제 #2
0
        public override void UpdateCombatState(CombatState CS)
        {
            base.UpdateCombatState(CS);
            float RPCost = 40 - (CS.m_Talents.RunicCorruption * 3);

            //RPCost /= (1f + (.05f * (float)CS.m_Talents.SuddenDoom));
            // Moving SD procs to be extra DCs in the rotation rather than reduced cost.
            // This makes it more like Rime.
            this.AbilityCost[(int)DKCostTypes.RunicPower] = (int)Math.Floor(RPCost);
            if (CS.m_Talents.UnholyBlight > 0)
            {
                ml_TriggeredAbility                = new AbilityDK_Base[1];
                ml_TriggeredAbility[0]             = new AbilityDK_UnholyBlight(CS);
                ml_TriggeredAbility[0].uBaseDamage = (uint)((this.TotalDamage / 10) / 10);
            }
        }
예제 #3
0
        public override void UpdateCombatState(CombatState CS)
        {
            base.UpdateCombatState(CS);
            float RPCost = 40 - (CS.m_Talents.RunicCorruption * 3);
            //RPCost /= (1f + (.05f * (float)CS.m_Talents.SuddenDoom));  
            // Moving SD procs to be extra DCs in the rotation rather than reduced cost.
            // This makes it more like Rime.
            this.AbilityCost[(int)DKCostTypes.RunicPower] = (int)Math.Floor(RPCost);
            if (CS.m_Talents.UnholyBlight > 0)
            {
                ml_TriggeredAbility = new AbilityDK_Base[1];
                ml_TriggeredAbility[0] = new AbilityDK_UnholyBlight(CS);
                ml_TriggeredAbility[0].uBaseDamage = (uint)((this.TotalDamage / 10) /10);
            }

        }
예제 #4
0
 public static int CompareDamageByRunes(AbilityDK_Base a, AbilityDK_Base b)
 {
     return(CompareXPerCost(a, b, DKCostTypes.Death, false));
 }
예제 #5
0
 public static int CompareDamageByRP(AbilityDK_Base a, AbilityDK_Base b)
 {
     return(CompareXPerCost(a, b, DKCostTypes.RunicPower, false));
 }
예제 #6
0
 public static int CompareByTotalDamage(AbilityDK_Base a, AbilityDK_Base b)
 {
     return(CompareXPerCost(a, b, DKCostTypes.None, false));
 }
예제 #7
0
 public static int CompareDamageByCooldown(AbilityDK_Base a, AbilityDK_Base b)
 {
     return(CompareXPerCost(a, b, DKCostTypes.CooldownTime, false));
 }
예제 #8
0
 public static int CompareThreatByRP(AbilityDK_Base a, AbilityDK_Base b)
 {
     return(CompareXPerCost(a, b, DKCostTypes.RunicPower, true));
 }
예제 #9
0
 public static int CompareByTotalDamage(AbilityDK_Base a, AbilityDK_Base b)
 {
     return CompareXPerCost(a, b, DKCostTypes.None, false);            
 }
예제 #10
0
 public static int CompareThreatByRunes(AbilityDK_Base a, AbilityDK_Base b)
 {
     return CompareXPerCost(a, b, DKCostTypes.Death, true);
 }
예제 #11
0
 public static int CompareThreatByRunes(AbilityDK_Base a, AbilityDK_Base b)
 {
     return(CompareXPerCost(a, b, DKCostTypes.Death, true));
 }
예제 #12
0
 public static int CompareByTotalThreat(AbilityDK_Base a, AbilityDK_Base b)
 {
     return CompareXPerCost(a, b, DKCostTypes.None, true);
 }
예제 #13
0
 public static int CompareThreatByCooldown(AbilityDK_Base a, AbilityDK_Base b)
 {
     return CompareXPerCost(a, b, DKCostTypes.CooldownTime, true);
 }
예제 #14
0
 public static int CompareDamageByRP(AbilityDK_Base a, AbilityDK_Base b)
 {
     return CompareXPerCost(a, b, DKCostTypes.RunicPower, false);
 }
예제 #15
0
 public static int CompareDamageByRunes(AbilityDK_Base a, AbilityDK_Base b)
 {
     return CompareXPerCost(a, b, DKCostTypes.Death, false);
 }
예제 #16
0
 public static int CompareDamageByCooldown(AbilityDK_Base a, AbilityDK_Base b)
 {
     return CompareXPerCost(a, b, DKCostTypes.CooldownTime, false);
 }
예제 #17
0
 public static int CompareByTotalThreat(AbilityDK_Base a, AbilityDK_Base b)
 {
     return(CompareXPerCost(a, b, DKCostTypes.None, true));
 }
예제 #18
0
 public static int CompareTPSByRunes(AbilityDK_Base a, AbilityDK_Base b)
 {
     return CompareValuePSPerRune(a, b, DKCostTypes.Death, true);
 }
예제 #19
0
 public static int CompareThreatByCooldown(AbilityDK_Base a, AbilityDK_Base b)
 {
     return(CompareXPerCost(a, b, DKCostTypes.CooldownTime, true));
 }
예제 #20
0
 private void PostData(AbilityDK_Base ability)
 {
     int i = ability.AbilityIndex;
     m_Calcs.DPUdamSub[i] = ability.GetTotalDamage();
     m_Calcs.DPUthreatSub[i] = ability.GetTotalThreat();
     m_Calcs.DPUdpsSub[i] = ability.GetDPS();
     m_Calcs.DPUtpsSub[i] = ability.GetTPS();
 }
예제 #21
0
 public static int CompareTPSByRunes(AbilityDK_Base a, AbilityDK_Base b)
 {
     return(CompareValuePSPerRune(a, b, DKCostTypes.Death, true));
 }
예제 #22
0
        public static int CompareValuePSPerRune(AbilityDK_Base a, AbilityDK_Base b, DKCostTypes t, bool bThreat)
        {
            int   ic     = 0;
            float aRunes = 1;
            float bRunes = 1;

            // Sum of cost:
            switch (t)
            {
            case DKCostTypes.Blood:
                aRunes = a.AbilityCost[(int)DKCostTypes.Blood];
                bRunes = b.AbilityCost[(int)DKCostTypes.Blood];
                break;

            case DKCostTypes.Frost:
                aRunes = a.AbilityCost[(int)DKCostTypes.Frost];
                bRunes = b.AbilityCost[(int)DKCostTypes.Frost];
                break;

            case DKCostTypes.UnHoly:
                aRunes = a.AbilityCost[(int)DKCostTypes.UnHoly];
                bRunes = b.AbilityCost[(int)DKCostTypes.UnHoly];
                break;

            case DKCostTypes.Death:
                aRunes = a.AbilityCost[(int)DKCostTypes.Blood] + a.AbilityCost[(int)DKCostTypes.Frost] + a.AbilityCost[(int)DKCostTypes.UnHoly];
                bRunes = b.AbilityCost[(int)DKCostTypes.Blood] + b.AbilityCost[(int)DKCostTypes.Frost] + b.AbilityCost[(int)DKCostTypes.UnHoly];
                break;

            case DKCostTypes.RunicPower:
                aRunes = a.RunicPower;
                bRunes = b.RunicPower;
                break;

            case DKCostTypes.CastTime:
            case DKCostTypes.CooldownTime:
            case DKCostTypes.DurationTime:
            default:
                aRunes = 1;
                bRunes = 1;
                break;
            }
            if (aRunes != 0 || bRunes != 0)
            {
                if (aRunes != 0 && bRunes != 0)
                {
                    float avalue = 0;
                    float bvalue = 0;
                    if (bThreat)
                    {
                        // Let's expand this to include triggered values as well.
                        avalue = a.GetTPS();
                        if (a.ml_TriggeredAbility != null)
                        {
                            foreach (AbilityDK_Base TriggerByA in a.ml_TriggeredAbility)
                            {
                                avalue += TriggerByA.GetTPS();
                            }
                        }
                        avalue /= aRunes;
                        bvalue  = b.GetTPS();
                        if (b.ml_TriggeredAbility != null)
                        {
                            foreach (AbilityDK_Base TriggerByA in b.ml_TriggeredAbility)
                            {
                                bvalue += TriggerByA.GetTPS();
                            }
                        }
                        bvalue /= bRunes;
                    }
                    else
                    {
                        // Let's expand this to include triggered values as well.
                        avalue = a.GetDPS();
                        if (a.ml_TriggeredAbility != null)
                        {
                            foreach (AbilityDK_Base TriggerByA in a.ml_TriggeredAbility)
                            {
                                avalue += TriggerByA.GetDPS();
                            }
                        }
                        avalue /= aRunes;
                        bvalue  = b.GetDPS();
                        if (b.ml_TriggeredAbility != null)
                        {
                            foreach (AbilityDK_Base TriggerByA in b.ml_TriggeredAbility)
                            {
                                bvalue += TriggerByA.GetDPS();
                            }
                        }
                        bvalue /= bRunes;
                    }
                    if (avalue != bvalue)
                    {
                        // This is setup where we want a descending order.
                        if (avalue > bvalue)
                        {
                            ic = -1;
                        }
                        else
                        {
                            ic = 1;
                        }
                    }
                }
                else // one of them are 0
                {
                    if (aRunes > bRunes)
                    {
                        ic = -1;
                    }
                    else
                    {
                        ic = 1;
                    }
                }
            }
            return(ic);
        }
예제 #23
0
 public static int CompareThreatByRP(AbilityDK_Base a, AbilityDK_Base b)
 {
     return CompareXPerCost(a, b, DKCostTypes.RunicPower, true);
 }
예제 #24
0
        public static int CompareValuePSPerRune(AbilityDK_Base a, AbilityDK_Base b, DKCostTypes t, bool bThreat)
        {
            int ic = 0;
            float aRunes = 1;
            float bRunes = 1;

            // Sum of cost:
            switch (t)
            {
                case DKCostTypes.Blood:
                    aRunes = a.AbilityCost[(int)DKCostTypes.Blood];
                    bRunes = b.AbilityCost[(int)DKCostTypes.Blood];
                    break;
                case DKCostTypes.Frost:
                    aRunes = a.AbilityCost[(int)DKCostTypes.Frost];
                    bRunes = b.AbilityCost[(int)DKCostTypes.Frost];
                    break;
                case DKCostTypes.UnHoly:
                    aRunes = a.AbilityCost[(int)DKCostTypes.UnHoly];
                    bRunes = b.AbilityCost[(int)DKCostTypes.UnHoly];
                    break;
                case DKCostTypes.Death:
                    aRunes = a.AbilityCost[(int)DKCostTypes.Blood] + a.AbilityCost[(int)DKCostTypes.Frost] + a.AbilityCost[(int)DKCostTypes.UnHoly];
                    bRunes = b.AbilityCost[(int)DKCostTypes.Blood] + b.AbilityCost[(int)DKCostTypes.Frost] + b.AbilityCost[(int)DKCostTypes.UnHoly];
                    break;
                case DKCostTypes.RunicPower:
                    aRunes = a.RunicPower;
                    bRunes = b.RunicPower;
                    break;
                case DKCostTypes.CastTime:
                case DKCostTypes.CooldownTime:
                case DKCostTypes.DurationTime:
                default:
                    aRunes = 1;
                    bRunes = 1;
                    break;

            }
            if (aRunes != 0 || bRunes != 0)
            {
                if (aRunes != 0 && bRunes != 0)
                {
                    float avalue = 0;
                    float bvalue = 0;
                    if (bThreat)
                    {
                        // Let's expand this to include triggered values as well.
                        avalue = a.GetTPS();
                        if (a.ml_TriggeredAbility != null)
                        {
                            foreach (AbilityDK_Base TriggerByA in a.ml_TriggeredAbility)
                            {
                                avalue += TriggerByA.GetTPS();
                            }
                        }
                        avalue /= aRunes;
                        bvalue = b.GetTPS();
                        if (b.ml_TriggeredAbility != null)
                        {
                            foreach (AbilityDK_Base TriggerByA in b.ml_TriggeredAbility)
                            {
                                bvalue += TriggerByA.GetTPS();
                            }
                        }
                        bvalue /= bRunes;
                    }
                    else
                    {
                        // Let's expand this to include triggered values as well.
                        avalue = a.GetDPS();
                        if (a.ml_TriggeredAbility != null)
                        {
                            foreach (AbilityDK_Base TriggerByA in a.ml_TriggeredAbility)
                            {
                                avalue += TriggerByA.GetDPS();
                            }
                        }
                        avalue /= aRunes;
                        bvalue = b.GetDPS();
                        if (b.ml_TriggeredAbility != null)
                        {
                            foreach (AbilityDK_Base TriggerByA in b.ml_TriggeredAbility)
                            {
                                bvalue += TriggerByA.GetDPS();
                            }
                        }
                        bvalue /= bRunes;
                    }
                    if (avalue != bvalue)
                    {
                        // This is setup where we want a descending order.
                        if (avalue > bvalue)
                            ic = -1;
                        else
                            ic = 1;
                    }
                }
                else // one of them are 0
                {
                    if (aRunes > bRunes)
                        ic = -1;
                    else
                        ic = 1;
                }
            }
            return ic;
        }