Skip to content

Commit b752550

Browse files
committed
add hibernating low mana
1 parent b021486 commit b752550

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

Diff for: rotations/priest/shadow.lua

+50-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,47 @@
11
local addon, light = ...
22

33
local lastHeal = 0
4+
local mustPenance = false
5+
local lastPenanceReq = 0
46

57
local function combat()
68
-- never interupt channeling? waste of mana?
79
if player.isChanneling then
810
return
911
end
1012

13+
-- hibernating if low mana
14+
-- Just wand and Penance self? NOTE: Flakey AF
15+
if player.power.mana.percent < 15 then
16+
if player.health.percent < 80 and castable(SB.Penance, player) then
17+
if not mustPenance then
18+
mustPenance = true
19+
lastPenanceReq = GetTime()
20+
--print("stop shoot")
21+
return cast("Shoot") -- disable shooting?
22+
--Unlock(RunMacroText, "/stopattack")
23+
elseif lastPenanceReq+1.5 < GetTime() then -- make sure to check GCD
24+
mustPenance = false
25+
-- TODO: pre-shield to not get knocked?
26+
--print("start PENANCE")
27+
return cast(SB.Penance, player)
28+
end
29+
elseif mustPenance == false then
30+
--print("start shoot")
31+
Unlock(RunMacroText, "/castsequence !Shoot")
32+
return
33+
end
34+
end
35+
36+
-- ???
37+
if mustPenance then
38+
if castable(SB.Penance, player) then
39+
mustPenance = false
40+
return cast(SB.Penance, player)
41+
end
42+
return
43+
end
44+
1145
-- 90%
1246
if player.health.percent < 90 and not player.buff("Renew").up then
1347
return cast(SB.Renew, player)
@@ -28,18 +62,26 @@ local function combat()
2862
-- Damage target
2963
if target.exists and target.enemy and target.alive then
3064
-- check 11 yards
31-
if not CheckInteractDistance("target", 2) then
65+
if not CheckInteractDistance("target", 2) or target.debuff("Blackout").up then
3266
-- TOOD: in_range ?
3367
if castable(SB.MindFlay, target) and target.in_range("Mind Flay")
3468
and not player.isChanneling then
3569
return cast(SB.MindFlay, target)
3670
end
3771
end
3872

73+
--if castable(SB.HolyFire, target) and target.health.actual > 90 then
74+
-- return cast(SB.HolyFire, target)
75+
--end
76+
3977
if not target.debuff("Shadow Word: Pain").up and target.health.percent > 20 and castable(SB.ShadowWordPain, target) then
4078
return cast(SB.ShadowWordPain, target)
4179
end
4280

81+
if castable(SB.Penance, target) then
82+
return cast(SB.Penance, target)
83+
end
84+
4385
if castable(SB.MindBlast, target) and not player.isChanneling then
4486
return cast(SB.MindBlast, target)
4587
end
@@ -58,12 +100,18 @@ local function resting()
58100
if not player.buff("Renew").up and castable(SB.Renew, player) then
59101
return cast(SB.Renew, player)
60102
end
103+
104+
-- 3.5sec cast, better have it out of combat (if learned)
105+
if castable(SB.HolyFire, target) then
106+
return cast(SB.HolyFire, target)
107+
end
108+
61109
if castable(SB.MindBlast, target) then
62110
return cast(SB.MindBlast, target)
63111
end
64112
end
65113
-- resting
66-
if player.alive then
114+
if player.alive and not player.buff("Drink").up and not player.buff("Food").up then
67115
if not player.buff("Inner Fire").up then
68116
return cast(SB.InnerFire, player)
69117
end

0 commit comments

Comments
 (0)