forked from wowsims/wotlk
-
Notifications
You must be signed in to change notification settings - Fork 2
/
shield_of_righteousness.go
59 lines (50 loc) · 1.67 KB
/
shield_of_righteousness.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
package paladin
import (
"time"
"github.com/Tereneckla/wotlk/sim/core"
"github.com/Tereneckla/wotlk/sim/core/stats"
)
func (paladin *Paladin) registerShieldOfRighteousnessSpell() {
var aegisPlateProcAura *core.Aura
if paladin.HasSetBonus(ItemSetAegisPlate, 4) {
aegisPlateProcAura = paladin.NewTemporaryStatsAura("Aegis", core.ActionID{SpellID: 64883}, stats.Stats{stats.BlockValue: 225}, time.Second*6)
}
paladin.ShieldOfRighteousness = paladin.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 61411},
SpellSchool: core.SpellSchoolHoly,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagAPL,
ManaCost: core.ManaCostOptions{
BaseCost: 0.06,
Multiplier: 1 - 0.02*float64(paladin.Talents.Benediction),
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
IgnoreHaste: true,
CD: core.Cooldown{
Timer: paladin.NewTimer(),
Duration: time.Second * 6,
},
},
DamageMultiplier: 1,
CritMultiplier: paladin.MeleeCritMultiplier(),
ThreatMultiplier: 1,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
if aegisPlateProcAura != nil {
aegisPlateProcAura.Activate(sim)
}
var baseDamage float64
// TODO: Derive or find accurate source for DR curve
bv := paladin.BlockValue()
if bv <= 2400.0 {
baseDamage = 520.0 + bv
} else {
bv = 2400.0 + (bv-2400.0)/2
baseDamage = 520.0 + core.TernaryFloat64(bv > 2760.0, 2760.0, bv)
}
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
},
})
}