Skip to content

Commit

Permalink
fix spriest talents that can proc trinkets (#3328)
Browse files Browse the repository at this point in the history
  • Loading branch information
lime-green committed Jul 17, 2023
1 parent d8d27a4 commit e2c11b0
Show file tree
Hide file tree
Showing 4 changed files with 359 additions and 327 deletions.
2 changes: 1 addition & 1 deletion sim/priest/devouring_plague.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (priest *Priest) registerDevouringPlagueSpell() {
impDevouringPlague = priest.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 63675},
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskEmpty, // TODO: test if this can proc things
ProcMask: core.ProcMaskProc, // this can proc things like Talisman of Volatile Power
Flags: core.SpellFlagDisease | core.SpellFlagAPL,

BonusHitRating: float64(priest.Talents.ShadowFocus) * 1 * core.SpellHitRatingPerHitChance,
Expand Down
30 changes: 30 additions & 0 deletions sim/priest/mind_blast.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ func (priest *Priest) registerMindBlastSpell() {
replSrc = priest.Env.Raid.NewReplenishmentSource(core.ActionID{SpellID: 48160})
}

// From Improved Mind Blast
mindTraumaSpell := priest.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 48301},
ProcMask: core.ProcMaskProc,
SpellSchool: core.SpellSchoolShadow,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
MindTraumaAura(target).Activate(sim)
},
})

priest.MindBlast = priest.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 48127},
SpellSchool: core.SpellSchoolShadow,
Expand Down Expand Up @@ -65,10 +75,30 @@ func (priest *Priest) registerMindBlastSpell() {
if priest.Talents.VampiricTouch && priest.VampiricTouch.CurDot().IsActive() {
priest.Env.Raid.ProcReplenishment(sim, replSrc)
}

if priest.Talents.Shadowform && priest.Talents.ImprovedMindBlast > 0 {
if sim.RandomFloat("Improved Mind Blast") < 0.2*float64(priest.Talents.ImprovedMindBlast) {
mindTraumaSpell.Cast(sim, target)
}
}
},
ExpectedDamage: func(sim *core.Simulation, target *core.Unit, spell *core.Spell, _ bool) *core.SpellResult {
baseDamage := (997.0+1053.0)/2 + spellCoeff*spell.SpellPower()
return spell.CalcDamage(sim, target, baseDamage, spell.OutcomeExpectedMagicHitAndCrit)
},
})
}

func MindTraumaAura(target *core.Unit) *core.Aura {
return target.GetOrRegisterAura(core.Aura{
Label: "Mind Trauma",
ActionID: core.ActionID{SpellID: 48301},
Duration: time.Second * 10,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
aura.Unit.PseudoStats.HealingTakenMultiplier *= 0.8
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
aura.Unit.PseudoStats.HealingTakenMultiplier /= 0.8
},
})
}
2 changes: 2 additions & 0 deletions sim/priest/mind_flay.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ func (priest *Priest) newMindFlaySpell(numTicks int32) *core.Spell {
if priest.ShadowWordPain.Dot(target).IsActive() {
if rolloverChance == 1 || sim.RandomFloat("Pain and Suffering") < rolloverChance {
priest.ShadowWordPain.Dot(target).Rollover(sim)
// trinkets can proc from the re-application
priest.Unit.OnCastComplete(sim, priest.ShadowWordPain)
}
}
spell.Dot(target).Apply(sim)
Expand Down
Loading

0 comments on commit e2c11b0

Please sign in to comment.