forked from wowsims/cata
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathbreath_of_fire.go
More file actions
79 lines (65 loc) · 2.27 KB
/
breath_of_fire.go
File metadata and controls
79 lines (65 loc) · 2.27 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
package brewmaster
import (
"time"
"github.com/wowsims/mop/sim/core"
"github.com/wowsims/mop/sim/monk"
)
func (bm *BrewmasterMonk) registerBreathOfFire() {
actionID := core.ActionID{SpellID: 115181}
dotActionID := core.ActionID{SpellID: 123725}
chiMetrics := bm.NewChiMetrics(actionID)
chiCost := int32(2)
bm.RegisterSpell(core.SpellConfig{
ActionID: actionID,
SpellSchool: core.SpellSchoolFire,
ProcMask: core.ProcMaskSpellDamage,
Flags: core.SpellFlagAoE | monk.SpellFlagSpender | core.SpellFlagAPL,
ClassSpellMask: monk.MonkSpellBreathOfFire,
MaxRange: 8,
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: time.Second,
},
IgnoreHaste: true,
CD: core.Cooldown{
Timer: bm.NewTimer(),
Duration: time.Second * 8,
},
},
DamageMultiplier: 1,
ThreatMultiplier: 1,
CritMultiplier: bm.DefaultCritMultiplier(),
Dot: core.DotConfig{
Aura: core.Aura{
Label: "Breath Of Fire" + bm.Label,
ActionID: dotActionID,
},
NumberOfTicks: 4,
TickLength: time.Millisecond * 2000,
AffectedByCastSpeed: false,
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) {
baseDamage := bm.CalcAndRollDamageRange(sim, 0.475, 0.242) + 0.1626*dot.Spell.MeleeAttackPower()
dot.Snapshot(target, baseDamage)
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeSnapshotCrit)
},
},
ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return bm.StanceMatches(monk.SturdyOx) && bm.GetChi() >= 2
},
ApplyEffects: func(sim *core.Simulation, _ *core.Unit, spell *core.Spell) {
for _, enemyTarget := range sim.Encounter.ActiveTargetUnits {
baseDamage := bm.CalcAndRollDamageRange(sim, 1.475, 0.242) + 0.3626*spell.MeleeAttackPower()
result := spell.CalcOutcome(sim, enemyTarget, spell.OutcomeMeleeSpecialNoBlockDodgeParryNoCritNoHitCounter)
if result.Landed() {
spell.CalcAndDealDamage(sim, enemyTarget, baseDamage, spell.OutcomeMagicCrit)
if bm.DizzyingHazeAuras.Get(enemyTarget).IsActive() {
spell.Dot(enemyTarget).Apply(sim)
}
}
}
bm.SpendChi(sim, chiCost, chiCost, chiMetrics)
},
})
}