Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rosenrusinov committed Mar 21, 2024
1 parent 9af59dd commit 512a814
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 70 deletions.
8 changes: 1 addition & 7 deletions sim/common/sod/crafted/phase_1.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,7 @@ func init() {
Priority: core.CooldownPriorityLow,
Type: core.CooldownTypeSurvival,
ShouldActivate: func(s *core.Simulation, c *core.Character) bool {
// only activate automatically if we're actually tanking a target
for _, target := range character.Env.Encounter.TargetUnits {
if target.CurrentTarget == &character.Unit {
return true
}
}
return false
return character.IsTanking()
},
})
})
Expand Down
9 changes: 9 additions & 0 deletions sim/core/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ func (target *Target) GetMetricsProto() *proto.UnitMetrics {
return metrics
}

func (character *Character) IsTanking() bool {
for _, target := range character.Env.Encounter.TargetUnits {
if target.CurrentTarget == &character.Unit {
return true
}
}
return false
}

func GetWeaponSkill(unit *Unit, weapon *Item) float64 {
if weapon == nil {
return 0
Expand Down
64 changes: 32 additions & 32 deletions sim/druid/balance/TestBalance.results
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ stat_weights_results: {
weights: 0
weights: 0.04809
weights: 0
weights: 0.48765
weights: 0.49196
weights: 0
weights: 0
weights: 0
Expand All @@ -113,7 +113,7 @@ stat_weights_results: {
weights: 0
weights: 0
weights: 0
weights: 0.74994
weights: 0.75488
weights: 0
weights: 0
weights: 0.00039
Expand Down Expand Up @@ -246,8 +246,8 @@ dps_results: {
dps_results: {
key: "TestBalance-Lvl25-AllItems-StormshroudArmor"
value: {
dps: 85.51675
tps: 88.12214
dps: 86.40914
tps: 89.01453
}
}
dps_results: {
Expand All @@ -260,99 +260,99 @@ dps_results: {
dps_results: {
key: "TestBalance-Lvl25-Average-Default"
value: {
dps: 171.31599
tps: 173.9194
dps: 172.74839
tps: 175.3518
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-NightElf-phase_1-Default-phase_1-FullBuffs-Phase 1 Consumes-LongMultiTarget"
value: {
dps: 170.19664
tps: 222.30452
dps: 171.10415
tps: 223.21202
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-NightElf-phase_1-Default-phase_1-FullBuffs-Phase 1 Consumes-LongSingleTarget"
value: {
dps: 170.19664
tps: 172.80203
dps: 171.10415
tps: 173.70954
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-NightElf-phase_1-Default-phase_1-FullBuffs-Phase 1 Consumes-ShortSingleTarget"
value: {
dps: 165.93242
tps: 170.29229
dps: 170.46995
tps: 174.82983
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-NightElf-phase_1-Default-phase_1-NoBuffs-Phase 1 Consumes-LongMultiTarget"
value: {
dps: 116.6242
tps: 168.73207
dps: 117.30489
tps: 169.41276
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-NightElf-phase_1-Default-phase_1-NoBuffs-Phase 1 Consumes-LongSingleTarget"
value: {
dps: 116.6242
tps: 119.22959
dps: 117.30489
tps: 119.91028
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-NightElf-phase_1-Default-phase_1-NoBuffs-Phase 1 Consumes-ShortSingleTarget"
value: {
dps: 116.37853
tps: 120.73841
dps: 119.78197
tps: 124.14185
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-Tauren-phase_1-Default-phase_1-FullBuffs-Phase 1 Consumes-LongMultiTarget"
value: {
dps: 169.84571
tps: 221.95359
dps: 170.75322
tps: 222.86109
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-Tauren-phase_1-Default-phase_1-FullBuffs-Phase 1 Consumes-LongSingleTarget"
value: {
dps: 169.84571
tps: 172.45111
dps: 170.75322
tps: 173.35861
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-Tauren-phase_1-Default-phase_1-FullBuffs-Phase 1 Consumes-ShortSingleTarget"
value: {
dps: 165.70388
tps: 170.06376
dps: 170.24142
tps: 174.6013
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-Tauren-phase_1-Default-phase_1-NoBuffs-Phase 1 Consumes-LongMultiTarget"
value: {
dps: 116.41286
tps: 168.52073
dps: 117.09355
tps: 169.20142
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-Tauren-phase_1-Default-phase_1-NoBuffs-Phase 1 Consumes-LongSingleTarget"
value: {
dps: 116.41286
tps: 119.01825
dps: 117.09355
tps: 119.69894
}
}
dps_results: {
key: "TestBalance-Lvl25-Settings-Tauren-phase_1-Default-phase_1-NoBuffs-Phase 1 Consumes-ShortSingleTarget"
value: {
dps: 116.29607
tps: 120.65594
dps: 119.69951
tps: 124.05938
}
}
dps_results: {
key: "TestBalance-Lvl25-SwitchInFrontOfTarget-Default"
value: {
dps: 170.34373
tps: 172.94913
dps: 171.76045
tps: 174.36585
}
}
dps_results: {
Expand Down
62 changes: 31 additions & 31 deletions sim/priest/shadow/TestShadow.results
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ stat_weights_results: {
weights: 0
weights: 0.10986
weights: 0
weights: 0.29677
weights: 0.29917
weights: 0
weights: 0
weights: 0
weights: 0
weights: 0
weights: 0.19772
weights: 0.19835
weights: 0
weights: 0
weights: 0.26753
weights: 0.27062
weights: 0
weights: 0
weights: 0
Expand Down Expand Up @@ -225,99 +225,99 @@ dps_results: {
dps_results: {
key: "TestShadow-Lvl25-Average-Default"
value: {
dps: 117.83638
tps: 118.37081
dps: 118.58891
tps: 119.12334
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-NightElf-phase_1-Basic-phase_1-FullBuffs-Phase 1 Consumes-LongMultiTarget"
value: {
dps: 119.78768
tps: 209.9018
dps: 120.5533
tps: 210.66742
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-NightElf-phase_1-Basic-phase_1-FullBuffs-Phase 1 Consumes-LongSingleTarget"
value: {
dps: 119.78768
tps: 120.2957
dps: 120.5533
tps: 121.06132
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-NightElf-phase_1-Basic-phase_1-FullBuffs-Phase 1 Consumes-ShortSingleTarget"
value: {
dps: 177.18063
tps: 178.96271
dps: 181.00872
tps: 182.7908
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-NightElf-phase_1-Basic-phase_1-NoBuffs-Phase 1 Consumes-LongMultiTarget"
value: {
dps: 70.81758
tps: 157.23654
dps: 71.37203
tps: 157.79098
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-NightElf-phase_1-Basic-phase_1-NoBuffs-Phase 1 Consumes-LongSingleTarget"
value: {
dps: 70.81758
tps: 74.17214
dps: 71.37203
tps: 74.72659
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-NightElf-phase_1-Basic-phase_1-NoBuffs-Phase 1 Consumes-ShortSingleTarget"
value: {
dps: 117.11367
tps: 123.2604
dps: 119.88591
tps: 126.03265
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-Undead-phase_1-Basic-phase_1-FullBuffs-Phase 1 Consumes-LongMultiTarget"
value: {
dps: 118.28688
tps: 207.85064
dps: 119.06218
tps: 208.62594
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-Undead-phase_1-Basic-phase_1-FullBuffs-Phase 1 Consumes-LongSingleTarget"
value: {
dps: 118.28688
tps: 118.81929
dps: 119.06218
tps: 119.5946
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-Undead-phase_1-Basic-phase_1-FullBuffs-Phase 1 Consumes-ShortSingleTarget"
value: {
dps: 178.6605
tps: 180.47786
dps: 182.53701
tps: 184.35437
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-Undead-phase_1-Basic-phase_1-NoBuffs-Phase 1 Consumes-LongMultiTarget"
value: {
dps: 69.70947
tps: 155.54033
dps: 70.27721
tps: 156.10807
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-Undead-phase_1-Basic-phase_1-NoBuffs-Phase 1 Consumes-LongSingleTarget"
value: {
dps: 69.70947
tps: 72.99843
dps: 70.27721
tps: 73.56617
}
}
dps_results: {
key: "TestShadow-Lvl25-Settings-Undead-phase_1-Basic-phase_1-NoBuffs-Phase 1 Consumes-ShortSingleTarget"
value: {
dps: 116.02042
tps: 122.30604
dps: 118.85913
tps: 125.14475
}
}
dps_results: {
key: "TestShadow-Lvl25-SwitchInFrontOfTarget-Default"
value: {
dps: 118.28688
tps: 118.81929
dps: 119.06218
tps: 119.5946
}
}
dps_results: {
Expand Down

0 comments on commit 512a814

Please sign in to comment.