From 433c91d5dfacdc643076a780ba993a4f32797b73 Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Thu, 16 Jan 2025 11:35:18 +0100 Subject: [PATCH 1/4] Add Shadow T13 set --- sim/priest/items.go | 20 +++++++++++++++++++- sim/priest/priest.go | 6 ++++++ sim/priest/shadow/shadow.go | 17 +++++++---------- sim/priest/shadowfiend_pet.go | 13 ++++++++++++- sim/priest/talents.go | 5 +++++ 5 files changed, 49 insertions(+), 12 deletions(-) diff --git a/sim/priest/items.go b/sim/priest/items.go index 8355115210..3260206e8a 100644 --- a/sim/priest/items.go +++ b/sim/priest/items.go @@ -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, @@ -412,5 +411,24 @@ 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() + priest.T13_4pc = setBonusAura + }, + }, +}) + func init() { } diff --git a/sim/priest/priest.go b/sim/priest/priest.go index 19417bddd7..01ab78b273 100644 --- a/sim/priest/priest.go +++ b/sim/priest/priest.go @@ -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 @@ -52,6 +55,9 @@ type Priest struct { ProcPrayerOfMending core.ApplySpellResults ClassSpellScaling float64 + + // Item sets + T13_4pc *core.Aura } type SelfBuffs struct { diff --git a/sim/priest/shadow/shadow.go b/sim/priest/shadow/shadow.go index 7fa59314cc..06756038da 100644 --- a/sim/priest/shadow/shadow.go +++ b/sim/priest/shadow/shadow.go @@ -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 { @@ -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, @@ -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) }, @@ -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{ @@ -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, @@ -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) } } } diff --git a/sim/priest/shadowfiend_pet.go b/sim/priest/shadowfiend_pet.go index 007b423c29..63ba59407c 100644 --- a/sim/priest/shadowfiend_pet.go +++ b/sim/priest/shadowfiend_pet.go @@ -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 @@ -52,6 +53,16 @@ func (priest *Priest) NewShadowfiend() *Shadowfiend { }, })) + core.MakePermanent(shadowfiend.GetOrRegisterAura(core.Aura{ + Label: "Autoattack T13 4pc", + OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { + if priest.ShadowOrbsAura != nil && result.Landed() && priest.T13_4pc.IsActive() { + priest.ShadowOrbsAura.Activate(sim) + priest.ShadowOrbsAura.SetStacks(sim, 3) + } + }, + })) + actionID := core.ActionID{SpellID: 63619} shadowfiend.ShadowcrawlAura = shadowfiend.GetOrRegisterAura(core.Aura{ Label: "Shadowcrawl", diff --git a/sim/priest/talents.go b/sim/priest/talents.go index 3c17eae7a5..ed627f7039 100644 --- a/sim/priest/talents.go +++ b/sim/priest/talents.go @@ -666,6 +666,11 @@ func (priest *Priest) applyShadowyApparition() { // restore mods spell.DamageMultiplier = oldMulti spell.DamageMultiplierAdditive = oldAdd + + if priest.ShadowOrbsAura != nil && result.Landed() && priest.T13_4pc.IsActive() { + priest.ShadowOrbsAura.Activate(sim) + priest.ShadowOrbsAura.SetStacks(sim, 3) + } }) }, }) From cbe7694dffc280014d4b6c9645d2633686bb01fb Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Thu, 16 Jan 2025 11:39:04 +0100 Subject: [PATCH 2/4] Add T13 4PC comment --- sim/priest/items.go | 1 + sim/priest/shadow/TestShadow.results | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/sim/priest/items.go b/sim/priest/items.go index 3260206e8a..def3893036 100644 --- a/sim/priest/items.go +++ b/sim/priest/items.go @@ -424,6 +424,7 @@ var ItemSetRegaliaOfDyingLight = core.NewItemSet(core.ItemSet{ }) }, 4: func(agent core.Agent, setBonusAura *core.Aura) { + // Implemented in: shadowfiend_pet.go:56 and talents.go:670 priest := agent.(PriestAgent).GetPriest() priest.T13_4pc = setBonusAura }, diff --git a/sim/priest/shadow/TestShadow.results b/sim/priest/shadow/TestShadow.results index 74c2b1e138..57e370d8ba 100644 --- a/sim/priest/shadow/TestShadow.results +++ b/sim/priest/shadow/TestShadow.results @@ -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: { From 7be1ef16102914477470cbe69fb899d843a3724e Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Thu, 16 Jan 2025 12:30:43 +0100 Subject: [PATCH 3/4] Move T13 4PC to items.go --- sim/priest/items.go | 27 ++++++++++++++++++++++++++- sim/priest/priest.go | 3 --- sim/priest/shadowfiend_pet.go | 10 ---------- sim/priest/talents.go | 5 ----- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/sim/priest/items.go b/sim/priest/items.go index def3893036..d3f917486e 100644 --- a/sim/priest/items.go +++ b/sim/priest/items.go @@ -426,7 +426,32 @@ var ItemSetRegaliaOfDyingLight = core.NewItemSet(core.ItemSet{ 4: func(agent core.Agent, setBonusAura *core.Aura) { // Implemented in: shadowfiend_pet.go:56 and talents.go:670 priest := agent.(PriestAgent).GetPriest() - priest.T13_4pc = setBonusAura + + 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, + })) }, }, }) diff --git a/sim/priest/priest.go b/sim/priest/priest.go index 01ab78b273..0187fe6258 100644 --- a/sim/priest/priest.go +++ b/sim/priest/priest.go @@ -55,9 +55,6 @@ type Priest struct { ProcPrayerOfMending core.ApplySpellResults ClassSpellScaling float64 - - // Item sets - T13_4pc *core.Aura } type SelfBuffs struct { diff --git a/sim/priest/shadowfiend_pet.go b/sim/priest/shadowfiend_pet.go index 63ba59407c..48f372bc11 100644 --- a/sim/priest/shadowfiend_pet.go +++ b/sim/priest/shadowfiend_pet.go @@ -53,16 +53,6 @@ func (priest *Priest) NewShadowfiend() *Shadowfiend { }, })) - core.MakePermanent(shadowfiend.GetOrRegisterAura(core.Aura{ - Label: "Autoattack T13 4pc", - OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { - if priest.ShadowOrbsAura != nil && result.Landed() && priest.T13_4pc.IsActive() { - priest.ShadowOrbsAura.Activate(sim) - priest.ShadowOrbsAura.SetStacks(sim, 3) - } - }, - })) - actionID := core.ActionID{SpellID: 63619} shadowfiend.ShadowcrawlAura = shadowfiend.GetOrRegisterAura(core.Aura{ Label: "Shadowcrawl", diff --git a/sim/priest/talents.go b/sim/priest/talents.go index ed627f7039..3c17eae7a5 100644 --- a/sim/priest/talents.go +++ b/sim/priest/talents.go @@ -666,11 +666,6 @@ func (priest *Priest) applyShadowyApparition() { // restore mods spell.DamageMultiplier = oldMulti spell.DamageMultiplierAdditive = oldAdd - - if priest.ShadowOrbsAura != nil && result.Landed() && priest.T13_4pc.IsActive() { - priest.ShadowOrbsAura.Activate(sim) - priest.ShadowOrbsAura.SetStacks(sim, 3) - } }) }, }) From 973e32bdf3c20e1e7aabfdfea85810c301a93b8c Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Thu, 16 Jan 2025 12:31:20 +0100 Subject: [PATCH 4/4] Remove set bonus comment --- sim/priest/items.go | 1 - 1 file changed, 1 deletion(-) diff --git a/sim/priest/items.go b/sim/priest/items.go index d3f917486e..4286104828 100644 --- a/sim/priest/items.go +++ b/sim/priest/items.go @@ -424,7 +424,6 @@ var ItemSetRegaliaOfDyingLight = core.NewItemSet(core.ItemSet{ }) }, 4: func(agent core.Agent, setBonusAura *core.Aura) { - // Implemented in: shadowfiend_pet.go:56 and talents.go:670 priest := agent.(PriestAgent).GetPriest() makeProcTriggerConfig := func(config core.ProcTrigger) core.ProcTrigger {