Skip to content

Commit

Permalink
Merge pull request #1224 from wowsims/feature/warlock-t13
Browse files Browse the repository at this point in the history
[WARLOCK] Add T13 set bonuses
  • Loading branch information
1337LutZ authored Nov 26, 2024
2 parents c4573e1 + d32820c commit 7fe56b8
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 8 deletions.
7 changes: 7 additions & 0 deletions sim/warlock/affliction/TestAffliction.results
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,13 @@ dps_results: {
tps: 25112.12253
}
}
dps_results: {
key: "TestAffliction-AllItems-VestmentsoftheFacelessShroud"
value: {
dps: 33731.50632
tps: 23572.2115
}
}
dps_results: {
key: "TestAffliction-AllItems-VialofShadows-77207"
value: {
Expand Down
7 changes: 7 additions & 0 deletions sim/warlock/demonology/TestDemonology.results
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,13 @@ dps_results: {
tps: 18247.60167
}
}
dps_results: {
key: "TestDemonology-AllItems-VestmentsoftheFacelessShroud"
value: {
dps: 34973.18788
tps: 17104.44623
}
}
dps_results: {
key: "TestDemonology-AllItems-VialofShadows-77207"
value: {
Expand Down
7 changes: 7 additions & 0 deletions sim/warlock/destruction/TestDestruction.results
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,13 @@ dps_results: {
tps: 22518.4744
}
}
dps_results: {
key: "TestDestruction-AllItems-VestmentsoftheFacelessShroud"
value: {
dps: 35497.41631
tps: 20804.38168
}
}
dps_results: {
key: "TestDestruction-AllItems-VialofShadows-77207"
value: {
Expand Down
2 changes: 1 addition & 1 deletion sim/warlock/doomguard.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func (warlock *Warlock) registerSummonDoomguard(timer *core.Timer) {
duration := time.Duration(45+10*warlock.Talents.AncientGrimoire) * time.Second
duration := time.Duration(45+10*warlock.Talents.AncientGrimoire+warlock.Calc2PT13SummonDuration()) * time.Second

summonDoomguardAura := warlock.RegisterAura(core.Aura{
Label: "Summon Doomguard",
Expand Down
11 changes: 6 additions & 5 deletions sim/warlock/infernal.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func (warlock *Warlock) registerSummonInfernal(timer *core.Timer) {
duration := time.Duration(45+10*warlock.Talents.AncientGrimoire) * time.Second
duration := time.Duration(45+10*warlock.Talents.AncientGrimoire+warlock.Calc2PT13SummonDuration()) * time.Second

summonInfernalAura := warlock.RegisterAura(core.Aura{
Label: "Summon Infernal",
Expand All @@ -19,10 +19,11 @@ func (warlock *Warlock) registerSummonInfernal(timer *core.Timer) {
})

warlock.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 1122},
SpellSchool: core.SpellSchoolFire,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagAPL,
ActionID: core.ActionID{SpellID: 1122},
SpellSchool: core.SpellSchoolFire,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagAPL,
ClassSpellMask: WarlockSpellSummonInfernal,

ManaCost: core.ManaCostOptions{BaseCost: 0.8},
Cast: core.CastConfig{
Expand Down
53 changes: 53 additions & 0 deletions sim/warlock/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"time"

"github.com/wowsims/cata/sim/core"
"github.com/wowsims/cata/sim/core/proto"
"github.com/wowsims/cata/sim/core/stats"
)

Expand Down Expand Up @@ -220,3 +221,55 @@ var ItemSetGladiatorsFelshroud = core.NewItemSet(core.ItemSet{
},
},
})

// T13
var ItemSetVestmentsOfTheFacelessShroud = core.NewItemSet(core.ItemSet{
Name: "Vestments of the Faceless Shroud",
Bonuses: map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
warlock := agent.(WarlockAgent).GetWarlock()

warlock.AddStaticMod(core.SpellModConfig{
Kind: core.SpellMod_Cooldown_Flat,
TimeValue: -time.Minute * 4,
ClassMask: WarlockSpellSummonDoomguard | WarlockSpellSummonInfernal,
})
},
4: func(agent core.Agent) {
warlock := agent.(WarlockAgent).GetWarlock()

spDep := warlock.NewDynamicMultiplyStat(stats.SpellPower, 1.1)
aura := warlock.RegisterAura(core.Aura{
Label: "Temporal Ruin",
ActionID: core.ActionID{SpellID: 105786},
Duration: 10 * time.Second,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
warlock.EnableDynamicStatDep(sim, spDep)
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
warlock.DisableDynamicStatDep(sim, spDep)
},
})

core.MakePermanent(warlock.RegisterAura(core.Aura{
Label: "Item - Warlock T13 4P Bonus",
ActionID: core.ActionID{SpellID: 105787},
ActionIDForProc: aura.ActionID,
OnCastComplete: func(_ *core.Aura, sim *core.Simulation, spell *core.Spell) {
if spell.Matches(WarlockSpellSoulBurn) {
aura.Activate(sim)
}
},
}))
},
},
})

func (warlock *Warlock) Calc2PT13SummonDuration() int32 {
has2PT13 := warlock.HasSetBonus(ItemSetVestmentsOfTheFacelessShroud, 2)
if has2PT13 {
return core.TernaryInt32(warlock.Spec == proto.Spec_SpecDemonologyWarlock, 20, 30)
} else {
return 0
}
}
6 changes: 6 additions & 0 deletions sim/warlock/soul_fire.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
)

func (warlock *Warlock) registerSoulFire() {
hasT134P := warlock.HasSetBonus(ItemSetVestmentsOfTheFacelessShroud, 4)

var improvedSoulFire *core.Aura = nil
if warlock.Talents.ImprovedSoulFire > 0 {
damageBonus := 1 + .04*float64(warlock.Talents.ImprovedSoulFire)
Expand Down Expand Up @@ -56,6 +58,10 @@ func (warlock *Warlock) registerSoulFire() {
baseDamage := warlock.CalcAndRollDamageRange(sim, 2.54299998283, 0.22499999404)
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)

if hasT134P && warlock.SoulBurnAura.IsActive() {
warlock.AddSoulShard()
}

warlock.SoulBurnAura.Deactivate(sim)
if result.Landed() && improvedSoulFire != nil {
improvedSoulFire.Activate(sim)
Expand Down
2 changes: 1 addition & 1 deletion sim/warlock/soul_harvest.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (warlock *Warlock) registerSoulHarvest() {
TickLength: 3 * time.Second,
AffectedByCastSpeed: true,
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
warlock.SoulShards = min(warlock.SoulShards+1, 3)
warlock.AddSoulShard()
if sim.Log != nil {
warlock.Log(sim, "Gained 1 soul shard (%v -> %v)", warlock.SoulShards-1, warlock.SoulShards)
}
Expand Down
2 changes: 1 addition & 1 deletion sim/warlock/soulburn.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (warlock *Warlock) registerSoulburn() {

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
warlock.SoulBurnAura.Activate(sim)
warlock.SoulShards -= 1
warlock.RemoveSoulShard()
},

ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
Expand Down
9 changes: 9 additions & 0 deletions sim/warlock/warlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ func (warlock *Warlock) Reset(sim *core.Simulation) {
warlock.SoulShards = 3
}

func (warlock *Warlock) AddSoulShard() {
warlock.SoulShards = min(warlock.SoulShards+1, 3)
}

func (warlock *Warlock) RemoveSoulShard() {
warlock.SoulShards = max(warlock.SoulShards-1, 0)
}

func NewWarlock(character *core.Character, options *proto.Player, warlockOptions *proto.WarlockOptions) *Warlock {
warlock := &Warlock{
Character: *character,
Expand Down Expand Up @@ -207,6 +215,7 @@ const (
WarlockSpellFelHunterShadowBite
WarlockSpellSummonSuccubus
WarlockSpellSuccubusLashOfPain
WarlockSpellSummonInfernal
WarlockSpellDemonSoul
WarlockSpellShadowflame
WarlockSpellShadowflameDot
Expand Down

0 comments on commit 7fe56b8

Please sign in to comment.