Skip to content

Commit

Permalink
- added conditions to mage earth/fire items
Browse files Browse the repository at this point in the history
- renamed them to use instead of summon as it is more accurate
  • Loading branch information
DerpleMQ2 committed Feb 25, 2024
1 parent 31d778d commit cbe6b6c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions class_configs/mag_class_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1187,12 +1187,17 @@ _ClassConfig = {
},
['Burn'] = {
{
name = "EarthPetItemSummon",
name = "EarthPetItemUse",
type = "CustomFunc",
cond = function(self)
if not self.ResolvedActionMap['EarthPetItemSummon'] then return false end
local baseItem = self.ResolvedActionMap['EarthPetItemSummon'].RankName.Base(1)()
return mq.TLO.FindItemCount(baseItem)() > 1
end,
custom_func = function(self)
if not self.ResolvedActionMap['EarthPetItemSummon'] then return false end
local baseItem = self.ResolvedActionMap['EarthPetItemSummon'].RankName.Base(1)()
if mq.TLO.FindItemCount(baseItem)() == 1 then
if mq.TLO.FindItemCount(baseItem)() > 1 then
local invItem = mq.TLO.FindItem(baseItem)
return RGMercUtils.UseItem(invItem.Name(), mq.TLO.Me.ID())
end
Expand All @@ -1201,12 +1206,17 @@ _ClassConfig = {
end,
},
{
name = "FirePetItemSummon",
name = "FirePetItemUse",
type = "CustomFunc",
cond = function(self)
if not self.ResolvedActionMap['FirePetItemSummon'] then return false end
local baseItem = self.ResolvedActionMap['FirePetItemSummon'].RankName.Base(1)()
return mq.TLO.FindItemCount(baseItem)() > 1
end,
custom_func = function(self)
if not self.ResolvedActionMap['FirePetItemSummon'] then return false end
local baseItem = self.ResolvedActionMap['FirePetItemSummon'].RankName.Base(1)()
if mq.TLO.FindItemCount(baseItem)() == 1 then
if mq.TLO.FindItemCount(baseItem)() > 1 then
local invItem = mq.TLO.FindItem(baseItem)
return RGMercUtils.UseItem(invItem.Name(), mq.TLO.Me.ID())
end
Expand Down

0 comments on commit cbe6b6c

Please sign in to comment.