Skip to content

Commit

Permalink
simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
lime-green committed Jul 7, 2023
1 parent 3309245 commit ada5e2f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
14 changes: 0 additions & 14 deletions sim/core/runic_power.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,20 +298,6 @@ func (rp *RunicPowerBar) NormalSpentBloodRuneReadyAt(sim *Simulation) time.Durat
return readyAt
}

func (rp *RunicPowerBar) NormalBloodRuneReadyAt(sim *Simulation) time.Duration {
readyAt := NeverExpires
if rp.runeStates&isDeaths[0] == 0 && rp.runeStates&isSpents[0] != 0 {
readyAt = rp.runeMeta[0].regenAt
}
if rp.runeStates&isDeaths[1] == 0 && rp.runeStates&isSpents[1] != 0 {
readyAt = MinDuration(readyAt, rp.runeMeta[3].regenAt)
}
if (rp.runeStates&isDeaths[0] == 0 && rp.runeStates&isSpents[0] == 0) || (rp.runeStates&isDeaths[1] == 0 && rp.runeStates&isSpents[1] == 0) {
readyAt = sim.CurrentTime
}
return readyAt
}

func (rp *RunicPowerBar) NormalSpentFrostRuneReadyAt(sim *Simulation) time.Duration {
readyAt := NeverExpires
if rp.runeStates&isDeaths[2] == 0 && rp.runeStates&isSpents[2] != 0 {
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/dps/rotation_frost.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (dk *DpsDeathknight) castAllMajorCooldowns(sim *core.Simulation) {

func (dk *DpsDeathknight) RotationActionCallback_UA_Frost(sim *core.Simulation, target *core.Unit, s *deathknight.Sequence) time.Duration {
if dk.UnbreakableArmor != nil {
if dk.NormalCurrentBloodRunes() < 2 && !dk.LeftBloodRuneReady() {
if !dk.LeftBloodRuneReady() {
dk.BloodTap.Cast(sim, nil)
}
casted := dk.UnbreakableArmor.Cast(sim, target)
Expand Down
5 changes: 2 additions & 3 deletions sim/deathknight/dps/rotation_frost_sub_blood.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (dk *DpsDeathknight) RotationActionCallback_FrostSubBlood_FS_Dump(sim *core
fr := dk.NormalCurrentFrostRunes()
uh := dk.NormalCurrentUnholyRunes()
b := dk.NormalCurrentBloodRunes()
bAt := dk.NormalBloodRuneReadyAt(sim)
bAt := dk.BloodRuneReadyAt(sim)
frAt := dk.NormalFrostRuneReadyAt(sim)
uhAt := dk.NormalUnholyRuneReadyAt(sim)
obAt := core.MaxDuration(frAt, uhAt)
Expand Down Expand Up @@ -195,9 +195,8 @@ func (dk *DpsDeathknight) RotationActionCallback_FrostSubBlood_FS_Dump(sim *core
casted = dk.FrostStrike.Cast(sim, target)
} else {
if dk.canCastFrostUnholySpell(sim, target) {
bAt = core.TernaryDuration(b > 0, sim.CurrentTime, bAt)
dndAt := core.MaxDuration(bAt-sim.CurrentTime, dk.DeathAndDecay.TimeToReady(sim))
if dk.Rotation.UseDeathAndDecay && dk.Env.GetNumTargets() >= 3 && dndAt < 1*time.Second && !dk.UnbreakableArmorAura.IsActive() && dk.UnbreakableArmor.TimeToReady(sim) > 8*time.Second {
if dk.Rotation.UseDeathAndDecay && dk.Env.GetNumTargets() >= 3 && dndAt < 3*time.Second && !dk.UnbreakableArmorAura.IsActive() && dk.UnbreakableArmor.TimeToReady(sim) > 8*time.Second {
if b > 0 {
casted = dk.DeathAndDecay.Cast(sim, target)
dk.fr.oblitCount += 1
Expand Down

0 comments on commit ada5e2f

Please sign in to comment.