1
1
local addon , light = ...
2
2
3
3
local lastHeal = 0
4
+ local mustPenance = false
5
+ local lastPenanceReq = 0
4
6
5
7
local function combat ()
6
8
-- never interupt channeling? waste of mana?
7
9
if player .isChanneling then
8
10
return
9
11
end
10
12
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
+
11
45
-- 90%
12
46
if player .health .percent < 90 and not player .buff (" Renew" ).up then
13
47
return cast (SB .Renew , player )
@@ -28,18 +62,26 @@ local function combat()
28
62
-- Damage target
29
63
if target .exists and target .enemy and target .alive then
30
64
-- check 11 yards
31
- if not CheckInteractDistance (" target" , 2 ) then
65
+ if not CheckInteractDistance (" target" , 2 ) or target . debuff ( " Blackout " ). up then
32
66
-- TOOD: in_range ?
33
67
if castable (SB .MindFlay , target ) and target .in_range (" Mind Flay" )
34
68
and not player .isChanneling then
35
69
return cast (SB .MindFlay , target )
36
70
end
37
71
end
38
72
73
+ -- if castable(SB.HolyFire, target) and target.health.actual > 90 then
74
+ -- return cast(SB.HolyFire, target)
75
+ -- end
76
+
39
77
if not target .debuff (" Shadow Word: Pain" ).up and target .health .percent > 20 and castable (SB .ShadowWordPain , target ) then
40
78
return cast (SB .ShadowWordPain , target )
41
79
end
42
80
81
+ if castable (SB .Penance , target ) then
82
+ return cast (SB .Penance , target )
83
+ end
84
+
43
85
if castable (SB .MindBlast , target ) and not player .isChanneling then
44
86
return cast (SB .MindBlast , target )
45
87
end
@@ -58,12 +100,18 @@ local function resting()
58
100
if not player .buff (" Renew" ).up and castable (SB .Renew , player ) then
59
101
return cast (SB .Renew , player )
60
102
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
+
61
109
if castable (SB .MindBlast , target ) then
62
110
return cast (SB .MindBlast , target )
63
111
end
64
112
end
65
113
-- resting
66
- if player .alive then
114
+ if player .alive and not player . buff ( " Drink " ). up and not player . buff ( " Food " ). up then
67
115
if not player .buff (" Inner Fire" ).up then
68
116
return cast (SB .InnerFire , player )
69
117
end
0 commit comments