From b17faf90d435775036605e2df8427bcb073f9df5 Mon Sep 17 00:00:00 2001 From: Kayla Glick Date: Tue, 31 Dec 2024 18:21:30 -0500 Subject: [PATCH] fix issue with aimed shot/multi shot not completing --- sim/hunter/TestBM.results | 48 +++++------ sim/hunter/TestMM.results | 48 +++++------ sim/hunter/TestSV.results | 176 +++++++++++++++++++------------------- sim/hunter/aimed_shot.go | 7 +- sim/hunter/multi_shot.go | 5 +- 5 files changed, 145 insertions(+), 139 deletions(-) diff --git a/sim/hunter/TestBM.results b/sim/hunter/TestBM.results index 3923a45d34..70d8a2e7c2 100644 --- a/sim/hunter/TestBM.results +++ b/sim/hunter/TestBM.results @@ -162,22 +162,22 @@ dps_results: { dps_results: { key: "TestBM-Phase2-Lvl40-Settings-NightElf-p2_melee-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-LongMultiTarget" value: { - dps: 553.86848 - tps: 651.24524 + dps: 539.98168 + tps: 639.29337 } } dps_results: { key: "TestBM-Phase2-Lvl40-Settings-NightElf-p2_melee-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-LongSingleTarget" value: { - dps: 488.51541 - tps: 256.02006 + dps: 480.08828 + tps: 251.60899 } } dps_results: { key: "TestBM-Phase2-Lvl40-Settings-NightElf-p2_melee-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-ShortSingleTarget" value: { - dps: 530.84557 - tps: 273.04146 + dps: 479.14047 + tps: 248.20311 } } dps_results: { @@ -246,22 +246,22 @@ dps_results: { dps_results: { key: "TestBM-Phase2-Lvl40-Settings-NightElf-p2_ranged_bm-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-LongMultiTarget" value: { - dps: 755.38989 - tps: 867.14178 + dps: 741.60387 + tps: 853.79258 } } dps_results: { key: "TestBM-Phase2-Lvl40-Settings-NightElf-p2_ranged_bm-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-LongSingleTarget" value: { - dps: 679.22745 - tps: 439.32537 + dps: 669.17718 + tps: 435.61495 } } dps_results: { key: "TestBM-Phase2-Lvl40-Settings-NightElf-p2_ranged_bm-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-ShortSingleTarget" value: { - dps: 734.26407 - tps: 477.50511 + dps: 669.86316 + tps: 449.73602 } } dps_results: { @@ -330,22 +330,22 @@ dps_results: { dps_results: { key: "TestBM-Phase2-Lvl40-Settings-Orc-p2_melee-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-LongMultiTarget" value: { - dps: 553.44237 - tps: 647.15879 + dps: 540.61482 + tps: 636.92207 } } dps_results: { key: "TestBM-Phase2-Lvl40-Settings-Orc-p2_melee-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-LongSingleTarget" value: { - dps: 491.52499 - tps: 253.04987 + dps: 481.39587 + tps: 247.95175 } } dps_results: { key: "TestBM-Phase2-Lvl40-Settings-Orc-p2_melee-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-ShortSingleTarget" value: { - dps: 533.35383 - tps: 269.96494 + dps: 481.54827 + tps: 245.43375 } } dps_results: { @@ -414,22 +414,22 @@ dps_results: { dps_results: { key: "TestBM-Phase2-Lvl40-Settings-Orc-p2_ranged_bm-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-LongMultiTarget" value: { - dps: 755.87161 - tps: 876.52417 + dps: 743.63258 + tps: 868.66409 } } dps_results: { key: "TestBM-Phase2-Lvl40-Settings-Orc-p2_ranged_bm-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-LongSingleTarget" value: { - dps: 679.13926 - tps: 434.3789 + dps: 663.48981 + tps: 429.52804 } } dps_results: { key: "TestBM-Phase2-Lvl40-Settings-Orc-p2_ranged_bm-Basic-p2_ranged_bm-FullBuffs-P2-Consumes-ShortSingleTarget" value: { - dps: 735.1694 - tps: 472.21388 + dps: 670.01315 + tps: 446.06523 } } dps_results: { diff --git a/sim/hunter/TestMM.results b/sim/hunter/TestMM.results index f8ac32e82f..94f0c16868 100644 --- a/sim/hunter/TestMM.results +++ b/sim/hunter/TestMM.results @@ -218,85 +218,85 @@ dps_results: { dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Dwarf-p2_ranged_mm-Basic-p2_ranged_mm-FullBuffs-P2-Consumes-LongMultiTarget" value: { - dps: 640.20169 - tps: 630.49346 + dps: 758.20261 + tps: 931.51243 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Dwarf-p2_ranged_mm-Basic-p2_ranged_mm-FullBuffs-P2-Consumes-LongSingleTarget" value: { - dps: 579.45898 - tps: 442.4404 + dps: 654.86883 + tps: 526.85756 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Dwarf-p2_ranged_mm-Basic-p2_ranged_mm-FullBuffs-P2-Consumes-ShortSingleTarget" value: { - dps: 588.54519 - tps: 455.33108 + dps: 650.19803 + tps: 520.75452 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Dwarf-p2_ranged_mm-Basic-p2_ranged_mm-NoBuffs-P2-Consumes-LongMultiTarget" value: { - dps: 362.98056 - tps: 480.0866 + dps: 422.26075 + tps: 661.00298 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Dwarf-p2_ranged_mm-Basic-p2_ranged_mm-NoBuffs-P2-Consumes-LongSingleTarget" value: { - dps: 312.27787 - tps: 248.44106 + dps: 360.96617 + tps: 303.92172 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Dwarf-p2_ranged_mm-Basic-p2_ranged_mm-NoBuffs-P2-Consumes-ShortSingleTarget" value: { - dps: 330.25524 - tps: 263.22233 + dps: 377.5628 + tps: 311.28293 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Orc-p2_ranged_mm-Basic-p2_ranged_mm-FullBuffs-P2-Consumes-LongMultiTarget" value: { - dps: 644.99202 - tps: 635.88631 + dps: 762.87626 + tps: 935.56757 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Orc-p2_ranged_mm-Basic-p2_ranged_mm-FullBuffs-P2-Consumes-LongSingleTarget" value: { - dps: 584.25377 - tps: 441.74818 + dps: 658.83242 + tps: 525.79631 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Orc-p2_ranged_mm-Basic-p2_ranged_mm-FullBuffs-P2-Consumes-ShortSingleTarget" value: { - dps: 593.13101 - tps: 454.95486 + dps: 654.08271 + tps: 518.65939 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Orc-p2_ranged_mm-Basic-p2_ranged_mm-NoBuffs-P2-Consumes-LongMultiTarget" value: { - dps: 366.16267 - tps: 474.03882 + dps: 427.60071 + tps: 651.92758 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Orc-p2_ranged_mm-Basic-p2_ranged_mm-NoBuffs-P2-Consumes-LongSingleTarget" value: { - dps: 314.88425 - tps: 247.80312 + dps: 366.58411 + tps: 304.7192 } } dps_results: { key: "TestMM-Phase2-Lvl40-Settings-Orc-p2_ranged_mm-Basic-p2_ranged_mm-NoBuffs-P2-Consumes-ShortSingleTarget" value: { - dps: 332.39633 - tps: 261.52569 + dps: 381.17459 + tps: 310.85955 } } dps_results: { diff --git a/sim/hunter/TestSV.results b/sim/hunter/TestSV.results index 7a128dbc62..1094e8e912 100644 --- a/sim/hunter/TestSV.results +++ b/sim/hunter/TestSV.results @@ -198,7 +198,7 @@ stat_weights_results: { key: "TestSV-Phase4-Lvl60-StatWeights-Default" value: { weights: 0 - weights: 2.96835 + weights: 2.82757 weights: 0 weights: 0 weights: 0 @@ -214,9 +214,9 @@ stat_weights_results: { weights: 0 weights: 0 weights: 0 - weights: 0.39601 + weights: 0.39647 weights: 0 - weights: 20.54013 + weights: 21.21761 weights: 0 weights: 0 weights: 0 @@ -224,7 +224,7 @@ stat_weights_results: { weights: 0 weights: 0 weights: 0 - weights: 0.4384 + weights: 0.44379 weights: 0 weights: 0 weights: 0 @@ -407,17 +407,17 @@ dps_results: { dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-BeastmasterArmor" value: { - dps: 1052.50217 - tps: 827.28501 - hps: 14.05876 + dps: 1108.62529 + tps: 882.10353 + hps: 14.17231 } } dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-BloodGuard'sChain" value: { - dps: 1182.25899 - tps: 934.2052 - hps: 14.05876 + dps: 1244.72796 + tps: 992.53336 + hps: 14.17231 } } dps_results: { @@ -431,25 +431,25 @@ dps_results: { dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-DevilsaurEye-19991" value: { - dps: 3241.19065 - tps: 2856.5705 - hps: 20.21352 + dps: 3213.27592 + tps: 2825.17424 + hps: 20.4684 } } dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-DevilsaurTooth-19992" value: { - dps: 3214.92863 - tps: 2833.3991 - hps: 20.21352 + dps: 3187.12404 + tps: 2802.28393 + hps: 20.4684 } } dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-DreadHunter'sChain" value: { - dps: 1844.25977 - tps: 1580.53683 - hps: 15.28197 + dps: 1899.77808 + tps: 1636.85565 + hps: 15.34389 } } dps_results: { @@ -463,182 +463,182 @@ dps_results: { dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-Knight-Lieutenant'sChain" value: { - dps: 1182.25899 - tps: 934.2052 - hps: 14.05876 + dps: 1244.72796 + tps: 992.53336 + hps: 14.17231 } } dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-Maelstrom'sWrath-231320" value: { - dps: 3262.11155 - tps: 2882.01225 - hps: 19.89415 + dps: 3237.01395 + tps: 2852.87833 + hps: 20.15517 } } dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-SignetofBeasts-209823" value: { - dps: 3178.51567 - tps: 2802.96097 - hps: 20.28722 + dps: 3159.57977 + tps: 2784.51375 + hps: 20.7632 } } dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-ZandalarPredator'sBelt-231322" value: { - dps: 2911.18127 - tps: 2573.16375 - hps: 19.62477 + dps: 2886.18418 + tps: 2544.39142 + hps: 19.87223 } } dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-ZandalarPredator'sBracers-231323" value: { - dps: 3057.49786 - tps: 2691.23148 - hps: 19.62477 + dps: 3073.37628 + tps: 2703.58761 + hps: 19.87223 } } dps_results: { key: "TestSV-Phase4-Lvl60-AllItems-ZandalarPredator'sMantle-231321" value: { - dps: 3141.57793 - tps: 2776.03883 - hps: 19.62477 + dps: 3116.93138 + tps: 2747.51823 + hps: 19.87223 } } dps_results: { key: "TestSV-Phase4-Lvl60-Average-Default" value: { - dps: 3245.85267 - tps: 2862.63447 - hps: 19.97449 + dps: 3240.82233 + tps: 2856.97014 + hps: 20.17278 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Dwarf-p4_weave-Weave-p4_weave-FullBuffs-P4-Consumes-LongMultiTarget" value: { - dps: 4944.79446 - tps: 4960.56653 - hps: 20.1602 + dps: 4734.16901 + tps: 4772.50877 + hps: 20.73445 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Dwarf-p4_weave-Weave-p4_weave-FullBuffs-P4-Consumes-LongSingleTarget" value: { - dps: 2986.42493 - tps: 2611.68776 - hps: 20.22776 + dps: 2996.97928 + tps: 2628.77088 + hps: 20.62697 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Dwarf-p4_weave-Weave-p4_weave-FullBuffs-P4-Consumes-ShortSingleTarget" value: { - dps: 2986.23838 - tps: 2618.26971 - hps: 19.45383 + dps: 3041.22596 + tps: 2686.22531 + hps: 20.03729 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Dwarf-p4_weave-Weave-p4_weave-NoBuffs-P4-Consumes-LongMultiTarget" value: { - dps: 3318.44207 - tps: 3567.46733 - hps: 10.55617 + dps: 3306.01954 + tps: 3565.88718 + hps: 10.42193 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Dwarf-p4_weave-Weave-p4_weave-NoBuffs-P4-Consumes-LongSingleTarget" value: { - dps: 1500.39661 - tps: 1336.22272 - hps: 10.37596 + dps: 1517.98161 + tps: 1353.69711 + hps: 10.30148 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Dwarf-p4_weave-Weave-p4_weave-NoBuffs-P4-Consumes-ShortSingleTarget" value: { - dps: 1508.55008 - tps: 1326.72925 - hps: 10.66558 + dps: 1510.76821 + tps: 1328.81466 + hps: 10.61961 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Orc-p4_weave-Weave-p4_weave-FullBuffs-P4-Consumes-LongMultiTarget" value: { - dps: 5229.66353 - tps: 5227.73017 - hps: 20.20319 + dps: 5047.14236 + tps: 5076.96859 + hps: 20.44579 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Orc-p4_weave-Weave-p4_weave-FullBuffs-P4-Consumes-LongSingleTarget" value: { - dps: 3162.41039 - tps: 2777.25348 - hps: 20.22469 + dps: 3228.49257 + tps: 2840.30554 + hps: 20.51335 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Orc-p4_weave-Weave-p4_weave-FullBuffs-P4-Consumes-ShortSingleTarget" value: { - dps: 3225.74417 - tps: 2849.98451 - hps: 19.02391 + dps: 3292.64028 + tps: 2933.649 + hps: 19.28493 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Orc-p4_weave-Weave-p4_weave-NoBuffs-P4-Consumes-LongMultiTarget" value: { - dps: 3311.53884 - tps: 3556.98708 - hps: 10.37596 + dps: 3296.14027 + tps: 3549.76953 + hps: 10.54881 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Orc-p4_weave-Weave-p4_weave-NoBuffs-P4-Consumes-LongSingleTarget" value: { - dps: 1502.57872 - tps: 1337.49305 - hps: 10.37688 + dps: 1511.87796 + tps: 1345.95201 + hps: 10.37136 } } dps_results: { key: "TestSV-Phase4-Lvl60-Settings-Orc-p4_weave-Weave-p4_weave-NoBuffs-P4-Consumes-ShortSingleTarget" value: { - dps: 1543.23597 - tps: 1360.60771 + dps: 1545.37175 + tps: 1362.50325 hps: 10.57364 } } dps_results: { key: "TestSV-Phase4-Lvl60-SwitchInFrontOfTarget-Default" value: { - dps: 3019.2061 - tps: 2719.86715 - hps: 19.59929 + dps: 3012.04121 + tps: 2700.04616 + hps: 19.89102 } } dps_results: { key: "TestSV-Phase5-Lvl60-AllItems-BeastmasterArmor" value: { - dps: 1174.82316 - tps: 953.33813 + dps: 1176.83581 + tps: 955.63333 } } dps_results: { key: "TestSV-Phase5-Lvl60-AllItems-BloodGuard'sChain" value: { - dps: 1348.32064 - tps: 1034.76059 + dps: 1350.98456 + tps: 1037.4956 } } dps_results: { key: "TestSV-Phase5-Lvl60-AllItems-BloodlashBow-216516" value: { - dps: 3730.09278 - tps: 3054.85594 + dps: 3803.3957 + tps: 3150.24938 } } dps_results: { @@ -665,15 +665,15 @@ dps_results: { dps_results: { key: "TestSV-Phase5-Lvl60-AllItems-GurubashiPitFighter'sBow-221450" value: { - dps: 3766.69794 - tps: 3088.4234 + dps: 3840.51351 + tps: 3184.38884 } } dps_results: { key: "TestSV-Phase5-Lvl60-AllItems-Knight-Lieutenant'sChain" value: { - dps: 1348.32064 - tps: 1034.76059 + dps: 1350.98456 + tps: 1037.4956 } } dps_results: { diff --git a/sim/hunter/aimed_shot.go b/sim/hunter/aimed_shot.go index fdfe5fede0..7343f1c22e 100644 --- a/sim/hunter/aimed_shot.go +++ b/sim/hunter/aimed_shot.go @@ -37,8 +37,9 @@ func (hunter *Hunter) getAimedShotConfig(rank int, timer *core.Timer) core.Spell Timer: timer, Duration: time.Second * 6, }, - ModifyCast: func(_ *core.Simulation, spell *core.Spell, cast *core.Cast) { + ModifyCast: func(sim *core.Simulation, spell *core.Spell, cast *core.Cast) { cast.CastTime = spell.CastTime() + hunter.AutoAttacks.CancelAutoSwing(sim) }, IgnoreHaste: true, // Hunter GCD is locked at 1.5s CastTime: func(spell *core.Spell) time.Duration { @@ -62,8 +63,10 @@ func (hunter *Hunter) getAimedShotConfig(rank int, timer *core.Timer) core.Spell baseDamage := hunter.AutoAttacks.Ranged().CalculateNormalizedWeaponDamage(sim, spell.RangedAttackPower(target, false)) + hunter.AmmoDamageBonus + baseDamage - result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeRangedHitAndCrit) + + hunter.AutoAttacks.EnableAutoSwing(sim) + spell.WaitTravelTime(sim, func(s *core.Simulation) { spell.DealDamage(sim, result) }) diff --git a/sim/hunter/multi_shot.go b/sim/hunter/multi_shot.go index 9a3baf1193..d758cf718f 100644 --- a/sim/hunter/multi_shot.go +++ b/sim/hunter/multi_shot.go @@ -38,8 +38,9 @@ func (hunter *Hunter) getMultiShotConfig(rank int, timer *core.Timer) core.Spell GCD: core.GCDDefault, CastTime: time.Millisecond * 500, }, - ModifyCast: func(_ *core.Simulation, spell *core.Spell, cast *core.Cast) { + ModifyCast: func(sim *core.Simulation, spell *core.Spell, cast *core.Cast) { cast.CastTime = spell.CastTime() + hunter.AutoAttacks.CancelAutoSwing(sim) }, IgnoreHaste: true, // Hunter GCD is locked at 1.5s CD: core.Cooldown{ @@ -71,6 +72,8 @@ func (hunter *Hunter) getMultiShotConfig(rank int, timer *core.Timer) core.Spell target = sim.Environment.NextTargetUnit(target) } + hunter.AutoAttacks.EnableAutoSwing(sim) + spell.WaitTravelTime(sim, func(s *core.Simulation) { for _, result := range results { spell.DealDamage(sim, result)