diff --git a/Modules/Data/Constants.lua b/Modules/Data/Constants.lua index a880a09..09908b5 100755 --- a/Modules/Data/Constants.lua +++ b/Modules/Data/Constants.lua @@ -346,8 +346,30 @@ Data.Aura = { [51466] = 3, -- Elemental Oath Rank 1 [51470] = 5, -- Elemental Oath Rank 2 }, + UndeadAttackPower = { -- melee + [17352] = 200, -- Argent Avenger + [24833] = 300, -- holy mightstone + [28486] = 30, -- Scourgebane Draught + }, + UndeadSpellPower = { -- spell + [24833] = 400, -- holy mightstone + [28488] = 15, -- Scourgebane Infusion + [60597] = 12000, -- Blessing of the Crusade + }, } Data.Enchant = { + BeastSlayer = { -- physical/spell + [31] = 2, + [188] = 2, + [189] = 4, + [190] = 6, + [191] = 8, + [192] = 10, + [193] = 12, + [194] = 14, + [249] = 2, -- Enchant Weapon - Minor Beastslayer + [853] = 6, -- Enchant Weapon - Lesser Beastslayer + }, BlockValue = { [2583] = 15, -- Presence of Might [2653] = 18, -- Enchant Shield - Tough Shield @@ -357,6 +379,12 @@ Data.Enchant = { }, Ids = { BIZNICK_SCOPE = 2523, -- 3% Hit from Biznicks 247x128 Accurascope + LESSER_ELEMENTAL_SLAYER = 854, -- +6 Enchant Weapon - Lesser Elemental Slayer + UNDEAD_DEMON_SLAYER_150 = 3093, -- Consecrated Weapon + }, + IncreaseSpellDamageUndead = { -- spell + [2685] = 60, -- Blessed Wizard Oil + [3592] = 100, -- Blessed Wizard Oil }, MP5 = { [2381] = 10, -- Enchant Chest - Greater Mana Restoration @@ -382,6 +410,12 @@ Data.Enchant = { [3836] = 8, -- Master's Inscription of the Crag [7099] = 12, -- Blackfathom Mana Oil. This effect only applies within Blackfathom Deeps. }, + UndeadSlayer = { -- melee/ranged + [2684] = 100, -- Consecrated Weapon + [3247] = 140, -- Enchant 2H Weapon - Scourgebane + [3593] = 170, + [7896] = 200, -- Consecrated Two-Handed Weapon + }, } Data.Gem = { MP5 = { @@ -444,9 +478,126 @@ Data.Gem = { [42146] = 17, -- Lustrous Dragon's Eye }, } +Data.Item = { + BeastSlaying = { -- ranged/melee + [1465] = 18, -- tigerbane + [3566] = 30, -- Raptorbane Armor + [7710] = 60, -- Loksey's Training Stick + [7756] = 30, -- Dog Training Gloves + [11628] = 24, -- Houndmaster's Bow + [11629] = 24, -- Houndmaster's Rifle + [11906] = 30, -- Beastsmasher + [11907] = 72, -- Beastslayer + [12709] = 45, -- pip's skinner + [13212] = 48, -- Halycon's Spiked Collar + [15782] = 33, -- Beaststalker Blade + [15783] = 33, -- Beasthunter Dagger + [16658] = 18, -- Wildhunter Cloak + [19946] = 60, -- Tigule's Harpoon + [37018] = -40, -- G.E.H.T.A. + [231272] = 99, -- Tigule's Harpoon + [231849] = 99, -- Tigule's Harpoon + }, + DemonSlaying = { -- ranged/melee + [10696] = 33, -- Enchanted Azsharite Felbane Sword + [10697] = 33, -- Enchanted Azsharite Felbane Dagger + [10698] = 78, -- Enchanted Azsharite Felbane Staff + [13044] = 99, -- Demonslayer + [18715] = 45, -- Lok'delar, Stave of the Ancient Keepers + [19963] = 117, -- Pitchfork of Madness + [20487] = 45, -- Lok'delar, Stave of the Ancient Keepers DEP + [29398] = 39, -- Circle of Banishing + [30788] = 93, -- Illidari-Bane Dagger + [31745] = 93, -- Illidari-Bane Broadsword + [220575] = 39, -- Eater of the Damned + [228332] = 45, -- Lok'delar, Stave of the Ancient Keepers + [231277] = 141, -- Pitchfork of Madness + [231864] = 141, -- Pitchfork of Madness + }, + DragonSlaying = { -- ranged/melee + [19961] = 48, -- Gri'lek's Grinder + [19962] = 117, -- Gri'lek's Carver + [220965] = 117, -- Scalebane Greataxe + [221457] = 36, -- Libram of Draconic Destruction + [231273] = 141, -- Gri'lek's Carver + [231274] = 60, -- Gri'lek's Grinder + [231846] = 141, -- Gri'lek's Carver + [231847] = 60, -- Gri'lek's Grinder + }, + ElementalSlaying = { -- ranged/melee + [18310] = 36, -- Fiendish Machete + [228056] = 36, -- Fiendish Machete + [228486] = 75, -- Treant's Bane + }, + IncreaseSpellDamageUndead = { -- spell + [18346] = 35, -- Threadbare Trousers + [19812] = 48, -- Rune of the Dawn + [23084] = 35, -- Gloves of Undead Cleansing + [23085] = 48, -- Robe of Undead Cleansing + [23091] = 26, -- Bracers of Undead Cleansing + [236716] = 35, -- Bracers of Undead Cleansing + [236717] = 48, -- Gloves of Undead Cleansing + [236718] = 65, -- Robe of Undead Cleansing + [236722] = 26, -- Bracers of Undead Warding + [236723] = 26, -- Gloves of Undead Warding + [236724] = 26, -- Robe of Undead Warding + [236725] = 35, -- Wristwraps of Undead Cleansing + [236726] = 48, -- Handwraps of Undead Cleansing + [236727] = 65, -- Tunic of Undead Cleansing + [236734] = 35, -- Wristguards of Undead Cleansing + [236735] = 48, -- Handguards of Undead Cleansing + [236736] = 65, -- Chestguard of Undead Cleansing + [236737] = 26, -- Wristguards of Undead Warding + [236738] = 26, -- Handguards of Undead Warding + [236739] = 26, -- Chestguard of Undead Warding + }, + IncreaseSpellDamageUndeadDemon = { -- spell + [23207] = 85, -- Champion of the Dawn + [236351] = 89, -- Champion of the Dawn + }, + UndeadDemonSlaying = { -- ranged/melee + [23207] = 150, -- Champion of the Dawn + [236352] = 157, -- Champion of the Dawn + }, + UndeadSlaying = { -- ranged/melee + [867] = 30, -- Gloves of Holy Might + [10805] = 30, -- Eater of the Dead + [13017] = 66, -- Hellslayer Battle Axe + [13209] = 81, -- Seal of the Dawn + [18758] = 45, -- Specter's Blade + [23078] = 60, -- Gauntlets of Undead Slaying + [23081] = 60, -- Handwraps of Undead Slaying + [23082] = 60, -- Handguards of Undead Slaying + [23087] = 81, -- Breastplate of Undead Slaying + [23088] = 81, -- Chestguard of Undead Slaying + [23089] = 81, -- Tunic of Undead Slaying + [23090] = 45, -- Bracers of Undead Slaying + [23092] = 45, -- Wristguards of Undead Slaying + [23093] = 45, -- Wristwraps of Undead Slaying + [209574] = 15, -- Discarded Tenets of the Silver Hand + [220575] = 39, -- Eater of the Damned + [228030] = 30, -- Malicious Axe + [236707] = 108, -- Tunic of Undead Slaying + [236708] = 108, -- Breastplate of Undead Slaying + [236709] = 108, -- Chestguard of Undead Slaying + [236710] = 60, -- Wristguards of Undead Slaying + [236711] = 60, -- Wristwraps of Undead Slaying + [236712] = 60, -- Bracers of Undead Slaying + [236713] = 81, -- Handwraps of Undead Slaying + [236714] = 81, -- Gauntlets of Undead Slaying + [236715] = 81, -- Handguards of Undead Slaying + [236731] = 45, -- Wristwraps of Undead Warding + [236732] = 45, -- Handwraps of Undead Warding + [236733] = 45, -- Tunic of Undead Warding + [236746] = 45, -- Bracers of Undead Warding + [236747] = 45, -- Gauntlets of Undead Warding + [236748] = 45, -- Breastplate of Undead Warding + }, +} Data.setNames = { AUGURS_REGALIA = "Augur's Regalia", BLOODSOUL_EMBRACE = "Bloodsoul Embrace", + CHAIN_OF_THE_SCARLET_CRUSADE = "Chain of the Scarlet Crusade", DAWN_OF_TRANSCENDENCE = "Dawn of Transcendence", FEL_IRON_CHAIN = "Fel Iron Chain", FREETHINKERS_ARMOR = "Freethinker's Armor", @@ -457,6 +608,7 @@ Data.setNames = { STORMRAGE_RAIMENT = "Stormrage Raiment", TEN_STORMS = "The Ten Storms", THE_EARTHSHATTERER = "The Earthshatterer", + THE_TWIN_BLADES_OF_AZZINOTH = "The Twin Blades of Azzinoth", VESTMENTS_OF_TRANSCENDENCE = "Vestments of Transcendence", WINDHAWK_ARMOR = "Windhawk Armor", } diff --git a/Modules/Data/ItemSets.lua b/Modules/Data/ItemSets.lua index cabd680..58423fc 100755 --- a/Modules/Data/ItemSets.lua +++ b/Modules/Data/ItemSets.lua @@ -118,6 +118,18 @@ local itemSets = { [227878] = true, [227879] = true, }, + [setNames.CHAIN_OF_THE_SCARLET_CRUSADE] = { + [10328] = true, + [10329] = true, + [10330] = true, + [10331] = true, + [10332] = true, + [10333] = true + }, + [setNames.THE_TWIN_BLADES_OF_AZZINOTH] = { + [32837] = true, + [32838] = true + }, } ---@return number @@ -144,6 +156,19 @@ function Data:GetSetBonusModifierMP5() return mod end +---@return bool +function Data:HasDemonSlaying200() + if classId == Data.ROGUE or classId == Data.WARRIOR then + return Data:IsSetBonusActive(setNames.THE_TWIN_BLADES_OF_AZZINOTH, 2) + end + return false +end + +---@return bool +function Data:HasUndeadSlayer15() + return Data:IsSetBonusActive(setNames.CHAIN_OF_THE_SCARLET_CRUSADE, 5) +end + ---@return number function Data:GetSetBonusValueMP5() local bonus = 0 diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index a58448a..b957f5a 100755 --- a/Modules/Data/Melee.lua +++ b/Modules/Data/Melee.lua @@ -14,6 +14,65 @@ function Data:GetMeleeAttackPower() return melee + posBuff + negBuff end +---@param creature number +---@return string +function Data:GetMeleeAttackPowerVsCreature(creature) + local dmg = 0 + -- auras + local j = 1 + repeat + local aura = C_UnitAuras.GetAuraDataByIndex("player", j, "HELPFUL") + j = j + 1 + if aura and aura.spellId then + if creature == Data.UNDEAD then + dmg = dmg + (Data.buffsUndeadAttackPower[aura.spellId] or 0) + elseif creature == Data.DEMON then + if aura.spellId == 11406 then dmg = dmg + 265 end -- Elixir of Demonslaying + end + end + until (not aura) + for i = 1, 18 do + -- items + local id, _ = GetInventoryItemID("player", i) + if creature == Data.UNDEAD then + dmg = dmg + (Data.itemsUndeadSlaying[id] or 0) + dmg = dmg + (Data.itemsUndeadDeamonSlaying[id] or 0) + elseif creature == Data.DEMON then + dmg = dmg + (Data.itemsDemonSlaying[id] or 0) + dmg = dmg + (Data.itemsUndeadDeamonSlaying[id] or 0) + elseif creature == Data.DRAGONKIN then + dmg = dmg + (Data.itemsDragonSlaying[id] or 0) + elseif creature == Data.MECHANICAL then + if id == 213319 then dmg = dmg + 30 end -- Machinist's Gloves + end + -- enchants + local itemLink = GetInventoryItemLink("player", i) + if itemLink then + local enchant = DataUtils:GetEnchantFromItemLink(itemLink) + if enchant then + if creature == Data.UNDEAD then + dmg = dmg + (Data.enchantsUndeadSlayer[enchant] or 0) + if enchant and enchant == Data.enchantIds.UNDEAD_DEMON_SLAYER_150 then dmg = dmg + 150 end + elseif creature == Data.DEMON then + if enchant and enchant == Data.enchantIds.UNDEAD_DEMON_SLAYER_150 then dmg = dmg + 150 end + elseif creature == Data.BEAST then + dmg = dmg + (Data.enchantsBeastSlayer[enchant] or 0) + elseif creature == Data.ELEMENTAL then + dmg = dmg + (Data.enchantsElementalSlayer[enchant] or 0) + if enchant and enchant == Data.enchantIds.LESSER_ELEMENTAL_SLAYER then dmg = dmg + 6 end + end + end + end + end + -- sets + if creature == Data.UNDEAD then + if Data:HasUndeadSlayer15() then dmg = dmg + 15 end + elseif creature == Data.DEMON then + if Data:HasDemonSlaying200() then dmg = dmg + 200 end + end + return dmg +end + ---@return string function Data:GetMeleeAttackSpeedMainHand() local mainHand, _ = UnitAttackSpeed("player") diff --git a/Modules/Data/Ranged.lua b/Modules/Data/Ranged.lua index dd3ae58..1c75e7e 100755 --- a/Modules/Data/Ranged.lua +++ b/Modules/Data/Ranged.lua @@ -19,6 +19,66 @@ function Data:GetRangeAttackPower() return melee + posBuff + negBuff end +---@param creature number +---@return string +function Data:GetRangedAttackPowerVsCreature(creature) + local dmg = 0 + -- auras + local j = 1 + repeat + local aura = C_UnitAuras.GetAuraDataByIndex("player", j, "HELPFUL") + j = j + 1 + if aura and aura.spellId then + if creature == Data.UNDEAD then + if aura.spellId == 58026 then dmg = dmg + 12000 end -- Blessing of the Crusade + elseif creature == Data.DEMON then + if aura.spellId == 11406 then dmg = dmg + 265 end -- Elixir of Demonslaying + end + end + until (not aura) + for i = 1, 18 do + -- items + local id, _ = GetInventoryItemID("player", i) + if creature == Data.UNDEAD then + dmg = dmg + (Data.itemsUndeadSlaying[id] or 0) + dmg = dmg + (Data.itemsUndeadDeamonSlaying[id] or 0) + elseif creature == Data.DEMON then + dmg = dmg + (Data.itemsDemonSlaying[id] or 0) + dmg = dmg + (Data.itemsUndeadDeamonSlaying[id] or 0) + elseif creature == Data.DRAGONKIN then + dmg = dmg + (Data.itemsDragonSlaying[id] or 0) + elseif creature == Data.MECHANICAL then + if id == 213319 then dmg = dmg + 30 end -- Machinist's Gloves + end + -- enchants + local itemLink = GetInventoryItemLink("player", i) + if itemLink then + local enchant = DataUtils:GetEnchantFromItemLink(itemLink) + if enchant then + if creature == Data.UNDEAD then + dmg = dmg + (Data.enchantsUndeadSlayer[enchant] or 0) + if enchant and enchant == Data.enchantIds.UNDEAD_DEMON_SLAYER_150 then dmg = dmg + 150 end + elseif creature == Data.DEMON then + if enchant and enchant == Data.enchantIds.UNDEAD_DEMON_SLAYER_150 then dmg = dmg + 150 end + elseif creature == Data.BEAST then + dmg = dmg + (Data.enchantsBeastSlayer[enchant] or 0) + elseif creature == Data.ELEMENTAL then + dmg = dmg + (Data.enchantsElementalSlayer[enchant] or 0) + if enchant and enchant == Data.enchantIds.LESSER_ELEMENTAL_SLAYER then dmg = dmg + 6 end + end + end + end + end + -- sets + if creature == Data.UNDEAD then + if Data:HasUndeadSlayer15() then dmg = dmg + 15 end + elseif creature == Data.DEMON then + if Data:HasDemonSlaying200() then dmg = dmg + 200 end + end + return dmg +end + + ---@return boolean function _Ranged:IsRangeAttackClass() return classId == Data.WARRIOR or classId == Data.ROGUE or classId == Data.HUNTER diff --git a/Modules/Data/SpellDamage.lua b/Modules/Data/SpellDamage.lua index 4801b5e..d7ea84d 100755 --- a/Modules/Data/SpellDamage.lua +++ b/Modules/Data/SpellDamage.lua @@ -16,6 +16,53 @@ function Data:GetSpellDamage(school) return DataUtils:Round(spellDmg, 0) end +---@param creature number +---@return number +function Data:GetSpellPowerVsCreature(creature) + local spellDmg = 0 + -- auras + local j = 1 + repeat + local aura = C_UnitAuras.GetAuraDataByIndex("player", j, "HELPFUL") + j = j + 1 + if aura and aura.spellId then + if creature == Data.UNDEAD then + spellDmg = spellDmg + (Data.buffsUndeadSpellPower[aura.spellId] or 0) + end + end + until (not aura) + for i = 1, 18 do + -- items + local id, _ = GetInventoryItemID("player", i) + if creature == Data.UNDEAD then + spellDmg = spellDmg + (Data.itemsIncreaseSpellDamageUndead[id] or 0) + spellDmg = spellDmg + (Data.itemsIncreaseSpellDamageUndeadDemon[id] or 0) + elseif creature == Data.DEMON then + if id == 30787 then spellDmg = spellDmg + 185 end -- Illidari-Bane Mageblade + spellDmg = spellDmg + (Data.itemsIncreaseSpellDamageUndeadDemon[id] or 0) + end + -- enchants + local itemLink = GetInventoryItemLink("player", i) + if itemLink then + local enchant = DataUtils:GetEnchantFromItemLink(itemLink) + if enchant then + if creature == Data.UNDEAD then + spellDmg = spellDmg + (Data.enchantsUndeadSlayer[enchant] or 0) + spellDmg = spellDmg + (Data.enchantsIncreaseSpellDamageUndead[enchant] or 0) + elseif creature == Data.BEAST then + spellDmg = spellDmg + (Data.enchantsBeastSlayer[enchant] or 0) + elseif creature == Data.ELEMENTAL then + spellDmg = spellDmg + (Data.enchantsElementalSlayer[enchant] or 0) + end + end + end + end + + local modifier = _SpellDamage:GetGeneralTalentModifier() + spellDmg = spellDmg * (1 + (modifier / 100)) + return DataUtils:Round(spellDmg, 0) +end + ---@return number function _SpellDamage:GetGeneralTalentModifier() local mod = 0 @@ -49,4 +96,4 @@ end function Data:GetSpellHasteBonus() local hasteBonus = GetCombatRatingBonus(CR_HASTE_SPELL) return DataUtils:Round(hasteBonus, 2) .. "%" -end \ No newline at end of file +end