diff --git a/proto/deathknight.proto b/proto/deathknight.proto index 658a5c4172..84420c1054 100644 --- a/proto/deathknight.proto +++ b/proto/deathknight.proto @@ -240,6 +240,8 @@ message Deathknight { bool use_gargoyle = 23; bool nerfed_gargoyle = 24; + + Presence gargoyle_presence = 25; } Rotation rotation = 1; diff --git a/sim/deathknight/dps/dps_deathknight.go b/sim/deathknight/dps/dps_deathknight.go index 90b8f80444..837c086922 100644 --- a/sim/deathknight/dps/dps_deathknight.go +++ b/sim/deathknight/dps/dps_deathknight.go @@ -108,6 +108,8 @@ func (dk *DpsDeathknight) SetupRotations() { dk.Rotation.StartingPresence = proto.Deathknight_Rotation_Unholy dk.Rotation.BlPresence = proto.Deathknight_Rotation_Blood dk.Rotation.Presence = proto.Deathknight_Rotation_Blood + // TODO: Change this to UP presence if nerfedGargoyle is live + dk.Rotation.GargoylePresence = proto.Deathknight_Rotation_Blood mh := dk.GetMHWeapon() oh := dk.GetOHWeapon() diff --git a/sim/deathknight/dps/rotation_unholy.go b/sim/deathknight/dps/rotation_unholy.go index e7f3bd13a5..1d8edf701b 100644 --- a/sim/deathknight/dps/rotation_unholy.go +++ b/sim/deathknight/dps/rotation_unholy.go @@ -279,7 +279,7 @@ func (dk *DpsDeathknight) uhAfterGargoyleSequence(sim *core.Simulation) { dk.RotationSequence.NewAction(dk.RotationActionCallback_AOTD) } - if dk.Rotation.BlPresence == proto.Deathknight_Rotation_Blood && !dk.PresenceMatches(deathknight.BloodPresence) { + if dk.Rotation.BlPresence == proto.Deathknight_Rotation_Blood && !dk.PresenceMatches(deathknight.BloodPresence) && (!dk.Rotation.NerfedGargoyle || dk.Rotation.GargoylePresence == proto.Deathknight_Rotation_Blood) { if didErw || dk.CurrentBloodRunes() > 0 { dk.RotationSequence.NewAction(dk.RotationActionCallback_BP) } else if !didErw && !dk.Rotation.BtGhoulFrenzy && dk.BloodTap.IsReady(sim) { diff --git a/sim/deathknight/dps/rotation_unholy_helper.go b/sim/deathknight/dps/rotation_unholy_helper.go index b347d10b5a..2dea9b285c 100644 --- a/sim/deathknight/dps/rotation_unholy_helper.go +++ b/sim/deathknight/dps/rotation_unholy_helper.go @@ -194,7 +194,7 @@ func (dk *DpsDeathknight) uhGargoyleCheck(sim *core.Simulation, target *core.Uni } if dk.uhGargoyleCanCast(sim, castTime) { - if !dk.PresenceMatches(deathknight.UnholyPresence) { + if !dk.PresenceMatches(deathknight.UnholyPresence) && (!dk.Rotation.NerfedGargoyle || dk.Rotation.GargoylePresence != proto.Deathknight_Rotation_Unholy) { if dk.CurrentUnholyRunes() == 0 { if dk.BloodTap.IsReady(sim) { dk.BloodTap.Cast(sim, dk.CurrentTarget) @@ -218,6 +218,27 @@ func (dk *DpsDeathknight) uhGargoyleCheck(sim *core.Simulation, target *core.Uni } } + // Go back to Blood Presence after Gargoyle + if dk.Rotation.NerfedGargoyle && !dk.SummonGargoyle.IsReady(sim) && dk.Rotation.Presence == proto.Deathknight_Rotation_Blood && dk.Rotation.GargoylePresence == proto.Deathknight_Rotation_Unholy && dk.PresenceMatches(deathknight.UnholyPresence) && !dk.HasActiveAura("Summon Gargoyle") { + if dk.BloodTapAura.IsActive() { + dk.BloodTapAura.Deactivate(sim) + } + return dk.BloodPresence.Cast(sim, target) + } + + // Go back to Unholy Presence after Gargoyle + if dk.Rotation.NerfedGargoyle && !dk.SummonGargoyle.IsReady(sim) && dk.Rotation.Presence == proto.Deathknight_Rotation_Unholy && dk.Rotation.GargoylePresence == proto.Deathknight_Rotation_Blood && dk.PresenceMatches(deathknight.BloodPresence) && !dk.HasActiveAura("Summon Gargoyle") { + if dk.BloodTapAura.IsActive() { + dk.BloodTapAura.Deactivate(sim) + } + return dk.UnholyPresence.Cast(sim, target) + } + + // Do not switch presences if gargoyle is still up if it's nerfed gargoyle + if dk.Rotation.NerfedGargoyle && dk.HasActiveAura("Summon Gargoyle") { + return false + } + // Go back to Blood Presence after Bloodlust if dk.Rotation.Presence == proto.Deathknight_Rotation_Blood && dk.Rotation.BlPresence == proto.Deathknight_Rotation_Unholy && dk.PresenceMatches(deathknight.UnholyPresence) && !dk.HasActiveAuraWithTag("Bloodlust") { if dk.BloodTapAura.IsActive() { diff --git a/ui/deathknight/inputs.ts b/ui/deathknight/inputs.ts index 32c84ef394..f4c56f5802 100644 --- a/ui/deathknight/inputs.ts +++ b/ui/deathknight/inputs.ts @@ -133,6 +133,18 @@ export const BloodlustPresence = InputHelpers.makeRotationEnumInput) => TypedEvent.onAny([player.rotationChangeEmitter, player.talentsChangeEmitter]), }); +export const GargoylePresence = InputHelpers.makeRotationEnumInput({ + fieldName: 'gargoylePresence', + label: 'Gargoyle Presence', + labelTooltip: 'Presence during Gargoyle.', + values: [ + { name: 'Blood', value: StartingPresence.Blood }, + { name: 'Unholy', value: StartingPresence.Unholy }, + ], + showWhen: (player: Player) => player.getTalents().summonGargoyle && !player.getRotation().autoRotation, + changeEmitter: (player: Player) => TypedEvent.onAny([player.rotationChangeEmitter, player.talentsChangeEmitter]), +}); + export const BloodTapGhoulFrenzy = InputHelpers.makeRotationBooleanInput({ fieldName: 'btGhoulFrenzy', label: 'BT Ghoul Frenzy', @@ -330,6 +342,7 @@ export const DeathKnightRotationConfig = { FirstDiseaseInput, StartingPresenceInput, BloodlustPresence, + GargoylePresence, FightPresence, BloodRuneFillerInput, UseDeathAndDecay,