-
Notifications
You must be signed in to change notification settings - Fork 135
/
rune_tap.go
51 lines (42 loc) · 1.32 KB
/
rune_tap.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
package deathknight
import (
"time"
"github.com/wowsims/wotlk/sim/core"
"github.com/wowsims/wotlk/sim/core/proto"
)
func (dk *Deathknight) GetRuneTapHealing() float64 {
maxHealth := dk.MaxHealth()
return maxHealth * dk.bonusCoeffs.runeTapHealing
}
func (dk *Deathknight) registerRuneTapSpell() {
if !dk.Talents.RuneTap {
return
}
actionID := core.ActionID{SpellID: 48982}
cdTimer := dk.NewTimer()
cd := time.Minute - (time.Second * 10 * time.Duration(dk.Talents.ImprovedRuneTap))
healthMetrics := dk.NewHealthMetrics(actionID)
dk.bonusCoeffs.runeTapHealing = []float64{1.0, 1.33, 1.66, 2.0}[dk.Talents.ImprovedRuneTap] *
core.TernaryFloat64(dk.HasMajorGlyph(proto.DeathknightMajorGlyph_GlyphOfRuneTap), 0.11, 0.10)
dk.RuneTap = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,
RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
},
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: cdTimer,
Duration: cd,
},
IgnoreHaste: true,
},
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
dk.GainHealth(sim, dk.GetRuneTapHealing()*dk.PseudoStats.HealingTakenMultiplier, healthMetrics)
},
})
dk.AddMajorCooldown(core.MajorCooldown{
Spell: dk.RuneTap,
Type: core.CooldownTypeSurvival,
})
}