-
Notifications
You must be signed in to change notification settings - Fork 134
/
thistle_tea.go
47 lines (38 loc) · 1.1 KB
/
thistle_tea.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package rogue
import (
"time"
"github.com/wowsims/wotlk/sim/core"
"github.com/wowsims/wotlk/sim/core/proto"
)
func (rogue *Rogue) registerThistleTeaCD() {
if rogue.Consumes.DefaultConjured != proto.Conjured_ConjuredRogueThistleTea {
return
}
actionID := core.ActionID{ItemID: 7676}
energyMetrics := rogue.NewEnergyMetrics(actionID)
const energyRegen = 20.0
thistleTeaSpell := rogue.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: rogue.NewTimer(),
Duration: time.Minute * 5,
},
SharedCD: core.Cooldown{
Timer: rogue.GetConjuredCD(),
Duration: time.Minute * 2,
},
},
ApplyEffects: func(sim *core.Simulation, _ *core.Unit, _ *core.Spell) {
rogue.AddEnergy(sim, energyRegen, energyMetrics)
},
})
rogue.AddMajorCooldown(core.MajorCooldown{
Spell: thistleTeaSpell,
Type: core.CooldownTypeDPS,
ShouldActivate: func(sim *core.Simulation, character *core.Character) bool {
// Make sure we have plenty of room so we dont energy cap right after using.
return rogue.CurrentEnergy() <= 60
},
})
}