diff --git a/Specialization/Blood.lua b/Specialization/Blood.lua index 5b5a3c5..1c1c12f 100644 --- a/Specialization/Blood.lua +++ b/Specialization/Blood.lua @@ -69,6 +69,9 @@ local RunicPowerDeficit local Blood = {} +local trinket_one_buffs +local trinket_two_buffs +local damage_trinket_priority local death_strike_dump_amount local bone_shield_refresh_value local heart_strike_rp_drw @@ -162,17 +165,18 @@ local function GetTotemDuration(name) end -function Blood:precombat() -end function Blood:deathbringer() - death_strike_dump_amount = 35 + death_strike_dump_amount = 65 bone_shield_refresh_value = 6 - heart_strike_rp_drw = ( 21 + targets * (talents[classtable.Heartbreaker] and talents[classtable.Heartbreaker] or 0) * 2 ) + heart_strike_rp_drw = ( 25 + targets * (talents[classtable.Heartbreaker] and talents[classtable.Heartbreaker] or 0) * 2 ) + if (MaxDps:CheckSpellUsable(classtable.RaiseDead, 'RaiseDead')) and cooldown[classtable.RaiseDead].ready then + MaxDps:GlowCooldown(classtable.RaiseDead, cooldown[classtable.RaiseDead].ready) + end if (MaxDps:CheckSpellUsable(classtable.BloodTap, 'BloodTap')) and (Runes <= 1) and cooldown[classtable.BloodTap].ready then MaxDps:GlowCooldown(classtable.BloodTap, cooldown[classtable.BloodTap].ready) end - if (MaxDps:CheckSpellUsable(classtable.RaiseDead, 'RaiseDead')) and cooldown[classtable.RaiseDead].ready then - MaxDps:GlowCooldown(classtable.RaiseDead, cooldown[classtable.RaiseDead].ready) + if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (true and buff[classtable.BloodShieldBuff].up and buff[classtable.BloodShieldBuff].remains <= gcd) and cooldown[classtable.DeathStrike].ready then + if not setSpell then setSpell = classtable.DeathStrike end end if (MaxDps:CheckSpellUsable(classtable.DeathsCaress, 'DeathsCaress')) and (not buff[classtable.BoneShieldBuff].up) and cooldown[classtable.DeathsCaress].ready then if not setSpell then setSpell = classtable.DeathsCaress end @@ -180,22 +184,31 @@ function Blood:deathbringer() if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (buff[classtable.CoagulopathyBuff].remains <= gcd or RunicPowerDeficit <35) and cooldown[classtable.DeathStrike].ready then if not setSpell then setSpell = classtable.DeathStrike end end - if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (debuff[classtable.ReapersMarkDeBuff].up and ( debuff[classtable.ReapersMarkDeBuff].remains <2 * gcd or cooldown[classtable.BloodBoil].charges >= 1.5 )) and cooldown[classtable.BloodBoil].ready then + if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (debuff[classtable.ReapersMarkDeBuff].up and debuff[classtable.ReapersMarkDeBuff].remains <2 * gcd) and cooldown[classtable.BloodBoil].ready then + if not setSpell then setSpell = classtable.BloodBoil end + end + if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (debuff[classtable.ReapersMarkDeBuff].up and cooldown[classtable.BloodBoil].charges >= 1.5) and cooldown[classtable.BloodBoil].ready then if not setSpell then setSpell = classtable.BloodBoil end end if (MaxDps:CheckSpellUsable(classtable.Consumption, 'Consumption')) and (debuff[classtable.ReapersMarkDeBuff].up and debuff[classtable.BloodPlagueDeBuff].up) and cooldown[classtable.Consumption].ready then if not setSpell then setSpell = classtable.Consumption end end - if (MaxDps:CheckSpellUsable(classtable.SoulReaper, 'SoulReaper')) and (targets == 1 and MaxDps:GetTimeToPct(35) <5 and ttd >( debuff[classtable.SoulReaperDeBuff].remains + 5 )) and cooldown[classtable.SoulReaper].ready then + if (MaxDps:CheckSpellUsable(classtable.SoulReaper, 'SoulReaper')) and (buff[classtable.ReaperofSoulsBuff].up and buff[classtable.CoagulopathyBuff].remains >1 * gcd) and cooldown[classtable.SoulReaper].ready then if not setSpell then setSpell = classtable.SoulReaper end end - if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (( debuff[classtable.ReapersMarkDeBuff].up and ( ( UnitExists('pet') and UnitName('pet') == 'dancing_rune_weapon' ) ) ) or not debuff[classtable.BloodPlagueDeBuff].up or ( cooldown[classtable.BloodBoil].charges >= 1 and debuff[classtable.ReapersMarkDeBuff].up and buff[classtable.CoagulopathyBuff].remains >2 * gcd )) and cooldown[classtable.BloodBoil].ready then + if (MaxDps:CheckSpellUsable(classtable.SoulReaper, 'SoulReaper')) and (targets == 1 and ( MaxDps:GetTimeToPct(35) <5 or buff[classtable.ReaperofSoulsBuff].up ) and ttd >( debuff[classtable.SoulReaperDeBuff].remains + 5 )) and cooldown[classtable.SoulReaper].ready then + if not setSpell then setSpell = classtable.SoulReaper end + end + if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (( debuff[classtable.ReapersMarkDeBuff].up and ( ( UnitExists('pet') and UnitName('pet') == 'dancing_rune_weapon' ) and debuff[classtable.BloodPlagueDeBuff].count <2 ) ) or not debuff[classtable.BloodPlagueDeBuff].up or ( cooldown[classtable.BloodBoil].charges >= 1 and debuff[classtable.ReapersMarkDeBuff].up and buff[classtable.CoagulopathyBuff].remains >2 * gcd )) and cooldown[classtable.BloodBoil].ready then if not setSpell then setSpell = classtable.BloodBoil end end if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (( ( debuff[classtable.ReapersMarkDeBuff].up ) and not debuff[classtable.DeathandDecayDebuff].up ) or not buff[classtable.DeathandDecayBuff].up) and cooldown[classtable.DeathandDecay].ready then if not setSpell then setSpell = classtable.DeathandDecay end end - if (MaxDps:CheckSpellUsable(classtable.Marrowrend, 'Marrowrend')) and (( buff[classtable.ExterminatePainfulDeathBuff].up or buff[classtable.ExterminateBuff].up ) and ( RunicPowerDeficit >20 and buff[classtable.CoagulopathyBuff].remains >2 * gcd )) and cooldown[classtable.Marrowrend].ready then + if (MaxDps:CheckSpellUsable(classtable.Marrowrend, 'Marrowrend')) and (buff[classtable.ExterminateBuff].up and ( RunicPowerDeficit >20 and buff[classtable.CoagulopathyBuff].remains >2 * gcd )) and cooldown[classtable.Marrowrend].ready then + if not setSpell then setSpell = classtable.Marrowrend end + end + if (MaxDps:CheckSpellUsable(classtable.Marrowrend, 'Marrowrend')) and (( buff[classtable.ExterminateBuff].up ) and ( RunicPowerDeficit >20 and buff[classtable.CoagulopathyBuff].remains >2 * gcd )) and cooldown[classtable.Marrowrend].ready then if not setSpell then setSpell = classtable.Marrowrend end end if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (debuff[classtable.ReapersMarkDeBuff].up) and cooldown[classtable.AbominationLimb].ready then @@ -240,106 +253,129 @@ function Blood:deathbringer() if (MaxDps:CheckSpellUsable(classtable.HeartStrike, 'HeartStrike')) and (Runes >= 1 or DeathKnight:TimeToRunes(2) = heart_strike_rp_drw) and cooldown[classtable.HeartStrike].ready then if not setSpell then setSpell = classtable.HeartStrike end end + if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and cooldown[classtable.BloodBoil].ready then + if not setSpell then setSpell = classtable.BloodBoil end + end end function Blood:sanlayn() - death_strike_dump_amount = 50 + death_strike_dump_amount = 65 death_strike_pre_essence_dump_amount = 20 - bone_shield_refresh_value = 11 + bone_shield_refresh_value = 7 heart_strike_rp_drw = ( 21 + targets * (talents[classtable.Heartbreaker] and talents[classtable.Heartbreaker] or 0) * 2 ) if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (buff[classtable.CoagulopathyBuff].remains <= gcd) and cooldown[classtable.DeathStrike].ready then if not setSpell then setSpell = classtable.DeathStrike end end - if (MaxDps:CheckSpellUsable(classtable.RaiseDead, 'RaiseDead')) and cooldown[classtable.RaiseDead].ready then - MaxDps:GlowCooldown(classtable.RaiseDead, cooldown[classtable.RaiseDead].ready) + if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (true and buff[classtable.BloodShieldBuff].up and buff[classtable.BloodShieldBuff].remains <= gcd) and cooldown[classtable.DeathStrike].ready then + if not setSpell then setSpell = classtable.DeathStrike end end - if (MaxDps:CheckSpellUsable(classtable.BloodTap, 'BloodTap')) and (Runes <3) and cooldown[classtable.BloodTap].ready then - MaxDps:GlowCooldown(classtable.BloodTap, cooldown[classtable.BloodTap].ready) + if (MaxDps:CheckSpellUsable(classtable.DeathsCaress, 'DeathsCaress')) and (not buff[classtable.BoneShieldBuff].up) and cooldown[classtable.DeathsCaress].ready then + if not setSpell then setSpell = classtable.DeathsCaress end end - if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (not debuff[classtable.BloodPlagueDeBuff].up or ( debuff[classtable.BloodPlagueDeBuff].remains <10 and buff[classtable.VampiricBloodBuff].up )) and cooldown[classtable.BloodBoil].ready then + if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (not debuff[classtable.BloodPlagueDeBuff].up or ( debuff[classtable.BloodPlagueDeBuff].remains <10 and buff[classtable.DancingRuneWeaponBuff].up )) and cooldown[classtable.BloodBoil].ready then if not setSpell then setSpell = classtable.BloodBoil end end - if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (buff[classtable.CoagulopathyBuff].remains >= 2 * gcd and ( not buff[classtable.EssenceoftheBloodQueenBuff].up or buff[classtable.EssenceoftheBloodQueenBuff].remains >= 3 * gcd ) and ( not buff[classtable.VampiricBloodBuff].up or buff[classtable.VampiricBloodBuff].remains >= 6 * gcd )) and cooldown[classtable.AbominationLimb].ready then - MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) + if (MaxDps:CheckSpellUsable(classtable.Consumption, 'Consumption')) and (( UnitExists('pet') and UnitName('pet') == 'dancing_rune_weapon' ) and GetTotemDuration('dancing_rune_weapon') <= 3) and cooldown[classtable.Consumption].ready then + if not setSpell then setSpell = classtable.Consumption end end - if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (cooldown[classtable.VampiricBlood].remains <3 * gcd and buff[classtable.CoagulopathyBuff].remains >= gcd) and cooldown[classtable.BloodBoil].ready then - if not setSpell then setSpell = classtable.BloodBoil end + if (MaxDps:CheckSpellUsable(classtable.Bonestorm, 'Bonestorm')) and (( buff[classtable.DeathandDecayBuff].up ) and buff[classtable.BoneShieldBuff].count >5 and cooldown[classtable.DancingRuneWeapon].remains >= 25) and cooldown[classtable.Bonestorm].ready then + if not setSpell then setSpell = classtable.Bonestorm end + end + if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (RunicPower >= 108) and cooldown[classtable.DeathStrike].ready then + if not setSpell then setSpell = classtable.DeathStrike end end - if (MaxDps:CheckSpellUsable(classtable.HeartStrike, 'HeartStrike')) and (buff[classtable.VampiricBloodBuff].up and ( buff[classtable.VampiricBloodBuff].remains <2 * gcd )) and cooldown[classtable.HeartStrike].ready then + if (MaxDps:CheckSpellUsable(classtable.HeartStrike, 'HeartStrike')) and (buff[classtable.DancingRuneWeaponBuff].up and Runes >1) and cooldown[classtable.HeartStrike].ready then if not setSpell then setSpell = classtable.HeartStrike end end - if (MaxDps:CheckSpellUsable(classtable.Bonestorm, 'Bonestorm')) and (( not buff[classtable.VampiricBloodBuff].up and buff[classtable.DeathandDecayBuff].up ) and buff[classtable.BoneShieldBuff].count >5 and cooldown[classtable.DancingRuneWeapon].remains >= 10 and buff[classtable.CoagulopathyBuff].remains >3 * gcd) and cooldown[classtable.Bonestorm].ready then - if not setSpell then setSpell = classtable.Bonestorm end + if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not buff[classtable.DeathandDecayBuff].up) and cooldown[classtable.DeathandDecay].ready then + if not setSpell then setSpell = classtable.DeathandDecay end end - if (MaxDps:CheckSpellUsable(classtable.Tombstone, 'Tombstone')) and (( not buff[classtable.VampiricBloodBuff].up and buff[classtable.DeathandDecayBuff].up ) and buff[classtable.BoneShieldBuff].count >5 and RunicPowerDeficit >= 30 and cooldown[classtable.DancingRuneWeapon].remains >= 10 and buff[classtable.CoagulopathyBuff].remains >2 * gcd) and cooldown[classtable.Tombstone].ready then + if (MaxDps:CheckSpellUsable(classtable.HeartStrike, 'HeartStrike')) and (buff[classtable.InflictionofSorrowBuff].up and buff[classtable.DeathandDecayBuff].up) and cooldown[classtable.HeartStrike].ready then + if not setSpell then setSpell = classtable.HeartStrike end + end + if (MaxDps:CheckSpellUsable(classtable.RaiseDead, 'RaiseDead')) and cooldown[classtable.RaiseDead].ready then + MaxDps:GlowCooldown(classtable.RaiseDead, cooldown[classtable.RaiseDead].ready) + end + if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and cooldown[classtable.AbominationLimb].ready then + MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) + end + if (MaxDps:CheckSpellUsable(classtable.Tombstone, 'Tombstone')) and (( not buff[classtable.DancingRuneWeaponBuff].up and buff[classtable.DeathandDecayBuff].up ) and buff[classtable.BoneShieldBuff].count >5 and RunicPowerDeficit >= 30 and cooldown[classtable.DancingRuneWeapon].remains >= 25 and buff[classtable.CoagulopathyBuff].remains >2 * gcd) and cooldown[classtable.Tombstone].ready then MaxDps:GlowCooldown(classtable.Tombstone, cooldown[classtable.Tombstone].ready) end - if (MaxDps:CheckSpellUsable(classtable.DancingRuneWeapon, 'DancingRuneWeapon')) and (buff[classtable.CoagulopathyBuff].remains >= 2 * gcd and ( not buff[classtable.EssenceoftheBloodQueenBuff].up or buff[classtable.EssenceoftheBloodQueenBuff].remains >= 3 * gcd ) and ( not buff[classtable.VampiricBloodBuff].up or buff[classtable.VampiricBloodBuff].remains >= 6 * gcd )) and cooldown[classtable.DancingRuneWeapon].ready then + if (MaxDps:CheckSpellUsable(classtable.DancingRuneWeapon, 'DancingRuneWeapon')) and (buff[classtable.CoagulopathyBuff].remains >= 2 * gcd and ( not buff[classtable.EssenceoftheBloodQueenBuff].up or buff[classtable.EssenceoftheBloodQueenBuff].remains >= 3 * gcd ) and ( not buff[classtable.DancingRuneWeaponBuff].up or buff[classtable.DancingRuneWeaponBuff].remains >= 6 * gcd )) and cooldown[classtable.DancingRuneWeapon].ready then MaxDps:GlowCooldown(classtable.DancingRuneWeapon, cooldown[classtable.DancingRuneWeapon].ready) end - if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (not buff[classtable.VampiricStrikeBuff].up and cooldown[classtable.VampiricBlood].remains <= 30 and RunicPower >death_strike_pre_essence_dump_amount and buff[classtable.EssenceoftheBloodQueenBuff].count >= 3) and cooldown[classtable.DeathStrike].ready then + if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (not buff[classtable.VampiricStrikeBuff].up and cooldown[classtable.DancingRuneWeapon].remains <= 30 and RunicPower >death_strike_pre_essence_dump_amount and buff[classtable.EssenceoftheBloodQueenBuff].count >= 3) and cooldown[classtable.DeathStrike].ready then if not setSpell then setSpell = classtable.DeathStrike end end - if (MaxDps:CheckSpellUsable(classtable.HeartStrike, 'HeartStrike')) and (( buff[classtable.VampiricBloodBuff].up ) and ( buff[classtable.CoagulopathyBuff].remains >2 * gcd )) and cooldown[classtable.HeartStrike].ready then - if not setSpell then setSpell = classtable.HeartStrike end + if (MaxDps:CheckSpellUsable(classtable.Marrowrend, 'Marrowrend')) and (not debuff[classtable.BonestormDeBuff].up and ( buff[classtable.BoneShieldBuff].count 20 or buff[classtable.BoneShieldBuff].remains <= 3 )) and cooldown[classtable.Marrowrend].ready then + if not setSpell then setSpell = classtable.Marrowrend end end - if (MaxDps:CheckSpellUsable(classtable.Consumption, 'Consumption')) and (buff[classtable.VampiricBloodBuff].remains <= 3 or buff[classtable.InflictionofSorrowBuff].up or cooldown[classtable.VampiricBlood].remains >5) and cooldown[classtable.Consumption].ready then - if not setSpell then setSpell = classtable.Consumption end + if (MaxDps:CheckSpellUsable(classtable.Marrowrend, 'Marrowrend')) and (not debuff[classtable.BonestormDeBuff].up and ( buff[classtable.BoneShieldBuff].count 20 and not cooldown[classtable.DancingRuneWeapon].ready or buff[classtable.BoneShieldBuff].remains <= 3 )) and cooldown[classtable.Marrowrend].ready then + if not setSpell then setSpell = classtable.Marrowrend end + end + if (MaxDps:CheckSpellUsable(classtable.SoulReaper, 'SoulReaper')) and (targets == 1 and MaxDps:GetTimeToPct(35) <5 and ttd >( debuff[classtable.SoulReaperDeBuff].remains + 5 )) and cooldown[classtable.SoulReaper].ready then + if not setSpell then setSpell = classtable.SoulReaper end end - if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (buff[classtable.VampiricBloodBuff].up and ( buff[classtable.CoagulopathyBuff].remains <2 * gcd or ( RunicPowerDeficit <= heart_strike_rp_drw and buff[classtable.InciteTerrorBuff].count >= 3 ) )) and cooldown[classtable.DeathStrike].ready then + if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (buff[classtable.DancingRuneWeaponBuff].up and ( buff[classtable.CoagulopathyBuff].remains <2 * gcd or ( RunicPowerDeficit <= heart_strike_rp_drw and buff[classtable.InciteTerrorBuff].count >= 3 ) )) and cooldown[classtable.DeathStrike].ready then if not setSpell then setSpell = classtable.DeathStrike end end if (MaxDps:CheckSpellUsable(classtable.HeartStrike, 'HeartStrike')) and (buff[classtable.VampiricStrikeBuff].up or buff[classtable.InflictionofSorrowBuff].up and ( ( talents[classtable.Consumption] and buff[classtable.ConsumptionBuff].up ) or not talents[classtable.Consumption] ) and debuff[classtable.BloodPlagueDeBuff].up and debuff[classtable.BloodPlagueDeBuff].remains >20) and cooldown[classtable.HeartStrike].ready then if not setSpell then setSpell = classtable.HeartStrike end end - if (MaxDps:CheckSpellUsable(classtable.VampiricBlood, 'VampiricBlood')) and (buff[classtable.CoagulopathyBuff].up) and cooldown[classtable.VampiricBlood].ready then - MaxDps:GlowCooldown(classtable.VampiricBlood, cooldown[classtable.VampiricBlood].ready) - end - if (MaxDps:CheckSpellUsable(classtable.DeathsCaress, 'DeathsCaress')) and (not buff[classtable.BoneShieldBuff].up) and cooldown[classtable.DeathsCaress].ready then - if not setSpell then setSpell = classtable.DeathsCaress end - end - if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not buff[classtable.DeathandDecayBuff].up or ( buff[classtable.CrimsonScourgeBuff].up and ( not buff[classtable.VampiricBloodBuff].up or buff[classtable.VampiricBloodBuff].remains >3 * gcd ) )) and cooldown[classtable.DeathandDecay].ready then - if not setSpell then setSpell = classtable.DeathandDecay end - end - if (MaxDps:CheckSpellUsable(classtable.Marrowrend, 'Marrowrend')) and (not debuff[classtable.BonestormDeBuff].up and ( buff[classtable.BoneShieldBuff].count 20 or buff[classtable.BoneShieldBuff].remains <= 3 )) and cooldown[classtable.Marrowrend].ready then - if not setSpell then setSpell = classtable.Marrowrend end + if (MaxDps:CheckSpellUsable(classtable.DancingRuneWeapon, 'DancingRuneWeapon')) and (buff[classtable.CoagulopathyBuff].up) and cooldown[classtable.DancingRuneWeapon].ready then + MaxDps:GlowCooldown(classtable.DancingRuneWeapon, cooldown[classtable.DancingRuneWeapon].ready) end if (MaxDps:CheckSpellUsable(classtable.DeathStrike, 'DeathStrike')) and (RunicPowerDeficit <= heart_strike_rp_drw or RunicPower >= death_strike_dump_amount) and cooldown[classtable.DeathStrike].ready then if not setSpell then setSpell = classtable.DeathStrike end end + if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (cooldown[classtable.BloodBoil].charges >= 2 or ( DeathKnight:TimeToRunes(5) <= gcd )) and cooldown[classtable.BloodBoil].ready then + if not setSpell then setSpell = classtable.BloodBoil end + end + if (MaxDps:CheckSpellUsable(classtable.Consumption, 'Consumption')) and (cooldown[classtable.DancingRuneWeapon].remains >20) and cooldown[classtable.Consumption].ready then + if not setSpell then setSpell = classtable.Consumption end + end if (MaxDps:CheckSpellUsable(classtable.HeartStrike, 'HeartStrike')) and (Runes >1) and cooldown[classtable.HeartStrike].ready then if not setSpell then setSpell = classtable.HeartStrike end end - if (MaxDps:CheckSpellUsable(classtable.Bonestorm, 'Bonestorm')) and (buff[classtable.DeathandDecayBuff].up and buff[classtable.BoneShieldBuff].count >5 and cooldown[classtable.DancingRuneWeapon].remains >= 10) and cooldown[classtable.Bonestorm].ready then + if (MaxDps:CheckSpellUsable(classtable.Bonestorm, 'Bonestorm')) and (buff[classtable.DeathandDecayBuff].up and buff[classtable.BoneShieldBuff].count >5 and cooldown[classtable.DancingRuneWeapon].remains >= 25) and cooldown[classtable.Bonestorm].ready then if not setSpell then setSpell = classtable.Bonestorm end end - if (MaxDps:CheckSpellUsable(classtable.Tombstone, 'Tombstone')) and (buff[classtable.DeathandDecayBuff].up and buff[classtable.BoneShieldBuff].count >5 and RunicPowerDeficit >= 30 and cooldown[classtable.DancingRuneWeapon].remains >= 10) and cooldown[classtable.Tombstone].ready then + if (MaxDps:CheckSpellUsable(classtable.Tombstone, 'Tombstone')) and (buff[classtable.DeathandDecayBuff].up and buff[classtable.BoneShieldBuff].count >5 and RunicPowerDeficit >= 30 and cooldown[classtable.DancingRuneWeapon].remains >= 25) and cooldown[classtable.Tombstone].ready then MaxDps:GlowCooldown(classtable.Tombstone, cooldown[classtable.Tombstone].ready) end - if (MaxDps:CheckSpellUsable(classtable.SoulReaper, 'SoulReaper')) and (targets == 1 and MaxDps:GetTimeToPct(35) <5 and ttd >( debuff[classtable.SoulReaperDeBuff].remains + 5 )) and cooldown[classtable.SoulReaper].ready then - if not setSpell then setSpell = classtable.SoulReaper end - end - if (MaxDps:CheckSpellUsable(classtable.BloodBoil, 'BloodBoil')) and (cooldown[classtable.BloodBoil].charges >= 2 or ( DeathKnight:TimeToRunes(5) <= gcd )) and cooldown[classtable.BloodBoil].ready then - if not setSpell then setSpell = classtable.BloodBoil end - end end local function ClearCDs() - MaxDps:GlowCooldown(classtable.BloodTap, false) + MaxDps:GlowCooldown(classtable.MindFreeze, false) + MaxDps:GlowCooldown(classtable.IceboundFortitude, false) + MaxDps:GlowCooldown(classtable.VampiricBlood, false) MaxDps:GlowCooldown(classtable.RaiseDead, false) + MaxDps:GlowCooldown(classtable.BloodTap, false) MaxDps:GlowCooldown(classtable.AbominationLimb, false) MaxDps:GlowCooldown(classtable.ReapersMark, false) MaxDps:GlowCooldown(classtable.Blooddrinker, false) MaxDps:GlowCooldown(classtable.DancingRuneWeapon, false) MaxDps:GlowCooldown(classtable.Tombstone, false) - MaxDps:GlowCooldown(classtable.VampiricBlood, false) end function Blood:callaction() + if (MaxDps:CheckSpellUsable(classtable.MindFreeze, 'MindFreeze')) and cooldown[classtable.MindFreeze].ready then + MaxDps:GlowCooldown(classtable.MindFreeze, ( select(8,UnitCastingInfo('target')) ~= nil and not select(8,UnitCastingInfo('target')) or select(7,UnitChannelInfo('target')) ~= nil and not select(7,UnitChannelInfo('target'))) ) + end + if (MaxDps:CheckSpellUsable(classtable.IceboundFortitude, 'IceboundFortitude')) and ((UnitThreatSituation('player') == 2 or UnitThreatSituation('player') == 3) and incoming_damage_5s >= ibf_damage and not ( buff[classtable.DancingRuneWeaponBuff].up or buff[classtable.VampiricBloodBuff].up )) and cooldown[classtable.IceboundFortitude].ready then + MaxDps:GlowCooldown(classtable.IceboundFortitude, cooldown[classtable.IceboundFortitude].ready) + end + if (MaxDps:CheckSpellUsable(classtable.VampiricBlood, 'VampiricBlood')) and ((UnitThreatSituation('player') == 2 or UnitThreatSituation('player') == 3) and incoming_damage_5s >= vb_damage and not ( buff[classtable.DancingRuneWeaponBuff].up or buff[classtable.IceboundFortitudeBuff].up )) and cooldown[classtable.VampiricBlood].ready then + MaxDps:GlowCooldown(classtable.VampiricBlood, cooldown[classtable.VampiricBlood].ready) + end + if (MaxDps:CheckSpellUsable(classtable.RuneTap, 'RuneTap')) and ((UnitThreatSituation('player') == 2 or UnitThreatSituation('player') == 3) and incoming_damage_5s >= rt_damage and not ( buff[classtable.DancingRuneWeaponBuff].up or buff[classtable.VampiricBloodBuff].up or buff[classtable.IceboundFortitudeBuff].up )) and cooldown[classtable.RuneTap].ready then + if not setSpell then setSpell = classtable.RuneTap end + end if ((MaxDps.ActiveHeroTree == 'deathbringer')) then Blood:deathbringer() end - if ((MaxDps.ActiveHeroTree == 'sanlayn') or (MaxDps.ActiveHeroTree == '')) then + if (not (MaxDps.ActiveHeroTree == 'deathbringer')) then Blood:sanlayn() end end @@ -377,30 +413,29 @@ function DeathKnight:Blood() -- self.Flags[spellId] = false -- self:ClearGlowIndependent(spellId, spellId) --end + classtable.BloodShieldBuff = 77535 classtable.BoneShieldBuff = 195181 classtable.CoagulopathyBuff = 391481 - classtable.ReapersMarkDeBuff = 0 + classtable.ReapersMarkDeBuff = 439843 classtable.BloodPlagueDeBuff = 55078 + classtable.ReaperofSoulsBuff = 440002 classtable.SoulReaperDeBuff = 343294 classtable.DeathandDecayDebuff = 52212 classtable.DeathandDecayBuff = 188290 - classtable.ExterminatePainfulDeathBuff = 0 - classtable.ExterminateBuff = 0 + classtable.ExterminateBuff = 441378 classtable.DancingRuneWeaponBuff = 81256 - classtable.BonestormDeBuff = 0 + classtable.BonestormDeBuff = 194844 classtable.HemostasisBuff = 273947 - classtable.VampiricBloodBuff = 55233 + classtable.InflictionofSorrowBuff = 433925 classtable.EssenceoftheBloodQueenBuff = 0 - classtable.VampiricStrikeBuff = 0 - classtable.InflictionofSorrowBuff = 0 - classtable.InciteTerrorBuff = 0 - classtable.ConsumptionBuff = 0 - classtable.CrimsonScourgeBuff = 81141 + classtable.VampiricStrikeBuff = 433899 + classtable.InciteTerrorBuff = 434151 + classtable.ConsumptionBuff = 274156 + classtable.VampiricBloodBuff = 55233 + classtable.IceboundFortitudeBuff = 48792 setSpell = nil ClearCDs() - Blood:precombat() - Blood:callaction() if setSpell then return setSpell end end diff --git a/Specialization/Frost.lua b/Specialization/Frost.lua index 5603263..4f0d59e 100644 --- a/Specialization/Frost.lua +++ b/Specialization/Frost.lua @@ -100,6 +100,7 @@ local pooling_runes local pooling_runic_power local ga_priority local breath_dying +local fwf_buffs local function twoh_check() @@ -181,44 +182,38 @@ end function Frost:precombat() rw_buffs = talents[classtable.GatheringStorm] or talents[classtable.BitingCold] breath_rp_cost = 17 - static_rime_buffs = talents[classtable.RageoftheFrozenChampion] or talents[classtable.Icebreaker] + static_rime_buffs = talents[classtable.RageoftheFrozenChampion] or talents[classtable.Icebreaker] or talents[classtable.BindInDarkness] breath_rp_threshold = 60 erw_breath_rp_trigger = 70 erw_breath_rune_trigger = 3 oblit_rune_pooling = 4 breath_rime_rp_threshold = 60 end -function Frost:aoe() - if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (buff[classtable.KillingMachineBuff].up and talents[classtable.CleavingStrikes] and buff[classtable.DeathandDecayBuff].up) and cooldown[classtable.Obliterate].ready then - if not setSpell then setSpell = classtable.Obliterate end - end - if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (not debuff[classtable.FrostFeverDeBuff].up) and cooldown[classtable.HowlingBlast].ready then - if not setSpell then setSpell = classtable.HowlingBlast end - end - if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (not pooling_runic_power and debuff[classtable.RazoriceDeBuff].count == 5 and talents[classtable.ShatteringBlade] and ( talents[classtable.ShatteredFrost] or targets <4 )) and cooldown[classtable.FrostStrike].ready then - if not setSpell then setSpell = classtable.FrostStrike end - end - if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (buff[classtable.RimeBuff].up) and cooldown[classtable.HowlingBlast].ready then - if not setSpell then setSpell = classtable.HowlingBlast end +function Frost:cold_heart() + if (MaxDps:CheckSpellUsable(classtable.ChainsofIce, 'ChainsofIce')) and (ttd = 4 or (twoh_check() == true and 2 or 1) and buff[classtable.ColdHeartBuff].count >8 ) or buff[classtable.KillingMachineBuff].up and ( not (twoh_check() == true and 2 or 1) and buff[classtable.ColdHeartBuff].count >8 or (twoh_check() == true and 2 or 1) and buff[classtable.ColdHeartBuff].count >10 ) )) and cooldown[classtable.ChainsofIce].ready then + if not setSpell then setSpell = classtable.ChainsofIce end end - if (MaxDps:CheckSpellUsable(classtable.GlacialAdvance, 'GlacialAdvance')) and (not pooling_runic_power and ( ga_priority or debuff[classtable.RazoriceDeBuff].count <5 )) and cooldown[classtable.GlacialAdvance].ready then - if not setSpell then setSpell = classtable.GlacialAdvance end + if (MaxDps:CheckSpellUsable(classtable.ChainsofIce, 'ChainsofIce')) and (not talents[classtable.Obliteration] and buff[classtable.PillarofFrostBuff].up and buff[classtable.ColdHeartBuff].count >= 10 and ( buff[classtable.PillarofFrostBuff].remains 15 and ( buff[classtable.ColdHeartBuff].count >= 10 and buff[classtable.UnholyStrengthBuff].up or buff[classtable.ColdHeartBuff].count >= 13 )) and cooldown[classtable.ChainsofIce].ready then + if not setSpell then setSpell = classtable.ChainsofIce end end - if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (not pooling_runic_power) and cooldown[classtable.FrostStrike].ready then - if not setSpell then setSpell = classtable.FrostStrike end + if (MaxDps:CheckSpellUsable(classtable.ChainsofIce, 'ChainsofIce')) and (not talents[classtable.Obliteration] and not wep_rune_check('Rune of fallen_crusader') and buff[classtable.ColdHeartBuff].count >= 10 and not buff[classtable.PillarofFrostBuff].up and cooldown[classtable.PillarofFrost].remains >20) and cooldown[classtable.ChainsofIce].ready then + if not setSpell then setSpell = classtable.ChainsofIce end end - if (MaxDps:CheckSpellUsable(classtable.HornofWinter, 'HornofWinter')) and (Runes <2 and RunicPowerDeficit >25 and ( not talents[classtable.BreathofSindragosa] or true_breath_cooldown >cooldown[classtable.HornofWinter].duration - 15 )) and cooldown[classtable.HornofWinter].ready then - MaxDps:GlowCooldown(classtable.HornofWinter, cooldown[classtable.HornofWinter].ready) + if (MaxDps:CheckSpellUsable(classtable.ChainsofIce, 'ChainsofIce')) and (talents[classtable.Obliteration] and not buff[classtable.PillarofFrostBuff].up and ( buff[classtable.ColdHeartBuff].count >= 14 and buff[classtable.UnholyStrengthBuff].up or buff[classtable.ColdHeartBuff].count >= 19 or cooldown[classtable.PillarofFrost].remains <3 and buff[classtable.ColdHeartBuff].count >= 14 )) and cooldown[classtable.ChainsofIce].ready then + if not setSpell then setSpell = classtable.ChainsofIce end end end function Frost:breath() if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (buff[classtable.KillingMachineBuff].count == 2) and cooldown[classtable.Obliterate].ready then if not setSpell then setSpell = classtable.Obliterate end end - if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (rime_buffs and RunicPower >( breath_rime_rp_threshold - ( (talents[classtable.RageoftheFrozenChampion] and talents[classtable.RageoftheFrozenChampion] or 0) * 6 ) ) or not debuff[classtable.FrostFeverDeBuff].up) and cooldown[classtable.HowlingBlast].ready then + if (MaxDps:CheckSpellUsable(classtable.SoulReaper, 'SoulReaper')) and (ttd >5 and MaxDps:GetTimeToPct(35) <5 and MaxDps:GetTimeToPct(0) >5 and RunicPower >50) and cooldown[classtable.SoulReaper].ready then + if not setSpell then setSpell = classtable.SoulReaper end + end + if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (( rime_buffs or not buff[classtable.KillingMachineBuff].up and buff[classtable.PillarofFrostBuff].up and talents[classtable.Obliteration] and not buff[classtable.BonegrinderFrostBuff].up ) and RunicPower >( breath_rime_rp_threshold - ( (talents[classtable.RageoftheFrozenChampion] and talents[classtable.RageoftheFrozenChampion] or 0) * 6 ) ) or not debuff[classtable.FrostFeverDeBuff].up) and cooldown[classtable.HowlingBlast].ready then if not setSpell then setSpell = classtable.HowlingBlast end end if (MaxDps:CheckSpellUsable(classtable.HornofWinter, 'HornofWinter')) and (Runes <2 and RunicPowerDeficit >30 and ( not buff[classtable.EmpowerRuneWeaponBuff].up or RunicPower = 10 and not talents[classtable.Obliteration] or breath_dying )) and cooldown[classtable.DeathandDecay].charges > 1 and cooldown[classtable.DeathandDecay].ready then + if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not debuff[classtable.DeathandDecayDebuff].up and ( st_planning and talents[classtable.UnholyGround] and RunicPowerDeficit >= 10 and not talents[classtable.Obliteration] or breath_dying )) and cooldown[classtable.DeathandDecay].ready then if not setSpell then setSpell = classtable.DeathandDecay end end if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (breath_dying) and cooldown[classtable.HowlingBlast].ready then @@ -240,113 +235,8 @@ function Frost:breath() if not setSpell then setSpell = classtable.HowlingBlast end end end -function Frost:cold_heart() - if (MaxDps:CheckSpellUsable(classtable.ChainsofIce, 'ChainsofIce')) and (ttd = 4 or (twoh_check() == true and 2 or 1) and buff[classtable.ColdHeartBuff].count >8 ) or buff[classtable.KillingMachineBuff].up and ( not (twoh_check() == true and 2 or 1) and buff[classtable.ColdHeartBuff].count >8 or (twoh_check() == true and 2 or 1) and buff[classtable.ColdHeartBuff].count >10 ) )) and cooldown[classtable.ChainsofIce].ready then - if not setSpell then setSpell = classtable.ChainsofIce end - end - if (MaxDps:CheckSpellUsable(classtable.ChainsofIce, 'ChainsofIce')) and (not talents[classtable.Obliteration] and buff[classtable.PillarofFrostBuff].up and buff[classtable.ColdHeartBuff].count >= 10 and ( buff[classtable.PillarofFrostBuff].remains 15 and ( buff[classtable.ColdHeartBuff].count >= 10 and buff[classtable.UnholyStrengthBuff].up or buff[classtable.ColdHeartBuff].count >= 13 )) and cooldown[classtable.ChainsofIce].ready then - if not setSpell then setSpell = classtable.ChainsofIce end - end - if (MaxDps:CheckSpellUsable(classtable.ChainsofIce, 'ChainsofIce')) and (not talents[classtable.Obliteration] and not wep_rune_check('Rune of fallen_crusader') and buff[classtable.ColdHeartBuff].count >= 10 and not buff[classtable.PillarofFrostBuff].up and cooldown[classtable.PillarofFrost].remains >20) and cooldown[classtable.ChainsofIce].ready then - if not setSpell then setSpell = classtable.ChainsofIce end - end - if (MaxDps:CheckSpellUsable(classtable.ChainsofIce, 'ChainsofIce')) and (talents[classtable.Obliteration] and not buff[classtable.PillarofFrostBuff].up and ( buff[classtable.ColdHeartBuff].count >= 14 and buff[classtable.UnholyStrengthBuff].up or buff[classtable.ColdHeartBuff].count >= 19 or cooldown[classtable.PillarofFrost].remains <3 and buff[classtable.ColdHeartBuff].count >= 14 )) and cooldown[classtable.ChainsofIce].ready then - if not setSpell then setSpell = classtable.ChainsofIce end - end -end -function Frost:cooldowns() - if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (talents[classtable.Obliteration] and not buff[classtable.PillarofFrostBuff].up and sending_cds or MaxDps:boss() and ttd <15) and cooldown[classtable.AbominationLimb].ready then - MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) - end - if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (not talents[classtable.Obliteration] and sending_cds) and cooldown[classtable.AbominationLimb].ready then - MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) - end - if (MaxDps:CheckSpellUsable(classtable.RemorselessWinter, 'RemorselessWinter')) and (rw_buffs and sending_cds and ( not talents[classtable.ArcticAssault] or not buff[classtable.PillarofFrostBuff].up ) and ttd >10) and cooldown[classtable.RemorselessWinter].ready then - if not setSpell then setSpell = classtable.RemorselessWinter end - end - if (MaxDps:CheckSpellUsable(classtable.ChillStreak, 'ChillStreak')) and (sending_cds and ( not talents[classtable.ArcticAssault] or not buff[classtable.PillarofFrostBuff].up )) and cooldown[classtable.ChillStreak].ready then - MaxDps:GlowCooldown(classtable.ChillStreak, cooldown[classtable.ChillStreak].ready) - end - if (MaxDps:CheckSpellUsable(classtable.ReapersMark, 'ReapersMark')) and (not debuff[classtable.ReapersMarkDebuffDeBuff].up and not talents[classtable.BreathofSindragosa] and ( buff[classtable.PillarofFrostBuff].up or cooldown[classtable.PillarofFrost].remains >10 ) or talents[classtable.BreathofSindragosa]) and cooldown[classtable.ReapersMark].ready then - MaxDps:GlowCooldown(classtable.ReapersMark, cooldown[classtable.ReapersMark].ready) - end - if (MaxDps:CheckSpellUsable(classtable.EmpowerRuneWeapon, 'EmpowerRuneWeapon')) and (talents[classtable.Obliteration] and not talents[classtable.BreathofSindragosa] and buff[classtable.PillarofFrostBuff].up or MaxDps:boss() and ttd <20) and cooldown[classtable.EmpowerRuneWeapon].ready then - MaxDps:GlowCooldown(classtable.EmpowerRuneWeapon, cooldown[classtable.EmpowerRuneWeapon].ready) - end - if (MaxDps:CheckSpellUsable(classtable.EmpowerRuneWeapon, 'EmpowerRuneWeapon')) and (buff[classtable.BreathofSindragosaBuff].up and RunicPower breath_rp_threshold and ( Runes <2 or RunicPower >80 ) and ( cooldown[classtable.PillarofFrost].ready and sending_cds or ttd <30 ) or ( timeInCombat <10 and Runes <1 )) and cooldown[classtable.BreathofSindragosa].ready then - MaxDps:GlowCooldown(classtable.BreathofSindragosa, cooldown[classtable.BreathofSindragosa].ready) - end - if (MaxDps:CheckSpellUsable(classtable.FrostwyrmsFury, 'FrostwyrmsFury')) and ((MaxDps.ActiveHeroTree == 'rideroftheapocalypse') and talents[classtable.ApocalypseNow] and sending_cds and ( not talents[classtable.BreathofSindragosa] and buff[classtable.PillarofFrostBuff].up or buff[classtable.BreathofSindragosaBuff].up ) or MaxDps:boss() and ttd <20) and cooldown[classtable.FrostwyrmsFury].ready then - MaxDps:GlowCooldown(classtable.FrostwyrmsFury, cooldown[classtable.FrostwyrmsFury].ready) - end - if (MaxDps:CheckSpellUsable(classtable.FrostwyrmsFury, 'FrostwyrmsFury')) and (not talents[classtable.ApocalypseNow] and targets == 1 and ( talents[classtable.PillarofFrost] and buff[classtable.PillarofFrostBuff].up and not talents[classtable.Obliteration] or not talents[classtable.PillarofFrost] ) and ( (targets <2) or ( math.huge >15 + (targets>1 and MaxDps:MaxAddDuration() or 0) or talents[classtable.AbsoluteZero] and math.huge >15 + (targets>1 and MaxDps:MaxAddDuration() or 0) ) ) or MaxDps:boss() and ttd <3) and cooldown[classtable.FrostwyrmsFury].ready then - MaxDps:GlowCooldown(classtable.FrostwyrmsFury, cooldown[classtable.FrostwyrmsFury].ready) - end - if (MaxDps:CheckSpellUsable(classtable.FrostwyrmsFury, 'FrostwyrmsFury')) and (not talents[classtable.ApocalypseNow] and targets >= 2 and ( talents[classtable.PillarofFrost] and buff[classtable.PillarofFrostBuff].up or (targets >1) and (targets >1) and math.huge 1 and MaxDps:MaxAddDuration() or 0) )) and cooldown[classtable.FrostwyrmsFury].ready then - MaxDps:GlowCooldown(classtable.FrostwyrmsFury, cooldown[classtable.FrostwyrmsFury].ready) - end - if (MaxDps:CheckSpellUsable(classtable.FrostwyrmsFury, 'FrostwyrmsFury')) and (not talents[classtable.ApocalypseNow] and talents[classtable.Obliteration] and ( talents[classtable.PillarofFrost] and buff[classtable.PillarofFrostBuff].up and not (twoh_check() == true and 2 or 1) or not buff[classtable.PillarofFrostBuff].up and (twoh_check() == true and 2 or 1) and cooldown[classtable.PillarofFrost].ready==false or not talents[classtable.PillarofFrost] ) and ( buff[classtable.PillarofFrostBuff].remains 5 and MaxDps:GetTimeToPct(35) <5 and MaxDps:GetTimeToPct(0) >5 and targets <= 1 and ( talents[classtable.Obliteration] and ( buff[classtable.PillarofFrostBuff].up and not buff[classtable.KillingMachineBuff].up and Runes >2 or not buff[classtable.PillarofFrostBuff].up or buff[classtable.KillingMachineBuff].count <2 and not buff[classtable.ExterminateBuff].up and not buff[classtable.ExterminatePainfulDeathBuff].up and buff[classtable.PillarofFrostBuff].remains 50 or not buff[classtable.BreathofSindragosaBuff].up ) or not talents[classtable.BreathofSindragosa] and not talents[classtable.Obliteration] )) and cooldown[classtable.SoulReaper].ready then - if not setSpell then setSpell = classtable.SoulReaper end - end - if (MaxDps:CheckSpellUsable(classtable.Frostscythe, 'Frostscythe')) and (not buff[classtable.KillingMachineBuff].up and not buff[classtable.PillarofFrostBuff].up) and cooldown[classtable.Frostscythe].ready then - if not setSpell then setSpell = classtable.Frostscythe end - end - if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not buff[classtable.DeathandDecayBuff].up and adds_remain and ( buff[classtable.PillarofFrostBuff].up and buff[classtable.KillingMachineBuff].up and ( talents[classtable.EnduringStrength] or buff[classtable.PillarofFrostBuff].remains >5 ) or not buff[classtable.PillarofFrostBuff].up and ( cooldown[classtable.DeathandDecay].charges == 2 or cooldown[classtable.PillarofFrost].remains >cooldown[classtable.DeathandDecay].duration or not talents[classtable.TheLongWinter] and cooldown[classtable.PillarofFrost].remains 5 or talents[classtable.CleavingStrikes] and targets >= 2 )) and cooldown[classtable.DeathandDecay].charges > 1 and cooldown[classtable.DeathandDecay].ready then - if not setSpell then setSpell = classtable.DeathandDecay end - end -end -function Frost:high_prio() - if (MaxDps:CheckSpellUsable(classtable.MindFreeze, 'MindFreeze')) and (UnitCastingInfo('target') and select(8,UnitCastingInfo('target')) == false) and cooldown[classtable.MindFreeze].ready then - MaxDps:GlowCooldown(classtable.MindFreeze, ( select(8,UnitCastingInfo('target')) ~= nil and not select(8,UnitCastingInfo('target')) or select(7,UnitChannelInfo('target')) ~= nil and not select(7,UnitChannelInfo('target'))) ) - end - if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (not debuff[classtable.FrostFeverDeBuff].up and targets >= 2 and ( not talents[classtable.Obliteration] or talents[classtable.Obliteration] and ( not cooldown[classtable.PillarofFrost].ready or buff[classtable.PillarofFrostBuff].up and not buff[classtable.KillingMachineBuff].up ) )) and cooldown[classtable.HowlingBlast].ready then - if not setSpell then setSpell = classtable.HowlingBlast end - end - if (MaxDps:CheckSpellUsable(classtable.GlacialAdvance, 'GlacialAdvance')) and (ga_priority and rp_buffs and talents[classtable.Obliteration] and talents[classtable.BreathofSindragosa] and not buff[classtable.PillarofFrostBuff].up and not buff[classtable.BreathofSindragosaBuff].up and cooldown[classtable.BreathofSindragosa].remains >breath_pooling_time) and cooldown[classtable.GlacialAdvance].ready then - if not setSpell then setSpell = classtable.GlacialAdvance end - end - if (MaxDps:CheckSpellUsable(classtable.GlacialAdvance, 'GlacialAdvance')) and (ga_priority and rp_buffs and talents[classtable.BreathofSindragosa] and not buff[classtable.BreathofSindragosaBuff].up and cooldown[classtable.BreathofSindragosa].remains >breath_pooling_time) and cooldown[classtable.GlacialAdvance].ready then - if not setSpell then setSpell = classtable.GlacialAdvance end - end - if (MaxDps:CheckSpellUsable(classtable.GlacialAdvance, 'GlacialAdvance')) and (ga_priority and rp_buffs and not talents[classtable.BreathofSindragosa] and talents[classtable.Obliteration] and not buff[classtable.PillarofFrostBuff].up and not talents[classtable.ShatteredFrost]) and cooldown[classtable.GlacialAdvance].ready then - if not setSpell then setSpell = classtable.GlacialAdvance end - end - if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (targets == 1 and rp_buffs and talents[classtable.Obliteration] and talents[classtable.BreathofSindragosa] and not buff[classtable.PillarofFrostBuff].up and not buff[classtable.BreathofSindragosaBuff].up and cooldown[classtable.BreathofSindragosa].remains >breath_pooling_time) and cooldown[classtable.FrostStrike].ready then - if not setSpell then setSpell = classtable.FrostStrike end - end - if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (targets == 1 and rp_buffs and talents[classtable.BreathofSindragosa] and not buff[classtable.BreathofSindragosaBuff].up and cooldown[classtable.BreathofSindragosa].remains >breath_pooling_time) and cooldown[classtable.FrostStrike].ready then - if not setSpell then setSpell = classtable.FrostStrike end - end - if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (targets == 1 and rp_buffs and not talents[classtable.BreathofSindragosa] and talents[classtable.Obliteration] and not buff[classtable.PillarofFrostBuff].up) and cooldown[classtable.FrostStrike].ready then - if not setSpell then setSpell = classtable.FrostStrike end - end -end function Frost:obliteration() - if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (buff[classtable.KillingMachineBuff].up and ( buff[classtable.ExterminateBuff].up or buff[classtable.ExterminatePainfulDeathBuff].up or ttd 5 and MaxDps:GetTimeToPct(35) <5 and MaxDps:GetTimeToPct(0) >5 and Runes >2) and cooldown[classtable.SoulReaper].ready then + if not setSpell then setSpell = classtable.SoulReaper end + end if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (not buff[classtable.KillingMachineBuff].up and ( not debuff[classtable.FrostFeverDeBuff].up )) and cooldown[classtable.HowlingBlast].ready then if not setSpell then setSpell = classtable.HowlingBlast end end @@ -392,29 +285,53 @@ function Frost:obliteration() if not setSpell then setSpell = classtable.HowlingBlast end end end -function Frost:racials() +function Frost:aoe() + if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (buff[classtable.KillingMachineBuff].up and talents[classtable.CleavingStrikes] and buff[classtable.DeathandDecayBuff].up) and cooldown[classtable.Obliterate].ready then + if not setSpell then setSpell = classtable.Obliterate end + end + if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (not pooling_runic_power and debuff[classtable.RazoriceDeBuff].count == 5 and talents[classtable.ShatteringBlade] and ( talents[classtable.ShatteredFrost] or targets <4 )) and cooldown[classtable.FrostStrike].ready then + if not setSpell then setSpell = classtable.FrostStrike end + end + if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (not debuff[classtable.FrostFeverDeBuff].up) and cooldown[classtable.HowlingBlast].ready then + if not setSpell then setSpell = classtable.HowlingBlast end + end + if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (buff[classtable.RimeBuff].up) and cooldown[classtable.HowlingBlast].ready then + if not setSpell then setSpell = classtable.HowlingBlast end + end + if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (buff[classtable.KillingMachineBuff].count >0) and cooldown[classtable.Obliterate].ready then + if not setSpell then setSpell = classtable.Obliterate end + end + if (MaxDps:CheckSpellUsable(classtable.GlacialAdvance, 'GlacialAdvance')) and (not pooling_runic_power and ( ga_priority or debuff[classtable.RazoriceDeBuff].count <5 )) and cooldown[classtable.GlacialAdvance].ready then + if not setSpell then setSpell = classtable.GlacialAdvance end + end + if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (not pooling_runic_power) and cooldown[classtable.FrostStrike].ready then + if not setSpell then setSpell = classtable.FrostStrike end + end + if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and cooldown[classtable.Obliterate].ready then + if not setSpell then setSpell = classtable.Obliterate end + end + if (MaxDps:CheckSpellUsable(classtable.HornofWinter, 'HornofWinter')) and (Runes <2 and RunicPowerDeficit >25 and ( not talents[classtable.BreathofSindragosa] or true_breath_cooldown >cooldown[classtable.HornofWinter].duration - 15 )) and cooldown[classtable.HornofWinter].ready then + MaxDps:GlowCooldown(classtable.HornofWinter, cooldown[classtable.HornofWinter].ready) + end end function Frost:single_target() if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (talents[classtable.AFeastofSouls] and debuff[classtable.RazoriceDeBuff].count == 5 and talents[classtable.ShatteringBlade] and buff[classtable.AFeastofSoulsBuff].up) and cooldown[classtable.FrostStrike].ready then if not setSpell then setSpell = classtable.FrostStrike end end - if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (buff[classtable.KillingMachineBuff].count == 2 or buff[classtable.ExterminateBuff].up or buff[classtable.ExterminatePainfulDeathBuff].up) and cooldown[classtable.Obliterate].ready then + if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (buff[classtable.KillingMachineBuff].count == 2 or buff[classtable.ExterminateBuff].up) and cooldown[classtable.Obliterate].ready then if not setSpell then setSpell = classtable.Obliterate end end - if (MaxDps:CheckSpellUsable(classtable.HornofWinter, 'HornofWinter')) and (( not talents[classtable.BreathofSindragosa] or true_breath_cooldown >cooldown[classtable.HornofWinter].duration - 15 ) and cooldown[classtable.PillarofFrost].remains 5 and MaxDps:GetTimeToPct(35) <5 and MaxDps:GetTimeToPct(0) >5 and Runes >2) and cooldown[classtable.SoulReaper].ready then + if not setSpell then setSpell = classtable.SoulReaper end end if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (not pooling_runic_power and ( rp_buffs or ( not talents[classtable.ShatteringBlade] and RunicPowerDeficit <20 ) )) and cooldown[classtable.FrostStrike].ready then if not setSpell then setSpell = classtable.FrostStrike end @@ -425,14 +342,14 @@ function Frost:single_target() if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (not pooling_runic_power and not ( (twoh_check() == true and 2 or 1) or talents[classtable.ShatteringBlade] )) and cooldown[classtable.FrostStrike].ready then if not setSpell then setSpell = classtable.FrostStrike end end - if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (not pooling_runes) and cooldown[classtable.Obliterate].ready then + if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (not pooling_runes and (twoh_check() == true and 2 or 1)) and cooldown[classtable.Obliterate].ready then if not setSpell then setSpell = classtable.Obliterate end end if (MaxDps:CheckSpellUsable(classtable.FrostStrike, 'FrostStrike')) and (not pooling_runic_power) and cooldown[classtable.FrostStrike].ready then if not setSpell then setSpell = classtable.FrostStrike end end - if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (talents[classtable.BreathofSindragosa] and not buff[classtable.BreathofSindragosaBuff].up and not true_breath_cooldown and Runes <2 and not buff[classtable.DeathandDecayBuff].up) and cooldown[classtable.DeathandDecay].charges > 1 and cooldown[classtable.DeathandDecay].ready then - if not setSpell then setSpell = classtable.DeathandDecay end + if (MaxDps:CheckSpellUsable(classtable.Obliterate, 'Obliterate')) and (not pooling_runes) and cooldown[classtable.Obliterate].ready then + if not setSpell then setSpell = classtable.Obliterate end end if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (not debuff[classtable.FrostFeverDeBuff].up) and cooldown[classtable.HowlingBlast].ready then if not setSpell then setSpell = classtable.HowlingBlast end @@ -441,11 +358,27 @@ function Frost:single_target() MaxDps:GlowCooldown(classtable.HornofWinter, cooldown[classtable.HornofWinter].ready) end end -function Frost:trinkets() + + +local function ClearCDs() + MaxDps:GlowCooldown(classtable.MindFreeze, false) + MaxDps:GlowCooldown(classtable.AbominationLimb, false) + MaxDps:GlowCooldown(classtable.ChillStreak, false) + MaxDps:GlowCooldown(classtable.EmpowerRuneWeapon, false) + MaxDps:GlowCooldown(classtable.PillarofFrost, false) + MaxDps:GlowCooldown(classtable.BreathofSindragosa, false) + MaxDps:GlowCooldown(classtable.ReapersMark, false) + MaxDps:GlowCooldown(classtable.FrostwyrmsFury, false) + MaxDps:GlowCooldown(classtable.RaiseDead, false) + MaxDps:GlowCooldown(classtable.HornofWinter, false) end -function Frost:variables() - st_planning = targets == 1 and ( math.huge >15 or (targets <2) ) - adds_remain = targets >= 2 and ( (targets <2) or (targets >1) and targets >5 ) + +function Frost:callaction() + if (MaxDps:CheckSpellUsable(classtable.MindFreeze, 'MindFreeze')) and cooldown[classtable.MindFreeze].ready then + MaxDps:GlowCooldown(classtable.MindFreeze, ( select(8,UnitCastingInfo('target')) ~= nil and not select(8,UnitCastingInfo('target')) or select(7,UnitChannelInfo('target')) ~= nil and not select(7,UnitChannelInfo('target'))) ) + end + st_planning = targets == 1 + adds_remain = targets >1 sending_cds = ( st_planning or adds_remain ) rime_buffs = buff[classtable.RimeBuff].up and ( static_rime_buffs or talents[classtable.Avalanche] and not talents[classtable.ArcticAssault] and debuff[classtable.RazoriceDeBuff].count <5 ) rp_buffs = talents[classtable.UnleashedFrenzy] and ( buff[classtable.UnleashedFrenzyBuff].remains 0 ) and cooldown[classtable.PillarofFrost].remains 30 ) and RunicPower <35 and cooldown[classtable.PillarofFrost].remains = 4 ) or ( not talents[classtable.ShatteredFrost] and not talents[classtable.ShatteringBlade] and targets >= 2 ) breath_dying = RunicPower RunicPower % breath_rp_cost -end - - -local function ClearCDs() - MaxDps:GlowCooldown(classtable.MindFreeze, false) - MaxDps:GlowCooldown(classtable.HornofWinter, false) - MaxDps:GlowCooldown(classtable.AbominationLimb, false) - MaxDps:GlowCooldown(classtable.ChillStreak, false) - MaxDps:GlowCooldown(classtable.ReapersMark, false) - MaxDps:GlowCooldown(classtable.EmpowerRuneWeapon, false) - MaxDps:GlowCooldown(classtable.PillarofFrost, false) - MaxDps:GlowCooldown(classtable.BreathofSindragosa, false) - MaxDps:GlowCooldown(classtable.FrostwyrmsFury, false) - MaxDps:GlowCooldown(classtable.RaiseDead, false) -end - -function Frost:callaction() - if (MaxDps:CheckSpellUsable(classtable.MindFreeze, 'MindFreeze')) and cooldown[classtable.MindFreeze].ready then - MaxDps:GlowCooldown(classtable.MindFreeze, ( select(8,UnitCastingInfo('target')) ~= nil and not select(8,UnitCastingInfo('target')) or select(7,UnitChannelInfo('target')) ~= nil and not select(7,UnitChannelInfo('target'))) ) + fwf_buffs = ( buff[classtable.PillarofFrostBuff].remains 1 or debuff[classtable.RazoriceDeBuff].count == 5 or not wep_rune_check('Rune of Razorice') and ( not talents[classtable.GlacialAdvance] or not talents[classtable.Avalanche] or not talents[classtable.ArcticAssault] ) or talents[classtable.ShatteringBlade] ) + if (MaxDps:CheckSpellUsable(classtable.HowlingBlast, 'HowlingBlast')) and (not debuff[classtable.FrostFeverDeBuff].up and targets >= 2 and ( not talents[classtable.Obliteration] or talents[classtable.WitherAway] or talents[classtable.Obliteration] and ( not cooldown[classtable.PillarofFrost].ready or buff[classtable.PillarofFrostBuff].up and not buff[classtable.KillingMachineBuff].up ) )) and cooldown[classtable.HowlingBlast].ready then + if not setSpell then setSpell = classtable.HowlingBlast end + end + if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (talents[classtable.Obliteration] and not buff[classtable.PillarofFrostBuff].up and sending_cds and ( not (MaxDps.ActiveHeroTree == 'deathbringer') or cooldown[classtable.ReapersMark].remains <5 ) or MaxDps:boss() and ttd <15) and cooldown[classtable.AbominationLimb].ready then + MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) + end + if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (not talents[classtable.Obliteration] and sending_cds) and cooldown[classtable.AbominationLimb].ready then + MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) + end + if (MaxDps:CheckSpellUsable(classtable.RemorselessWinter, 'RemorselessWinter')) and (rw_buffs and sending_cds and ( not talents[classtable.ArcticAssault] or not buff[classtable.PillarofFrostBuff].up ) and ( cooldown[classtable.PillarofFrost].remains >20 or cooldown[classtable.PillarofFrost].remains <4 or ( buff[classtable.GatheringStormBuff].count == 10 and buff[classtable.RemorselessWinterBuff].remains 10) and cooldown[classtable.RemorselessWinter].ready then + if not setSpell then setSpell = classtable.RemorselessWinter end + end + if (MaxDps:CheckSpellUsable(classtable.ChillStreak, 'ChillStreak')) and (sending_cds and ( not talents[classtable.ArcticAssault] or not buff[classtable.PillarofFrostBuff].up )) and cooldown[classtable.ChillStreak].ready then + MaxDps:GlowCooldown(classtable.ChillStreak, cooldown[classtable.ChillStreak].ready) + end + if (MaxDps:CheckSpellUsable(classtable.EmpowerRuneWeapon, 'EmpowerRuneWeapon')) and (talents[classtable.Obliteration] and not talents[classtable.BreathofSindragosa] and buff[classtable.PillarofFrostBuff].up or MaxDps:boss() and ttd <20) and cooldown[classtable.EmpowerRuneWeapon].ready then + MaxDps:GlowCooldown(classtable.EmpowerRuneWeapon, cooldown[classtable.EmpowerRuneWeapon].ready) + end + if (MaxDps:CheckSpellUsable(classtable.EmpowerRuneWeapon, 'EmpowerRuneWeapon')) and (buff[classtable.BreathofSindragosaBuff].up and ( RunicPower <40 or RunicPower 1 )) and cooldown[classtable.PillarofFrost].ready then + MaxDps:GlowCooldown(classtable.PillarofFrost, cooldown[classtable.PillarofFrost].ready) + end + if (MaxDps:CheckSpellUsable(classtable.PillarofFrost, 'PillarofFrost')) and (not talents[classtable.Obliteration] and not talents[classtable.BreathofSindragosa] and sending_cds) and cooldown[classtable.PillarofFrost].ready then + MaxDps:GlowCooldown(classtable.PillarofFrost, cooldown[classtable.PillarofFrost].ready) + end + if (MaxDps:CheckSpellUsable(classtable.BreathofSindragosa, 'BreathofSindragosa')) and (not buff[classtable.BreathofSindragosaBuff].up and RunicPower >breath_rp_threshold and ( Runes <2 or RunicPower >80 ) and ( ( buff[classtable.PillarofFrostBuff].up or cooldown[classtable.PillarofFrost].remains >30 or cooldown[classtable.PillarofFrost].ready ) and sending_cds or ttd <30 ) or ( timeInCombat <10 and Runes <1 )) and cooldown[classtable.BreathofSindragosa].ready then + MaxDps:GlowCooldown(classtable.BreathofSindragosa, cooldown[classtable.BreathofSindragosa].ready) + end + if (MaxDps:CheckSpellUsable(classtable.ReapersMark, 'ReapersMark')) and (( MaxDps:boss() or ttd >13 ) and not debuff[classtable.ReapersMarkDebuffDeBuff].up and ( buff[classtable.PillarofFrostBuff].up or cooldown[classtable.PillarofFrost].remains >5 )) and cooldown[classtable.ReapersMark].ready then + MaxDps:GlowCooldown(classtable.ReapersMark, cooldown[classtable.ReapersMark].ready) + end + if (MaxDps:CheckSpellUsable(classtable.FrostwyrmsFury, 'FrostwyrmsFury')) and ((MaxDps.ActiveHeroTree == 'rideroftheapocalypse') and talents[classtable.ApocalypseNow] and sending_cds and ( not talents[classtable.BreathofSindragosa] and buff[classtable.PillarofFrostBuff].up or buff[classtable.BreathofSindragosaBuff].up ) or MaxDps:boss() and ttd <20) and cooldown[classtable.FrostwyrmsFury].ready then + MaxDps:GlowCooldown(classtable.FrostwyrmsFury, cooldown[classtable.FrostwyrmsFury].ready) + end + if (MaxDps:CheckSpellUsable(classtable.FrostwyrmsFury, 'FrostwyrmsFury')) and (not talents[classtable.ApocalypseNow] and targets == 1 and ( talents[classtable.PillarofFrost] and buff[classtable.PillarofFrostBuff].up and not talents[classtable.Obliteration] or not talents[classtable.PillarofFrost] ) and ( (targets <2) or math.huge >cooldown[classtable.FrostwyrmsFury].duration + (targets>1 and MaxDps:MaxAddDuration() or 0) ) and fwf_buffs or ttd <3) and cooldown[classtable.FrostwyrmsFury].ready then + MaxDps:GlowCooldown(classtable.FrostwyrmsFury, cooldown[classtable.FrostwyrmsFury].ready) + end + if (MaxDps:CheckSpellUsable(classtable.FrostwyrmsFury, 'FrostwyrmsFury')) and (not talents[classtable.ApocalypseNow] and targets >= 2 and ( talents[classtable.PillarofFrost] and buff[classtable.PillarofFrostBuff].up or (targets >1) and (targets >1) and math.huge 1 and MaxDps:MaxAddDuration() or 0) ) and fwf_buffs) and cooldown[classtable.FrostwyrmsFury].ready then + MaxDps:GlowCooldown(classtable.FrostwyrmsFury, cooldown[classtable.FrostwyrmsFury].ready) + end + if (MaxDps:CheckSpellUsable(classtable.FrostwyrmsFury, 'FrostwyrmsFury')) and (not talents[classtable.ApocalypseNow] and talents[classtable.Obliteration] and ( talents[classtable.PillarofFrost] and buff[classtable.PillarofFrostBuff].up and not main_hand.two_hand or not buff[classtable.PillarofFrostBuff].up and (twoh_check() == true and 2 or 1) and cooldown[classtable.PillarofFrost].ready==false or not talents[classtable.PillarofFrost] ) and fwf_buffs and ( (targets <2) or math.huge >cooldown[classtable.FrostwyrmsFury].duration + (targets>1 and MaxDps:MaxAddDuration() or 0) )) and cooldown[classtable.FrostwyrmsFury].ready then + MaxDps:GlowCooldown(classtable.FrostwyrmsFury, cooldown[classtable.FrostwyrmsFury].ready) + end + if (MaxDps:CheckSpellUsable(classtable.RaiseDead, 'RaiseDead')) and (buff[classtable.PillarofFrostBuff].up) and cooldown[classtable.RaiseDead].ready then + MaxDps:GlowCooldown(classtable.RaiseDead, cooldown[classtable.RaiseDead].ready) + end + if (MaxDps:CheckSpellUsable(classtable.Frostscythe, 'Frostscythe')) and (not buff[classtable.KillingMachineBuff].up and not buff[classtable.PillarofFrostBuff].up) and cooldown[classtable.Frostscythe].ready then + if not setSpell then setSpell = classtable.Frostscythe end + end + if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and ((MaxDps.ActiveHeroTree == 'deathbringer') and not buff[classtable.DeathandDecayBuff].up and st_planning and cooldown[classtable.ReapersMark].remains 5 ) or not buff[classtable.PillarofFrostBuff].up and ( cooldown[classtable.DeathandDecay].charges == 2 or cooldown[classtable.PillarofFrost].remains >cooldown[classtable.DeathandDecay].duration or not talents[classtable.TheLongWinter] and cooldown[classtable.PillarofFrost].remains 5 or talents[classtable.CleavingStrikes] and targets >= 2 )) and cooldown[classtable.DeathandDecay].ready then + if not setSpell then setSpell = classtable.DeathandDecay end + end + if (MaxDps:CheckSpellUsable(classtable.ArcanePulse, 'ArcanePulse')) and (cooldown_check) and cooldown[classtable.ArcanePulse].ready then + if not setSpell then setSpell = classtable.ArcanePulse end end - Frost:variables() - Frost:trinkets() - Frost:high_prio() - Frost:cooldowns() - Frost:racials() if (talents[classtable.ColdHeart] and ( not buff[classtable.KillingMachineBuff].up or talents[classtable.BreathofSindragosa] ) and ( ( debuff[classtable.RazoriceDeBuff].count == 5 or not wep_rune_check('Rune of Razorice') and not talents[classtable.GlacialAdvance] and not talents[classtable.Avalanche] and not talents[classtable.ArcticAssault] ) or MaxDps:boss() and ttd <= gcd )) then Frost:cold_heart() end - if (buff[classtable.BreathofSindragosaBuff].up) then + if (buff[classtable.BreathofSindragosaBuff].up or breath_ticks_left >0) then Frost:breath() end if (talents[classtable.Obliteration] and buff[classtable.PillarofFrostBuff].up and not buff[classtable.BreathofSindragosaBuff].up) then @@ -545,23 +520,24 @@ function DeathKnight:Frost() -- self:ClearGlowIndependent(spellId, spellId) --end classtable.KillingMachineBuff = 51124 - classtable.DeathandDecayBuff = 188290 - classtable.FrostFeverDeBuff = 55095 - classtable.RazoriceDeBuff = 51714 - classtable.RimeBuff = 59052 - classtable.EmpowerRuneWeaponBuff = 47568 - classtable.DeathandDecayDebuff = 52212 classtable.ColdHeartBuff = 281209 classtable.PillarofFrostBuff = 51271 classtable.UnholyStrengthBuff = 53365 - classtable.ReapersMarkDebuffDeBuff = 439594 - classtable.BreathofSindragosaBuff = 152279 - classtable.UnleashedFrenzyBuff = 376907 - classtable.BonegrinderFrostBuff = 0 - classtable.ExterminateBuff = 0 - classtable.ExterminatePainfulDeathBuff = 0 + classtable.BonegrinderFrostBuff = 377098 + classtable.FrostFeverDeBuff = 55095 + classtable.EmpowerRuneWeaponBuff = 47568 + classtable.DeathandDecayDebuff = 52212 + classtable.RimeBuff = 59052 + classtable.ExterminateBuff = 441378 + classtable.DeathandDecayBuff = 188290 + classtable.RazoriceDeBuff = 51714 classtable.AFeastofSoulsBuff = 440861 + classtable.UnleashedFrenzyBuff = 376907 classtable.IcyTalonsBuff = 194879 + classtable.GatheringStormBuff = 194912 + classtable.RemorselessWinterBuff = 196770 + classtable.BreathofSindragosaBuff = 152279 + classtable.ReapersMarkDebuffDeBuff = 439594 setSpell = nil ClearCDs() diff --git a/Specialization/Unholy.lua b/Specialization/Unholy.lua index 598ad2f..366a582 100644 --- a/Specialization/Unholy.lua +++ b/Specialization/Unholy.lua @@ -73,16 +73,17 @@ local trinket_one_buffs local trinket_two_buffs local trinket_one_duration local trinket_two_duration +local trinket_one_high_value +local trinket_two_high_value local trinket_one_sync local trinket_two_sync local trinket_priority local damage_trinket_priority -local st_planning -local adds_remain local apoc_timing local pop_wounds local pooling_runic_power local spend_rp +local epidemic_targets local function GetTotemDuration(name) @@ -174,22 +175,26 @@ end function Unholy:precombat() if (MaxDps:CheckSpellUsable(classtable.RaiseDead, 'RaiseDead')) and cooldown[classtable.RaiseDead].ready and not UnitAffectingCombat('player') then - if not setSpell then setSpell = classtable.RaiseDead end MaxDps:GlowCooldown(classtable.RaiseDead, cooldown[classtable.RaiseDead].ready) end if (MaxDps:CheckSpellUsable(classtable.ArmyoftheDead, 'ArmyoftheDead')) and cooldown[classtable.ArmyoftheDead].ready and not UnitAffectingCombat('player') then - if not setSpell then setSpell = classtable.ArmyoftheDead end MaxDps:GlowCooldown(classtable.ArmyoftheDead, cooldown[classtable.ArmyoftheDead].ready) end end function Unholy:aoe() + if (MaxDps:CheckSpellUsable(classtable.FesteringStrike, 'FesteringStrike')) and (buff[classtable.FesteringScytheBuff].up) and cooldown[classtable.FesteringStrike].ready then + if not setSpell then setSpell = classtable.FesteringStrike end + end if (MaxDps:CheckSpellUsable(classtable.WoundSpender, 'WoundSpender')) and (debuff[classtable.FesteringWoundDeBuff].count >= 1 and buff[classtable.DeathandDecayBuff].up and talents[classtable.BurstingSores] and cooldown[classtable.Apocalypse].remains >apoc_timing) and cooldown[classtable.WoundSpender].ready then if not setSpell then setSpell = classtable.WoundSpender end end + if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (not pooling_runic_power and targets = 1 or buff[classtable.VampiricStrikeBuff].up) and cooldown[classtable.WoundSpender].ready then if not setSpell then setSpell = classtable.WoundSpender end end + if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (targets = 1 or debuff[classtable.FesteringWoundDebuff].count >= 8 or (targets >1) and targets <= 11 and targets >5 )) and cooldown[classtable.DeathandDecay].charges > 1 and cooldown[classtable.DeathandDecay].ready then - if not setSpell then setSpell = classtable.DnD end + if (MaxDps:CheckSpellUsable(classtable.FesteringStrike, 'FesteringStrike')) and (buff[classtable.FesteringScytheBuff].up) and cooldown[classtable.FesteringStrike].ready then + if not setSpell then setSpell = classtable.FesteringStrike end + end + if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not debuff[classtable.DeathandDecayDebuff].up and ( not talents[classtable.BurstingSores] and not talents[classtable.VileContagion] or debuff[classtable.FesteringWoundDebuff].count >= 1 or debuff[classtable.FesteringWoundDebuff].count >= 8 or (targets >1) and targets <= 11 and targets >5 or not buff[classtable.DeathandDecayBuff].up and talents[classtable.Defile] )) and cooldown[classtable.DeathandDecay].ready then + if not setSpell then setSpell = classtable.DeathandDecay end end - if (MaxDps:CheckSpellUsable(classtable.WoundSpender, 'WoundSpender')) and (debuff[classtable.ChainsofIceTrollbaneSlowDeBuff].up and debuff[classtable.ChainsofIceTrollbaneSlowDeBuff].remains = 1 and debuff[classtable.FesteringWoundDeBuff].count <= 4 or buff[classtable.FesteringScytheBuff].up) and cooldown[classtable.FesteringStrike].ready then + if (MaxDps:CheckSpellUsable(classtable.FesteringStrike, 'FesteringStrike')) and (not talents[classtable.VileContagion]) and cooldown[classtable.FesteringStrike].ready then + if not setSpell then setSpell = classtable.FesteringStrike end + end + if (MaxDps:CheckSpellUsable(classtable.FesteringStrike, 'FesteringStrike')) and (cooldown[classtable.VileContagion].remains <5 or debuff[classtable.FesteringWoundDebuff].count >= 1 and debuff[classtable.FesteringWoundDeBuff].count <= 4) and cooldown[classtable.FesteringStrike].ready then if not setSpell then setSpell = classtable.FesteringStrike end end + if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (not pooling_runic_power and buff[classtable.SuddenDoomBuff].up and targets = 1 ) or MaxDps:boss() and ttd <20) and cooldown[classtable.DarkTransformation].ready then + if (MaxDps:CheckSpellUsable(classtable.DarkTransformation, 'DarkTransformation')) and (targets == 1 and ( cooldown[classtable.Apocalypse].remains <8 or not talents[classtable.Apocalypse] or targets >= 1 ) or MaxDps:boss() and ttd <20) and cooldown[classtable.DarkTransformation].ready then MaxDps:GlowCooldown(classtable.DarkTransformation, cooldown[classtable.DarkTransformation].ready) end - if (MaxDps:CheckSpellUsable(classtable.UnholyAssault, 'UnholyAssault')) and (st_planning and ( cooldown[classtable.Apocalypse].remains = 2 and buff[classtable.DarkTransformationBuff].up ) or MaxDps:boss() and ttd <20) and cooldown[classtable.UnholyAssault].ready then + if (MaxDps:CheckSpellUsable(classtable.UnholyAssault, 'UnholyAssault')) and (targets == 1 and ( cooldown[classtable.Apocalypse].remains = 2 and buff[classtable.DarkTransformationBuff].up ) or MaxDps:boss() and ttd <20) and cooldown[classtable.UnholyAssault].ready then if not setSpell then setSpell = classtable.UnholyAssault end end - if (MaxDps:CheckSpellUsable(classtable.Apocalypse, 'Apocalypse')) and (st_planning) and cooldown[classtable.Apocalypse].ready then + if (MaxDps:CheckSpellUsable(classtable.Apocalypse, 'Apocalypse')) and (targets == 1 or ttd <20) and cooldown[classtable.Apocalypse].ready then if not setSpell then setSpell = classtable.Apocalypse end end - if (MaxDps:CheckSpellUsable(classtable.Outbreak, 'Outbreak')) and (ttd >debuff[classtable.VirulentPlagueDeBuff].remains and ( debuff[classtable.VirulentPlagueDeBuff].refreshable or talents[classtable.Superstrain] and ( debuff[classtable.FrostFeverDeBuff].refreshable or debuff[classtable.BloodPlagueDeBuff].refreshable ) ) and ( not talents[classtable.UnholyBlight] or talents[classtable.Plaguebringer] ) and ( not talents[classtable.RaiseAbomination] or talents[classtable.RaiseAbomination] )) and cooldown[classtable.Outbreak].ready then + if (MaxDps:CheckSpellUsable(classtable.Outbreak, 'Outbreak')) and (ttd >debuff[classtable.VirulentPlagueDeBuff].remains and debuff[classtable.VirulentPlagueDeBuff].ticksRemain <5 and ( debuff[classtable.VirulentPlagueDeBuff].refreshable or talents[classtable.Superstrain] and ( debuff[classtable.FrostFeverDeBuff].refreshable or debuff[classtable.BloodPlagueDeBuff].refreshable ) ) and ( not talents[classtable.UnholyBlight] or talents[classtable.Plaguebringer] ) and ( not talents[classtable.RaiseAbomination] or talents[classtable.RaiseAbomination] and cooldown[classtable.RaiseAbomination].remains >debuff[classtable.VirulentPlagueDeBuff].ticksRemain * 3 )) and cooldown[classtable.Outbreak].ready then if not setSpell then setSpell = classtable.Outbreak end end - if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (st_planning and not buff[classtable.SuddenDoomBuff].up and ( buff[classtable.FestermightBuff].up and buff[classtable.FestermightBuff].count >8 or not talents[classtable.Festermight] ) and ( GetTotemDuration('apoc_ghoul') <5 or not talents[classtable.Apocalypse] ) and debuff[classtable.FesteringWoundDeBuff].count <= 2 or MaxDps:boss() and ttd <12) and cooldown[classtable.AbominationLimb].ready then + if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (targets == 1 and not buff[classtable.SuddenDoomBuff].up and ( buff[classtable.FestermightBuff].up and buff[classtable.FestermightBuff].count >8 or not talents[classtable.Festermight] ) and ( GetTotemDuration('apoc_ghoul') <5 or not talents[classtable.Apocalypse] ) and debuff[classtable.FesteringWoundDeBuff].count <= 2 or MaxDps:boss() and ttd <12) and cooldown[classtable.AbominationLimb].ready then MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) end end function Unholy:cds_aoe() - if (MaxDps:CheckSpellUsable(classtable.VileContagion, 'VileContagion')) and (debuff[classtable.FesteringWoundDeBuff].count >= 4 and ( targets >4 or (targets <2) and ttd >4 ) and ( (targets >1) and targets <= 11 or cooldown[classtable.DeathandDecay].remains <3 or buff[classtable.DeathandDecayBuff].up and debuff[classtable.FesteringWoundDeBuff].count >= 4 ) or adds_remain and debuff[classtable.FesteringWoundDeBuff].count == 6) and cooldown[classtable.VileContagion].ready then - if not setSpell then setSpell = classtable.VileContagion end - end - if (MaxDps:CheckSpellUsable(classtable.UnholyAssault, 'UnholyAssault')) and (adds_remain and ( debuff[classtable.FesteringWoundDeBuff].count >= 2 and cooldown[classtable.VileContagion].remains <3 or not talents[classtable.VileContagion] )) and cooldown[classtable.UnholyAssault].ready then + if (MaxDps:CheckSpellUsable(classtable.UnholyAssault, 'UnholyAssault')) and (targets >1 and ( cooldown[classtable.VileContagion].remains <3 or cooldown[classtable.VileContagion].remains >40 or not talents[classtable.VileContagion] )) and cooldown[classtable.UnholyAssault].ready then if not setSpell then setSpell = classtable.UnholyAssault end end - if (MaxDps:CheckSpellUsable(classtable.DarkTransformation, 'DarkTransformation')) and (adds_remain and ( cooldown[classtable.VileContagion].remains >5 or not talents[classtable.VileContagion] or debuff[classtable.DeathandDecayDebuff].up or cooldown[classtable.DeathandDecay].remains <3 )) and cooldown[classtable.DarkTransformation].ready then + if (MaxDps:CheckSpellUsable(classtable.VileContagion, 'VileContagion')) and (debuff[classtable.FesteringWoundDeBuff].count >= 4 and ( targets >4 or (targets <2) and ttd >4 ) and ( (targets >1) and targets <= 11 or cooldown[classtable.DeathandDecay].remains <3 or buff[classtable.DeathandDecayBuff].up and debuff[classtable.FesteringWoundDeBuff].count >= 4 ) or targets >1 and debuff[classtable.FesteringWoundDeBuff].count == 6) and cooldown[classtable.VileContagion].ready then + if not setSpell then setSpell = classtable.VileContagion end + end + if (MaxDps:CheckSpellUsable(classtable.DarkTransformation, 'DarkTransformation')) and (targets >1 and ( cooldown[classtable.VileContagion].remains >5 or not talents[classtable.VileContagion] or debuff[classtable.DeathandDecayDebuff].up or cooldown[classtable.DeathandDecay].remains <3 )) and cooldown[classtable.DarkTransformation].ready then MaxDps:GlowCooldown(classtable.DarkTransformation, cooldown[classtable.DarkTransformation].ready) end - if (MaxDps:CheckSpellUsable(classtable.Outbreak, 'Outbreak')) and (( debuff[classtable.VirulentPlagueDeBuff].refreshable or talents[classtable.Morbidity] and not buff[classtable.GiftoftheSanlaynBuff].up and talents[classtable.Superstrain] and debuff[classtable.FrostFeverDeBuff].refreshable and debuff[classtable.BloodPlagueDeBuff].refreshable ) and ( not talents[classtable.UnholyBlight] or talents[classtable.UnholyBlight] and cooldown[classtable.DarkTransformation].ready==false ) and ( not talents[classtable.RaiseAbomination] or talents[classtable.RaiseAbomination] and cooldown[classtable.RaiseAbomination].ready==false )) and cooldown[classtable.Outbreak].ready then + if (MaxDps:CheckSpellUsable(classtable.Outbreak, 'Outbreak')) and (debuff[classtable.VirulentPlagueDeBuff].ticksRemain <5 and ( debuff[classtable.VirulentPlagueDeBuff].refreshable or talents[classtable.Morbidity] and not buff[classtable.GiftoftheSanlaynBuff].up and talents[classtable.Superstrain] and debuff[classtable.FrostFeverDeBuff].refreshable and debuff[classtable.BloodPlagueDeBuff].refreshable ) and ( not talents[classtable.UnholyBlight] or talents[classtable.UnholyBlight] and cooldown[classtable.DarkTransformation].ready==false ) and ( not talents[classtable.RaiseAbomination] or talents[classtable.RaiseAbomination] and cooldown[classtable.RaiseAbomination].ready==false )) and cooldown[classtable.Outbreak].ready then if not setSpell then setSpell = classtable.Outbreak end end - if (MaxDps:CheckSpellUsable(classtable.Apocalypse, 'Apocalypse')) and (adds_remain and Runes <= 3) and cooldown[classtable.Apocalypse].ready then + if (MaxDps:CheckSpellUsable(classtable.Apocalypse, 'Apocalypse')) and (targets >1 and Runes <= 3) and cooldown[classtable.Apocalypse].ready then if not setSpell then setSpell = classtable.Apocalypse end end - if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (adds_remain) and cooldown[classtable.AbominationLimb].ready then + if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (targets >1) and cooldown[classtable.AbominationLimb].ready then MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) end end function Unholy:cds_aoe_san() - if (MaxDps:CheckSpellUsable(classtable.DarkTransformation, 'DarkTransformation')) and (adds_remain and buff[classtable.DeathandDecayBuff].up) and cooldown[classtable.DarkTransformation].ready then + if (MaxDps:CheckSpellUsable(classtable.DarkTransformation, 'DarkTransformation')) and (targets >1 and buff[classtable.DeathandDecayBuff].up) and cooldown[classtable.DarkTransformation].ready then MaxDps:GlowCooldown(classtable.DarkTransformation, cooldown[classtable.DarkTransformation].ready) end - if (MaxDps:CheckSpellUsable(classtable.VileContagion, 'VileContagion')) and (debuff[classtable.FesteringWoundDeBuff].count >= 4 and ( targets >4 or (targets <2) and ttd >4 ) and ( (targets >1) and targets <= 11 or cooldown[classtable.DeathandDecay].remains <3 or buff[classtable.DeathandDecayBuff].up and debuff[classtable.FesteringWoundDeBuff].count >= 4 ) or adds_remain and debuff[classtable.FesteringWoundDeBuff].count == 6) and cooldown[classtable.VileContagion].ready then - if not setSpell then setSpell = classtable.VileContagion end - end - if (MaxDps:CheckSpellUsable(classtable.UnholyAssault, 'UnholyAssault')) and (adds_remain and ( debuff[classtable.FesteringWoundDeBuff].count >= 2 and cooldown[classtable.VileContagion].remains <6 or not talents[classtable.VileContagion] )) and cooldown[classtable.UnholyAssault].ready then + if (MaxDps:CheckSpellUsable(classtable.UnholyAssault, 'UnholyAssault')) and (targets >1 and ( cooldown[classtable.VileContagion].remains <6 or cooldown[classtable.VileContagion].remains >40 or not talents[classtable.VileContagion] ) or MaxDps:boss() and ttd <20) and cooldown[classtable.UnholyAssault].ready then if not setSpell then setSpell = classtable.UnholyAssault end end + if (MaxDps:CheckSpellUsable(classtable.VileContagion, 'VileContagion')) and (debuff[classtable.FesteringWoundDeBuff].count >= 4 and ( targets >4 or (targets <2) and ttd >4 ) and ( (targets >1) and targets <= 11 or cooldown[classtable.DeathandDecay].remains <3 or buff[classtable.DeathandDecayBuff].up and debuff[classtable.FesteringWoundDeBuff].count >= 4 ) or targets >1 and debuff[classtable.FesteringWoundDeBuff].count == 6) and cooldown[classtable.VileContagion].ready then + if not setSpell then setSpell = classtable.VileContagion end + end if (MaxDps:CheckSpellUsable(classtable.Outbreak, 'Outbreak')) and (( debuff[classtable.VirulentPlagueDeBuff].refreshable or talents[classtable.Morbidity] and not buff[classtable.GiftoftheSanlaynBuff].up and talents[classtable.Superstrain] and debuff[classtable.FrostFeverDeBuff].refreshable and debuff[classtable.BloodPlagueDeBuff].refreshable ) and ( not talents[classtable.UnholyBlight] or talents[classtable.UnholyBlight] and cooldown[classtable.DarkTransformation].remains >15 % ( ( 2 * (talents[classtable.Superstrain] and talents[classtable.Superstrain] or 0) ) + ( 2 * (talents[classtable.EbonFever] and talents[classtable.EbonFever] or 0) ) + ( 2 * (talents[classtable.Plaguebringer] and talents[classtable.Plaguebringer] or 0) ) ) ) and ( not talents[classtable.RaiseAbomination] or talents[classtable.RaiseAbomination] and cooldown[classtable.RaiseAbomination].remains >15 % ( ( 2 * (talents[classtable.Superstrain] and talents[classtable.Superstrain] or 0) ) + ( 2 * (talents[classtable.EbonFever] and talents[classtable.EbonFever] or 0) ) + ( 2 * (talents[classtable.Plaguebringer] and talents[classtable.Plaguebringer] or 0) ) ) )) and cooldown[classtable.Outbreak].ready then if not setSpell then setSpell = classtable.Outbreak end end - if (MaxDps:CheckSpellUsable(classtable.Apocalypse, 'Apocalypse')) and (adds_remain and Runes <= 3) and cooldown[classtable.Apocalypse].ready then + if (MaxDps:CheckSpellUsable(classtable.Apocalypse, 'Apocalypse')) and (targets >1 and Runes <= 3) and cooldown[classtable.Apocalypse].ready then if not setSpell then setSpell = classtable.Apocalypse end end - if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (adds_remain) and cooldown[classtable.AbominationLimb].ready then + if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (targets >1) and cooldown[classtable.AbominationLimb].ready then MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) end end function Unholy:cds_san() - if (MaxDps:CheckSpellUsable(classtable.DarkTransformation, 'DarkTransformation')) and (targets >= 1 and st_planning and ( talents[classtable.Apocalypse] and ( UnitExists('pet') and UnitName('pet') == 'apoc_ghoul' ) or not talents[classtable.Apocalypse] ) or MaxDps:boss() and ttd <20) and cooldown[classtable.DarkTransformation].ready then + if (MaxDps:CheckSpellUsable(classtable.DarkTransformation, 'DarkTransformation')) and (targets >= 1 and targets == 1 and ( talents[classtable.Apocalypse] and ( UnitExists('pet') and UnitName('pet') == 'apoc_ghoul' ) or not talents[classtable.Apocalypse] ) or MaxDps:boss() and ttd <20) and cooldown[classtable.DarkTransformation].ready then MaxDps:GlowCooldown(classtable.DarkTransformation, cooldown[classtable.DarkTransformation].ready) end - if (MaxDps:CheckSpellUsable(classtable.UnholyAssault, 'UnholyAssault')) and (st_planning and ( buff[classtable.DarkTransformationBuff].up and buff[classtable.DarkTransformationBuff].remains <12 ) or MaxDps:boss() and ttd <20) and cooldown[classtable.UnholyAssault].ready then + if (MaxDps:CheckSpellUsable(classtable.UnholyAssault, 'UnholyAssault')) and (targets == 1 and ( buff[classtable.DarkTransformationBuff].up and buff[classtable.DarkTransformationBuff].remains <12 ) or MaxDps:boss() and ttd <20) and cooldown[classtable.UnholyAssault].ready then if not setSpell then setSpell = classtable.UnholyAssault end end - if (MaxDps:CheckSpellUsable(classtable.Apocalypse, 'Apocalypse')) and (st_planning and debuff[classtable.FesteringWoundDeBuff].count >= 3 or MaxDps:boss() and ttd <20) and cooldown[classtable.Apocalypse].ready then + if (MaxDps:CheckSpellUsable(classtable.Apocalypse, 'Apocalypse')) and (targets == 1 or ttd <20) and cooldown[classtable.Apocalypse].ready then if not setSpell then setSpell = classtable.Apocalypse end end - if (MaxDps:CheckSpellUsable(classtable.Outbreak, 'Outbreak')) and (ttd >debuff[classtable.VirulentPlagueDeBuff].remains and ( debuff[classtable.VirulentPlagueDeBuff].refreshable or talents[classtable.Morbidity] and buff[classtable.InflictionofSorrowBuff].up and talents[classtable.Superstrain] and debuff[classtable.FrostFeverDeBuff].refreshable and debuff[classtable.BloodPlagueDeBuff].refreshable ) and ( not talents[classtable.UnholyBlight] or talents[classtable.UnholyBlight] and cooldown[classtable.DarkTransformation].ready==false ) and ( not talents[classtable.RaiseAbomination] or talents[classtable.RaiseAbomination] and cooldown[classtable.RaiseAbomination].ready==false )) and cooldown[classtable.Outbreak].ready then + if (MaxDps:CheckSpellUsable(classtable.Outbreak, 'Outbreak')) and (ttd >debuff[classtable.VirulentPlagueDeBuff].remains and debuff[classtable.VirulentPlagueDeBuff].ticksRemain <5 and ( debuff[classtable.VirulentPlagueDeBuff].refreshable or talents[classtable.Morbidity] and buff[classtable.InflictionofSorrowBuff].up and talents[classtable.Superstrain] and debuff[classtable.FrostFeverDeBuff].refreshable and debuff[classtable.BloodPlagueDeBuff].refreshable ) and ( not talents[classtable.UnholyBlight] or talents[classtable.UnholyBlight] and cooldown[classtable.DarkTransformation].ready==false ) and ( not talents[classtable.RaiseAbomination] or talents[classtable.RaiseAbomination] and cooldown[classtable.RaiseAbomination].ready==false )) and cooldown[classtable.Outbreak].ready then if not setSpell then setSpell = classtable.Outbreak end end - if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (targets >= 1 and st_planning and not buff[classtable.GiftoftheSanlaynBuff].up and not buff[classtable.SuddenDoomBuff].up and buff[classtable.FestermightBuff].up and debuff[classtable.FesteringWoundDeBuff].count <= 2 or not buff[classtable.GiftoftheSanlaynBuff].up and ttd <12) and cooldown[classtable.AbominationLimb].ready then + if (MaxDps:CheckSpellUsable(classtable.AbominationLimb, 'AbominationLimb')) and (targets >= 1 and targets == 1 and not buff[classtable.GiftoftheSanlaynBuff].up and not buff[classtable.SuddenDoomBuff].up and buff[classtable.FestermightBuff].up and debuff[classtable.FesteringWoundDeBuff].count <= 2 or not buff[classtable.GiftoftheSanlaynBuff].up and ttd <12) and cooldown[classtable.AbominationLimb].ready then MaxDps:GlowCooldown(classtable.AbominationLimb, cooldown[classtable.AbominationLimb].ready) end end -function Unholy:cds_shared() - if (MaxDps:CheckSpellUsable(classtable.ArmyoftheDead, 'ArmyoftheDead')) and (( st_planning or adds_remain ) and ( talents[classtable.CommanderoftheDead] and cooldown[classtable.DarkTransformation].remains <5 or not talents[classtable.CommanderoftheDead] and targets >= 1 ) or MaxDps:boss() and ttd <35) and cooldown[classtable.ArmyoftheDead].ready then - MaxDps:GlowCooldown(classtable.ArmyoftheDead, cooldown[classtable.ArmyoftheDead].ready) - end - if (MaxDps:CheckSpellUsable(classtable.RaiseAbomination, 'RaiseAbomination')) and (( st_planning or adds_remain ) or MaxDps:boss() and ttd <30) and cooldown[classtable.RaiseAbomination].ready then - MaxDps:GlowCooldown(classtable.RaiseAbomination, cooldown[classtable.RaiseAbomination].ready) - end - if (MaxDps:CheckSpellUsable(classtable.SummonGargoyle, 'SummonGargoyle')) and (( st_planning or adds_remain ) and ( buff[classtable.CommanderoftheDeadBuff].up or not talents[classtable.CommanderoftheDead] and targets >= 1 )) and cooldown[classtable.SummonGargoyle].ready then - MaxDps:GlowCooldown(classtable.SummonGargoyle, cooldown[classtable.SummonGargoyle].ready) - end -end function Unholy:cleave() - if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not debuff[classtable.DeathandDecayDebuff].up) and cooldown[classtable.DeathandDecay].charges > 1 and cooldown[classtable.DeathandDecay].ready then - if not setSpell then setSpell = classtable.DnD end + if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not debuff[classtable.DeathandDecayDebuff].up) and cooldown[classtable.DeathandDecay].ready then + if not setSpell then setSpell = classtable.DeathandDecay end end - if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (not pooling_runic_power and talents[classtable.ImprovedDeathCoil]) and cooldown[classtable.DeathCoil].ready then + if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (not pooling_runic_power) and cooldown[classtable.DeathCoil].ready then if not setSpell then setSpell = classtable.DeathCoil end end - if (MaxDps:CheckSpellUsable(classtable.Epidemic, 'Epidemic')) and (not pooling_runic_power and not talents[classtable.ImprovedDeathCoil]) and cooldown[classtable.Epidemic].ready then - if not setSpell then setSpell = classtable.Epidemic end - end if (MaxDps:CheckSpellUsable(classtable.FesteringStrike, 'FesteringStrike')) and (not pop_wounds and debuff[classtable.FesteringWoundDeBuff].count <4 or buff[classtable.FesteringScytheBuff].up) and cooldown[classtable.FesteringStrike].ready then if not setSpell then setSpell = classtable.FesteringStrike end end @@ -350,11 +359,9 @@ function Unholy:cleave() if not setSpell then setSpell = classtable.WoundSpender end end end -function Unholy:racials() -end function Unholy:san_fishing() - if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not buff[classtable.DeathandDecayBuff].up and not buff[classtable.VampiricStrikeBuff].up) and cooldown[classtable.DeathandDecay].charges > 1 and cooldown[classtable.DeathandDecay].ready then - if not setSpell then setSpell = classtable.DnD end + if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not buff[classtable.DeathandDecayBuff].up and not buff[classtable.VampiricStrikeBuff].up) and cooldown[classtable.DeathandDecay].ready then + if not setSpell then setSpell = classtable.DeathandDecay end end if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (buff[classtable.SuddenDoomBuff].up and talents[classtable.DoomedBidding]) and cooldown[classtable.DeathCoil].ready then if not setSpell then setSpell = classtable.DeathCoil end @@ -373,22 +380,25 @@ function Unholy:san_fishing() end end function Unholy:san_st() - if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not debuff[classtable.DeathandDecayDebuff].up and talents[classtable.UnholyGround] and cooldown[classtable.DarkTransformation].remains <5) and cooldown[classtable.DeathandDecay].charges > 1 and cooldown[classtable.DeathandDecay].ready then - if not setSpell then setSpell = classtable.DnD end + if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (not debuff[classtable.DeathandDecayDebuff].up and talents[classtable.UnholyGround] and cooldown[classtable.DarkTransformation].remains <5) and cooldown[classtable.DeathandDecay].ready then + if not setSpell then setSpell = classtable.DeathandDecay end end - if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (buff[classtable.SuddenDoomBuff].up and buff[classtable.GiftoftheSanlaynBuff].remains and ( talents[classtable.DoomedBidding] or talents[classtable.RottenTouch] ) or Runes <2 and not buff[classtable.RunicCorruptionBuff].up) and cooldown[classtable.DeathCoil].ready then + if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (buff[classtable.SuddenDoomBuff].up and buff[classtable.GiftoftheSanlaynBuff].remains and ( talents[classtable.DoomedBidding] or talents[classtable.RottenTouch] ) or Runes <3 and not buff[classtable.RunicCorruptionBuff].up) and cooldown[classtable.DeathCoil].ready then if not setSpell then setSpell = classtable.DeathCoil end end - if (MaxDps:CheckSpellUsable(classtable.WoundSpender, 'WoundSpender')) and (buff[classtable.EssenceoftheBloodQueenBuff].remains <3 and buff[classtable.VampiricStrikeBuff].up or talents[classtable.GiftoftheSanlayn] and buff[classtable.DarkTransformationBuff].up and buff[classtable.DarkTransformationBuff].remains 5) and cooldown[classtable.SoulReaper].ready then if not setSpell then setSpell = classtable.SoulReaper end end - if (MaxDps:CheckSpellUsable(classtable.FesteringStrike, 'FesteringStrike')) and (( debuff[classtable.FesteringWoundDeBuff].count <4 and ( cooldown[classtable.Apocalypse].remains = 1) and cooldown[classtable.WoundSpender].ready then + if not setSpell then setSpell = classtable.WoundSpender end + end + if (MaxDps:CheckSpellUsable(classtable.FesteringStrike, 'FesteringStrike')) and (( debuff[classtable.FesteringWoundDeBuff].count == 0 and cooldown[classtable.Apocalypse].remains = 3 - ( UnitExists('pet') and UnitName('pet') == 'abomination' and 1 or 0 ) and cooldown[classtable.Apocalypse].remains >apoc_timing ) or buff[classtable.VampiricStrikeBuff].up and cooldown[classtable.Apocalypse].remains >apoc_timing) and cooldown[classtable.WoundSpender].ready then + if (MaxDps:CheckSpellUsable(classtable.WoundSpender, 'WoundSpender')) and (( not talents[classtable.Apocalypse] or cooldown[classtable.Apocalypse].remains >apoc_timing ) and ( debuff[classtable.FesteringWoundDeBuff].count >= 3 - ( UnitExists('pet') and UnitName('pet') == 'abomination' ) or buff[classtable.VampiricStrikeBuff].up )) and cooldown[classtable.WoundSpender].ready then if not setSpell then setSpell = classtable.WoundSpender end end if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (not pooling_runic_power and debuff[classtable.DeathRotDeBuff].remains = 1 or Runes <2 )) and cooldown[classtable.DeathCoil].ready then @@ -407,8 +417,11 @@ function Unholy:st() if (MaxDps:CheckSpellUsable(classtable.SoulReaper, 'SoulReaper')) and (targetHP <= 35 and ttd >5) and cooldown[classtable.SoulReaper].ready then if not setSpell then setSpell = classtable.SoulReaper end end - if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (talents[classtable.UnholyGround] and not buff[classtable.DeathandDecayBuff].up and ( ( UnitExists('pet') and UnitName('pet') == 'apoc_ghoul' ) or ( UnitExists('pet') and UnitName('pet') == 'abomination' ) or ( UnitExists('pet') and UnitName('pet') == 'gargoyle' ) )) and cooldown[classtable.DeathandDecay].charges > 1 and cooldown[classtable.DeathandDecay].ready then - if not setSpell then setSpell = classtable.DnD end + if (MaxDps:CheckSpellUsable(classtable.WoundSpender, 'WoundSpender')) and (debuff[classtable.ChainsofIceTrollbaneSlowDeBuff].up) and cooldown[classtable.WoundSpender].ready then + if not setSpell then setSpell = classtable.WoundSpender end + end + if (MaxDps:CheckSpellUsable(classtable.DeathandDecay, 'DeathandDecay')) and (talents[classtable.UnholyGround] and not buff[classtable.DeathandDecayBuff].up and ( ( UnitExists('pet') and UnitName('pet') == 'apoc_ghoul' ) or ( UnitExists('pet') and UnitName('pet') == 'abomination' ) or ( UnitExists('pet') and UnitName('pet') == 'gargoyle' ) )) and cooldown[classtable.DeathandDecay].ready then + if not setSpell then setSpell = classtable.DeathandDecay end end if (MaxDps:CheckSpellUsable(classtable.DeathCoil, 'DeathCoil')) and (not pooling_runic_power and spend_rp or MaxDps:boss() and ttd <10) and cooldown[classtable.DeathCoil].ready then if not setSpell then setSpell = classtable.DeathCoil end @@ -428,63 +441,49 @@ function Unholy:st() end function Unholy:trinkets() end -function Unholy:variables() - if targets == 1 then - st_planning = true - else - st_planning = false - end - if targets >= 2 then - adds_remain = true - else - adds_remain = false - end - if cooldown[classtable.Apocalypse].remains <10 and debuff[classtable.FesteringWoundDeBuff].count <= 4 and cooldown[classtable.UnholyAssault].remains >10 then - apoc_timing = 7 - else - apoc_timing = 3 - end - if ( cooldown[classtable.Apocalypse].remains >apoc_timing or not talents[classtable.Apocalypse] ) and ( debuff[classtable.FesteringWoundDeBuff].count >= 1 and cooldown[classtable.UnholyAssault].remains <20 and talents[classtable.UnholyAssault] and st_planning or debuff[classtable.RottenTouchDeBuff].up and debuff[classtable.FesteringWoundDeBuff].count >= 1 or debuff[classtable.FesteringWoundDeBuff].count >= 4 - ( UnitExists('pet') and UnitName('pet') == 'abomination' and 1 or 0 ) ) or ttd <5 and debuff[classtable.FesteringWoundDeBuff].count >= 1 then - pop_wounds = true - else - pop_wounds = false - end - if talents[classtable.VileContagion] and cooldown[classtable.VileContagion].remains <5 and RunicPower <30 then - pooling_runic_power = true - else - pooling_runic_power = false - end - if ( not talents[classtable.RottenTouch] or talents[classtable.RottenTouch] and not debuff[classtable.RottenTouchDeBuff].up or RunicPowerDeficit <20 ) and ( ( talents[classtable.ImprovedDeathCoil] and ( targets == 2 or talents[classtable.CoilofDevastation] ) or Runes <3 or ( UnitExists('pet') and UnitName('pet') == 'gargoyle' ) or buff[classtable.SuddenDoomBuff].up or not pop_wounds and debuff[classtable.FesteringWoundDeBuff].count >= 4 ) ) then - spend_rp = true - else - spend_rp = false - end -end local function ClearCDs() MaxDps:GlowCooldown(classtable.RaiseDead, false) MaxDps:GlowCooldown(classtable.ArmyoftheDead, false) MaxDps:GlowCooldown(classtable.MindFreeze, false) - MaxDps:GlowCooldown(classtable.DarkTransformation, false) - MaxDps:GlowCooldown(classtable.AbominationLimb, false) MaxDps:GlowCooldown(classtable.RaiseAbomination, false) MaxDps:GlowCooldown(classtable.SummonGargoyle, false) + MaxDps:GlowCooldown(classtable.DarkTransformation, false) + MaxDps:GlowCooldown(classtable.AbominationLimb, false) end function Unholy:callaction() if (MaxDps:CheckSpellUsable(classtable.MindFreeze, 'MindFreeze')) and cooldown[classtable.MindFreeze].ready then MaxDps:GlowCooldown(classtable.MindFreeze, ( select(8,UnitCastingInfo('target')) ~= nil and not select(8,UnitCastingInfo('target')) or select(7,UnitChannelInfo('target')) ~= nil and not select(7,UnitChannelInfo('target'))) ) end - Unholy:variables() + if cooldown[classtable.Apocalypse].remains <5 and debuff[classtable.FesteringWoundDeBuff].count <1 and cooldown[classtable.UnholyAssault].remains >5 then + apoc_timing = 3 + else + apoc_timing = 0 + end + pop_wounds = ( cooldown[classtable.Apocalypse].remains >apoc_timing or not talents[classtable.Apocalypse] ) and ( debuff[classtable.FesteringWoundDeBuff].count >= 1 and cooldown[classtable.UnholyAssault].remains <20 and talents[classtable.UnholyAssault] and targets == 1 or debuff[classtable.RottenTouchDeBuff].up and debuff[classtable.FesteringWoundDeBuff].count >= 1 or debuff[classtable.FesteringWoundDeBuff].count >= 4 - ( UnitExists('pet') and UnitName('pet') == 'abomination' ) ) or ttd <5 and debuff[classtable.FesteringWoundDeBuff].count >= 1 + pooling_runic_power = talents[classtable.VileContagion] and cooldown[classtable.VileContagion].remains <5 and RunicPower <30 + spend_rp = ( not talents[classtable.RottenTouch] or talents[classtable.RottenTouch] and not debuff[classtable.RottenTouchDeBuff].up or RunicPowerDeficit <20 ) and ( ( talents[classtable.ImprovedDeathCoil] and ( targets == 2 or talents[classtable.CoilofDevastation] ) or Runes <3 or ( UnitExists('pet') and UnitName('pet') == 'gargoyle' ) or buff[classtable.SuddenDoomBuff].up or not pop_wounds and debuff[classtable.FesteringWoundDeBuff].count >= 4 ) ) + epidemic_targets = 3 + (talents[classtable.ImprovedDeathCoil] and talents[classtable.ImprovedDeathCoil] or 0) + ( talents[classtable.FrenziedBloodthirst] and buff[classtable.EssenceoftheBloodQueenBuff].count >5 and 1 or 0 ) + ( talents[classtable.HungeringThirst] and talents[classtable.HarbingerofDoom] and buff[classtable.SuddenDoomBuff].up and 1 or 0 ) if (talents[classtable.VampiricStrike]) then Unholy:san_trinkets() end if (not talents[classtable.VampiricStrike]) then Unholy:trinkets() end - Unholy:racials() - Unholy:cds_shared() + if (MaxDps:CheckSpellUsable(classtable.ArcanePulse, 'ArcanePulse')) and (targets >= 2 or ( rune.deficit >= 5 and RunicPowerDeficit >= 60 )) and cooldown[classtable.ArcanePulse].ready then + if not setSpell then setSpell = classtable.ArcanePulse end + end + if (MaxDps:CheckSpellUsable(classtable.ArmyoftheDead, 'ArmyoftheDead')) and (( talents[classtable.CommanderoftheDead] and cooldown[classtable.DarkTransformation].remains <5 or not talents[classtable.CommanderoftheDead] and targets >= 1 ) or MaxDps:boss() and ttd <35) and cooldown[classtable.ArmyoftheDead].ready then + MaxDps:GlowCooldown(classtable.ArmyoftheDead, cooldown[classtable.ArmyoftheDead].ready) + end + if (MaxDps:CheckSpellUsable(classtable.RaiseAbomination, 'RaiseAbomination')) and cooldown[classtable.RaiseAbomination].ready then + MaxDps:GlowCooldown(classtable.RaiseAbomination, cooldown[classtable.RaiseAbomination].ready) + end + if (MaxDps:CheckSpellUsable(classtable.SummonGargoyle, 'SummonGargoyle')) and (( buff[classtable.CommanderoftheDeadBuff].up or not talents[classtable.CommanderoftheDead] and targets >= 1 ) or MaxDps:boss() and ttd <25) and cooldown[classtable.SummonGargoyle].ready then + MaxDps:GlowCooldown(classtable.SummonGargoyle, cooldown[classtable.SummonGargoyle].ready) + end if (talents[classtable.VampiricStrike] and targets >= 2) then Unholy:cds_aoe_san() end @@ -509,6 +508,9 @@ function Unholy:callaction() if (targets >= 3 and not debuff[classtable.DeathandDecayDebuff].up) then Unholy:aoe() end + if (targets == 1 and talents[classtable.GiftoftheSanlayn] and not cooldown[classtable.DarkTransformation].ready and not buff[classtable.GiftoftheSanlaynBuff].up and buff[classtable.EssenceoftheBloodQueenBuff].remains