From c40110169d3de1b0bcc46c06cb99f4ad9c123def Mon Sep 17 00:00:00 2001 From: Taracque Date: Wed, 11 Sep 2013 18:44:10 +0200 Subject: [PATCH] 0.9.4, minor adjustments on unholy rotation --- DKCrutch.lua | 67 ++++++++++++++++++++++++++++++++++++---------------------- DKCrutch.toc | 4 ++-- 2 files changed, 44 insertions(+), 27 deletions(-) diff --git a/DKCrutch.lua b/DKCrutch.lua index 3e7ae2c..65b0502 100755 --- a/DKCrutch.lua +++ b/DKCrutch.lua @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- DKCrutch 0.9.3 +-- DKCrutch 0.9.4 -- -- Death Knight rune tracker and ability advisor ------------------------------------------------------------------------------- @@ -8,7 +8,7 @@ DKCrutch = {Locals = {}} local L = DKCrutch.Locals -DKCrutch.versionNumber = '0.9.3' +DKCrutch.versionNumber = '0.9.4' DKCrutch.talent = "" DKCrutch.talentUnsure = true DKCrutch.DebugMode = false @@ -947,12 +947,30 @@ function DKCrutch:AdviseUnholyAbility() end -- icy touch + --[[ cd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Icy Touch"]) if (cd<=0) and ( IsSpellInRange(DKCrutch.SpellList["Icy Touch"],"target") == 1) then if ( (ffExpiration - GetTime()) <3) then return "Icy Touch" end end + ]]-- + + -- Blood Tap if have at least 10 charges, and have >=32 runic power + if (DKCrutch.SpellList["Blood Tap"]) then + local name,_,_,count = DKCrutch:hasBuff("player", DKCrutch.SpellList["Blood Charge"]) + if (count) and (count>10) and (DKCrutch.depletedCount>0) and (UnitPower("player", 6) >= 32) then + return "Blood Tap" + end + end + + -- Unholy blight and debuffs are expiring + if (DKCrutch.SpellList["Unholy Blight"]) then + cd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Unholy Blight"]) + if (cd) and (cd<=0) and (ffExpiration<3) or (bpExpiration<3) then + return "Unholy Blight" + end + end -- Soul Reaper, if target health < 35% if (DKCrutch.SpellList["Soul Reaper"]) then @@ -961,35 +979,25 @@ function DKCrutch:AdviseUnholyAbility() return "Soul Reaper" end end - + -- Dark Transform, if has pet and available cd, enabled = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Dark Transformation"]) if (cd) and (cd<=0) and (IsUsableSpell(DKCrutch.SpellList["Dark Transformation"])) and ( PetHasActionBar() ) then return "Dark Transformation" end - -- Blood Tap if have at least 5 charges, and at least on fully depleted rune - if (DKCrutch.SpellList["Blood Tap"]) then - local name,_,_,count = DKCrutch:hasBuff("player", DKCrutch.SpellList["Blood Charge"]) - if (count) and (count>=5) and (DKCrutch.depletedCount>0) then - return "Blood Tap" - end - end - - -- Plague Leech if Outbreak available, and have on fully depleted rune - if (DKCrutch.SpellList["Plague Leech"]) then - if (obcd) and (obcd<=0) and (IsSpellInRange(DKCrutch.SpellList["Outbreak"], "target") == 1) and (DKCrutch.depletedCount>0) then - if (DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Plague Leech"]) <= 1) then - return "Plague Leech" - end - end + -- Death Coik if runic power>90 + local dccd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Death Coil"]) + local _, _, _, cost = GetSpellInfo(DKCrutch.SpellList["Death Coil"]) + if (dccd) and (dccd <= 1) and (UnitPower("player", 6) > 90) then + return "Death Coil" end -- Scourge strike (or Death and Decay), if 4 death runes are up, or 2 unholy runes are up local ddcd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Death and Decay"]) local sscd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Scourge Strike"]) if (DKCrutch.runesUp[4] == 4) or (DKCrutch.runesUp[2] == 2) then - if (ddcd) and (ddcd <= 1) and (DKCrutch.person["foeCount"]>1) then + if (ddcd) and (ddcd <= 1) then return "Death and Decay" else if (sscd) and (sscd <= 1) then @@ -1030,6 +1038,15 @@ function DKCrutch:AdviseUnholyAbility() return "Scourge Strike" end + -- Plague Leech if Outbreak available, and have on fully depleted rune + if (DKCrutch.SpellList["Plague Leech"]) then + if (obcd) and (obcd<=0) and (IsSpellInRange(DKCrutch.SpellList["Outbreak"], "target") == 1) and (DKCrutch.depletedCount>0) then + if (DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Plague Leech"]) <= 1) then + return "Plague Leech" + end + end + end + -- Festering strike if (fscd) and (fscd <= 1) then return "Festering Strike" @@ -1043,18 +1060,18 @@ function DKCrutch:AdviseUnholyAbility() end end - -- Empower Rune Weapon - cd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Empower Rune Weapon"]) - if (cd) and (cd <= 1) and (DKCrutch.runesUp[2] == 0) then - return "Empower Rune Weapon" - end - -- Horn of Winter cd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Horn of Winter"]) if (cd) and (cd <= 1) then return "Horn of Winter" end + -- Empower Rune Weapon + cd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Empower Rune Weapon"]) + if (cd) and (cd <= 1) and (DKCrutch.runesUp[2] == 0) then + return "Empower Rune Weapon" + end + return "" end diff --git a/DKCrutch.toc b/DKCrutch.toc index 6428efd..6750677 100755 --- a/DKCrutch.toc +++ b/DKCrutch.toc @@ -1,8 +1,8 @@ -## Interface: 50300 +## Interface: 50400 ## Title: DKCrutch ## Notes: Death Knight rune tracker and rotation helper ## Author: Taracque, Dšgrov‡s of Arathor -## Version: 0.9.3 +## Version: 0.9.4 ## SavedVariables: DKCrutchDB ## OptionalDeps: ## Dependencies: -- 1.7.9.5