Skip to content

Commit

Permalink
Merge pull request #4132 from wowsims/fixes
Browse files Browse the repository at this point in the history
Move DK AMS fields from Rotation --> Options
  • Loading branch information
jimmyt857 authored Jan 7, 2024
2 parents 5ecc876 + 6c4707f commit 4f307ba
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 30 deletions.
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

0 comments on commit 4f307ba

Please sign in to comment.