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 ele t10 #3919

Merged
merged 3 commits into from
Oct 19, 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
4 changes: 2 additions & 2 deletions sim/shaman/elemental/TestElemental.results
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ dps_results: {
dps_results: {
key: "TestElemental-AllItems-FrostWitch'sRegalia"
value: {
dps: 8146.52207
tps: 4515.57676
dps: 8209.20382
tps: 4559.89103
}
}
dps_results: {
Expand Down
21 changes: 19 additions & 2 deletions sim/shaman/items_wotlk.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package shaman

import (
"math"
"time"

"github.com/wowsims/wotlk/sim/core"
Expand Down Expand Up @@ -60,8 +61,24 @@ var ItemSetFrostWitchRegalia = core.NewItemSet(core.ItemSet{
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
fsDot := shaman.FlameShock.Dot(result.Target)
if spell == shaman.LavaBurst && fsDot.IsActive() { // Doesn't have to hit from tooltip
// Modify dot to last 6 more seconds than it has left, and refresh aura
fsDot.Duration = fsDot.RemainingDuration(sim) + time.Second*6
// Find the number of ticks whose duration is closest to 6s.
// "our testing confirms that the 4pc t10 setbonus adds to FS the closest number of ticks to 6 seconds always"
// https://web.archive.org/web/20100808192139/http://elitistjerks.com/f79/t76510-elemental_patch_3_3_now_more_fire_nova/p25/
numTicks := 2
period := fsDot.TickPeriod()
sixSeconds := time.Second * 6

for i := 3; i <= 10; i++ {
finishesAtCur := time.Duration(numTicks) * period
finishesAtNew := time.Duration(i) * period

if math.Abs(float64(sixSeconds-finishesAtNew)) <= math.Abs(float64(sixSeconds-finishesAtCur)) {
numTicks = i
} else {
break
}
}
fsDot.Duration = fsDot.RemainingDuration(sim) + time.Duration(numTicks)*period
fsDot.Refresh(sim)
}
},
Expand Down
Loading