-
Notifications
You must be signed in to change notification settings - Fork 131
/
sinister_strike.go
62 lines (53 loc) · 2.02 KB
/
sinister_strike.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
package rogue
import (
"time"
"github.com/wowsims/wotlk/sim/core"
"github.com/wowsims/wotlk/sim/core/proto"
)
func (rogue *Rogue) registerSinisterStrikeSpell() {
hasGlyphOfSinisterStrike := rogue.HasMajorGlyph(proto.RogueMajorGlyph_GlyphOfSinisterStrike)
rogue.SinisterStrike = rogue.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 48638},
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIncludeTargetBonusDamage | SpellFlagBuilder | SpellFlagColdBlooded | core.SpellFlagAPL,
EnergyCost: core.EnergyCostOptions{
Cost: rogue.costModifier([]float64{45, 42, 40}[rogue.Talents.ImprovedSinisterStrike]),
Refund: 0.8,
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: time.Second,
},
IgnoreHaste: true,
},
BonusCritRating: core.TernaryFloat64(rogue.HasSetBonus(Tier9, 4), 5*core.CritRatingPerCritChance, 0) +
[]float64{0, 2, 4, 6}[rogue.Talents.TurnTheTables]*core.CritRatingPerCritChance,
DamageMultiplier: 1 +
0.02*float64(rogue.Talents.FindWeakness) +
0.03*float64(rogue.Talents.Aggression) +
0.05*float64(rogue.Talents.BladeTwisting) +
core.TernaryFloat64(rogue.Talents.SurpriseAttacks, 0.1, 0) +
core.TernaryFloat64(rogue.HasSetBonus(Tier6, 4), 0.06, 0),
CritMultiplier: rogue.MeleeCritMultiplier(true),
ThreatMultiplier: 1,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
rogue.BreakStealth(sim)
baseDamage := 180 +
spell.Unit.MHNormalizedWeaponDamage(sim, spell.MeleeAttackPower()) +
spell.BonusWeaponDamage()
result := spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeWeaponSpecialHitAndCrit)
if result.Landed() {
points := int32(1)
if hasGlyphOfSinisterStrike && result.DidCrit() {
if sim.RandomFloat("Glyph of Sinister Strike") < 0.5 {
points += 1
}
}
rogue.AddComboPoints(sim, points, spell.ComboPointMetrics())
} else {
spell.IssueRefund(sim)
}
},
})
}