forked from wowsims/cata
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathblackout_kick.go
More file actions
120 lines (90 loc) · 3.76 KB
/
blackout_kick.go
File metadata and controls
120 lines (90 loc) · 3.76 KB
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
119
120
package monk
import (
"time"
"github.com/wowsims/mop/sim/core"
"github.com/wowsims/mop/sim/core/proto"
)
/*
Tooltip:
Kick with a blast of Chi energy, dealing ${7.12*$<low>} to ${7.12*$<high>} Physical damage
-- Teachings of the Monastery && Stance of the Wise Serpent --
to your target and ${3.56*$<low>} to ${3.56*$<high>} to up to 4 additional nearby targets for 50% damage
-- Teachings of the Monastery && Stance of the Wise Serpent --
.
-- Combat Conditioning --
If behind the target, you deal an additional 20% damage over 4 sec. If in front of the target, you are instantly healed for 20% of the damage done.
-- Combat Conditioning --
-- Brewmaster Training --
Also causes you to gain Shuffle, increasing your parry chance by 20% and your Stagger amount by an additional 20% for 6 sec.
-- Brewmaster Training --
-- Teachings of the Monastery --
Also empowers you with Serpent's Zeal, causing you and your summoned Jade Serpent Statue to heal nearby injured targets equal to 25% of your auto-attack damage.
-- Teachings of the Monastery --
*/
var blackoutKickActionID = core.ActionID{SpellID: 100784}.WithTag(1)
func blackoutKickSpellConfig(monk *Monk, isSEFClone bool, overrides core.SpellConfig) core.SpellConfig {
hotfixDamageMultiplier := core.Ternary(monk.Spec == proto.Spec_SpecBrewmasterMonk, 1.25, 1.0) // [Brewmaster] Blackout Kick damage increased by 25%. - https://eu.forums.blizzard.com/en/wow/t/mists-of-pandaria-classic-development-notes-updated-20-june/571162/1
config := core.SpellConfig{
ActionID: blackoutKickActionID,
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | SpellFlagSpender | core.SpellFlagAPL,
ClassSpellMask: MonkSpellBlackoutKick,
MaxRange: core.MaxMeleeRange,
DamageMultiplier: 7.12 * hotfixDamageMultiplier,
ThreatMultiplier: 1,
CritMultiplier: monk.DefaultCritMultiplier(),
Cast: overrides.Cast,
ExtraCastCondition: overrides.ExtraCastCondition,
ApplyEffects: overrides.ApplyEffects,
}
if isSEFClone {
config.ActionID = config.ActionID.WithTag(SEFSpellID)
config.Flags &= ^(core.SpellFlagAPL | SpellFlagSpender)
}
return config
}
func (monk *Monk) registerBlackoutKick() {
chiMetrics := monk.NewChiMetrics(blackoutKickActionID)
chiCost := int32(2)
monk.RegisterSpell(blackoutKickSpellConfig(monk, false, core.SpellConfig{
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: time.Second,
},
IgnoreHaste: true,
},
ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return monk.GetChi() >= monk.GetT16Windwalker4PCostReduction(chiCost) || monk.ComboBreakerBlackoutKickAura.IsActive()
},
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := monk.CalculateMonkStrikeDamage(sim, spell)
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
if result.Landed() {
if monk.ComboBreakerBlackoutKickAura.IsActive() {
monk.onChiSpent(sim, chiCost)
} else {
monk.SpendChi(sim, monk.GetT16Windwalker4PCostReduction(chiCost), chiCost, chiMetrics)
if monk.T16Windwalker4P != nil {
monk.T16Windwalker4P.Deactivate(sim)
}
}
}
spell.DealOutcome(sim, result)
},
}))
}
func (pet *StormEarthAndFirePet) registerSEFBlackoutKick() {
pet.RegisterSpell(blackoutKickSpellConfig(pet.owner, true, core.SpellConfig{
Cast: core.CastConfig{
DefaultCast: core.Cast{
NonEmpty: true,
},
IgnoreHaste: true,
},
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := pet.owner.CalculateMonkStrikeDamage(sim, spell)
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
},
}))
}