-
Notifications
You must be signed in to change notification settings - Fork 132
/
blood_strike.go
118 lines (98 loc) · 3.77 KB
/
blood_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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
package deathknight
import (
"github.com/wowsims/wotlk/sim/core"
)
var BloodStrikeActionID = core.ActionID{SpellID: 49930}
func (dk *Deathknight) newBloodStrikeSpell(isMH bool) *core.Spell {
bonusBaseDamage := dk.sigilOfTheDarkRiderBonus()
diseaseMulti := dk.dkDiseaseMultiplier(0.125)
deathConvertChance := float64(dk.Talents.BloodOfTheNorth+dk.Talents.Reaping) / 3
conf := core.SpellConfig{
ActionID: BloodStrikeActionID.WithTag(core.TernaryInt32(isMH, 1, 2)),
SpellSchool: core.SpellSchoolPhysical,
ProcMask: dk.threatOfThassarianProcMask(isMH),
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIncludeTargetBonusDamage,
RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
RunicPowerGain: 10,
Refundable: true,
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
IgnoreHaste: true,
},
BonusCritRating: (dk.subversionCritBonus() + dk.annihilationCritBonus()) * core.CritRatingPerCritChance,
DamageMultiplier: 0.4 *
core.TernaryFloat64(isMH, 1, dk.nervesOfColdSteelBonus()) *
dk.bloodOfTheNorthCoeff() *
dk.thassariansPlateDamageBonus() *
dk.bloodyStrikesBonus(BloodyStrikesBS),
CritMultiplier: dk.bonusCritMultiplier(dk.Talents.MightOfMograine + dk.Talents.GuileOfGorefiend),
ThreatMultiplier: 1,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
var baseDamage float64
if isMH {
baseDamage = 764 +
bonusBaseDamage +
spell.Unit.MHNormalizedWeaponDamage(sim, spell.MeleeAttackPower()) +
spell.BonusWeaponDamage()
} else {
// SpellID 66979
baseDamage = 382 +
bonusBaseDamage +
spell.Unit.OHNormalizedWeaponDamage(sim, spell.MeleeAttackPower()) +
spell.BonusWeaponDamage()
}
baseDamage *= dk.RoRTSBonus(target) *
(1.0 + dk.dkCountActiveDiseases(target)*diseaseMulti)
result := spell.CalcDamage(sim, target, baseDamage, dk.threatOfThassarianOutcomeApplier(spell))
if isMH {
spell.SpendRefundableCostAndConvertBloodRune(sim, result, deathConvertChance)
dk.threatOfThassarianProc(sim, result, dk.BloodStrikeOhHit)
if result.Landed() {
if dk.DesolationAura != nil {
dk.DesolationAura.Activate(sim)
}
}
}
spell.DealDamage(sim, result)
},
}
if !isMH { // offhand doesn't need GCD
conf.RuneCost = core.RuneCostOptions{}
conf.Cast = core.CastConfig{}
} else {
conf.Flags |= core.SpellFlagAPL
}
return dk.RegisterSpell(conf)
}
func (dk *Deathknight) registerBloodStrikeSpell() {
dk.BloodStrikeMhHit = dk.newBloodStrikeSpell(true)
dk.BloodStrikeOhHit = dk.newBloodStrikeSpell(false)
dk.BloodStrike = dk.BloodStrikeMhHit
}
func (dk *Deathknight) registerDrwBloodStrikeSpell() {
bonusBaseDamage := dk.sigilOfTheDarkRiderBonus()
diseaseMulti := dk.dkDiseaseMultiplier(0.125)
dk.RuneWeapon.BloodStrike = dk.RuneWeapon.RegisterSpell(core.SpellConfig{
ActionID: BloodStrikeActionID.WithTag(1),
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIncludeTargetBonusDamage,
BonusCritRating: (dk.subversionCritBonus() + dk.annihilationCritBonus()) * core.CritRatingPerCritChance,
DamageMultiplier: 0.4 *
dk.bloodOfTheNorthCoeff() *
dk.thassariansPlateDamageBonus() *
dk.bloodyStrikesBonus(BloodyStrikesBS),
CritMultiplier: dk.bonusCritMultiplier(dk.Talents.MightOfMograine + dk.Talents.GuileOfGorefiend),
ThreatMultiplier: 1,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := 764 + bonusBaseDamage + dk.DrwWeaponDamage(sim, spell)
baseDamage *= dk.RoRTSBonus(target) *
(1.0 + dk.drwCountActiveDiseases(target)*diseaseMulti)
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeWeaponSpecialHitAndCrit)
},
})
}