forked from wowsims/wotlk
-
Notifications
You must be signed in to change notification settings - Fork 2
/
holy_fire.go
72 lines (64 loc) · 2.34 KB
/
holy_fire.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
package priest
import (
"time"
"github.com/Tereneckla/wotlk/sim/core"
"github.com/Tereneckla/wotlk/sim/core/proto"
)
func (priest *Priest) RegisterHolyFireSpell(memeDream bool) {
hasGlyph := !memeDream && priest.HasMajorGlyph(proto.PriestMajorGlyph_GlyphOfSmite)
priest.HolyFire = priest.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 25384},
SpellSchool: core.SpellSchoolHoly,
ProcMask: core.ProcMaskSpellDamage,
Flags: core.SpellFlagAPL,
ManaCost: core.ManaCostOptions{
BaseCost: 0.11,
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
CastTime: time.Millisecond*2000 - time.Millisecond*100*time.Duration(priest.Talents.DivineFury),
},
CD: core.Cooldown{
Timer: priest.NewTimer(),
Duration: time.Second * 10,
},
},
BonusCritRating: float64(priest.Talents.HolySpecialization) * 1 * core.CritRatingPerCritChance,
DamageMultiplier: 1 + 0.05*float64(priest.Talents.SearingLight),
CritMultiplier: priest.DefaultSpellCritMultiplier(),
ThreatMultiplier: 1 - []float64{0, .07, .14, .20}[priest.Talents.SilentResolve],
Dot: core.DotConfig{
Aura: core.Aura{
Label: "HolyFire",
OnGain: func(aura *core.Aura, sim *core.Simulation) {
if hasGlyph {
priest.Smite.DamageMultiplier *= 1.2
}
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
if hasGlyph {
priest.Smite.DamageMultiplier /= 1.2
}
},
},
NumberOfTicks: 7,
TickLength: time.Second * 1,
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
dot.SnapshotBaseDamage = 21 + 0.024*dot.Spell.SpellPower()
dot.SnapshotAttackerMultiplier = dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex])
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick)
},
},
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(705+3.6*4, 895+3.6*4) + 0.5711*spell.SpellPower()
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
if result.Landed() {
spell.Dot(target).Apply(sim)
}
spell.DealDamage(sim, result)
},
})
}