Add monk stuff, more bw stuff

main
Ryan Crockett 2 years ago
parent 0aa4ec5af8
commit ada2b52ca1
  1. 0
      references/paladin/paladin_protection.lua
  2. 0
      references/paladin/shared/hammer-of-wrath.lua
  3. 0
      references/paladin/shared/rebuke.lua
  4. 49
      scripts/brewmaster.lua
  5. 0
      scripts/mistweaver.lua
  6. 0
      scripts/windwalker.lua
  7. 56
      src/MythicPlusUtils/MythicPlusUtils.lua
  8. 524
      src/MythicPlusUtils/lists/tank-buster-list.lua
  9. 26
      src/_bastion.lua

@ -0,0 +1,49 @@
local Tinkr, _Bastion = ...
---@type Bastion
local Bastion = _Bastion
local BrewModule = Bastion.Module:New('brewmaster')
local Player = Bastion.UnitManager:Get('player')
local Target = Bastion.UnitManager:Get('target')
local None = Bastion.UnitManager:Get('none')
local AutoAttack = Bastion.SpellBook:GetSpell(6603)
---@return boolean
local function CombatRotation()
-- Attack the target is auto attack isnt active.
if AutoAttack:IsKnownAndUsable() and not IsCurrentSpell(AutoAttack:GetID()) and Player:InMelee(Target) and not Target:IsDead() then
AutoAttack:Cast(Target)
end
return false
end
---@return boolean
local function OutOfCombatRotation()
return false
end
local isRunning = false
BrewModule:Sync(function()
if not isRunning then
Bastion:Print('Brewmaster Started')
isRunning = true
end
if not Player:IsAlive() or Player:IsMounted() then
return false
end
if Player:IsAffectingCombat() then
-- Combat Rotation
return CombatRotation()
else
-- Out Of Combat Rotation
return OutOfCombatRotation()
end
end)
Bastion:Register(BrewModule)

@ -1,4 +1,4 @@
local Tinkr, _Bastion, DBM = ...
local Tinkr, _Bastion = ...
---@class Bastion
local Bastion = _Bastion
@ -9,8 +9,11 @@ local Bastion = _Bastion
local MythicPlusUtils = {
---@type InterruptList
interruptList = {},
---@type TankBusterList
tankBusterList = {},
---@type BigWigsBars
bars = {}
bars = {},
isBigWigsEnabled = false
}
MythicPlusUtils.__index = MythicPlusUtils
@ -20,6 +23,8 @@ local function BWEventCallBack(event, ...)
local addon, spellId, text, duration, icon, isCD = ...
local now = GetTime()
print('START BAR', text)
MythicPlusUtils.bars[text] = MythicPlusUtils.bars[text] or {}
MythicPlusUtils.bars[text].duration = duration
@ -27,16 +32,25 @@ local function BWEventCallBack(event, ...)
MythicPlusUtils.bars[text].spellId = spellId
elseif event == "BigWigs_StopBar" then
local addon, text = ...
print('STOP BAR', text)
if MythicPlusUtils.bars[text] then
MythicPlusUtils.bars[text] = nil
end
elseif event == "BigWigs_PauseBar" then
local addon, text = ...
print('PAUSE BAR', text)
if MythicPlusUtils.bars[text] then
MythicPlusUtils.bars[text].pauseTime = GetTime()
end
elseif event == "BigWigs_ResumeBar" then
local addon, text = ...
print('RESUME BAR', text)
if MythicPlusUtils.bars[text] and MythicPlusUtils.bars[text].pauseTime then
local pauseTime = MythicPlusUtils.bars[text].pauseTime
local startTime = MythicPlusUtils.bars[text].startTime
@ -55,14 +69,19 @@ end
---@type InterruptList
local _interruptList = Tinkr:require("scripts/bastion/MythicPlusUtils/lists/interrupt-list", Bastion)
---@type TankBusterList
local _tankBusterList = Tinkr:require("scripts/bastion/MythicPlusUtils/lists/tank-buster-list", Bastion)
---@return MythicPlusUtils
function MythicPlusUtils:New()
local self = setmetatable({}, MythicPlusUtils)
self.interruptList = _interruptList
self.tankBusterList = _tankBusterList
if BigWigsLoader then
print("BigWigs Enabled!")
self.isBigWigsEnabled = true
BigWigsLoader.RegisterMessage({}, 'BigWigs_StartBar', BWEventCallBack)
BigWigsLoader.RegisterMessage({}, 'BigWigs_StopBar', BWEventCallBack)
BigWigsLoader.RegisterMessage({}, 'BigWigs_PauseBar', BWEventCallBack)
@ -101,6 +120,39 @@ function MythicPlusUtils:CastingCriticalStop(unit, percent)
return nil
end
function MythicPlusUtils:RefreshBars()
if self.isBigWigsEnabled then
for key, value in pairs(self.bars) do
local expireTime = value.duration + value.startTime
if expireTime < GetTime() then
self.bars[key] = nil
end
end
end
end
---@param spellId number
---@param timeUntilCast number
---@return boolean
function MythicPlusUtils:IsSpellCastSoon(spellId, timeUntilCast)
if self.isBigWigsEnabled then
self:RefreshBars()
for key, value in pairs(self.bars) do
if value.spellId == spellId then
local expireTime = value.duration + value.startTime
local timeUntilSpell = expireTime - GetTime()
if timeUntilSpell > 0 and timeUntilSpell <= timeUntilCast then
return true
end
end
end
end
return false
end
---@param unit Unit
---@param timeUntilCast? number
---@return boolean

@ -1,129 +1,417 @@
---@alias TankBusterList table<number, table<number, { shouldDampen: boolean, shouldDiffuse: boolean, shouldFort: boolean }>>
---@alias TankBusterList table<number, table<number, { shouldDampen: boolean, shouldDiffuse: boolean, shouldFort: boolean, shouldBubble: boolean }>>
---@type TankBusterList
local _TankBusterList = {
-- isPhysical, isMagical
--
-- RLP
--
-- Primal Juggernaut
-- [188244] = {
-- -- Crushing Smash
-- [372730] = {
-- true, false
-- }
-- },
-- -- Defier Draghar
-- [187897] = {
-- -- Steel Barrage
-- [372047] = {
-- true, false
-- }
-- },
-- -- Thunderhead
-- [197698] = {
-- -- Thunder Jaw
-- [392395] = {
-- true, true
-- }
-- },
-- -- Flamegullet
-- [197697] = {
-- -- Fire Maw
-- [392394] = {
-- true, true
-- }
-- },
-- -- Kokia
-- [189232] = {
-- -- Searing Blows
-- [372858] = {
-- true, false
-- },
-- },
-- -- Erkhart
-- [190485] = {
-- -- Stormslam
-- [381512] = {
-- true, true
-- }
-- },
-- --
-- -- NO
-- --
-- -- Raging Tempest
-- [186615] = {
-- -- Energy Surge
-- [384686] = {
-- true, false
-- }
-- },
-- -- Beastcaller
-- [195878] = {
-- -- Heavy Slash
-- [387826] = {
-- true, false
-- }
-- },
-- -- Maruuk
-- [186338] = {
-- -- Brutalize
-- [382836] = {
-- true, false
-- }
-- },
-- [186151] = {
-- [375937] = {
-- true, false
-- }
-- },
-- --
-- -- AV
-- --
-- -- Leymore
-- [186644] = {
-- -- Infused Strike
-- [374789] = {
-- false, true
-- }
-- },
-- -- Vault Guard
-- [190510] = {
-- -- Ice Cutter
-- [377105] = {
-- false, true
-- }
-- },
-- -- Scalebane
-- [191739] = {
-- -- Ice Cutter
-- [377105] = {
-- false, true
-- },
-- -- Spellfrost Breath
-- [391120] = {
-- false, true
-- }
-- },
-- -- Azureblade
-- [186739] = {
-- -- Arcane Cleave
-- [372222] = {
-- false, true
-- }
-- },
-- -- Umbreskul
-- [186738] = {
-- -- Dragon Strike
-- [384978] = {
-- false, true
-- }
-- },
-- --
-- -- AA
-- --
[188244] = {
-- Crushing Smash
[372730] = {
shouldBubble = false,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- Defier Draghar
[187897] = {
-- Steel Barrage
[372047] = {
shouldBubble = false,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- Thunderhead
[197698] = {
-- Thunder Jaw
[392395] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = false
}
},
-- Flamegullet
[197697] = {
-- Fire Maw
[392394] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = false
}
},
-- Kokia
[189232] = {
-- Searing Blows
[372858] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = true
},
},
-- Erkhart
[190485] = {
-- Stormslam
[381512] = {
shouldBubble = false,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = true
}
},
--
-- NO
--
-- Raging Tempest
[186615] = {
-- Energy Surge
[384686] = {
shouldBubble = false,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = true
}
},
-- Beastcaller
[195878] = {
-- Heavy Slash
[387826] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- Maruuk
[186338] = {
-- Brutalize
[382836] = {
shouldBubble = false,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- Balakar
[186151] = {
-- Rending Strike
[375937] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = true
}
},
--
-- AV
--
-- Leymore
[186644] = {
-- Infused Strike
[374789] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = true
}
},
-- Vault Guard
[190510] = {
-- Ice Cutter
[377105] = {
shouldBubble = false,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = false
}
},
-- Scalebane
[191739] = {
-- Ice Cutter
[377105] = {
shouldBubble = false,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = false
},
-- Spellfrost Breath
[391120] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = true
}
},
-- Azureblade
[186739] = {
-- Arcane Cleave
[372222] = {
shouldBubble = false,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = false
}
},
-- Umbreskul
[186738] = {
-- Dragon Strike
[384978] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = true
}
},
--
-- AA
--
-- Battleaxe
[196577] = {
-- Severing Slash
[388911] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- Crawth
[191736] = {
-- Savage Peck
[376997] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = true
}
},
-- Overgrown Ancient
[196482] = {
-- Barkbreaker
[388544] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = true
}
},
--
-- HOV
--
-- Storm Drake
[97068] = {
-- Lightning Breath
[198888] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = false
}
},
-- Hymdall
[94960] = {
-- Bloodletting Sweep
[193092] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = true
}
},
-- Hyrja
[95833] = {
[192018] = {
shouldBubble = false,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = true
}
},
-- Storm Drake
[99891] = {
-- Lightning Breath
[198888] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = false
}
},
-- Angerhoof Bull
[96611] = {
-- Piercing Horns
[199151] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- Steeljaw Grizzly
[96677] = {
-- Rending Claws
[185425] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = true
}
},
-- King Ranulf
[97083] = {
-- Sever
[199652] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- King Haldor
[95843] = {
-- Sever
[199652] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- King Bjorn
[97081] = {
-- Sever
[199652] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- King Tor
[97084] = {
-- Sever
[199652] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- God-King Skovald
[95675] = {
-- Savaga Slash
[193668] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
--
-- CoS
--
-- Sentry
[104270] = {
-- Charged Smash
[209495] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- Gereth the Vile
[108151] = {
-- Vampiric Claws
[373364] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = false
}
},
--
-- SMBG
--
-- Reanimated Ritual Bones
[75715] = {
-- Shadow Slash
[75715] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = true
}
},
--
-- TJS
--
-- Haunting Sha
[59555] = {
-- Haunting Gaze
[114646] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = true
}
},
-- Songbird
[59553] = {
-- Vicious Peck
[396007] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- The Golden Beetle
[59545] = {
[396019] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- Sha-Touched Guardian
[200131] = {
-- Setting Sun Kick
[397094] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = false,
shouldFort = false
}
},
-- Minion of Doubt
[57109] = {
-- Dark Claw
[397931] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = false
}
},
-- Liu Flameheart
[56732] = {
-- Jade Serpent Strike
[106841] = {
shouldBubble = true,
shouldDampen = true,
shouldDiffuse = true,
shouldFort = true
}
}
}
return _TankBusterList

@ -252,26 +252,6 @@ Command:Register('module', 'Toggle a module on/off', function(args)
end
end)
Command:Register('mplus', 'Toggle m+ module on/off', function(args)
local cmd = args[2]
if cmd == 'debuffs' then
Bastion.MythicPlusUtils:ToggleDebuffLogging()
Bastion:Print("Debuff logging", Bastion.MythicPlusUtils.debuffLogging and "enabled" or "disabled")
return
end
if cmd == 'casts' then
Bastion.MythicPlusUtils:ToggleCastLogging()
Bastion:Print("Cast logging", Bastion.MythicPlusUtils.castLogging and "enabled" or "disabled")
return
end
Bastion:Print("[MythicPlusUtils] Unknown command")
Bastion:Print("Available commands:")
Bastion:Print("debuffs")
Bastion:Print("casts")
end)
Command:Register('pause', 'Pause a module for X seconds', function (args)
if Bastion.Enabled then
local duration = args[3]
@ -295,7 +275,7 @@ Command:Register('missed', 'Dump the list of immune kidney shot spells', functio
end
end)
if UnitClass('player') == 'Paladin' and GetSpecialization() == 2 then
Tinkr:require("scripts/bastion/scripts/paladin/paladin_protection", Bastion)
Eval('RunMacroText("/bastion module paladin_protection")', 'bastion')
if UnitClass('player') == 'Monk' and GetSpecialization() == 1 then
Tinkr:require("scripts/bastion/scripts/brewmaster", Bastion)
Eval('RunMacroText("/bastion module brewmaster")', 'bastion')
end

Loading…
Cancel
Save