diff --git a/sim/encounters/ulduar/algalon25_ai.go b/sim/encounters/ulduar/algalon25_ai.go index 0b093995f5..8a4185b42b 100644 --- a/sim/encounters/ulduar/algalon25_ai.go +++ b/sim/encounters/ulduar/algalon25_ai.go @@ -191,15 +191,15 @@ func (ai *Algalon25AI) registerCosmicSmashSpell(target *core.Target) { } func (ai *Algalon25AI) DoAction(sim *core.Simulation) { - if ai.BlackHoleExplosion.IsReady(sim) && sim.CurrentTime >= ai.BlackHoleExplosion.CD.Duration { - ai.BlackHoleExplosion.Cast(sim, nil) - } + if ai.Target.CurrentTarget != nil { + if ai.BlackHoleExplosion.IsReady(sim) && sim.CurrentTime >= ai.BlackHoleExplosion.CD.Duration { + ai.BlackHoleExplosion.Cast(sim, ai.Target.CurrentTarget) + } - if ai.CosmicSmash.IsReady(sim) && sim.CurrentTime >= ai.CosmicSmash.CD.Duration { - ai.CosmicSmash.Cast(sim, nil) - } + if ai.CosmicSmash.IsReady(sim) && sim.CurrentTime >= ai.CosmicSmash.CD.Duration { + ai.CosmicSmash.Cast(sim, ai.Target.CurrentTarget) + } - if ai.Target.CurrentTarget != nil { if ai.PhasePunch.IsReady(sim) && sim.CurrentTime >= ai.PhasePunch.CD.Duration { ai.PhasePunch.Cast(sim, ai.Target.CurrentTarget) return diff --git a/sim/encounters/ulduar/hodir_ai.go b/sim/encounters/ulduar/hodir_ai.go index 82ac05115e..64f20edec3 100644 --- a/sim/encounters/ulduar/hodir_ai.go +++ b/sim/encounters/ulduar/hodir_ai.go @@ -504,12 +504,14 @@ func (ai *HodirAI) DoAction(sim *core.Simulation) { } } - if ai.FrozenBlows.IsReady(sim) && sim.CurrentTime >= ai.FrozenBlows.CD.Duration { - ai.FrozenBlows.Cast(sim, nil) - } + if ai.Target.CurrentTarget != nil { + if ai.FrozenBlows.IsReady(sim) && sim.CurrentTime >= ai.FrozenBlows.CD.Duration { + ai.FrozenBlows.Cast(sim, nil) + } - if ai.FlashFreeze.IsReady(sim) && sim.CurrentTime >= ai.FlashFreeze.CD.Duration { - ai.FlashFreeze.Cast(sim, nil) + if ai.FlashFreeze.IsReady(sim) && sim.CurrentTime >= ai.FlashFreeze.CD.Duration { + ai.FlashFreeze.Cast(sim, nil) + } } if ai.Target.GCD.IsReady(sim) {