Skip to content

Commit 7cc8c90

Browse files
wip
1 parent a702066 commit 7cc8c90

5 files changed

Lines changed: 364 additions & 0 deletions

File tree

Modules/Data/Constants.lua

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,30 @@ Data.Aura = {
346346
[51466] = 3, -- Elemental Oath Rank 1
347347
[51470] = 5, -- Elemental Oath Rank 2
348348
},
349+
UndeadAttackPower = { -- melee
350+
[17352] = 200, -- Argent Avenger
351+
[24833] = 300, -- holy mightstone
352+
[28486] = 30, -- Scourgebane Draught
353+
},
354+
UndeadSpellPower = { -- spell
355+
[24833] = 400, -- holy mightstone
356+
[28488] = 15, -- Scourgebane Infusion
357+
[60597] = 12000, -- Blessing of the Crusade
358+
},
349359
}
350360
Data.Enchant = {
361+
BeastSlayer = { -- physical/spell
362+
[31] = 2,
363+
[188] = 2,
364+
[189] = 4,
365+
[190] = 6,
366+
[191] = 8,
367+
[192] = 10,
368+
[193] = 12,
369+
[194] = 14,
370+
[249] = 2, -- Enchant Weapon - Minor Beastslayer
371+
[853] = 6, -- Enchant Weapon - Lesser Beastslayer
372+
},
351373
BlockValue = {
352374
[2583] = 15, -- Presence of Might
353375
[2653] = 18, -- Enchant Shield - Tough Shield
@@ -357,6 +379,12 @@ Data.Enchant = {
357379
},
358380
Ids = {
359381
BIZNICK_SCOPE = 2523, -- 3% Hit from Biznicks 247x128 Accurascope
382+
LESSER_ELEMENTAL_SLAYER = 854, -- +6 Enchant Weapon - Lesser Elemental Slayer
383+
UNDEAD_DEMON_SLAYER_150 = 3093, -- Consecrated Weapon
384+
},
385+
IncreaseSpellDamageUndead = { -- spell
386+
[2685] = 60, -- Blessed Wizard Oil
387+
[3592] = 100, -- Blessed Wizard Oil
360388
},
361389
MP5 = {
362390
[2381] = 10, -- Enchant Chest - Greater Mana Restoration
@@ -382,6 +410,12 @@ Data.Enchant = {
382410
[3836] = 8, -- Master's Inscription of the Crag
383411
[7099] = 12, -- Blackfathom Mana Oil. This effect only applies within Blackfathom Deeps.
384412
},
413+
UndeadSlayer = { -- melee/ranged
414+
[2684] = 100, -- Consecrated Weapon
415+
[3247] = 140, -- Enchant 2H Weapon - Scourgebane
416+
[3593] = 170,
417+
[7896] = 200, -- Consecrated Two-Handed Weapon
418+
},
385419
}
386420
Data.Gem = {
387421
MP5 = {
@@ -444,9 +478,126 @@ Data.Gem = {
444478
[42146] = 17, -- Lustrous Dragon's Eye
445479
},
446480
}
481+
Data.Item = {
482+
BeastSlaying = { -- ranged/melee
483+
[1465] = 18, -- tigerbane
484+
[3566] = 30, -- Raptorbane Armor
485+
[7710] = 60, -- Loksey's Training Stick
486+
[7756] = 30, -- Dog Training Gloves
487+
[11628] = 24, -- Houndmaster's Bow
488+
[11629] = 24, -- Houndmaster's Rifle
489+
[11906] = 30, -- Beastsmasher
490+
[11907] = 72, -- Beastslayer
491+
[12709] = 45, -- pip's skinner
492+
[13212] = 48, -- Halycon's Spiked Collar
493+
[15782] = 33, -- Beaststalker Blade
494+
[15783] = 33, -- Beasthunter Dagger
495+
[16658] = 18, -- Wildhunter Cloak
496+
[19946] = 60, -- Tigule's Harpoon
497+
[37018] = -40, -- G.E.H.T.A.
498+
[231272] = 99, -- Tigule's Harpoon
499+
[231849] = 99, -- Tigule's Harpoon
500+
},
501+
DemonSlaying = { -- ranged/melee
502+
[10696] = 33, -- Enchanted Azsharite Felbane Sword
503+
[10697] = 33, -- Enchanted Azsharite Felbane Dagger
504+
[10698] = 78, -- Enchanted Azsharite Felbane Staff
505+
[13044] = 99, -- Demonslayer
506+
[18715] = 45, -- Lok'delar, Stave of the Ancient Keepers
507+
[19963] = 117, -- Pitchfork of Madness
508+
[20487] = 45, -- Lok'delar, Stave of the Ancient Keepers DEP
509+
[29398] = 39, -- Circle of Banishing
510+
[30788] = 93, -- Illidari-Bane Dagger
511+
[31745] = 93, -- Illidari-Bane Broadsword
512+
[220575] = 39, -- Eater of the Damned
513+
[228332] = 45, -- Lok'delar, Stave of the Ancient Keepers
514+
[231277] = 141, -- Pitchfork of Madness
515+
[231864] = 141, -- Pitchfork of Madness
516+
},
517+
DragonSlaying = { -- ranged/melee
518+
[19961] = 48, -- Gri'lek's Grinder
519+
[19962] = 117, -- Gri'lek's Carver
520+
[220965] = 117, -- Scalebane Greataxe
521+
[221457] = 36, -- Libram of Draconic Destruction
522+
[231273] = 141, -- Gri'lek's Carver
523+
[231274] = 60, -- Gri'lek's Grinder
524+
[231846] = 141, -- Gri'lek's Carver
525+
[231847] = 60, -- Gri'lek's Grinder
526+
},
527+
ElementalSlaying = { -- ranged/melee
528+
[18310] = 36, -- Fiendish Machete
529+
[228056] = 36, -- Fiendish Machete
530+
[228486] = 75, -- Treant's Bane
531+
},
532+
IncreaseSpellDamageUndead = { -- spell
533+
[18346] = 35, -- Threadbare Trousers
534+
[19812] = 48, -- Rune of the Dawn
535+
[23084] = 35, -- Gloves of Undead Cleansing
536+
[23085] = 48, -- Robe of Undead Cleansing
537+
[23091] = 26, -- Bracers of Undead Cleansing
538+
[236716] = 35, -- Bracers of Undead Cleansing
539+
[236717] = 48, -- Gloves of Undead Cleansing
540+
[236718] = 65, -- Robe of Undead Cleansing
541+
[236722] = 26, -- Bracers of Undead Warding
542+
[236723] = 26, -- Gloves of Undead Warding
543+
[236724] = 26, -- Robe of Undead Warding
544+
[236725] = 35, -- Wristwraps of Undead Cleansing
545+
[236726] = 48, -- Handwraps of Undead Cleansing
546+
[236727] = 65, -- Tunic of Undead Cleansing
547+
[236734] = 35, -- Wristguards of Undead Cleansing
548+
[236735] = 48, -- Handguards of Undead Cleansing
549+
[236736] = 65, -- Chestguard of Undead Cleansing
550+
[236737] = 26, -- Wristguards of Undead Warding
551+
[236738] = 26, -- Handguards of Undead Warding
552+
[236739] = 26, -- Chestguard of Undead Warding
553+
},
554+
IncreaseSpellDamageUndeadDemon = { -- spell
555+
[23207] = 85, -- Champion of the Dawn
556+
[236351] = 89, -- Champion of the Dawn
557+
},
558+
UndeadDemonSlaying = { -- ranged/melee
559+
[23207] = 150, -- Champion of the Dawn
560+
[236352] = 157, -- Champion of the Dawn
561+
},
562+
UndeadSlaying = { -- ranged/melee
563+
[867] = 30, -- Gloves of Holy Might
564+
[10805] = 30, -- Eater of the Dead
565+
[13017] = 66, -- Hellslayer Battle Axe
566+
[13209] = 81, -- Seal of the Dawn
567+
[18758] = 45, -- Specter's Blade
568+
[23078] = 60, -- Gauntlets of Undead Slaying
569+
[23081] = 60, -- Handwraps of Undead Slaying
570+
[23082] = 60, -- Handguards of Undead Slaying
571+
[23087] = 81, -- Breastplate of Undead Slaying
572+
[23088] = 81, -- Chestguard of Undead Slaying
573+
[23089] = 81, -- Tunic of Undead Slaying
574+
[23090] = 45, -- Bracers of Undead Slaying
575+
[23092] = 45, -- Wristguards of Undead Slaying
576+
[23093] = 45, -- Wristwraps of Undead Slaying
577+
[209574] = 15, -- Discarded Tenets of the Silver Hand
578+
[220575] = 39, -- Eater of the Damned
579+
[228030] = 30, -- Malicious Axe
580+
[236707] = 108, -- Tunic of Undead Slaying
581+
[236708] = 108, -- Breastplate of Undead Slaying
582+
[236709] = 108, -- Chestguard of Undead Slaying
583+
[236710] = 60, -- Wristguards of Undead Slaying
584+
[236711] = 60, -- Wristwraps of Undead Slaying
585+
[236712] = 60, -- Bracers of Undead Slaying
586+
[236713] = 81, -- Handwraps of Undead Slaying
587+
[236714] = 81, -- Gauntlets of Undead Slaying
588+
[236715] = 81, -- Handguards of Undead Slaying
589+
[236731] = 45, -- Wristwraps of Undead Warding
590+
[236732] = 45, -- Handwraps of Undead Warding
591+
[236733] = 45, -- Tunic of Undead Warding
592+
[236746] = 45, -- Bracers of Undead Warding
593+
[236747] = 45, -- Gauntlets of Undead Warding
594+
[236748] = 45, -- Breastplate of Undead Warding
595+
},
596+
}
447597
Data.setNames = {
448598
AUGURS_REGALIA = "Augur's Regalia",
449599
BLOODSOUL_EMBRACE = "Bloodsoul Embrace",
600+
CHAIN_OF_THE_SCARLET_CRUSADE = "Chain of the Scarlet Crusade",
450601
DAWN_OF_TRANSCENDENCE = "Dawn of Transcendence",
451602
FEL_IRON_CHAIN = "Fel Iron Chain",
452603
FREETHINKERS_ARMOR = "Freethinker's Armor",
@@ -457,6 +608,7 @@ Data.setNames = {
457608
STORMRAGE_RAIMENT = "Stormrage Raiment",
458609
TEN_STORMS = "The Ten Storms",
459610
THE_EARTHSHATTERER = "The Earthshatterer",
611+
THE_TWIN_BLADES_OF_AZZINOTH = "The Twin Blades of Azzinoth",
460612
VESTMENTS_OF_TRANSCENDENCE = "Vestments of Transcendence",
461613
WINDHAWK_ARMOR = "Windhawk Armor",
462614
}

Modules/Data/ItemSets.lua

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,18 @@ local itemSets = {
118118
[227878] = true,
119119
[227879] = true,
120120
},
121+
[setNames.CHAIN_OF_THE_SCARLET_CRUSADE] = {
122+
[10328] = true,
123+
[10329] = true,
124+
[10330] = true,
125+
[10331] = true,
126+
[10332] = true,
127+
[10333] = true
128+
},
129+
[setNames.THE_TWIN_BLADES_OF_AZZINOTH] = {
130+
[32837] = true,
131+
[32838] = true
132+
},
121133
}
122134

123135
---@return number
@@ -144,6 +156,19 @@ function Data:GetSetBonusModifierMP5()
144156
return mod
145157
end
146158

159+
---@return bool
160+
function Data:HasDemonSlaying200()
161+
if classId == Data.ROGUE or classId == Data.WARRIOR then
162+
return Data:IsSetBonusActive(setNames.THE_TWIN_BLADES_OF_AZZINOTH, 2)
163+
end
164+
return false
165+
end
166+
167+
---@return bool
168+
function Data:HasUndeadSlayer15()
169+
return Data:IsSetBonusActive(setNames.CHAIN_OF_THE_SCARLET_CRUSADE, 5)
170+
end
171+
147172
---@return number
148173
function Data:GetSetBonusValueMP5()
149174
local bonus = 0

Modules/Data/Melee.lua

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,70 @@ function Data:GetMeleeAttackPower()
1414
return melee + posBuff + negBuff
1515
end
1616

17+
<<<<<<< HEAD
1718
---@return number
19+
=======
20+
---@param creature number
21+
---@return string
22+
function Data:GetMeleeAttackPowerVsCreature(creature)
23+
local dmg = 0
24+
-- auras
25+
local j = 1
26+
repeat
27+
local aura = C_UnitAuras.GetAuraDataByIndex("player", j, "HELPFUL")
28+
j = j + 1
29+
if aura and aura.spellId then
30+
if creature == Data.UNDEAD then
31+
dmg = dmg + (Data.buffsUndeadAttackPower[aura.spellId] or 0)
32+
elseif creature == Data.DEMON then
33+
if aura.spellId == 11406 then dmg = dmg + 265 end -- Elixir of Demonslaying
34+
end
35+
end
36+
until (not aura)
37+
for i = 1, 18 do
38+
-- items
39+
local id, _ = GetInventoryItemID("player", i)
40+
if creature == Data.UNDEAD then
41+
dmg = dmg + (Data.itemsUndeadSlaying[id] or 0)
42+
dmg = dmg + (Data.itemsUndeadDeamonSlaying[id] or 0)
43+
elseif creature == Data.DEMON then
44+
dmg = dmg + (Data.itemsDemonSlaying[id] or 0)
45+
dmg = dmg + (Data.itemsUndeadDeamonSlaying[id] or 0)
46+
elseif creature == Data.DRAGONKIN then
47+
dmg = dmg + (Data.itemsDragonSlaying[id] or 0)
48+
elseif creature == Data.MECHANICAL then
49+
if id == 213319 then dmg = dmg + 30 end -- Machinist's Gloves
50+
end
51+
-- enchants
52+
local itemLink = GetInventoryItemLink("player", i)
53+
if itemLink then
54+
local enchant = DataUtils:GetEnchantFromItemLink(itemLink)
55+
if enchant then
56+
if creature == Data.UNDEAD then
57+
dmg = dmg + (Data.enchantsUndeadSlayer[enchant] or 0)
58+
if enchant and enchant == Data.enchantIds.UNDEAD_DEMON_SLAYER_150 then dmg = dmg + 150 end
59+
elseif creature == Data.DEMON then
60+
if enchant and enchant == Data.enchantIds.UNDEAD_DEMON_SLAYER_150 then dmg = dmg + 150 end
61+
elseif creature == Data.BEAST then
62+
dmg = dmg + (Data.enchantsBeastSlayer[enchant] or 0)
63+
elseif creature == Data.ELEMENTAL then
64+
dmg = dmg + (Data.enchantsElementalSlayer[enchant] or 0)
65+
if enchant and enchant == Data.enchantIds.LESSER_ELEMENTAL_SLAYER then dmg = dmg + 6 end
66+
end
67+
end
68+
end
69+
end
70+
-- sets
71+
if creature == Data.UNDEAD then
72+
if Data:HasUndeadSlayer15() then dmg = dmg + 15 end
73+
elseif creature == Data.DEMON then
74+
if Data:HasDemonSlaying200() then dmg = dmg + 200 end
75+
end
76+
return dmg
77+
end
78+
79+
---@return string
80+
>>>>>>> f900584 (wip)
1881
function Data:GetMeleeAttackSpeedMainHand()
1982
local mainHand, _ = UnitAttackSpeed("player")
2083
return DataUtils:Round(mainHand, 2)

Modules/Data/Ranged.lua

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,66 @@ function Data:GetRangeAttackPower()
1919
return melee + posBuff + negBuff
2020
end
2121

22+
---@param creature number
23+
---@return string
24+
function Data:GetRangedAttackPowerVsCreature(creature)
25+
local dmg = 0
26+
-- auras
27+
local j = 1
28+
repeat
29+
local aura = C_UnitAuras.GetAuraDataByIndex("player", j, "HELPFUL")
30+
j = j + 1
31+
if aura and aura.spellId then
32+
if creature == Data.UNDEAD then
33+
if aura.spellId == 58026 then dmg = dmg + 12000 end -- Blessing of the Crusade
34+
elseif creature == Data.DEMON then
35+
if aura.spellId == 11406 then dmg = dmg + 265 end -- Elixir of Demonslaying
36+
end
37+
end
38+
until (not aura)
39+
for i = 1, 18 do
40+
-- items
41+
local id, _ = GetInventoryItemID("player", i)
42+
if creature == Data.UNDEAD then
43+
dmg = dmg + (Data.itemsUndeadSlaying[id] or 0)
44+
dmg = dmg + (Data.itemsUndeadDeamonSlaying[id] or 0)
45+
elseif creature == Data.DEMON then
46+
dmg = dmg + (Data.itemsDemonSlaying[id] or 0)
47+
dmg = dmg + (Data.itemsUndeadDeamonSlaying[id] or 0)
48+
elseif creature == Data.DRAGONKIN then
49+
dmg = dmg + (Data.itemsDragonSlaying[id] or 0)
50+
elseif creature == Data.MECHANICAL then
51+
if id == 213319 then dmg = dmg + 30 end -- Machinist's Gloves
52+
end
53+
-- enchants
54+
local itemLink = GetInventoryItemLink("player", i)
55+
if itemLink then
56+
local enchant = DataUtils:GetEnchantFromItemLink(itemLink)
57+
if enchant then
58+
if creature == Data.UNDEAD then
59+
dmg = dmg + (Data.enchantsUndeadSlayer[enchant] or 0)
60+
if enchant and enchant == Data.enchantIds.UNDEAD_DEMON_SLAYER_150 then dmg = dmg + 150 end
61+
elseif creature == Data.DEMON then
62+
if enchant and enchant == Data.enchantIds.UNDEAD_DEMON_SLAYER_150 then dmg = dmg + 150 end
63+
elseif creature == Data.BEAST then
64+
dmg = dmg + (Data.enchantsBeastSlayer[enchant] or 0)
65+
elseif creature == Data.ELEMENTAL then
66+
dmg = dmg + (Data.enchantsElementalSlayer[enchant] or 0)
67+
if enchant and enchant == Data.enchantIds.LESSER_ELEMENTAL_SLAYER then dmg = dmg + 6 end
68+
end
69+
end
70+
end
71+
end
72+
-- sets
73+
if creature == Data.UNDEAD then
74+
if Data:HasUndeadSlayer15() then dmg = dmg + 15 end
75+
elseif creature == Data.DEMON then
76+
if Data:HasDemonSlaying200() then dmg = dmg + 200 end
77+
end
78+
return dmg
79+
end
80+
81+
2282
---@return boolean
2383
function _Ranged:IsRangeAttackClass()
2484
return classId == Data.WARRIOR or classId == Data.ROGUE or classId == Data.HUNTER

0 commit comments

Comments
 (0)