Skip to content

Commit

Permalink
Add T12 Mirror Image cast delay
Browse files Browse the repository at this point in the history
  • Loading branch information
1337LutZ committed Nov 17, 2024
1 parent 831b010 commit 4c537a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sim/mage/mirror_image_t12.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@ func (mi *T12MirrorImage) Reset(_ *core.Simulation) {
}

func (mi *T12MirrorImage) ExecuteCustomRotation(sim *core.Simulation) {
if success := mi.Fireball.Cast(sim, mi.CurrentTarget); !success {
mi.Disable(sim)
if mi.Fireball.CanCast(sim, mi.CurrentTarget) {
mi.Fireball.Cast(sim, mi.CurrentTarget)
minDelay := 680.0
maxDelay := 790.0
delayRange := maxDelay - minDelay
// ~680-790ms delay between casts resulting in ~735 ms average
// Research:https://docs.google.com/spreadsheets/d/e/2PACX-1vTvD34UWX5Eb9dIGmH7EPRQyuLdJDOpNR7_8cmZlWRZb1W7RlRE-y7ffSnvM55o_GZ5dPusxAW1STH3/pubchart?oid=96701738&format=image
randomDelay := time.Duration(minDelay+delayRange*sim.RandomFloat("T12 Mirror Image Cast Delay")) * time.Millisecond
mi.WaitUntil(sim, mi.NextGCDAt()+randomDelay)
return
}
}

Expand Down
Binary file not shown.

0 comments on commit 4c537a7

Please sign in to comment.