-
Notifications
You must be signed in to change notification settings - Fork 133
/
vampiric_blood.go
66 lines (56 loc) · 1.75 KB
/
vampiric_blood.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
56
57
58
59
60
61
62
63
64
65
66
package deathknight
import (
"time"
"github.com/wowsims/wotlk/sim/core"
"github.com/wowsims/wotlk/sim/core/proto"
"github.com/wowsims/wotlk/sim/core/stats"
)
func (dk *Deathknight) registerVampiricBloodSpell() {
if !dk.Talents.VampiricBlood {
return
}
actionID := core.ActionID{SpellID: 55233}
healthMetrics := dk.NewHealthMetrics(actionID)
cdTimer := dk.NewTimer()
cd := time.Minute*1 - dk.thassariansPlateCooldownReduction(dk.VampiricBlood)
var bonusHealth float64
dk.VampiricBloodAura = dk.RegisterAura(core.Aura{
Label: "Vampiric Blood",
ActionID: actionID,
Duration: time.Second*10 + core.TernaryDuration(dk.HasMajorGlyph(proto.DeathknightMajorGlyph_GlyphOfVampiricBlood), 5*time.Second, 0),
OnGain: func(aura *core.Aura, sim *core.Simulation) {
bonusHealth = dk.MaxHealth() * 0.15
dk.AddStatsDynamic(sim, stats.Stats{stats.Health: bonusHealth})
dk.GainHealth(sim, bonusHealth, healthMetrics)
dk.PseudoStats.HealingTakenMultiplier *= 1.35
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
dk.AddStatsDynamic(sim, stats.Stats{stats.Health: -bonusHealth})
dk.PseudoStats.HealingTakenMultiplier /= 1.35
},
})
dk.VampiricBlood = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,
RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
RunicPowerGain: 10,
},
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: cdTimer,
Duration: cd,
},
IgnoreHaste: true,
},
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
dk.VampiricBloodAura.Activate(sim)
},
})
if !dk.Inputs.IsDps {
dk.AddMajorCooldown(core.MajorCooldown{
Spell: dk.VampiricBlood,
Type: core.CooldownTypeSurvival,
})
}
}