Skip to content

Commit

Permalink
make dance of the wicked snapshot dodge
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Dec 28, 2024
1 parent 1190da1 commit 39a85c6
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions sim/warlock/runes.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,18 +269,22 @@ func (warlock *Warlock) applyDanceOfTheWicked() {
}

actionId := core.ActionID{SpellID: 412800}
dodgeModifier := warlock.NewDynamicStatDependency(stats.SpellCrit, stats.Dodge, 1)
critDelta := 0.0

// DoTW snapshot your current crit each time it procs so we want to store the delta from each proc
dotwAura := warlock.GetOrRegisterAura(core.Aura{
Label: "Dance of the Wicked Proc",
ActionID: actionId,
Label: "Dance of the Wicked Proc",
Duration: 15 * time.Second,

OnGain: func(aura *core.Aura, sim *core.Simulation) {
warlock.EnableDynamicStatDep(sim, dodgeModifier)
OnReset: func(aura *core.Aura, sim *core.Simulation) {
critDelta = 0
},
OnRefresh: func(aura *core.Aura, sim *core.Simulation) {
critDelta = warlock.GetStat(stats.SpellCrit) - critDelta
warlock.AddStatDynamic(sim, stats.Dodge, critDelta)
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
warlock.DisableDynamicStatDep(sim, dodgeModifier)
warlock.AddStatDynamic(sim, stats.Dodge, -critDelta)
},
})

Expand All @@ -290,19 +294,13 @@ func (warlock *Warlock) applyDanceOfTheWicked() {
}

handler := func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if !spell.ProcMask.Matches(core.ProcMaskDirect) {
return
}
if spell.ProcMask.Matches(core.ProcMaskDirect) && result.DidCrit() {
dotwAura.Activate(sim)
warlock.AddMana(sim, warlock.MaxMana()*0.02, manaMetric)

if !result.DidCrit() {
return
}

dotwAura.Activate(sim)

warlock.AddMana(sim, warlock.MaxMana()*0.02, manaMetric)
if warlock.ActivePet != nil {
warlock.ActivePet.AddMana(sim, warlock.ActivePet.MaxMana()*0.02, warlock.ActivePet.DanceOfTheWickedManaMetrics)
if warlock.ActivePet != nil {
warlock.ActivePet.AddMana(sim, warlock.ActivePet.MaxMana()*0.02, warlock.ActivePet.DanceOfTheWickedManaMetrics)
}
}
}

Expand Down

0 comments on commit 39a85c6

Please sign in to comment.