Skip to content

Commit

Permalink
Merge pull request #1301 from wowsims/feature/shadow-p4
Browse files Browse the repository at this point in the history
Add Shadow T13 set
  • Loading branch information
1337LutZ authored Jan 16, 2025
2 parents c67de86 + 973e32b commit c1d22e8
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 12 deletions.
45 changes: 44 additions & 1 deletion sim/priest/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ var ItemSetRegaliaOfTheCleansingFlame = core.NewItemSet(core.ItemSet{
Name: "Regalia of the Cleansing Flame",
Bonuses: map[int32]core.ApplySetBonus{
2: func(agent core.Agent, setBonusAura *core.Aura) {

// Fiend deals 20% extra damage as fire damage and cooldown reduced by 75 seconds
setBonusAura.AttachSpellMod(core.SpellModConfig{
Kind: core.SpellMod_Cooldown_Flat,
Expand Down Expand Up @@ -412,5 +411,49 @@ var ItemSetRegaliaOfTheCleansingFlame = core.NewItemSet(core.ItemSet{
},
})

// T13 - Shadow
var ItemSetRegaliaOfDyingLight = core.NewItemSet(core.ItemSet{
Name: "Regalia of Dying Light",
AlternativeName: "Regalia of Dying light",
Bonuses: map[int32]core.ApplySetBonus{
2: func(agent core.Agent, setBonusAura *core.Aura) {
setBonusAura.AttachSpellMod(core.SpellModConfig{
Kind: core.SpellMod_DamageDone_Flat,
ClassMask: PriestSpellShadowWordDeath,
FloatValue: 0.55,
})
},
4: func(agent core.Agent, setBonusAura *core.Aura) {
priest := agent.(PriestAgent).GetPriest()

makeProcTriggerConfig := func(config core.ProcTrigger) core.ProcTrigger {
return core.ProcTrigger{
ActionID: core.ActionID{SpellID: 105844},
Name: "Item - Priest T13 Shadow 4P Bonus (Shadowfiend and Shadowy Apparition)",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcChance: 1.0,
ClassSpellMask: config.ClassSpellMask,
ProcMask: config.ProcMask,
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if priest.ShadowOrbsAura != nil {
priest.ShadowOrbsAura.Activate(sim)
priest.ShadowOrbsAura.SetStacks(sim, 3)
}
},
}
}

setBonusAura.MakeDependentProcTriggerAura(&priest.ShadowfiendPet.Unit, makeProcTriggerConfig(core.ProcTrigger{
ProcMask: core.ProcMaskMelee,
}))

setBonusAura.AttachProcTrigger(makeProcTriggerConfig(core.ProcTrigger{
ClassSpellMask: PriestSpellShadowyApparation,
}))
},
},
})

func init() {
}
3 changes: 3 additions & 0 deletions sim/priest/priest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ type Priest struct {
ShadowfiendAura *core.Aura
ShadowfiendPet *Shadowfiend

ShadowOrbsAura *core.Aura
EmpoweredShadowAura *core.Aura

// cached cast stuff
// TODO: aoe multi-target situations will need multiple spells ticking for each target.
HolyEvangelismProcAura *core.Aura
Expand Down
7 changes: 7 additions & 0 deletions sim/priest/shadow/TestShadow.results
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,13 @@ dps_results: {
tps: 33728.8407
}
}
dps_results: {
key: "TestShadow-AllItems-RegaliaofDyingLight"
value: {
dps: 35688.96997
tps: 31611.20778
}
}
dps_results: {
key: "TestShadow-AllItems-RegaliaoftheCleansingFlame"
value: {
Expand Down
17 changes: 7 additions & 10 deletions sim/priest/shadow/shadow.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ func NewShadowPriest(character *core.Character, options *proto.Player) *ShadowPr
type ShadowPriest struct {
*priest.Priest
options *proto.ShadowPriest_Options

shadowOrbsAura *core.Aura
empoweredShadowAura *core.Aura
}

func (spriest *ShadowPriest) GetPriest() *priest.Priest {
Expand Down Expand Up @@ -110,7 +107,7 @@ func (spriest *ShadowPriest) ApplyTalents() {
})

// mastery aura
spriest.shadowOrbsAura = spriest.RegisterAura(core.Aura{
spriest.ShadowOrbsAura = spriest.RegisterAura(core.Aura{
Label: "Shadow Orb",
ActionID: core.ActionID{SpellID: 77487},
Duration: time.Minute,
Expand All @@ -125,8 +122,8 @@ func (spriest *ShadowPriest) ApplyTalents() {
return
}

spriest.empoweredShadowAura.Deactivate(sim)
spriest.empoweredShadowAura.Activate(sim)
spriest.EmpoweredShadowAura.Deactivate(sim)
spriest.EmpoweredShadowAura.Activate(sim)
aura.Deactivate(sim)
},

Expand All @@ -136,7 +133,7 @@ func (spriest *ShadowPriest) ApplyTalents() {
})

spriest.AddOnMasteryStatChanged(func(sim *core.Simulation, oldMastery, newMastery float64) {
shadowOrbMod.UpdateFloatValue(getMasteryBonus(core.MasteryRatingToMasteryPoints(newMastery)) * float64(spriest.shadowOrbsAura.GetStacks()))
shadowOrbMod.UpdateFloatValue(getMasteryBonus(core.MasteryRatingToMasteryPoints(newMastery)) * float64(spriest.ShadowOrbsAura.GetStacks()))
})

empoweredShadowMod := spriest.AddDynamicMod(core.SpellModConfig{
Expand All @@ -145,7 +142,7 @@ func (spriest *ShadowPriest) ApplyTalents() {
FloatValue: getMasteryBonus(spriest.GetMasteryPoints()),
})

spriest.empoweredShadowAura = spriest.RegisterAura(core.Aura{
spriest.EmpoweredShadowAura = spriest.RegisterAura(core.Aura{
Label: "Empowered Shadow",
ActionID: core.ActionID{SpellID: 95799},
Duration: time.Second * 15,
Expand Down Expand Up @@ -179,8 +176,8 @@ func handleShadowOrbPower(spriest *ShadowPriest, sim *core.Simulation, spell *co
if spell.ClassSpellMask&(priest.PriestSpellShadowWordPain|priest.PriestSpellMindFlay) > 0 {
procChance := 0.1 + float64(spriest.Talents.HarnessedShadows)*0.04
if sim.Proc(procChance, "Shadow Orb Power") {
spriest.shadowOrbsAura.Activate(sim)
spriest.shadowOrbsAura.AddStack(sim)
spriest.ShadowOrbsAura.Activate(sim)
spriest.ShadowOrbsAura.AddStack(sim)
}
}
}
3 changes: 2 additions & 1 deletion sim/priest/shadowfiend_pet.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ func (priest *Priest) NewShadowfiend() *Shadowfiend {

shadowfiend.DelayInitialInheritance(time.Millisecond * 500)
manaMetric := priest.NewManaMetrics(core.ActionID{SpellID: 34433})
_ = core.MakePermanent(shadowfiend.GetOrRegisterAura(core.Aura{

core.MakePermanent(shadowfiend.GetOrRegisterAura(core.Aura{
Label: "Autoattack mana regen",
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
restoreMana := priest.MaxMana() * 0.03
Expand Down

0 comments on commit c1d22e8

Please sign in to comment.