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

Move DK AMS fields from Rotation --> Options #4132

Merged
merged 2 commits into from
Jan 7, 2024
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
10 changes: 7 additions & 3 deletions proto/deathknight.proto
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ message Deathknight {
Presence starting_presence = 10;
BloodTap blood_tap = 11;

bool use_ams = 13;
double avg_ams_success_rate = 14;
double avg_ams_hit = 15;
bool use_ams = 13 [deprecated = true];
double avg_ams_success_rate = 14 [deprecated = true];
double avg_ams_hit = 15 [deprecated = true];

bool auto_rotation = 16;

Expand Down Expand Up @@ -288,6 +288,10 @@ message Deathknight {
bool new_drw = 7;

double disease_downtime = 8;

bool use_ams = 9;
double avg_ams_success_rate = 10;
double avg_ams_hit = 11;
}
Options options = 3;
}
Expand Down
6 changes: 3 additions & 3 deletions sim/deathknight/dps/dps_deathknight.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ func NewDpsDeathknight(character *core.Character, player *proto.Player) *DpsDeat
RefreshHornOfWinter: dk.Rotation.RefreshHornOfWinter,
ArmyOfTheDeadType: dk.Rotation.ArmyOfTheDead,
StartingPresence: dk.Rotation.StartingPresence,
UseAMS: dk.Rotation.UseAms,
AvgAMSSuccessRate: dk.Rotation.AvgAmsSuccessRate,
AvgAMSHit: dk.Rotation.AvgAmsHit,
UseAMS: dk.Options.UseAms,
AvgAMSSuccessRate: dk.Options.AvgAmsSuccessRate,
AvgAMSHit: dk.Options.AvgAmsHit,
}, player.TalentsString, dk.Rotation.PreNerfedGargoyle),
Rotation: dk.Rotation,
}
Expand Down
48 changes: 24 additions & 24 deletions ui/deathknight/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,30 @@ export const DrwPestiApply = InputHelpers.makeSpecOptionsBooleanInput<Spec.SpecD
changeEmitter: (player: Player<Spec.SpecDeathknight>) => TypedEvent.onAny([player.specOptionsChangeEmitter, player.rotationChangeEmitter, player.talentsChangeEmitter]),
});

export const UseAMSInput = InputHelpers.makeSpecOptionsBooleanInput<Spec.SpecDeathknight>({
fieldName: 'useAms',
label: 'Use AMS',
labelTooltip: 'Use AMS around predicted damage for a RP gain.',
showWhen: (player: Player<Spec.SpecDeathknight>) => player.getTalents().howlingBlast,
changeEmitter: (player: Player<Spec.SpecDeathknight>) => TypedEvent.onAny([player.specOptionsChangeEmitter, player.talentsChangeEmitter]),
});

export const AvgAMSSuccessRateInput = InputHelpers.makeSpecOptionsNumberInput<Spec.SpecDeathknight>({
fieldName: 'avgAmsSuccessRate',
label: 'Avg AMS Success %',
labelTooltip: 'Chance for damage to be taken during the 5 second window of AMS.',
showWhen: (player: Player<Spec.SpecDeathknight>) => player.getSpecOptions().useAms == true && player.getTalents().howlingBlast,
changeEmitter: (player: Player<Spec.SpecDeathknight>) => TypedEvent.onAny([player.specOptionsChangeEmitter, player.talentsChangeEmitter]),
});

export const AvgAMSHitInput = InputHelpers.makeSpecOptionsNumberInput<Spec.SpecDeathknight>({
fieldName: 'avgAmsHit',
label: 'Avg AMS Hit',
labelTooltip: 'How much on average (+-10%) the character is hit for when AMS is successful.',
showWhen: (player: Player<Spec.SpecDeathknight>) => player.getSpecOptions().useAms == true && player.getTalents().howlingBlast,
changeEmitter: (player: Player<Spec.SpecDeathknight>) => TypedEvent.onAny([player.specOptionsChangeEmitter, player.talentsChangeEmitter]),
});

export const DiseaseRefreshDuration = InputHelpers.makeRotationNumberInput<Spec.SpecDeathknight>({
fieldName: 'diseaseRefreshDuration',
label: 'Disease Refresh Duration',
Expand Down Expand Up @@ -249,30 +273,6 @@ export const BloodTapInput = InputHelpers.makeRotationEnumInput<Spec.SpecDeathkn
changeEmitter: (player: Player<Spec.SpecDeathknight>) => TypedEvent.onAny([player.rotationChangeEmitter, player.talentsChangeEmitter]),
})

export const UseAMSInput = InputHelpers.makeRotationBooleanInput<Spec.SpecDeathknight>({
fieldName: 'useAms',
label: 'Use AMS',
labelTooltip: 'Use AMS around predicted damage for a RP gain.',
showWhen: (player: Player<Spec.SpecDeathknight>) => player.getTalents().howlingBlast && !player.getRotation().autoRotation && player.getRotation().frostRotationType != FrostRotationType.Custom,
changeEmitter: (player: Player<Spec.SpecDeathknight>) => TypedEvent.onAny([player.rotationChangeEmitter, player.talentsChangeEmitter]),
});

export const AvgAMSSuccessRateInput = InputHelpers.makeRotationNumberInput<Spec.SpecDeathknight>({
fieldName: 'avgAmsSuccessRate',
label: 'Avg AMS Success %',
labelTooltip: 'Chance for damage to be taken during the 5 second window of AMS.',
showWhen: (player: Player<Spec.SpecDeathknight>) => player.getRotation().useAms == true && !player.getRotation().autoRotation && player.getTalents().howlingBlast && player.getRotation().frostRotationType != FrostRotationType.Custom,
changeEmitter: (player: Player<Spec.SpecDeathknight>) => TypedEvent.onAny([player.rotationChangeEmitter, player.talentsChangeEmitter]),
});

export const AvgAMSHitInput = InputHelpers.makeRotationNumberInput<Spec.SpecDeathknight>({
fieldName: 'avgAmsHit',
label: 'Avg AMS Hit',
labelTooltip: 'How much on average (+-10%) the character is hit for when AMS is successful.',
showWhen: (player: Player<Spec.SpecDeathknight>) => player.getRotation().useAms == true && !player.getRotation().autoRotation && player.getTalents().howlingBlast && player.getRotation().frostRotationType != FrostRotationType.Custom,
changeEmitter: (player: Player<Spec.SpecDeathknight>) => TypedEvent.onAny([player.rotationChangeEmitter, player.talentsChangeEmitter]),
});

export const UseAutoRotation = InputHelpers.makeRotationBooleanInput<Spec.SpecDeathknight>({
fieldName: 'autoRotation',
label: 'Automatic Rotation',
Expand Down
3 changes: 3 additions & 0 deletions ui/deathknight/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecDeathknight, {
DeathKnightInputs.SelfUnholyFrenzy,
DeathKnightInputs.StartingRunicPower,
DeathKnightInputs.PetUptime,
DeathKnightInputs.UseAMSInput,
DeathKnightInputs.AvgAMSSuccessRateInput,
DeathKnightInputs.AvgAMSHitInput,

DeathKnightInputs.PrecastGhoulFrenzy,
DeathKnightInputs.PrecastHornOfWinter,
Expand Down
Loading