Skip to content

Commit

Permalink
- Added Rez AA to Necros
Browse files Browse the repository at this point in the history
  • Loading branch information
DerpleMQ2 committed Feb 23, 2024
1 parent 813d31c commit 727b53f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 12 deletions.
44 changes: 34 additions & 10 deletions class_configs/nec_class_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ local mq = require('mq')
local RGMercUtils = require("utils.rgmercs_utils")

local _ClassConfig = {
_version = "0.1a",
_author = "Derple",
['Modes'] = {
_version = "0.1a",
_author = "Derple",
['Modes'] = {
'DPS',
},
['Themes'] = {
['ModeChecks'] = {
-- necro can AA Rez
IsRezing = function() return true end,
},
['Themes'] = {
['DPS'] = {
{ element = ImGuiCol.TitleBgActive, color = { r = 0.5, g = 0.05, b = 1.0, a = .8, }, },
{ element = ImGuiCol.TableHeaderBg, color = { r = 0.4, g = 0.05, b = 0.8, a = .8, }, },
Expand All @@ -38,13 +42,13 @@ local _ClassConfig = {
{ element = ImGuiCol.FrameBgActive, color = { r = 0.2, g = 0.05, b = 0.6, a = 1.0, }, },
},
},
['ItemSets'] = {
['ItemSets'] = {
['Epic'] = {
"Deathwhisper",
"Soulwhisper",
},
},
['AbilitySets'] = {
['AbilitySets'] = {
['SelfHPBuff'] = {
"Shield of Memories",
"Shield of Shadow",
Expand Down Expand Up @@ -650,7 +654,7 @@ local _ClassConfig = {
"Focus Death",
},
},
['RotationOrder'] = {
['RotationOrder'] = {
-- Downtime doesn't have state because we run the whole rotation at once.
{
name = 'Downtime',
Expand Down Expand Up @@ -690,7 +694,7 @@ local _ClassConfig = {
end,
},
},
['Rotations'] = {
['Rotations'] = {
['Safety'] = {
{
name = "Death Peace",
Expand Down Expand Up @@ -1103,7 +1107,27 @@ local _ClassConfig = {
},
},
},
['Spells'] = {
['HelperFunctions'] = {
-- helper function for advanced logic to see if we want to use Dark Lord's Unity
DoRez = function(self, corpseId)
if RGMercUtils.GetSetting('DoBattleRez') or RGMercUtils.DoBuffCheck() then
RGMercUtils.SetTarget(corpseId)

local target = mq.TLO.Target

if not target or not target() then return false end

if mq.TLO.Target.Distance() > 25 then
RGMercUtils.DoCmd("/corpse")
end

if RGMercUtils.AAReady("Convergence") and mq.TLO.FindItemCount(mq.TLO.AltAbility("Convergence").Spell.ReagentID(1)())() > 0 then
return RGMercUtils.UseAA("Convergence", corpseId)
end
end
end,
},
['Spells'] = {
{
gem = 1,
spells = {
Expand Down Expand Up @@ -1211,7 +1235,7 @@ local _ClassConfig = {
},
},
},
['DefaultConfig'] = {
['DefaultConfig'] = {
['Mode'] = { DisplayName = "Mode", Category = "Combat", Tooltip = "Select the Combat Mode for this Toon", Type = "Custom", RequiresLoadoutChange = true, Default = 1, Min = 1, Max = 1, },
['PetType'] = { DisplayName = "Mode", Category = "Combat", Tooltip = "1 = War, 2 = Rog", Type = "Combo", ComboOptions = { 'War', 'Rog', }, Default = 1, Min = 1, Max = 2, },
['DoLich'] = { DisplayName = "Cast Lich", Category = "Spells and Abilities", Tooltip = "Enable casting Lich spells.", RequiresLoadoutChange = true, Default = true, },
Expand Down
16 changes: 14 additions & 2 deletions modules/class.lua
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,16 @@ function Module:IsHealing()
return self.ClassConfig.ModeChecks.IsHealing()
end

---@return boolean
function Module:IsRezing()
-- If we are healing then we are also rezing.
if not self.ClassConfig or not self.ClassConfig.ModeChecks or not self.ClassConfig.ModeChecks.IsRezing then
return self:IsHealing()
end

return self.ClassConfig.ModeChecks.IsRezing() or self:IsHealing()
end

---@return boolean
function Module:IsCuring()
if not self.ClassConfig or not self.ClassConfig.ModeChecks or not self.ClassConfig.ModeChecks.IsCuring then
Expand Down Expand Up @@ -605,6 +615,10 @@ function Module:GiveTime(combat_state)

-- Healing Happens reguardless of combat_state and happens first.
if self:IsHealing() then
self:RunHealRotation()
end

if self:IsRezing() then
-- Check Rezes
if (not mq.TLO.Me.Invis() or RGMercUtils.GetSetting('BreakInvis')) then
self:IGCheckAndRez()
Expand All @@ -615,8 +629,6 @@ function Module:GiveTime(combat_state)
self:OOGCheckAndRez()
end
end

self:RunHealRotation()
end

if self:IsCuring() then
Expand Down

0 comments on commit 727b53f

Please sign in to comment.