-
Notifications
You must be signed in to change notification settings - Fork 133
/
scourge_strike.go
106 lines (85 loc) · 3.88 KB
/
scourge_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
package deathknight
import (
"time"
"github.com/wowsims/wotlk/sim/core"
"github.com/wowsims/wotlk/sim/core/proto"
)
var ScourgeStrikeActionID = core.ActionID{SpellID: 55271}
// this is just a simple spell because it has no rune costs and is really just a wrapper.
func (dk *Deathknight) registerScourgeStrikeShadowDamageSpell() *core.Spell {
diseaseMulti := dk.dkDiseaseMultiplier(0.12)
// This spell (70890) is marked as "Ignore Damage Taken Modifiers" and "Ignore Caster Damage Modifiers", but does neither.
// E.g. Ebon Plague affects it like a normal spell, but caster damage modifiers (Apply Aura: Mod Damage Done % (Shadow))
// are affecting it additively (e.g. Blood Presence (+15%), Desolation (+5%), and Black Ice (+10%) add only 30% instead of
// the regular ~32.9% damage).
return dk.Unit.RegisterSpell(core.SpellConfig{
ActionID: ScourgeStrikeActionID.WithTag(2),
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellDamage | core.ProcMaskProc,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIgnoreAttackerModifiers,
DamageMultiplier: 1,
ThreatMultiplier: 1,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := dk.LastScourgeStrikeDamage * diseaseMulti * dk.dkCountActiveDiseases(target) * dk.bonusCoeffs.scourgeStrikeShadowMultiplier
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeAlwaysHit)
},
})
}
func (dk *Deathknight) registerScourgeStrikeSpell() {
if !dk.Talents.ScourgeStrike {
return
}
shadowDamageSpell := dk.registerScourgeStrikeShadowDamageSpell()
bonusBaseDamage := dk.sigilOfAwarenessBonus() + dk.sigilOfArthriticBindingBonus()
hasGlyph := dk.HasMajorGlyph(proto.DeathknightMajorGlyph_GlyphOfScourgeStrike)
dk.ScourgeStrike = dk.RegisterSpell(core.SpellConfig{
ActionID: ScourgeStrikeActionID.WithTag(1),
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIncludeTargetBonusDamage | core.SpellFlagAPL,
RuneCost: core.RuneCostOptions{
FrostRuneCost: 1,
UnholyRuneCost: 1,
RunicPowerGain: 15 + 2.5*float64(dk.Talents.Dirge) + dk.scourgeborneBattlegearRunicPowerBonus(),
Refundable: true,
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
IgnoreHaste: true,
},
BonusCritRating: (dk.subversionCritBonus() + dk.viciousStrikesCritChanceBonus() + dk.scourgeborneBattlegearCritBonus()) * core.CritRatingPerCritChance,
DamageMultiplier: .7 *
[]float64{1.0, 1.07, 1.13, 1.2}[dk.Talents.Outbreak] *
dk.scourgelordsBattlegearDamageBonus(ScourgelordBonusSpellSS),
CritMultiplier: dk.bonusCritMultiplier(dk.Talents.ViciousStrikes),
ThreatMultiplier: 1,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := 800 +
bonusBaseDamage +
spell.Unit.MHNormalizedWeaponDamage(sim, spell.MeleeAttackPower()) +
spell.BonusWeaponDamage()
baseDamage *= dk.RoRTSBonus(target)
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
spell.SpendRefundableCost(sim, result)
if result.Landed() && dk.DiseasesAreActive(target) {
dk.LastScourgeStrikeDamage = result.Damage
shadowDamageSpell.Cast(sim, target)
if hasGlyph {
// Extend FF by 3
if dk.FrostFeverSpell.Dot(target).IsActive() && dk.FrostFeverExtended[target.Index] < 3 {
dk.FrostFeverExtended[target.Index]++
dk.FrostFeverSpell.Dot(target).UpdateExpires(dk.FrostFeverSpell.Dot(target).ExpiresAt() + 3*time.Second)
}
// Extend BP by 3
if dk.BloodPlagueSpell.Dot(target).IsActive() && dk.BloodPlagueExtended[target.Index] < 3 {
dk.BloodPlagueExtended[target.Index]++
dk.BloodPlagueSpell.Dot(target).UpdateExpires(dk.BloodPlagueSpell.Dot(target).ExpiresAt() + 3*time.Second)
}
}
}
spell.DealDamage(sim, result)
},
})
}