Skip to content

Commit

Permalink
Merge pull request #1567 from TheGroxEmpire/master
Browse files Browse the repository at this point in the history
Warrior: add additional check for Slam and BT after after BT CD
  • Loading branch information
TheGroxEmpire authored Nov 3, 2022
2 parents 7324a21 + 0eb630f commit d7c3afd
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 178 deletions.
12 changes: 11 additions & 1 deletion sim/warrior/bloodthirst.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,20 @@ func (warrior *Warrior) registerBloodthirstSpell(cdTimer *core.Timer) {
if !result.Landed() {
warrior.AddRage(sim, refundAmount, warrior.RageRefundMetrics)
}
core.StartDelayedAction(sim, core.DelayedActionOptions{
DoAt: sim.CurrentTime + warrior.Bloodthirst.CD.Duration,
OnAction: func(_ *core.Simulation) {
if warrior.ShouldInstantSlam(sim) {
warrior.CastSlam(sim, warrior.CurrentTarget)
} else if warrior.CanBloodthirst(sim) {
warrior.Bloodthirst.Cast(sim, warrior.CurrentTarget)
}
},
})
},
})
}

func (warrior *Warrior) CanBloodthirst(sim *core.Simulation) bool {
return warrior.Talents.Bloodthirst && warrior.CurrentRage() >= warrior.Bloodthirst.DefaultCast.Cost && warrior.Bloodthirst.IsReady(sim)
return warrior.Talents.Bloodthirst && warrior.CurrentRage() >= warrior.Bloodthirst.DefaultCast.Cost && warrior.Bloodthirst.IsReady(sim) && warrior.GCD.IsReady(sim)
}
Loading

0 comments on commit d7c3afd

Please sign in to comment.