Skip to content

Commit

Permalink
Merge pull request #1174 from wowsims/feature/apl-aura-sets
Browse files Browse the repository at this point in the history
Unholy APL Updates
  • Loading branch information
NerdEgghead authored Nov 6, 2024
2 parents f8ec572 + 37c437e commit fee5088
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 69 deletions.
9 changes: 8 additions & 1 deletion proto/apl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ message APLAction {
}
}

// NextIndex: 84
// NextIndex: 85
message APLValue {
oneof value {
// Operators
Expand Down Expand Up @@ -167,6 +167,7 @@ message APLValue {
APLValueAllTrinketStatProcsActive all_trinket_stat_procs_active = 78;
APLValueAnyTrinketStatProcsActive any_trinket_stat_procs_active = 79;
APLValueTrinketProcsMinRemainingTime trinket_procs_min_remaining_time = 80;
APLValueTrinketProcsMaxRemainingICD trinket_procs_max_remaining_icd = 84;
APLValueNumEquippedStatProcTrinkets num_equipped_stat_proc_trinkets = 81;

// Dot values
Expand Down Expand Up @@ -583,6 +584,12 @@ message APLValueTrinketProcsMinRemainingTime {
int32 stat_type3 = 3;
bool exclude_stacking_procs = 4;
}
message APLValueTrinketProcsMaxRemainingICD {
int32 stat_type1 = 1;
int32 stat_type2 = 2;
int32 stat_type3 = 3;
bool exclude_stacking_procs = 4;
}
message APLValueNumEquippedStatProcTrinkets {
int32 stat_type1 = 1;
int32 stat_type2 = 2;
Expand Down
2 changes: 2 additions & 0 deletions sim/core/apl_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ func (rot *APLRotation) newAPLValue(config *proto.APLValue) APLValue {
return rot.newValueAnyTrinketStatProcsActive(config.GetAnyTrinketStatProcsActive())
case *proto.APLValue_TrinketProcsMinRemainingTime:
return rot.newValueTrinketProcsMinRemainingTime(config.GetTrinketProcsMinRemainingTime())
case *proto.APLValue_TrinketProcsMaxRemainingIcd:
return rot.newValueTrinketProcsMaxRemainingICD(config.GetTrinketProcsMaxRemainingIcd())
case *proto.APLValue_NumEquippedStatProcTrinkets:
return rot.newValueNumEquippedStatProcTrinkets(config.GetNumEquippedStatProcTrinkets())

Expand Down
30 changes: 30 additions & 0 deletions sim/core/apl_values_aura_sets.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,36 @@ func (value *APLValueTrinketProcsMinRemainingTime) GetDuration(sim *Simulation)
return minRemainingTime
}

type APLValueTrinketProcsMaxRemainingICD struct {
*APLValueTrinketStatProcCheck
}

func (rot *APLRotation) newValueTrinketProcsMaxRemainingICD(config *proto.APLValueTrinketProcsMaxRemainingICD) APLValue {
parentImpl := rot.newTrinketStatProcValue("TrinketProcsMaxRemainingICD", config.StatType1, config.StatType2, config.StatType3, config.ExcludeStackingProcs, true)

if parentImpl == nil {
return nil
}

return &APLValueTrinketProcsMaxRemainingICD{
APLValueTrinketStatProcCheck: parentImpl,
}
}
func (value *APLValueTrinketProcsMaxRemainingICD) Type() proto.APLValueType {
return proto.APLValueType_ValueTypeDuration
}
func (value *APLValueTrinketProcsMaxRemainingICD) GetDuration(sim *Simulation) time.Duration {
var maxRemainingICD time.Duration

for _, aura := range value.matchingAuras {
if !aura.IsActive() && (aura.Icd != nil) {
maxRemainingICD = max(maxRemainingICD, aura.Icd.TimeToReady(sim))
}
}

return maxRemainingICD
}

type APLValueNumEquippedStatProcTrinkets struct {
*APLValueTrinketStatProcCheck
}
Expand Down
118 changes: 59 additions & 59 deletions sim/death_knight/unholy/TestUnholy.results
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-BloodthirstyGladiator'sInsigniaofVictory-64763"
value: {
dps: 40469.55782
tps: 30030.97493
hps: 648.07648
dps: 40270.43381
tps: 29857.61305
hps: 644.94189
}
}
dps_results: {
Expand Down Expand Up @@ -374,8 +374,8 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-CataclysmicGladiator'sInsigniaofVictory-73491"
value: {
dps: 40969.2121
tps: 30398.30302
dps: 40897.40866
tps: 30240.29167
hps: 644.15825
}
}
Expand Down Expand Up @@ -414,17 +414,17 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-CrecheoftheFinalDragon-77205"
value: {
dps: 42665.07
tps: 31556.58376
hps: 662.96579
dps: 42752.97224
tps: 31595.01928
hps: 671.58591
}
}
dps_results: {
key: "TestUnholy-AllItems-CrecheoftheFinalDragon-77972"
value: {
dps: 42300.04506
tps: 31315.25944
hps: 657.48025
dps: 42531.19511
tps: 31426.51684
hps: 660.61484
}
}
dps_results: {
Expand Down Expand Up @@ -542,9 +542,9 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-Dwyer'sCaber-70141"
value: {
dps: 41236.64066
tps: 30615.35337
hps: 659.04755
dps: 41319.53336
tps: 30744.92451
hps: 662.96579
}
}
dps_results: {
Expand Down Expand Up @@ -598,17 +598,17 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-EssenceoftheCyclone-59473"
value: {
dps: 40185.633
tps: 29751.18977
hps: 648.86013
dps: 40381.16317
tps: 29925.60571
hps: 657.48025
}
}
dps_results: {
key: "TestUnholy-AllItems-EssenceoftheCyclone-65140"
value: {
dps: 40418.75989
tps: 30076.3759
hps: 653.56202
dps: 40445.42149
tps: 30054.78753
hps: 661.39849
}
}
dps_results: {
Expand Down Expand Up @@ -814,17 +814,17 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-GraceoftheHerald-55266"
value: {
dps: 39667.52838
tps: 29449.58594
hps: 650.42743
dps: 39705.03153
tps: 29408.2828
hps: 647.29284
}
}
dps_results: {
key: "TestUnholy-AllItems-GraceoftheHerald-56295"
value: {
dps: 39719.33388
tps: 29431.35445
hps: 651.21107
dps: 39891.39075
tps: 29559.13964
hps: 654.34566
}
}
dps_results: {
Expand Down Expand Up @@ -886,24 +886,24 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-HeartofRage-59224"
value: {
dps: 41486.07333
tps: 30720.78992
hps: 655.12931
dps: 41614.1318
tps: 30823.73169
hps: 655.91296
}
}
dps_results: {
key: "TestUnholy-AllItems-HeartofSolace-55868"
value: {
dps: 41490.55968
tps: 30619.85157
hps: 656.69661
dps: 41571.97403
tps: 30708.51663
hps: 655.12931
}
}
dps_results: {
key: "TestUnholy-AllItems-HeartofSolace-56393"
value: {
dps: 41627.95047
tps: 30658.83912
dps: 41711.31804
tps: 30783.26047
hps: 655.12931
}
}
Expand All @@ -926,9 +926,9 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-HeartoftheVile-66969"
value: {
dps: 39849.08604
tps: 29584.41293
hps: 646.50919
dps: 39973.3572
tps: 29681.99187
hps: 651.99472
}
}
dps_results: {
Expand Down Expand Up @@ -1502,25 +1502,25 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-RightEyeofRajh-56100"
value: {
dps: 40234.14758
tps: 29726.21769
dps: 40435.15183
tps: 29932.3626
hps: 646.50919
}
}
dps_results: {
key: "TestUnholy-AllItems-RightEyeofRajh-56431"
value: {
dps: 40217.50037
tps: 29708.16359
hps: 640.24001
dps: 40233.42998
tps: 29752.24913
hps: 645.72554
}
}
dps_results: {
key: "TestUnholy-AllItems-RosaryofLight-72901"
value: {
dps: 41649.38574
tps: 30862.17245
hps: 667.66767
dps: 41600.02374
tps: 30816.23457
hps: 668.45132
}
}
dps_results: {
Expand Down Expand Up @@ -1638,16 +1638,16 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-RuthlessGladiator'sInsigniaofVictory-70403"
value: {
dps: 40731.89899
tps: 30194.08766
hps: 644.94189
dps: 40521.27377
tps: 30022.32131
hps: 648.07648
}
}
dps_results: {
key: "TestUnholy-AllItems-RuthlessGladiator'sInsigniaofVictory-72455"
value: {
dps: 40854.62401
tps: 30270.91016
dps: 40836.45242
tps: 30195.69675
hps: 644.94189
}
}
Expand Down Expand Up @@ -1846,9 +1846,9 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-Stonemother'sKiss-61411"
value: {
dps: 39673.41208
tps: 29421.68788
hps: 655.12931
dps: 39713.91143
tps: 29469.20265
hps: 655.91296
}
}
dps_results: {
Expand Down Expand Up @@ -2262,17 +2262,17 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-ViciousGladiator'sInsigniaofVictory-61046"
value: {
dps: 40401.45566
tps: 29989.90786
hps: 648.86013
dps: 40154.8341
tps: 29801.74598
hps: 648.07648
}
}
dps_results: {
key: "TestUnholy-AllItems-ViciousGladiator'sInsigniaofVictory-70579"
value: {
dps: 40656.89784
tps: 30147.77781
hps: 645.72554
dps: 40640.4822
tps: 30124.49689
hps: 648.86013
}
}
dps_results: {
Expand Down
14 changes: 14 additions & 0 deletions ui/core/components/individual_sim_ui/apl_values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ import {
APLValueSpellTimeToReady,
APLValueSpellTravelTime,
APLValueTotemRemainingTime,
APLValueTrinketProcsMaxRemainingICD,
APLValueTrinketProcsMinRemainingTime,
APLValueUnitIsMoving,
APLValueWarlockShouldRecastDrainSoul,
Expand Down Expand Up @@ -1006,6 +1007,19 @@ const valueKindFactories: { [f in NonNullable<APLValueKind>]: ValueKindConfig<AP
}),
fields: [AplHelpers.statTypeFieldConfig('statType1'), AplHelpers.statTypeFieldConfig('statType2'), AplHelpers.statTypeFieldConfig('statType3'), AplHelpers.excludeStackingProcsInput],
}),
trinketProcsMaxRemainingIcd: inputBuilder({
label: 'Trinket Procs Max Remaining ICD',
submenu: ['Aura Sets'],
shortDescription:
'Longest remaining ICD on any inactive trinket procs that buff the specified stat type(s), or 0 if all are currently active.',
newValue: () =>
APLValueTrinketProcsMaxRemainingICD.create({
statType1: -1,
statType2: -1,
statType3: -1,
}),
fields: [AplHelpers.statTypeFieldConfig('statType1'), AplHelpers.statTypeFieldConfig('statType2'), AplHelpers.statTypeFieldConfig('statType3'), AplHelpers.excludeStackingProcsInput],
}),
numEquippedStatProcTrinkets: inputBuilder({
label: 'Num Equipped Stat Proc Trinkets',
submenu: ['Aura Sets'],
Expand Down
Loading

0 comments on commit fee5088

Please sign in to comment.