Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warlock rotation rework #2844

Merged
merged 2 commits into from
Apr 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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