forked from wowsims/wotlk
-
Notifications
You must be signed in to change notification settings - Fork 2
/
hymn_of_hope.go
55 lines (48 loc) · 1.61 KB
/
hymn_of_hope.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
48
49
50
51
52
53
54
55
package priest
/*
import (
"time"
"github.com/Tereneckla/wotlk/sim/core"
"github.com/Tereneckla/wotlk/sim/core/proto"
)
// TODO: This currently only affects the caster, not other raid members.
func (priest *Priest) RegisterHymnOfHopeCD() {
actionID := core.ActionID{SpellID: 64901}
manaMetrics := priest.NewManaMetrics(actionID)
numTicks := 4 + core.TernaryInt32(priest.HasMajorGlyph(proto.PriestMajorGlyph_GlyphOfHymnOfHope), 1, 0)
channelTime := time.Duration(numTicks) * time.Second * 2
hymnOfHopeSpell := priest.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagHelpful,
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
ChannelTime: channelTime,
},
CD: core.Cooldown{
Timer: priest.NewTimer(),
Duration: time.Minute * 6,
},
},
ApplyEffects: func(sim *core.Simulation, _ *core.Unit, spell *core.Spell) {
period := spell.CurCast.ChannelTime / time.Duration(numTicks)
core.StartPeriodicAction(sim, core.PeriodicActionOptions{
Period: period,
NumTicks: int(numTicks),
OnAction: func(sim *core.Simulation) {
// This is 3%, but it increases the target's max mana by 20% for the duration
// so just simplify to 3 * 1.2 = 3.6%.
priest.AddMana(sim, priest.MaxMana()*0.036, manaMetrics)
},
})
},
})
priest.AddMajorCooldown(core.MajorCooldown{
Spell: hymnOfHopeSpell,
Type: core.CooldownTypeMana,
ShouldActivate: func(sim *core.Simulation, character *core.Character) bool {
return character.CurrentManaPercent() < 0.1
},
})
}
*/