-
Notifications
You must be signed in to change notification settings - Fork 131
/
garrote.go
74 lines (66 loc) · 2.23 KB
/
garrote.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
67
68
69
70
71
72
73
74
package rogue
import (
"time"
"github.com/wowsims/wotlk/sim/core"
"github.com/wowsims/wotlk/sim/core/proto"
)
func (rogue *Rogue) registerGarrote() {
numTicks := int32(6)
var glyphMultiplier float64
if rogue.HasMajorGlyph(proto.RogueMajorGlyph_GlyphOfGarrote) {
numTicks = 5
glyphMultiplier = 0.44 // cp. https://www.wowhead.com/wotlk/spell=56812/glyph-of-garrote
}
rogue.Garrote = rogue.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 48676},
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | SpellFlagBuilder | core.SpellFlagAPL,
EnergyCost: core.EnergyCostOptions{
Cost: rogue.costModifier(50 - 10*float64(rogue.Talents.DirtyDeeds)),
Refund: 0.8,
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: time.Second,
},
IgnoreHaste: true,
},
ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return !rogue.PseudoStats.InFrontOfTarget && rogue.IsStealthed()
},
DamageMultiplier: 1 +
glyphMultiplier +
0.15*float64(rogue.Talents.BloodSpatter) +
0.10*float64(rogue.Talents.Opportunity) +
0.02*float64(rogue.Talents.FindWeakness),
ThreatMultiplier: 1,
Dot: core.DotConfig{
Aura: core.Aura{
Label: "Garrote",
Tag: RogueBleedTag,
},
NumberOfTicks: numTicks,
TickLength: time.Second * 3,
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
dot.SnapshotBaseDamage = 119 + dot.Spell.MeleeAttackPower()*0.07
attackTable := dot.Spell.Unit.AttackTables[target.UnitIndex]
dot.SnapshotAttackerMultiplier = dot.Spell.AttackerDamageMultiplier(attackTable)
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick)
},
},
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
rogue.BreakStealth(sim)
result := spell.CalcOutcome(sim, target, spell.OutcomeMeleeSpecialNoBlockDodgeParryNoCrit)
if result.Landed() {
rogue.AddComboPoints(sim, 1, spell.ComboPointMetrics())
spell.Dot(target).Apply(sim)
} else {
spell.IssueRefund(sim)
}
spell.DealOutcome(sim, result)
},
})
}