From 3413e657a7efea9d70ef8959494d8888ad23eec9 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Sat, 7 Oct 2023 19:27:47 -0700 Subject: [PATCH 1/3] Use shared channel clip delay instead of fixed constant for special warlock apl value --- sim/warlock/apl_values.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sim/warlock/apl_values.go b/sim/warlock/apl_values.go index a8882444ea..31f7ed1d42 100644 --- a/sim/warlock/apl_values.go +++ b/sim/warlock/apl_values.go @@ -72,8 +72,7 @@ func (value *APLValueWarlockShouldRecastDrainSoul) GetBool(sim *core.Simulation) snapshotDmg := warlock.DrainSoul.ExpectedTickDamageFromCurrentSnapshot(sim, warlock.CurrentTarget) * float64(ticksLeft) recastDmg := warlock.DrainSoul.ExpectedTickDamage(sim, warlock.CurrentTarget) * float64(recastTicks) snapshotDPS := snapshotDmg / (float64(ticksLeft) * dsDot.TickPeriod().Seconds()) - recastDps := recastDmg / (float64(recastTicks)*warlock.ApplyCastSpeed(dsDot.TickLength).Seconds() + - humanReactionTime.Seconds()) + recastDps := recastDmg / (float64(recastTicks) * (warlock.ApplyCastSpeed(dsDot.TickLength) + warlock.ChannelClipDelay).Seconds()) //if sim.Log != nil { // warlock.Log(sim, "Should Recast Drain Soul Calc: %.2f (%d) > %.2f (%d)", recastDps, recastTicks, snapshotDPS, ticksLeft) From 6949d0fc01a97374426a6907460a4ce8c5c450e3 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Sat, 7 Oct 2023 19:30:42 -0700 Subject: [PATCH 2/3] Fix math --- sim/warlock/apl_values.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sim/warlock/apl_values.go b/sim/warlock/apl_values.go index 31f7ed1d42..1baf33ec80 100644 --- a/sim/warlock/apl_values.go +++ b/sim/warlock/apl_values.go @@ -1,6 +1,8 @@ package warlock import ( + "time" + "github.com/wowsims/wotlk/sim/core" "github.com/wowsims/wotlk/sim/core/proto" ) @@ -72,7 +74,7 @@ func (value *APLValueWarlockShouldRecastDrainSoul) GetBool(sim *core.Simulation) snapshotDmg := warlock.DrainSoul.ExpectedTickDamageFromCurrentSnapshot(sim, warlock.CurrentTarget) * float64(ticksLeft) recastDmg := warlock.DrainSoul.ExpectedTickDamage(sim, warlock.CurrentTarget) * float64(recastTicks) snapshotDPS := snapshotDmg / (float64(ticksLeft) * dsDot.TickPeriod().Seconds()) - recastDps := recastDmg / (float64(recastTicks) * (warlock.ApplyCastSpeed(dsDot.TickLength) + warlock.ChannelClipDelay).Seconds()) + recastDps := recastDmg / (time.Duration(recastTicks)*warlock.ApplyCastSpeed(dsDot.TickLength) + warlock.ChannelClipDelay).Seconds() //if sim.Log != nil { // warlock.Log(sim, "Should Recast Drain Soul Calc: %.2f (%d) > %.2f (%d)", recastDps, recastTicks, snapshotDPS, ticksLeft) From 0fb16ae4a57fca2934a89ee282b118cb5b69b56e Mon Sep 17 00:00:00 2001 From: James Tanner Date: Sat, 7 Oct 2023 19:31:33 -0700 Subject: [PATCH 3/3] Fix more math for consistency --- sim/warlock/apl_values.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/warlock/apl_values.go b/sim/warlock/apl_values.go index 1baf33ec80..334c98b46e 100644 --- a/sim/warlock/apl_values.go +++ b/sim/warlock/apl_values.go @@ -73,7 +73,7 @@ func (value *APLValueWarlockShouldRecastDrainSoul) GetBool(sim *core.Simulation) snapshotDmg := warlock.DrainSoul.ExpectedTickDamageFromCurrentSnapshot(sim, warlock.CurrentTarget) * float64(ticksLeft) recastDmg := warlock.DrainSoul.ExpectedTickDamage(sim, warlock.CurrentTarget) * float64(recastTicks) - snapshotDPS := snapshotDmg / (float64(ticksLeft) * dsDot.TickPeriod().Seconds()) + snapshotDPS := snapshotDmg / (time.Duration(ticksLeft) * dsDot.TickPeriod()).Seconds() recastDps := recastDmg / (time.Duration(recastTicks)*warlock.ApplyCastSpeed(dsDot.TickLength) + warlock.ChannelClipDelay).Seconds() //if sim.Log != nil {