Skip to content

Commit

Permalink
more sk stuff including tooltip support
Browse files Browse the repository at this point in the history
  • Loading branch information
DerpleMQ2 committed Dec 28, 2023
1 parent e65179d commit b2ea657
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 17 deletions.
54 changes: 52 additions & 2 deletions class_configs/shd_class_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,22 @@ return {
['Rotations'] = {
['Tank'] = {
['Rotation'] = {
['Buff'] = {
[1] = { name="Dark Lord's Unity (Azia)", type="AA", cond=function(self) return self:castDLU() and not mq.TLO.Me.FindBuff("name "..tostring(mq.TLO.Me.AltAbility("Dark Lord's Unity (Azia)").Spell.Trigger(1).BaseName()))() end },
[2] = { name="Skin", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffCheck(spell) end },
[3] = { name="Horror", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[4] = { name="Demeanor", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[5] = { name="CloakHP", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[6] = { name="SelfDS", type="Spell", cond=function(self, spell) return not self:castDLU() and mq.TLO.FindItemCount(spell.NoExpendReagentID(1))() > 0 and RGMercUtils.SelfBuffCheck(spell) end },
[7] = { name="Shroud", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[8] = { name="Covenant", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[9] = { name="CallAtk", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[10] = { name="TempHP", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffCheck(spell) end },
[11] = { name="HealBurn", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffCheck(spell) end },
[12] = { name="Voice of Thule", type="AA", cond=function(self) return RGMercUtils.SelfBuffAACheck("Voice of Thule") end },
[13] = { name="PetSpell", type="Spell", cond=function(self, spell) return not mq.TLO.Me.Pet.ID() and self.settings.DoPet and mq.TLO.FindItemCount(spell.ReagentID(1))() > 0 end },
[14] = { name="PetHaste", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffPetCheck(spell) end },
},
['Burn'] = {
[1] = { name="Acrimony", type="DISC", cond=function(self) return mq.TLO.Target.Named() == true end },
[2] = { name="SpiteStrike", type="DISC", cond=function(self) return mq.TLO.Target.Named() == true end },
Expand All @@ -497,7 +513,7 @@ return {
['Debuff'] = {},
['Heal'] = {},
['DPS'] = {
[1] = { name="ActivateShield", type="cmd", cond=function(self) return self.settings.DoBandolier and not mq.TLO.Me.Bandolier("Shield").Active() and mq.TLO.Me.Bandolier("Shield").Index() and self.settings.DoBurn end, cmd="/bandolier activate Shield" },
[1] = { name="ActivateShield", type="cmd", tooltip="Activates when you have DoBandolier enabled and a 'Shield' bandolier", cond=function(self) return self.settings.DoBandolier and not mq.TLO.Me.Bandolier("Shield").Active() and mq.TLO.Me.Bandolier("Shield").Index() and self.settings.DoBurn end, cmd="/bandolier activate Shield" },
[2] = { name="Activate2HS", type="cmd", cond=function(self) return self.settings.DoBandolier and not mq.TLO.Me.Bandolier("2HS").Active() and mq.TLO.Me.Bandolier("2HS").Index() and not self.settings.DoBurn end, cmd="/bandolier activate 2HS" },
[3] = { name="EndRegen", type="DISC", cond=function(self) return mq.TLO.Me.PctEndurance() < 15 end },
[4] = { name="Explosion of Hatred", type="AA", cond=function(self) return mq.TLO.SpawnCount("NPC radius 50 zradius 50")() >= self.settings.AeTauntCnt and mq.TLO.XAssist.XTFullHaterCount() >= self.settings.AeTauntCnt end },
Expand Down Expand Up @@ -567,7 +583,9 @@ return {
},
['Debuff'] = {},
['Heal'] = {},
['DPS'] = {},
['DPS'] = {

},
['Downtime'] = {},
['Burn'] = {
[1] = { name="ReflexStrike", type="DISC", cond=function(self) return mq.TLO.Target.Named() == true end },
Expand Down Expand Up @@ -600,6 +618,22 @@ return {
['DPS'] = 1,
['Downtime'] = 1,
['Burn'] = 1,
['Buff'] = {
[1] = { name="Dark Lord's Unity (Azia)", type="AA", cond=function(self) return self:castDLU() and not mq.TLO.Me.FindBuff("name "..tostring(mq.TLO.Me.AltAbility("Dark Lord's Unity (Azia)").Spell.Trigger(1).BaseName()))() end },
[2] = { name="Skin", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffCheck(spell) end },
[3] = { name="Horror", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[4] = { name="Demeanor", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[5] = { name="CloakHP", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[6] = { name="SelfDS", type="Spell", cond=function(self, spell) return not self:castDLU() and mq.TLO.FindItemCount(spell.NoExpendReagentID(1))() > 0 and RGMercUtils.SelfBuffCheck(spell) end },
[7] = { name="Shroud", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[8] = { name="Covenant", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[9] = { name="CallAtk", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[10] = { name="TempHP", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffCheck(spell) end },
[11] = { name="HealBurn", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffCheck(spell) end },
[12] = { name="Voice of Thule", type="AA", cond=function(self) return RGMercUtils.SelfBuffAACheck("Voice of Thule") end },
[13] = { name="PetSpell", type="Spell", cond=function(self, spell) return not mq.TLO.Me.Pet.ID() and self.settings.DoPet and mq.TLO.FindItemCount(spell.ReagentID(1))() > 0 end },
[14] = { name="PetHaste", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffPetCheck(spell) end },
},
},
['Spells'] = {
[1] = { name="Terror", gem=1 },
Expand All @@ -623,6 +657,22 @@ return {
['DPS'] = 1,
['Downtime'] = 1,
['Burn'] = 1,
['Buff'] = {
[1] = { name="Dark Lord's Unity (Azia)", type="AA", cond=function(self) return self:castDLU() and not mq.TLO.Me.FindBuff("name "..tostring(mq.TLO.Me.AltAbility("Dark Lord's Unity (Azia)").Spell.Trigger(1).BaseName()))() end },
[2] = { name="Skin", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffCheck(spell) end },
[3] = { name="Horror", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[4] = { name="Demeanor", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[5] = { name="CloakHP", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[6] = { name="SelfDS", type="Spell", cond=function(self, spell) return not self:castDLU() and mq.TLO.FindItemCount(spell.NoExpendReagentID(1))() > 0 and RGMercUtils.SelfBuffCheck(spell) end },
[7] = { name="Shroud", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[8] = { name="Covenant", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[9] = { name="CallAtk", type="Spell", cond=function(self, spell) return not self:castDLU() and RGMercUtils.SelfBuffCheck(spell) end },
[10] = { name="TempHP", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffCheck(spell) end },
[11] = { name="HealBurn", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffCheck(spell) end },
[12] = { name="Voice of Thule", type="AA", cond=function(self) return RGMercUtils.SelfBuffAACheck("Voice of Thule") end },
[13] = { name="PetSpell", type="Spell", cond=function(self, spell) return not mq.TLO.Me.Pet.ID() and self.settings.DoPet and mq.TLO.FindItemCount(spell.ReagentID(1))() > 0 end },
[14] = { name="PetHaste", type="Spell", cond=function(self, spell) return RGMercUtils.SelfBuffPetCheck(spell) end },
},
},
['Spells'] = {
[1] = { name="Terror", gem=1 },
Expand Down
24 changes: 16 additions & 8 deletions modules/shd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,23 @@ function Module:Render()
self.settings.BurnAuto, pressed = RGMercUtils.RenderOptionToggle("##_bool_auto_burn", "Burn Auto", self.settings.BurnAuto)
if pressed then self:SaveSettings(true) end

ImGui.Text("Spell Loadout")
RGMercUtils.RenderLoadoutTable(Module.SpellLoadOut)

ImGui.Text("Rotations")
local mode = shdClassConfig.Modes[self.settings.Mode]
for k,v in pairs(shdClassConfig.Rotations[mode].Rotation) do
if ImGui.CollapsingHeader(k) then
RGMercUtils.RenderRotationTable(self, k, shdClassConfig.Rotations[mode].Rotation[k], Module.ResolvedActionMap)
if ImGui.CollapsingHeader("Spell Loadout") then
ImGui.Indent()
RGMercUtils.RenderLoadoutTable(Module.SpellLoadOut)
ImGui.Unindent()
end

if ImGui.CollapsingHeader("Rotations") then
ImGui.Indent()
local mode = shdClassConfig.Modes[self.settings.Mode]
for k,v in pairs(shdClassConfig.Rotations[mode].Rotation) do
if ImGui.CollapsingHeader(k) then
ImGui.Indent()
RGMercUtils.RenderRotationTable(self, k, shdClassConfig.Rotations[mode].Rotation[k], Module.ResolvedActionMap)
ImGui.Unindent()
end
end
ImGui.Unindent()
end
ImGui.Text(string.format("Combat State: %s", self.CombatState))
end
Expand Down
6 changes: 3 additions & 3 deletions utils/rgmercs_modules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Modules.__index = Modules
function Modules.load()
local newModules = setmetatable({
modules = {
Basic = require("modules.basic").New(),
Chase = require("modules.chase").New(),
SHD = require("modules.shd").New(),
Basic = require("modules.basic").New(),
Chase = require("modules.chase").New(),
ShadowKnight = require("modules.shd").New(),
}
}, Modules)

Expand Down
11 changes: 7 additions & 4 deletions utils/rgmercs_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ end

function Utils.SelfBuffPetCheck(spell)
if not spell then return false end
return not mq.TLO.Me.PetBuff(spell.Name()) and spell.StacksPet() and mq.TLO.Me.Pet.ID() > 0
return not mq.TLO.Me.PetBuff(spell.Name())() and spell.StacksPet() and mq.TLO.Me.Pet.ID() > 0
end

function Utils.SelfBuffCheck(spell)
Expand Down Expand Up @@ -203,9 +203,9 @@ end
function Utils.RenderRotationTable(s, n, t, map)
if ImGui.BeginTable("Rotation_"..n, 3, ImGuiTableFlags.Resizable + ImGuiTableFlags.Borders) then
ImGui.PushStyleColor(ImGuiCol.Text, 1.0, 0.0, 1.0, 1)
ImGui.TableSetupColumn('ID',(ImGuiTableColumnFlags.WidthFixed), 20.0)
ImGui.TableSetupColumn('Condition Met', ImGuiTableColumnFlags.None, 20.0)
ImGui.TableSetupColumn('Action',(ImGuiTableColumnFlags.WidthFixed), 250.0)
ImGui.TableSetupColumn('ID', ImGuiTableColumnFlags.WidthFixed, 20.0)
ImGui.TableSetupColumn('Condition Met', ImGuiTableColumnFlags.WidthFixed, 20.0)
ImGui.TableSetupColumn('Action', ImGuiTableColumnFlags.WidthStretch, 250.0)
ImGui.PopStyleColor()
ImGui.TableHeadersRow()

Expand All @@ -227,6 +227,9 @@ function Utils.RenderRotationTable(s, n, t, map)
ImGui.Text(ICONS.MD_CHECK)
end
ImGui.PopStyleColor()
if entry.tooltip then
Utils.Tooltip(entry.tooltip)
end
ImGui.TableNextColumn()
local mappedAction = map[entry.name]
if mappedAction then
Expand Down

0 comments on commit b2ea657

Please sign in to comment.