Skip to content

Commit

Permalink
Merge pull request #2844 from Tharre/rotation_rework
Browse files Browse the repository at this point in the history
Warlock rotation rework
  • Loading branch information
Tharre committed Apr 1, 2023
2 parents 61a6fe6 + d994afa commit 06c4728
Show file tree
Hide file tree
Showing 12 changed files with 899 additions and 1,108 deletions.
3 changes: 2 additions & 1 deletion sim/core/buffs.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ func BloodlustAura(character *Character, actionTag int32) *Aura {
return aura
}

var PowerInfusionActionID = ActionID{SpellID: 10060}
var PowerInfusionAuraTag = "PowerInfusion"

const PowerInfusionDuration = time.Second * 15
Expand All @@ -616,7 +617,7 @@ func registerPowerInfusionCD(agent Agent, numPowerInfusions int32) {
registerExternalConsecutiveCDApproximation(
agent,
externalConsecutiveCDApproximation{
ActionID: ActionID{SpellID: 10060, Tag: -1},
ActionID: PowerInfusionActionID.WithTag(-1),
AuraTag: PowerInfusionAuraTag,
CooldownPriority: CooldownPriorityDefault,
AuraDuration: PowerInfusionDuration,
Expand Down
1 change: 1 addition & 0 deletions sim/core/cast.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type Cast struct {
func (cast Cast) EffectiveTime() time.Duration {
gcd := cast.GCD
if cast.GCD != 0 {
// TODO: isn't this wrong for spells like shadowfury, that have a reduced GCD?
gcd = MaxDuration(GCDMin, gcd)
}
fullCastTime := cast.CastTime + cast.ChannelTime + cast.AfterCastDelay
Expand Down
12 changes: 12 additions & 0 deletions sim/core/spell.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,18 @@ func (spell *Spell) ExpectedDamageFromCurrentSnapshot(sim *Simulation, target *U
return spell.expectedDamageHelper(sim, target, true)
}

// Time until either the cast is finished or GCD is ready again, whichever is longer
func (spell *Spell) EffectiveCastTime() time.Duration {
// TODO: this is wrong for spells like shadowfury, that have a GCD of less than 1s
return MaxDuration(spell.Unit.SpellGCD(),
spell.Unit.ApplyCastSpeedForSpell(spell.DefaultCast.EffectiveTime(), spell))
}

// Time until the cast is finished (ignoring GCD)
func (spell *Spell) CastTime() time.Duration {
return spell.Unit.ApplyCastSpeedForSpell(spell.DefaultCast.CastTime, spell)
}

// Handles computing the cost of spells and checking whether the Unit
// meets them.
type SpellCost interface {
Expand Down
121 changes: 0 additions & 121 deletions sim/warlock/DSprocsHelper.go

This file was deleted.

Loading

0 comments on commit 06c4728

Please sign in to comment.