-
Notifications
You must be signed in to change notification settings - Fork 29
/
hammer_of_the_righteous.go
54 lines (45 loc) · 1.42 KB
/
hammer_of_the_righteous.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
package paladin
import (
"github.com/wowsims/sod/sim/core"
"github.com/wowsims/sod/sim/core/proto"
"time"
)
func (paladin *Paladin) registerHammerOfTheRighteous() {
if !paladin.hasRune(proto.PaladinRune_RuneWristHammerOfTheRighteous) {
return
}
results := make([]*core.SpellResult, min(3, paladin.Env.GetNumTargets()))
paladin.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: int32(proto.PaladinRune_RuneWristHammerOfTheRighteous)},
SpellSchool: core.SpellSchoolHoly,
DefenseType: core.DefenseTypeMelee,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagAPL,
ManaCost: core.ManaCostOptions{
BaseCost: 0.06,
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
IgnoreHaste: false,
CD: core.Cooldown{
Timer: paladin.NewTimer(),
Duration: time.Second * 6,
},
},
DamageMultiplier: 4,
ThreatMultiplier: 1,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
weapon := paladin.AutoAttacks.MH()
baseDamage := weapon.CalculateAverageWeaponDamage(spell.MeleeAttackPower()) / weapon.SwingSpeed
for idx := range results {
results[idx] = spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
target = sim.Environment.NextTargetUnit(target)
}
for _, result := range results {
spell.DealDamage(sim, result)
}
},
})
}