diff --git a/sim/common/sod/crafted/phase_1.go b/sim/common/sod/crafted/phase_1.go index f41e1ea869..acc37e2033 100644 --- a/sim/common/sod/crafted/phase_1.go +++ b/sim/common/sod/crafted/phase_1.go @@ -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() }, }) }) diff --git a/sim/core/target.go b/sim/core/target.go index 4901a7d57f..730632bcdf 100644 --- a/sim/core/target.go +++ b/sim/core/target.go @@ -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 diff --git a/sim/druid/balance/TestBalance.results b/sim/druid/balance/TestBalance.results index 042a88b815..54c4f4ac05 100644 --- a/sim/druid/balance/TestBalance.results +++ b/sim/druid/balance/TestBalance.results @@ -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 @@ -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 @@ -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: { @@ -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: { diff --git a/sim/priest/shadow/TestShadow.results b/sim/priest/shadow/TestShadow.results index c6e3755e9d..2f97a5e3bc 100644 --- a/sim/priest/shadow/TestShadow.results +++ b/sim/priest/shadow/TestShadow.results @@ -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 @@ -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: {