Skip to content

Commit

Permalink
feat(Unholy): 11.0 first pass
Browse files Browse the repository at this point in the history
- Untested due to all servers being down
  • Loading branch information
Cilraaz committed Jul 23, 2024
1 parent c16a003 commit 1118e16
Show file tree
Hide file tree
Showing 4 changed files with 449 additions and 435 deletions.
16 changes: 16 additions & 0 deletions HeroRotation_DeathKnight/DeathKnight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ Spell.DeathKnight.Commons = {
SacrificialPact = Spell(327574),
SoulReaper = Spell(343294),
UnholyGround = Spell(374265),
-- Hero Talents
GiftoftheSanlayn = Spell(434152),
VampiricStrike = Spell(433901),
-- Hero Talent Buffs
EssenceoftheBloodQueenBuff = Spell(433925),
GiftoftheSanlaynBuff = Spell(434153),
InflictionofSorrowBuff = Spell(460049),
VampricStrikeBuff = Spell(433899),
-- Buffs
AbominationLimbBuff = Spell(383269),
DeathAndDecayBuff = Spell(188290),
Expand Down Expand Up @@ -150,6 +158,7 @@ Spell.DeathKnight.Frost = MergeTableByKey(Spell.DeathKnight.Commons, {

Spell.DeathKnight.Unholy = MergeTableByKey(Spell.DeathKnight.Commons, {
-- Abilities
FesteringScytheAction = Spell(458128),
-- Talents
Apocalypse = Spell(275699),
ArmyoftheDamned = Spell(276837),
Expand All @@ -160,9 +169,11 @@ Spell.DeathKnight.Unholy = MergeTableByKey(Spell.DeathKnight.Commons, {
CommanderoftheDead = Spell(390259),
DarkTransformation = Spell(63560),
Defile = Spell(152280),
DoomedBidding = Spell(455386),
EbonFever = Spell(207269),
Epidemic = Spell(207317),
EternalAgony = Spell(390268),
FesteringScythe = Spell(455397),
FesteringStrike = Spell(85948),
Festermight = Spell(377590),
GhoulishFrenzy = Spell(377587),
Expand All @@ -172,6 +183,7 @@ Spell.DeathKnight.Unholy = MergeTableByKey(Spell.DeathKnight.Commons, {
Outbreak = Spell(77575),
Pestilence = Spell(277234),
Plaguebringer = Spell(390175),
RaiseAbomination = Spell(455395),
RaiseDead = Spell(46584),
RottenTouch = Spell(390275),
ScourgeStrike = Spell(55090),
Expand All @@ -185,6 +197,7 @@ Spell.DeathKnight.Unholy = MergeTableByKey(Spell.DeathKnight.Commons, {
-- Buffs
CommanderoftheDeadBuff = Spell(390260),
DefileBuff = Spell(218100),
FesteringScytheBuff = Spell(458123),
FestermightBuff = Spell(377591),
PlaguebringerBuff = Spell(390178),
RunicCorruptionBuff = Spell(51460),
Expand All @@ -204,6 +217,9 @@ Item.DeathKnight.Commons = {
AlgetharPuzzleBox = Item(193701, {13, 14}),
IrideusFragment = Item(193743, {13, 14}),
VialofAnimatedBlood = Item(159625, {13, 14}),
-- Trinkets
MirrorofFracturedTomorrows = Item(207581, {13, 14}),
TreacherousTransmitter = Item(221023, {13, 14}),
-- Other Items
Fyralath = Item(206448, {16}),
}
Expand Down
64 changes: 41 additions & 23 deletions HeroRotation_DeathKnight/Events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ local GetTime = GetTime
local OneRuneSpenders = { 42650, 55090, 207311, 43265, 152280, 77575, 115989, 45524, 3714, 343294, 111673 }
-- GhoulTable
HL.GhoulTable = {
SummonedGhoul = nil,
SummonExpiration = nil,
SummonedGargoyle = nil,
GargoyleExpiration = nil,
AbominationExpiration = 0,
ApocMagusExpiration = 0,
ArmyMagusExpiration = 0,
GargoyleExpiration = 0,
SummonExpiration = 0,
SummonedAbomination = nil,
SummonedGargoyle = nil,
SummonedGhoul = nil,
}

--- ============================ CONTENT ============================
--- Ghoul Tracking
--- ===== Ghoul Tracking =====
HL:RegisterForSelfCombatEvent(function(_, _, _, _, _, _, _, destGUID, _, _, _, spellId)
if spellId == 46585 then
HL.GhoulTable.SummonedGhoul = destGUID
Expand All @@ -37,12 +39,16 @@ HL:RegisterForSelfCombatEvent(function(_, _, _, _, _, _, _, destGUID, _, _, _, s
HL.GhoulTable.SummonedGargoyle = destGUID
HL.GhoulTable.GargoyleExpiration = GetTime() + 25
end
if spellId == 455395 then
HL.GhoulTable.SummonedAbomination = destGUID
HL.GhoulTable.AbominationExpiration = GetTime() + 30
end
end, "SPELL_SUMMON")

HL:RegisterForSelfCombatEvent(function(_, _, _, _, _, _, _, _, _, _, _, spellId)
if spellId == 327574 then
HL.GhoulTable.SummonedGhoul = nil
HL.GhoulTable.SummonExpiration = nil
HL.GhoulTable.SummonExpiration = 0
end
if Player:HasTier(31, 4) and (HL.GhoulTable.ApocMagusExpiration > 0 or HL.GhoulTable.ArmyMagusExpiration > 0) then
if spellId == 85948 then
Expand All @@ -67,31 +73,33 @@ end, "SPELL_CAST_SUCCESS")
HL:RegisterForCombatEvent(function(_, _, _, _, _, _, _, destGUID)
if destGUID == HL.GhoulTable.SummonedGhoul then
HL.GhoulTable.SummonedGhoul = nil
HL.GhoulTable.SummonExpiration = nil
HL.GhoulTable.SummonExpiration = 0
end
if destGUID == HL.GhoulTable.SummonedGargoyle then
HL.GhoulTable.SummonedGargoyle = nil
HL.GhoulTable.GargoyleExpiration = nil
HL.GhoulTable.GargoyleExpiration = 0
end
if destGUID == HL.GhoulTable.SummonedAbomination then
HL.GhoulTable.SummonedAbomination = nil
HL.GhoulTable.AbominationExpiration = 0
end, "UNIT_DESTROYED")

-- Tracker Functions
function HL.GhoulTable:GhoulRemains()
if HL.GhoulTable.SummonExpiration == nil then return 0 end
return HL.GhoulTable.SummonExpiration - GetTime()
--- ===== Tracker Functions =====
function HL.GhoulTable:AbomRemains()
if HL.GhoulTable.AbominationExpiration == 0 then return 0 end
return HL.GhoulTable.AbominationExpiration - GetTime()
end

function HL.GhoulTable:GhoulActive()
return HL.GhoulTable.SummonedGhoul ~= nil and HL.GhoulTable:GhoulRemains() > 0
function HL.GhoulTable:AbomActive()
return HL.GhoulTable.SummonedAbomination ~= nil and HL.GhoulTable:AbomRemains() > 0
end

function HL.GhoulTable:GargRemains()
if HL.GhoulTable.GargoyleExpiration == nil then return 0 end
return HL.GhoulTable.GargoyleExpiration - GetTime()
function HL.GhoulTable:ApocMagusRemains()
return HL.GhoulTable.ApocMagusExpiration - GetTime()
end

function HL.GhoulTable:GargActive()
return HL.GhoulTable.SummonedGargoyle ~= nil and HL.GhoulTable:GargRemains() > 0
function HL.GhoulTable:ApocMagusActive()
return HL.GhoulTable.ApocMagusRemains() > 0
end

function HL.GhoulTable:ArmyMagusRemains()
Expand All @@ -102,12 +110,22 @@ function HL.GhoulTable:ArmyMagusActive()
return HL.GhoulTable:ArmyMagusRemains() > 0
end

function HL.GhoulTable:ApocMagusRemains()
return HL.GhoulTable.ApocMagusExpiration - GetTime()
function HL.GhoulTable:GargRemains()
if HL.GhoulTable.GargoyleExpiration == 0 then return 0 end
return HL.GhoulTable.GargoyleExpiration - GetTime()
end

function HL.GhoulTable:ApocMagusActive()
return HL.GhoulTable.ApocMagusRemains() > 0
function HL.GhoulTable:GargActive()
return HL.GhoulTable.SummonedGargoyle ~= nil and HL.GhoulTable:GargRemains() > 0
end

function HL.GhoulTable:GhoulRemains()
if HL.GhoulTable.SummonExpiration == 0 then return 0 end
return HL.GhoulTable.SummonExpiration - GetTime()
end

function HL.GhoulTable:GhoulActive()
return HL.GhoulTable.SummonedGhoul ~= nil and HL.GhoulTable:GhoulRemains() > 0
end

--- ======= NON-COMBATLOG =======
Expand Down
8 changes: 6 additions & 2 deletions HeroRotation_DeathKnight/Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ local CreateARPanelOptions = HR.GUI.CreateARPanelOptions
-- All settings here should be moved into the GUI someday.
HR.GUISettings.APL.DeathKnight = {
Commons = {
DisableAotD = false,
UseDeathStrikeHP = 60, -- % HP threshold to try to heal with Death Strike
UseDarkSuccorHP = 80, -- % HP threshold to use Dark Succor's free Death Strike
UseAMSAMZOffensively = false,
Expand Down Expand Up @@ -96,8 +97,8 @@ HR.GUISettings.APL.DeathKnight = {
}
},
Unholy = {
AMSAbsorbPercent = 0,
RaiseDeadCastLeft = false,
SkipGargSetup = false,
PotionType = {
Selected = "Power",
},
Expand All @@ -106,9 +107,11 @@ HR.GUISettings.APL.DeathKnight = {
},
GCDasOffGCD = {
-- Abilities
AbominationLimb = false,
Apocalypse = false,
DarkTransformation = true,
Epidemic = false,
RaiseAbomination = false,
SummonGargoyle = false,
UnholyAssault = true,
UnholyBlight = false,
Expand All @@ -131,6 +134,7 @@ local CP_Unholy = CreateChildPanel(CP_Deathknight, "Unholy")
CreatePanelOption("Slider", CP_Deathknight, "APL.DeathKnight.Commons.UseDeathStrikeHP", { 1, 100, 1 }, "Use Death Strike on Low HP", "Set the HP threshold to use Death Strike (working only if Solo Mode is enabled).")
CreatePanelOption("Slider", CP_Deathknight, "APL.DeathKnight.Commons.UseDarkSuccorHP", { 1, 100, 1 }, "Use Death Strike to Consume Dark Succor", "Set the HP threshold to use Death Strike to Consume Dark Succor (working only if Solo Mode is enabled).")
CreatePanelOption("CheckButton", CP_Deathknight, "APL.DeathKnight.Commons.UseAMSAMZOffensively", "Use AMS/AMZ Offensively", "Enable this option to allow AMS/AMZ to be suggested for Runic Power generation purposes.")
CreatePanelOption("CheckButton", CP_Deathknight, "APL.DeathKnight.Commons.DisableAotD", "Disabled AotD", "Disable suggestions related to Army of the Dead.")
CreateARPanelOptions(CP_Deathknight, "APL.DeathKnight.Commons")
CreateARPanelOptions(CP_DeathknightDS, "APL.DeathKnight.CommonsDS")
CreateARPanelOptions(CP_DeathknightOGCD, "APL.DeathKnight.CommonsOGCD")
Expand All @@ -149,5 +153,5 @@ CreateARPanelOptions(CP_Frost, "APL.DeathKnight.Frost")

--Unholy Panels
CreatePanelOption("CheckButton", CP_Unholy, "APL.DeathKnight.Unholy.RaiseDeadCastLeft", "Raise Dead in CastLeft", "Enable this to ignore the Raise Dead DisplayStyle option and instead use CastLeft.")
CreatePanelOption("CheckButton", CP_Unholy, "APL.DeathKnight.Unholy.SkipGargSetup", "Skip Gargoyle Setup Action List", "Enable this option to allow the ability to hold Summon Gargoyle without pausing the entire rotation. NOTE: This WILL result in a DPS LOSS, but stops the rotation from hanging when not using Summon Gargoyle when suggested.")
CreatePanelOption("Slider", CP_Frost, "APL.DeathKnight.Unholy.AMSAbsorbPercent", {0, 100, 1}, "AMS Absorb Percentage", "Set this to the average percentage of AMS's absorb shield that is actively used on any given cast of AMS. Leave at 0 if unsure.")
CreateARPanelOptions(CP_Unholy, "APL.DeathKnight.Unholy")
Loading

0 comments on commit 1118e16

Please sign in to comment.