Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some spriest bugs with APL #3734

Merged
merged 1 commit into from
Sep 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions sim/priest/mind_flay.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ import (
// TODO Mind Flay (48156) now "periodically triggers" Mind Flay (58381), probably to allow haste to work.
// The first never deals damage, so the latter should probably be used as ActionID here.

func (priest *Priest) newMindFlaySpell(numTicks int32) *core.Spell {
func (priest *Priest) newMindFlaySpell(numTicksIdx int32) *core.Spell {
numTicks := numTicksIdx
flags := core.SpellFlagChanneled
if numTicksIdx == 0 {
numTicks = 3
flags |= core.SpellFlagAPL
}

var mfReducTime time.Duration
if priest.HasSetBonus(ItemSetCrimsonAcolyte, 4) {
mfReducTime = time.Millisecond * 170
Expand All @@ -26,10 +33,10 @@ func (priest *Priest) newMindFlaySpell(numTicks int32) *core.Spell {
focusedMind := 0.05 * float64(priest.Talents.FocusedMind)

return priest.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 48156}.WithTag(numTicks),
ActionID: core.ActionID{SpellID: 48156}.WithTag(numTicksIdx),
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellDamage,
Flags: core.SpellFlagChanneled | core.SpellFlagAPL,
Flags: flags,

ManaCost: core.ManaCostOptions{
BaseCost: 0.09,
Expand Down Expand Up @@ -68,7 +75,7 @@ func (priest *Priest) newMindFlaySpell(numTicks int32) *core.Spell {

Dot: core.DotConfig{
Aura: core.Aura{
Label: "MindFlay-" + strconv.Itoa(int(numTicks)),
Label: "MindFlay-" + strconv.Itoa(int(numTicksIdx)),
},
NumberOfTicks: numTicks,
TickLength: tickLength,
Expand Down
15 changes: 11 additions & 4 deletions sim/priest/mind_sear.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ import (
// TODO see Mind Flay: Mind Sear (53023) now "periodically triggers" Mind Sear (53022).
// Since Mind Flay no longer is a binary spell, Mind Sear likely isn't, either.

func (priest *Priest) newMindSearSpell(numTicks int32) *core.Spell {
func (priest *Priest) newMindSearSpell(numTicksIdx int32) *core.Spell {
numTicks := numTicksIdx
flags := core.SpellFlagChanneled
if numTicksIdx == 0 {
numTicks = 3
flags |= core.SpellFlagAPL
}

channelTime := time.Second * time.Duration(numTicks)
miseryCoeff := 0.2861 * (1 + 0.05*float64(priest.Talents.Misery))
hasGlyphOfShadow := priest.HasGlyph(int32(proto.PriestMajorGlyph_GlyphOfShadow))

return priest.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 53023, Tag: numTicks},
ActionID: core.ActionID{SpellID: 53023, Tag: numTicksIdx},
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellDamage,
Flags: core.SpellFlagChanneled | core.SpellFlagAPL,
Flags: flags,

ManaCost: core.ManaCostOptions{
BaseCost: 0.28,
Expand All @@ -42,7 +49,7 @@ func (priest *Priest) newMindSearSpell(numTicks int32) *core.Spell {
CritMultiplier: priest.DefaultSpellCritMultiplier(),
Dot: core.DotConfig{
Aura: core.Aura{
Label: "MindSear-" + strconv.Itoa(int(numTicks)),
Label: "MindSear-" + strconv.Itoa(int(numTicksIdx)),
},
NumberOfTicks: numTicks,
TickLength: time.Second,
Expand Down
5 changes: 5 additions & 0 deletions sim/priest/priest.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ func (priest *Priest) Initialize() {

priest.registerPowerInfusionCD()

if priest.IsUsingAPL {
priest.newMindFlaySpell(0)
priest.newMindSearSpell(0)
}

priest.MindFlay = []*core.Spell{
nil, // So we can use # of ticks as the index
priest.newMindFlaySpell(1),
Expand Down
2 changes: 1 addition & 1 deletion sim/priest/shadow/shadow_priest.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (spriest *ShadowPriest) GetPriest() *priest.Priest {
func (spriest *ShadowPriest) Initialize() {
spriest.Priest.Initialize()

if spriest.rotation.PrecastType > 0 {
if !spriest.IsUsingAPL && spriest.rotation.PrecastType > 0 {
precastSpell := spriest.VampiricTouch
if spriest.rotation.PrecastType == 2 {
precastSpell = spriest.MindBlast
Expand Down
2 changes: 1 addition & 1 deletion ui/core/components/individual_sim_ui/apl_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const actionIdSets: Record<ACTION_ID_SET, {
'channel_spells': {
defaultLabel: 'Channeled Spell',
getActionIDs: async (metadata) => {
return metadata.getSpells().filter(spell => spell.data.isChanneled).map(actionId => {
return metadata.getSpells().filter(spell => spell.data.isCastable && spell.data.isChanneled).map(actionId => {
return {
value: actionId.id,
};
Expand Down
Loading