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

DK APL basic support #3280

Merged
merged 9 commits into from
Jul 11, 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
1 change: 1 addition & 0 deletions sim/deathknight/anti_magic_shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func (dk *Deathknight) registerAntiMagicShellSpell() {

dk.AntiMagicShell = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
RunicPowerCost: 20,
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/army_of_the_dead.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func (dk *Deathknight) registerArmyOfTheDeadCD() {

dk.ArmyOfTheDead = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 42650},
Flags: core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/blood_boil.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func (dk *Deathknight) registerBloodBoilSpell() {
// There is no refund and you only get RP on at least one of the effects hitting.
dk.BloodBoil = dk.RegisterSpell(core.SpellConfig{
ActionID: BloodBoilActionID,
Flags: core.SpellFlagAPL,
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellDamage,

Expand Down
2 changes: 2 additions & 0 deletions sim/deathknight/blood_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ func (dk *Deathknight) newBloodStrikeSpell(isMH bool) *core.Spell {
if !isMH { // offhand doesn't need GCD
conf.RuneCost = core.RuneCostOptions{}
conf.Cast = core.CastConfig{}
} else {
conf.Flags |= core.SpellFlagAPL
}

return dk.RegisterSpell(conf)
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/blood_tap.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (dk *Deathknight) registerBloodTapSpell() {

dk.BloodTap = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,

Cast: core.CastConfig{
CD: core.Cooldown{
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/bone_shield.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (dk *Deathknight) registerBoneShieldSpell() {

dk.BoneShield = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
UnholyRuneCost: 1,
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/dancing_rune_weapon.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func (dk *Deathknight) registerDancingRuneWeaponCD() {

dk.DancingRuneWeapon = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 49028},
Flags: core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
RunicPowerCost: 60,
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/death_and_decay.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ func (dk *Deathknight) registerDeathAndDecaySpell() {

dk.DeathAndDecay = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 49938},
Flags: core.SpellFlagAPL,
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskEmpty, // D&D doesn't seem to proc things in game.

Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/death_coil.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func (dk *Deathknight) registerDeathCoilSpell() {
bonusFlatDamage := 443 + dk.sigilOfTheWildBuckBonus() + dk.sigilOfTheVengefulHeartDeathCoil()
dk.DeathCoil = dk.RegisterSpell(core.SpellConfig{
ActionID: DeathCoilActionID,
Flags: core.SpellFlagAPL,
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellDamage,

Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/death_pact.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (dk *Deathknight) registerDeathPactSpell() {

dk.DeathPact = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
RunicPowerCost: 40,
Expand Down
2 changes: 2 additions & 0 deletions sim/deathknight/death_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ func (dk *Deathknight) newDeathStrikeSpell(isMH bool) *core.Spell {
if !isMH {
conf.RuneCost = core.RuneCostOptions{}
conf.Cast = core.CastConfig{}
} else {
conf.Flags |= core.SpellFlagAPL
}

return dk.RegisterSpell(conf)
Expand Down
4 changes: 4 additions & 0 deletions sim/deathknight/dps/dps_deathknight.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@ func (dk *DpsDeathknight) Reset(sim *core.Simulation) {

b, f, u := deathknight.PointsInTalents(dk.Talents)

if dk.IsUsingAPL {
return
}

if f > u && f > b {
if dk.Rotation.Presence == proto.Deathknight_Rotation_Blood {
dk.ChangePresence(sim, deathknight.BloodPresence)
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/empower_rune_weapon.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func (dk *Deathknight) registerEmpowerRuneWeaponSpell() {
rpMetrics := dk.NewRunicPowerMetrics(actionID)
dk.EmpowerRuneWeapon = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: cdTimer,
Expand Down
2 changes: 2 additions & 0 deletions sim/deathknight/frost_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ func (dk *Deathknight) newFrostStrikeHitSpell(isMH bool) *core.Spell {
if !isMH {
conf.RuneCost = core.RuneCostOptions{}
conf.Cast = core.CastConfig{}
} else {
conf.Flags |= core.SpellFlagAPL
}

return dk.RegisterSpell(conf)
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/ghoul_frenzy.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func (dk *Deathknight) registerGhoulFrenzySpell() {
ActionID: core.ActionID{SpellID: 63560},
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellHealing,
Flags: core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
UnholyRuneCost: 1,
Expand Down
4 changes: 4 additions & 0 deletions sim/deathknight/heart_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ func (dk *Deathknight) newHeartStrikeSpell(isMainTarget bool, isDrw bool) *core.
conf.Cast = core.CastConfig{}
}

if isMainTarget {
conf.Flags |= core.SpellFlagAPL
}

if isDrw {
if !dk.Inputs.NewDrw {
conf.DamageMultiplier *= 0.5
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/horn_of_winter.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (dk *Deathknight) registerHornOfWinterSpell() {

dk.HornOfWinter = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/howling_blast.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func (dk *Deathknight) registerHowlingBlastSpell() {

dk.HowlingBlast = dk.RegisterSpell(core.SpellConfig{
ActionID: HowlingBlastActionID,
Flags: core.SpellFlagAPL,
SpellSchool: core.SpellSchoolFrost,
ProcMask: core.ProcMaskSpellDamage,

Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/icebound_fortitude.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (dk *Deathknight) registerIceboundFortitudeSpell() {

dk.IceboundFortitude = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
RunicPowerCost: 20,
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/icy_touch.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func (dk *Deathknight) registerIcyTouchSpell() {

dk.IcyTouch = dk.RegisterSpell(core.SpellConfig{
ActionID: IcyTouchActionID,
Flags: core.SpellFlagAPL,
SpellSchool: core.SpellSchoolFrost,
ProcMask: core.ProcMaskSpellDamage,

Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/mark_of_blood.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (dk *Deathknight) registerMarkOfBloodSpell() {
var markOfBloodAura *core.Aura = nil
dk.MarkOfBlood = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
Expand Down
2 changes: 2 additions & 0 deletions sim/deathknight/obliterate.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ func (dk *Deathknight) newObliterateHitSpell(isMH bool) *core.Spell {
if !isMH {
conf.RuneCost = core.RuneCostOptions{}
conf.Cast = core.CastConfig{}
} else {
conf.Flags |= core.SpellFlagAPL
}

return dk.RegisterSpell(conf)
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/pestilence.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func (dk *Deathknight) registerPestilenceSpell() {

dk.Pestilence = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 50842},
Flags: core.SpellFlagAPL,
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellDamage,

Expand Down
2 changes: 2 additions & 0 deletions sim/deathknight/plague_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ func (dk *Deathknight) newPlagueStrikeSpell(isMH bool) *core.Spell {
if !isMH { // only MH has cost & gcd
conf.RuneCost = core.RuneCostOptions{}
conf.Cast = core.CastConfig{}
} else {
conf.Flags |= core.SpellFlagAPL
}

return dk.RegisterSpell(conf)
Expand Down
3 changes: 3 additions & 0 deletions sim/deathknight/presences.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func (dk *Deathknight) registerBloodPresenceAura(timer *core.Timer) {

dk.BloodPresence = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 50689},
Flags: core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
Expand Down Expand Up @@ -111,6 +112,7 @@ func (dk *Deathknight) registerFrostPresenceAura(timer *core.Timer) {

dk.FrostPresence = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 48263},
Flags: core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
FrostRuneCost: 1,
Expand Down Expand Up @@ -171,6 +173,7 @@ func (dk *Deathknight) registerUnholyPresenceAura(timer *core.Timer) {

dk.UnholyPresence = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 48265},
Flags: core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
UnholyRuneCost: 1,
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/raise_dead.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func (dk *Deathknight) registerRaiseDeadCD() {

dk.RaiseDead = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 46584},
Flags: core.SpellFlagAPL,

Cast: core.CastConfig{
DefaultCast: core.Cast{
Expand Down
4 changes: 4 additions & 0 deletions sim/deathknight/rotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ func (dk *Deathknight) IsMainTank() bool {
}

func (dk *Deathknight) DoRotation(sim *core.Simulation) {
if dk.IsUsingAPL {
return
}

target := dk.CurrentTarget

optWait := time.Duration(-1)
Expand Down
2 changes: 2 additions & 0 deletions sim/deathknight/rune_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ func (dk *Deathknight) newRuneStrikeSpell(isMH bool) *core.Spell {
conf.RuneCost = core.RuneCostOptions{}
conf.Cast = core.CastConfig{}
conf.ExtraCastCondition = nil
} else {
conf.Flags |= core.SpellFlagAPL
}

return dk.RegisterSpell(conf)
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/rune_tap.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (dk *Deathknight) registerRuneTapSpell() {

dk.RuneTap = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/scourge_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (dk *Deathknight) registerScourgeStrikeSpell() {
ActionID: ScourgeStrikeActionID.WithTag(1),
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIncludeTargetBonusDamage,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIncludeTargetBonusDamage | core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
FrostRuneCost: 1,
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/summon_gargoyle.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func (dk *Deathknight) registerSummonGargoyleCD() {

dk.SummonGargoyle = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 49206},
Flags: core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
RunicPowerCost: 60,
Expand Down
5 changes: 5 additions & 0 deletions sim/deathknight/tank/tank_deathknight.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func (dk *TankDeathknight) Reset(sim *core.Simulation) {
dk.switchIT = false

dk.Presence = deathknight.UnsetPresence

if dk.IsUsingAPL {
return
}

if dk.Rotation.Presence == proto.TankDeathknight_Rotation_Blood {
dk.ChangePresence(sim, deathknight.BloodPresence)
} else if dk.Rotation.Presence == proto.TankDeathknight_Rotation_Frost {
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/unbreakable_armor.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (dk *Deathknight) registerUnbreakableArmorSpell() {

dk.UnbreakableArmor = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
FrostRuneCost: 1,
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/unholy_frenzy.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func (dk *Deathknight) registerUnholyFrenzyCD() {

dk.UnholyFrenzy = dk.Character.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagAPL,

Cast: core.CastConfig{
CD: core.Cooldown{
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/vampiric_blood.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (dk *Deathknight) registerVampiricBloodSpell() {

dk.VampiricBlood = dk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,

RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
Expand Down
4 changes: 2 additions & 2 deletions ui/core/launched_sims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export const aplLaunchStatuses: Record<Spec, LaunchStatus> = {
[Spec.SpecWarlock]: LaunchStatus.Unlaunched,
[Spec.SpecWarrior]: LaunchStatus.Unlaunched,
[Spec.SpecProtectionWarrior]: LaunchStatus.Unlaunched,
[Spec.SpecDeathknight]: LaunchStatus.Unlaunched,
[Spec.SpecTankDeathknight]: LaunchStatus.Unlaunched,
[Spec.SpecDeathknight]: LaunchStatus.Alpha,
[Spec.SpecTankDeathknight]: LaunchStatus.Alpha,
};

// Meme specs are excluded from title drop-down menu.
Expand Down
Loading