forked from wowsims/cata
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathww_rising_sun_kick.go
More file actions
134 lines (106 loc) · 3.95 KB
/
ww_rising_sun_kick.go
File metadata and controls
134 lines (106 loc) · 3.95 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
package monk
import (
"fmt"
"time"
"github.com/wowsims/mop/sim/core"
)
/*
Tooltip:
You kick upwards, dealing ${14.4*0.89*$<low>} to ${14.4*0.89*$<high>} damage and applying Mortal Wounds to the target.
Also causes all targets within 8 yards to take an increased 20% damage from your abilities for 15 sec.
-- Mortal Wounds --
Grievously wounds the target, reducing the effectiveness of any healing received for 10 sec.
-- Mortal Wounds --
*/
var risingSunKickActionID = core.ActionID{SpellID: 130320}
func risingSunKickDamageBonus(_ *core.Simulation, spell *core.Spell, _ *core.AttackTable) float64 {
if !spell.Matches(MonkSpellsAll ^ MonkSpellTigerStrikes) {
return 1.0
}
return 1.2
}
func risingSunKickSpellConfig(monk *Monk, isSEFClone bool, overrides core.SpellConfig) core.SpellConfig {
config := core.SpellConfig{
ActionID: risingSunKickActionID,
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | SpellFlagSpender | core.SpellFlagAPL,
ClassSpellMask: MonkSpellRisingSunKick,
MaxRange: core.MaxMeleeRange,
Cast: overrides.Cast,
DamageMultiplier: 14.4 * 0.89,
ThreatMultiplier: 1,
CritMultiplier: monk.DefaultCritMultiplier(),
ExtraCastCondition: overrides.ExtraCastCondition,
ApplyEffects: overrides.ApplyEffects,
RelatedAuraArrays: overrides.RelatedAuraArrays,
}
if isSEFClone {
config.ActionID = config.ActionID.WithTag(SEFSpellID)
config.Flags &= ^(core.SpellFlagAPL | SpellFlagSpender)
}
return config
}
func (monk *Monk) registerRisingSunKick() {
chiMetrics := monk.NewChiMetrics(risingSunKickActionID)
chiCost := int32(2)
risingSunKickDebuff := monk.NewEnemyAuraArray(func(target *core.Unit) *core.Aura {
return target.GetOrRegisterAura(core.Aura{
Label: fmt.Sprintf("Rising Sun Kick %s", target.Label),
ActionID: risingSunKickActionID,
Duration: time.Second * 15,
}).AttachDDBC(DDBC_RisingSunKick, DDBC_Total, &monk.AttackTables, risingSunKickDamageBonus)
})
monk.RegisterSpell(risingSunKickSpellConfig(monk, false, core.SpellConfig{
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: time.Second,
},
IgnoreHaste: true,
CD: core.Cooldown{
Timer: monk.NewTimer(),
Duration: time.Second * 8,
},
},
ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return monk.GetChi() >= monk.GetT16Windwalker4PCostReduction(chiCost)
},
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := monk.CalculateMonkStrikeDamage(sim, spell)
result := spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
if result.Landed() {
monk.SpendChi(sim, monk.GetT16Windwalker4PCostReduction(chiCost), chiCost, chiMetrics)
risingSunKickDebuff.ActivateAll(sim)
if monk.T16Windwalker4P != nil {
monk.T16Windwalker4P.Deactivate(sim)
}
}
},
RelatedAuraArrays: risingSunKickDebuff.ToMap(),
}))
}
func (pet *StormEarthAndFirePet) registerSEFRisingSunKick() {
risingSunKickDebuff := pet.NewEnemyAuraArray(func(target *core.Unit) *core.Aura {
return target.GetOrRegisterAura(core.Aura{
Label: fmt.Sprintf("Rising Sun Kick - Clone %s", target.Label),
ActionID: risingSunKickActionID.WithTag(SEFSpellID),
Duration: time.Second * 15,
}).AttachDDBC(DDBC_RisingSunKickSEF, DDBC_Total, &pet.AttackTables, risingSunKickDamageBonus)
})
pet.RegisterSpell(risingSunKickSpellConfig(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)
result := spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
if result.Landed() {
risingSunKickDebuff.ActivateAll(sim)
}
},
RelatedAuraArrays: risingSunKickDebuff.ToMap(),
}))
}