Skip to content

Commit

Permalink
fix ele t10
Browse files Browse the repository at this point in the history
  • Loading branch information
lime-green committed Oct 19, 2023
1 parent f5e24b3 commit e10681b
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 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,22 @@ 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
}
}
fsDot.Duration = fsDot.RemainingDuration(sim) + time.Duration(numTicks)*period
fsDot.Refresh(sim)
}
},
Expand Down

0 comments on commit e10681b

Please sign in to comment.