-
Notifications
You must be signed in to change notification settings - Fork 33
/
sotc.go
105 lines (90 loc) · 3.39 KB
/
sotc.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
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
package paladin
import (
"github.com/wowsims/sod/sim/core"
"github.com/wowsims/sod/sim/core/stats"
"strconv"
"time"
)
func (paladin *Paladin) registerSealOfTheCrusader() {
type judge struct {
spellID int32
bonus float64
}
var ranks = []struct {
level int32
spellID int32
manaCost float64
scaleLevel int32
ap float64
scale float64
judge judge
}{
{level: 6, spellID: 21082, manaCost: 25, scaleLevel: 12, ap: 31, scale: 0.7, judge: judge{spellID: 21183, bonus: 20}},
{level: 12, spellID: 20162, manaCost: 40, scaleLevel: 20, ap: 51, scale: 1.1, judge: judge{spellID: 20188, bonus: 30}},
{level: 22, spellID: 20305, manaCost: 65, scaleLevel: 30, ap: 94, scale: 1.7, judge: judge{spellID: 20300, bonus: 50}},
{level: 32, spellID: 20306, manaCost: 90, scaleLevel: 40, ap: 145, scale: 2, judge: judge{spellID: 20301, bonus: 80}},
{level: 42, spellID: 20307, manaCost: 125, scaleLevel: 50, ap: 221, scale: 2.2, judge: judge{spellID: 20302, bonus: 110}},
{level: 52, spellID: 20308, manaCost: 160, scaleLevel: 60, ap: 306, scale: 2.4, judge: judge{spellID: 20303, bonus: 140}},
}
improvedSotC := []float64{1, 1.05, 1.1, 1.15}[paladin.Talents.ImprovedSealOfTheCrusader]
var libramAp, libramBonus float64
if paladin.Ranged().ID == LibramOfFervor {
libramAp = 48
libramBonus = 33
}
for i, rank := range ranks {
rank := rank
if paladin.Level < rank.level {
break
}
debuffs := paladin.NewEnemyAuraArray(func(target *core.Unit, level int32) *core.Aura {
return core.JudgementOfTheCrusaderAura(&paladin.Unit, target, level, improvedSotC, libramBonus)
})
judgeSpell := paladin.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: rank.judge.spellID},
SpellSchool: core.SpellSchoolHoly,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagMeleeMetrics,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealOutcome(sim, target, spell.OutcomeAlwaysHit)
debuffs.Get(target).Activate(sim)
},
})
ap := rank.ap + rank.scale*float64(min(paladin.Level, rank.scaleLevel)-rank.level)
aura := paladin.RegisterAura(core.Aura{
Label: "Seal of the Crusader" + paladin.Label + strconv.Itoa(i+1),
ActionID: core.ActionID{SpellID: rank.spellID},
Duration: time.Second * 30,
OnGain: func(_ *core.Aura, sim *core.Simulation) {
paladin.MultiplyMeleeSpeed(sim, 1.4)
paladin.AutoAttacks.MHAuto().DamageMultiplier /= 1.4
paladin.AddStatDynamic(sim, stats.AttackPower, ap*improvedSotC+libramAp)
},
OnExpire: func(_ *core.Aura, sim *core.Simulation) {
paladin.MultiplyMeleeSpeed(sim, 1/1.4)
paladin.AutoAttacks.MHAuto().DamageMultiplier *= 1.4
paladin.AddStatDynamic(sim, stats.AttackPower, -ap*improvedSotC+libramAp)
},
})
paladin.RegisterSpell(core.SpellConfig{
ActionID: aura.ActionID,
SpellSchool: core.SpellSchoolHoly,
Flags: core.SpellFlagAPL,
RequiredLevel: int(rank.level),
Rank: i + 1,
ManaCost: core.ManaCostOptions{
FlatCost: rank.manaCost - paladin.getLibramSealCostReduction(),
Multiplier: paladin.benediction(),
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
},
ApplyEffects: func(sim *core.Simulation, _ *core.Unit, _ *core.Spell) {
paladin.applySeal(aura, judgeSpell, sim)
},
})
}
}