Skip to content

Commit

Permalink
- Moved some helpers out of config and into utils
Browse files Browse the repository at this point in the history
- First Pass at Sham DPS, Dots, and Healing
- Healing Data exists but the logic is still missing from class.lua
  • Loading branch information
DerpleMQ2 committed Jan 8, 2024
1 parent b531869 commit d225bb5
Show file tree
Hide file tree
Showing 10 changed files with 771 additions and 228 deletions.
55 changes: 28 additions & 27 deletions class_configs/nec_class_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -697,117 +697,117 @@ local _ClassConfig = {
{
name = "SnareDOT",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) and self.settings.DoSnare end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) and self.settings.DoSnare end,
},
{
name = "Disease3",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Magic3",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "FireDot3",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Disease2",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Poison1",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Poison2",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Poison2_2",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Disease1",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Magic2_2",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Poison3",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Magic1",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "PoisonNuke2",
type = "Spell",
cond = function(self, _) return RGMercUtils.GetTargetPctHPs() > 50 and mq.TLO.Me.PctMana() > RGMercConfig:GetSettings().ManaToNuke end,
cond = function(self, _) return RGMercUtils.GetTargetPctHPs() > 50 and RGMercUtils.ManaCheck() end,
},
{
name = "PoisonNuke",
type = "Spell",
cond = function(self, _) return mq.TLO.Me.PctMana() > RGMercConfig:GetSettings().ManaToNuke end,
cond = function(self, _) return RGMercUtils.ManaCheck() end,
},
{
name = "HealthTaps",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "DurationTap",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "FireDot1",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "FireDot2",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "FireDot2_2",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "FireDot4",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "GroupLeech",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "Corruption1",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
{
name = "DurationTap",
type = "Spell",
cond = function(self, spell) return RGMercUtils.DetSpellCheck(spell) end,
cond = function(self, spell) return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell) end,
},
},
['Burn'] = {
Expand Down Expand Up @@ -962,9 +962,9 @@ local _ClassConfig = {
end
end,
cond = function(self, spell) return self.settings.PetType == 1 and (mq.TLO.Me.Pet.ID() == 0 or mq.TLO.Me.Pet.Class.ShortName():lower() ~= "war") end,
post_activate = function(self, spell)
post_activate = function(self, spell, success)
local pet = mq.TLO.Me.Pet
if pet.ID() > 0 then
if success and pet.ID() > 0 then
RGMercUtils.PrintGroupMessage("Summoned a new %d %s pet named %s using '%s'!", pet.Level(), pet.Class.Name(), pet.CleanName(), spell.RankName())
end
end,
Expand All @@ -979,9 +979,9 @@ local _ClassConfig = {
end
end,
cond = function(self, _) return self.settings.PetType == 2 and (mq.TLO.Me.Pet.ID() == 0 or mq.TLO.Me.Pet.Class.ShortName():lower() ~= "rog") end,
post_activate = function(self, spell)
post_activate = function(self, spell, success)
local pet = mq.TLO.Me.Pet
if pet.ID() > 0 then
if success and pet.ID() > 0 then
RGMercUtils.PrintGroupMessage("Summoned a new %d %s pet named %s using '%s'!", pet.Level(), pet.Class.Name(), pet.CleanName(), spell.RankName())
end
end,
Expand Down Expand Up @@ -1112,6 +1112,7 @@ local _ClassConfig = {
['DoLich'] = { DisplayName = "Cast Lich", Category = "Spells and Abilities", Tooltip = "Enable casting Lich spells.", RequiresLoadoutChange = true, Default = true, },
['DeathBloomPercent'] = { DisplayName = "Death Bloom %", Category = "Spells and Abilities", Tooltip = "Mana % at which to cast Death Bloom", Default = 40, Min = 1, Max = 100, },
['DoSnare'] = { DisplayName = "Cast Snares", Category = "Spells and Abilities", Tooltip = "Enable casting Snare spells.", Default = true, },
['HPStopDOT'] = { DisplayName = "HP Stop DOTs", Category = "Spells and Abilities", Tooltip = "Stop casting DOTs when the mob hits [x] HP %.", Default = 30, Min = 1, Max = 100, },
},

}
Expand Down
10 changes: 5 additions & 5 deletions class_configs/shd_class_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,8 @@ local _ClassConfig = {
type = "AA",
tooltip = Tooltips.HarmTouch,
cond = function(self, _)
return (self.settings.BurnAuto and RGMercUtils.IsNamed(mq.TLO.Target)) or
RGMercUtils.BigBurn(self.settings)
return (RGMercConfig:GetSettings().BurnAuto and RGMercUtils.IsNamed(mq.TLO.Target)) or
RGMercUtils.BigBurn()
end,
},
{ name = "Thought Leech", type = "AA", tooltip = Tooltips.ThoughtLeech, },
Expand Down Expand Up @@ -878,7 +878,7 @@ local _ClassConfig = {
type = "Spell",
tooltip = Tooltips.ForPower,
cond = function(self, spell)
return RGMercConfig.Globals.IsTanking and RGMercUtils.DotSpellCheck(self.settings, spell)
return RGMercConfig.Globals.IsTanking and RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell)
end,
},
{
Expand Down Expand Up @@ -962,15 +962,15 @@ local _ClassConfig = {
type = "Spell",
tooltip = Tooltips.PoisonDot,
cond = function(self, spell)
return RGMercUtils.DotSpellCheck(self.settings, spell)
return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell)
end,
},
{
name = "DireDot",
type = "Spell",
tooltip = Tooltips.DireDot,
cond = function(self, spell)
return RGMercUtils.DotSpellCheck(self.settings, spell)
return RGMercUtils.DotSpellCheck(self.settings.HPStopDOT, spell)
end,
},
{
Expand Down

0 comments on commit d225bb5

Please sign in to comment.