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(); }
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); } }
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); } }
public static int CompareDamageByRunes(AbilityDK_Base a, AbilityDK_Base b) { return(CompareXPerCost(a, b, DKCostTypes.Death, false)); }
public static int CompareDamageByRP(AbilityDK_Base a, AbilityDK_Base b) { return(CompareXPerCost(a, b, DKCostTypes.RunicPower, false)); }
public static int CompareByTotalDamage(AbilityDK_Base a, AbilityDK_Base b) { return(CompareXPerCost(a, b, DKCostTypes.None, false)); }
public static int CompareDamageByCooldown(AbilityDK_Base a, AbilityDK_Base b) { return(CompareXPerCost(a, b, DKCostTypes.CooldownTime, false)); }
public static int CompareThreatByRP(AbilityDK_Base a, AbilityDK_Base b) { return(CompareXPerCost(a, b, DKCostTypes.RunicPower, true)); }
public static int CompareByTotalDamage(AbilityDK_Base a, AbilityDK_Base b) { return CompareXPerCost(a, b, DKCostTypes.None, false); }
public static int CompareThreatByRunes(AbilityDK_Base a, AbilityDK_Base b) { return CompareXPerCost(a, b, DKCostTypes.Death, true); }
public static int CompareThreatByRunes(AbilityDK_Base a, AbilityDK_Base b) { return(CompareXPerCost(a, b, DKCostTypes.Death, true)); }
public static int CompareByTotalThreat(AbilityDK_Base a, AbilityDK_Base b) { return CompareXPerCost(a, b, DKCostTypes.None, true); }
public static int CompareThreatByCooldown(AbilityDK_Base a, AbilityDK_Base b) { return CompareXPerCost(a, b, DKCostTypes.CooldownTime, true); }
public static int CompareDamageByRP(AbilityDK_Base a, AbilityDK_Base b) { return CompareXPerCost(a, b, DKCostTypes.RunicPower, false); }
public static int CompareDamageByRunes(AbilityDK_Base a, AbilityDK_Base b) { return CompareXPerCost(a, b, DKCostTypes.Death, false); }
public static int CompareDamageByCooldown(AbilityDK_Base a, AbilityDK_Base b) { return CompareXPerCost(a, b, DKCostTypes.CooldownTime, false); }
public static int CompareByTotalThreat(AbilityDK_Base a, AbilityDK_Base b) { return(CompareXPerCost(a, b, DKCostTypes.None, true)); }
public static int CompareTPSByRunes(AbilityDK_Base a, AbilityDK_Base b) { return CompareValuePSPerRune(a, b, DKCostTypes.Death, true); }
public static int CompareThreatByCooldown(AbilityDK_Base a, AbilityDK_Base b) { return(CompareXPerCost(a, b, DKCostTypes.CooldownTime, true)); }
public static int CompareTPSByRunes(AbilityDK_Base a, AbilityDK_Base b) { return(CompareValuePSPerRune(a, b, DKCostTypes.Death, true)); }
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); }
public static int CompareThreatByRP(AbilityDK_Base a, AbilityDK_Base b) { return CompareXPerCost(a, b, DKCostTypes.RunicPower, true); }
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; }