diff --git a/sim/core/flags.go b/sim/core/flags.go index 780577640e..55e93199ca 100644 --- a/sim/core/flags.go +++ b/sim/core/flags.go @@ -81,25 +81,12 @@ const ( ProcMaskDirect = ProcMaskMelee | ProcMaskRanged | ProcMaskSpellDamage - ProcMaskTwoRoll = ProcMaskRanged | ProcMaskMeleeSpecial - ProcMaskSpecial = ProcMaskMeleeOrRangedSpecial | ProcMaskSpellDamage ProcMaskMeleeOrProc = ProcMaskMelee | ProcMaskProc ProcMaskSpellOrProc = ProcMaskSpellDamage | ProcMaskProc ) -func GetMeleeProcMaskForHands(mh bool, oh bool) ProcMask { - mask := ProcMaskUnknown - if mh { - mask |= ProcMaskMeleeMH - } - if oh { - mask |= ProcMaskMeleeOH - } - return mask -} - // Possible outcomes of any hit/damage roll. type HitOutcome uint16 diff --git a/sim/shaman/elemental/elemental.go b/sim/shaman/elemental/elemental.go index 5583d828bc..50c60e5c8e 100644 --- a/sim/shaman/elemental/elemental.go +++ b/sim/shaman/elemental/elemental.go @@ -55,12 +55,12 @@ func NewElementalShaman(character core.Character, options *proto.Player) *Elemen } ele.EnableResumeAfterManaWait(ele.tryUseGCD) - if ele.HasMHWeapon() { - ele.ApplyFlametongueImbueToItem(ele.GetMHWeapon(), false) + if mh := ele.GetMHWeapon(); mh != nil { + ele.ApplyFlametongueImbueToItem(mh, false) } - if ele.HasOHWeapon() { - ele.ApplyFlametongueImbueToItem(ele.GetOHWeapon(), false) + if oh := ele.GetOHWeapon(); oh != nil { + ele.ApplyFlametongueImbueToItem(oh, false) } if ele.Talents.FeralSpirit { diff --git a/sim/shaman/enhancement/enhancement.go b/sim/shaman/enhancement/enhancement.go index 5f5fd4e7c3..4f0e6ef119 100644 --- a/sim/shaman/enhancement/enhancement.go +++ b/sim/shaman/enhancement/enhancement.go @@ -79,15 +79,10 @@ func NewEnhancementShaman(character core.Character, options *proto.Player) *Enha enh.SelfBuffs.ImbueOH = proto.ShamanImbue_NoImbue } - enh.RegisterFlametongueImbue( - enh.SelfBuffs.ImbueMH == proto.ShamanImbue_FlametongueWeapon, - enh.SelfBuffs.ImbueOH == proto.ShamanImbue_FlametongueWeapon) - enh.RegisterFlametongueDownrankImbue( - enh.SelfBuffs.ImbueMH == proto.ShamanImbue_FlametongueWeaponDownrank, - enh.SelfBuffs.ImbueOH == proto.ShamanImbue_FlametongueWeaponDownrank) - enh.RegisterWindfuryImbue( - enh.SelfBuffs.ImbueMH == proto.ShamanImbue_WindfuryWeapon, - enh.SelfBuffs.ImbueOH == proto.ShamanImbue_WindfuryWeapon) + enh.RegisterFlametongueImbue(enh.getImbueProcMask(proto.ShamanImbue_FlametongueWeapon), false) + enh.RegisterFlametongueImbue(enh.getImbueProcMask(proto.ShamanImbue_FlametongueWeaponDownrank), true) + enh.RegisterWindfuryImbue(enh.getImbueProcMask(proto.ShamanImbue_WindfuryWeapon)) + enh.RegisterFrostbrandImbue(enh.getImbueProcMask(proto.ShamanImbue_FrostbrandWeapon)) enh.SpiritWolves = &shaman.SpiritWolves{ SpiritWolf1: enh.NewSpiritWolf(1), @@ -99,6 +94,17 @@ func NewEnhancementShaman(character core.Character, options *proto.Player) *Enha return enh } +func (enh *EnhancementShaman) getImbueProcMask(imbue proto.ShamanImbue) core.ProcMask { + var mask core.ProcMask + if enh.SelfBuffs.ImbueMH == imbue { + mask |= core.ProcMaskMeleeMH + } + if enh.SelfBuffs.ImbueOH == imbue { + mask |= core.ProcMaskMeleeOH + } + return mask +} + type EnhancementShaman struct { *shaman.Shaman @@ -115,10 +121,6 @@ func (enh *EnhancementShaman) GetShaman() *shaman.Shaman { func (enh *EnhancementShaman) Initialize() { enh.Shaman.Initialize() - enh.RegisterFrostbrandImbue( - enh.SelfBuffs.ImbueMH == proto.ShamanImbue_FrostbrandWeapon, - enh.SelfBuffs.ImbueOH == proto.ShamanImbue_FrostbrandWeapon) - if enh.ItemSwap.IsEnabled() { mh := enh.ItemSwap.GetItem(proto.ItemSlot_ItemSlotMainHand) enh.ApplyFlametongueImbueToItem(mh, true) diff --git a/sim/shaman/restoration/TestRestoration.results b/sim/shaman/restoration/TestRestoration.results index 976a1aa7b2..f2fdf00cd1 100644 --- a/sim/shaman/restoration/TestRestoration.results +++ b/sim/shaman/restoration/TestRestoration.results @@ -46,953 +46,953 @@ character_stats_results: { dps_results: { key: "TestRestoration-AllItems-Althor'sAbacus-50359" value: { - tps: 56.59391 - hps: 3960.70062 + tps: 56.07985 + hps: 3754.27922 } } dps_results: { key: "TestRestoration-AllItems-Althor'sAbacus-50366" value: { - tps: 56.59391 - hps: 3997.41648 + tps: 56.07985 + hps: 3788.48026 } } dps_results: { key: "TestRestoration-AllItems-AustereEarthsiegeDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-Bandit'sInsignia-40371" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-BaubleofTrueBlood-50354" value: { - tps: 56.31578 - hps: 3757.41451 + tps: 55.83375 + hps: 3564.89099 } } dps_results: { key: "TestRestoration-AllItems-BaubleofTrueBlood-50726" value: { - tps: 56.31578 - hps: 3757.41451 + tps: 55.83375 + hps: 3564.89099 } } dps_results: { key: "TestRestoration-AllItems-BeamingEarthsiegeDiamond" value: { tps: 53.89479 - hps: 3676.36381 + hps: 3493.14559 } } dps_results: { key: "TestRestoration-AllItems-Beast-tamer'sShoulders-30892" value: { - tps: 58.16727 - hps: 3514.36496 + tps: 57.51218 + hps: 3321.3201 } } dps_results: { key: "TestRestoration-AllItems-Bizuri'sTotemofShatteredIce-50458" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-BlackBruise-50035" value: { - tps: 59.16145 - hps: 3252.88662 + tps: 58.71145 + hps: 3083.05622 } } dps_results: { key: "TestRestoration-AllItems-BlackBruise-50692" value: { - tps: 59.16145 - hps: 3252.88662 + tps: 58.71145 + hps: 3083.05622 } } dps_results: { key: "TestRestoration-AllItems-BlessedGarboftheUndeadSlayer" value: { - tps: 52.32877 - hps: 2865.22549 + tps: 52.02877 + hps: 2688.54081 } } dps_results: { key: "TestRestoration-AllItems-BlessedRegaliaofUndeadCleansing" value: { - tps: 52.92434 - hps: 2995.51001 + tps: 52.4401 + hps: 2804.98043 } } dps_results: { key: "TestRestoration-AllItems-BracingEarthsiegeDiamond" value: { tps: 52.95176 - hps: 3639.10082 + hps: 3451.57899 } } dps_results: { key: "TestRestoration-AllItems-Bryntroll,theBoneArbiter-50415" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-Bryntroll,theBoneArbiter-50709" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-ChaoticSkyflareDiamond" value: { tps: 53.15684 - hps: 3633.10175 + hps: 3447.64906 } } dps_results: { key: "TestRestoration-AllItems-CorpseTongueCoin-50349" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-CorpseTongueCoin-50352" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-CorrodedSkeletonKey-50356" value: { - tps: 56.74391 - hps: 3746.60818 + tps: 55.99781 + hps: 3546.06576 } } dps_results: { key: "TestRestoration-AllItems-DarkmoonCard:Berserker!-42989" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-DarkmoonCard:Death-42990" value: { - tps: 57.23611 - hps: 3724.89149 + tps: 56.8451 + hps: 3534.98338 } } dps_results: { key: "TestRestoration-AllItems-DarkmoonCard:Greatness-44255" value: { - tps: 60.94341 - hps: 3966.63411 + tps: 60.31137 + hps: 3774.13794 } } dps_results: { key: "TestRestoration-AllItems-DeadlyGladiator'sTotemofSurvival-42602" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-Death'sChoice-47464" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-DeathKnight'sAnguish-38212" value: { - tps: 56.949 - hps: 3697.0938 + tps: 56.24391 + hps: 3502.07884 } } dps_results: { key: "TestRestoration-AllItems-Deathbringer'sWill-50362" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-Deathbringer'sWill-50363" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-Defender'sCode-40257" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-DestructiveSkyflareDiamond" value: { tps: 53.19786 - hps: 3633.96889 + hps: 3448.51619 } } dps_results: { key: "TestRestoration-AllItems-DislodgedForeignObject-50348" value: { - tps: 56.66188 - hps: 3683.71737 + tps: 56.04781 + hps: 3484.38943 } } dps_results: { key: "TestRestoration-AllItems-DislodgedForeignObject-50353" value: { - tps: 56.66188 - hps: 3683.44193 + tps: 55.99781 + hps: 3484.11398 } } dps_results: { key: "TestRestoration-AllItems-EarthshatterBattlegear" value: { tps: 48.8553 - hps: 2785.7267 + hps: 2621.59543 } } dps_results: { key: "TestRestoration-AllItems-EarthshatterGarb" value: { tps: 52.28018 - hps: 3302.94497 + hps: 3122.88007 } } dps_results: { key: "TestRestoration-AllItems-EffulgentSkyflareDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-EmberSkyflareDiamond" value: { tps: 53.63194 - hps: 3683.19394 + hps: 3496.80238 } } dps_results: { key: "TestRestoration-AllItems-EnigmaticSkyflareDiamond" value: { tps: 53.15684 - hps: 3633.10175 + hps: 3447.64906 } } dps_results: { key: "TestRestoration-AllItems-EnigmaticStarflareDiamond" value: { tps: 53.15684 - hps: 3633.10175 + hps: 3447.64906 } } dps_results: { key: "TestRestoration-AllItems-EphemeralSnowflake-50260" value: { - tps: 60.90708 - hps: 3769.18592 + tps: 60.20221 + hps: 3576.44936 } } dps_results: { key: "TestRestoration-AllItems-EssenceofGossamer-37220" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-EternalEarthsiegeDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-ExtractofNecromanticPower-40373" value: { - tps: 57.4412 - hps: 3733.44955 + tps: 57.05018 + hps: 3542.90956 } } dps_results: { key: "TestRestoration-AllItems-EyeoftheBroodmother-45308" value: { - tps: 57.40018 - hps: 3826.22233 + tps: 57.00916 + hps: 3630.87664 } } dps_results: { key: "TestRestoration-AllItems-Figurine-SapphireOwl-42413" value: { - tps: 62.67911 - hps: 3861.67796 + tps: 62.12911 + hps: 3672.81318 } } dps_results: { key: "TestRestoration-AllItems-ForethoughtTalisman-40258" value: { - tps: 56.74391 - hps: 3811.87195 + tps: 55.99781 + hps: 3606.74796 } } dps_results: { key: "TestRestoration-AllItems-ForgeEmber-37660" value: { - tps: 57.1951 - hps: 3719.75268 + tps: 56.71306 + hps: 3527.83717 } } dps_results: { key: "TestRestoration-AllItems-ForlornSkyflareDiamond" value: { tps: 52.95176 - hps: 3639.10082 + hps: 3451.57899 } } dps_results: { key: "TestRestoration-AllItems-ForlornStarflareDiamond" value: { tps: 52.95176 - hps: 3635.58852 + hps: 3448.25707 } } dps_results: { key: "TestRestoration-AllItems-FrostWitch'sBattlegear" value: { tps: 54.18965 - hps: 3092.53263 + hps: 2939.14468 } } dps_results: { key: "TestRestoration-AllItems-FrostWitch'sRegalia" value: { tps: 60.07309 - hps: 3912.22005 + hps: 3726.4535 } } dps_results: { key: "TestRestoration-AllItems-FuriousGladiator'sTotemofSurvival-42603" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-FuryoftheFiveFlights-40431" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-FuturesightRune-38763" value: { - tps: 56.74391 - hps: 3727.47799 + tps: 55.99781 + hps: 3524.37649 } } dps_results: { key: "TestRestoration-AllItems-Gladiator'sEarthshaker" value: { tps: 56.62679 - hps: 3220.79317 + hps: 3064.48559 } } dps_results: { key: "TestRestoration-AllItems-Gladiator'sWartide" value: { tps: 51.4736 - hps: 3535.96372 + hps: 3343.91022 } } dps_results: { key: "TestRestoration-AllItems-GlowingTwilightScale-54573" value: { - tps: 56.74391 - hps: 3874.69912 + tps: 55.99781 + hps: 3666.13636 } } dps_results: { key: "TestRestoration-AllItems-GlowingTwilightScale-54589" value: { - tps: 56.74391 - hps: 3899.84512 + tps: 55.99781 + hps: 3690.22747 } } dps_results: { key: "TestRestoration-AllItems-GnomishLightningGenerator-41121" value: { - tps: 57.23611 - dtps: 26.96036 - hps: 3724.22095 + tps: 56.8451 + dtps: 26.98835 + hps: 3534.24269 } } dps_results: { key: "TestRestoration-AllItems-HatefulGladiator'sTotemofSurvival-42601" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-Heartpierce-49982" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-Heartpierce-50641" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-ImpassiveSkyflareDiamond" value: { tps: 53.15684 - hps: 3633.10175 + hps: 3447.64906 } } dps_results: { key: "TestRestoration-AllItems-ImpassiveStarflareDiamond" value: { tps: 53.15684 - hps: 3633.10175 + hps: 3447.64906 } } dps_results: { key: "TestRestoration-AllItems-IncisorFragment-37723" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-InsightfulEarthsiegeDiamond" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-InvigoratingEarthsiegeDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-Lavanthor'sTalisman-37872" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-MajesticDragonFigurine-40430" value: { - tps: 56.74391 - hps: 3685.13031 + tps: 55.9568 + hps: 3480.2829 } } dps_results: { key: "TestRestoration-AllItems-MeteoriteWhetstone-37390" value: { - tps: 57.1951 - hps: 3719.75268 + tps: 56.71306 + hps: 3527.83717 } } dps_results: { key: "TestRestoration-AllItems-NevermeltingIceCrystal-50259" value: { - tps: 58.60763 - hps: 3884.71841 + tps: 58.05763 + hps: 3690.28595 } } dps_results: { key: "TestRestoration-AllItems-OfferingofSacrifice-37638" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-PersistentEarthshatterDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-PersistentEarthsiegeDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-PetrifiedScarab-21685" value: { - tps: 56.74391 - hps: 3681.5064 + tps: 56.04781 + hps: 3481.51487 } } dps_results: { key: "TestRestoration-AllItems-PetrifiedTwilightScale-54571" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-PetrifiedTwilightScale-54591" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-PowerfulEarthshatterDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-PowerfulEarthsiegeDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-PurifiedShardoftheGods" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-ReignoftheDead-47316" value: { - tps: 56.74391 - hps: 3791.16418 + tps: 55.99781 + hps: 3584.43044 } } dps_results: { key: "TestRestoration-AllItems-ReignoftheDead-47477" value: { - tps: 56.74391 - hps: 3804.1909 + tps: 55.99781 + hps: 3596.71421 } } dps_results: { key: "TestRestoration-AllItems-RelentlessEarthsiegeDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-RelentlessGladiator'sTotemofSurvival-42604" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-RevitalizingSkyflareDiamond" value: { tps: 53.11582 - hps: 3700.97588 + hps: 3515.8025 } } dps_results: { key: "TestRestoration-AllItems-RuneofRepulsion-40372" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-SavageGladiator'sTotemofSurvival-42594" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-SealofthePantheon-36993" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-Shadowmourne-49623" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-ShinyShardoftheGods" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-Sindragosa'sFlawlessFang-50361" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-SkycallTotem-33506" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-SkyshatterHarness" value: { tps: 40.1362 - hps: 2230.65969 + hps: 2069.19609 } } dps_results: { key: "TestRestoration-AllItems-SkyshatterRegalia" value: { tps: 44.41819 - hps: 2748.17717 + hps: 2566.14808 } } dps_results: { key: "TestRestoration-AllItems-SliverofPureIce-50339" value: { - tps: 65.18585 - hps: 3973.30795 + tps: 64.55381 + hps: 3781.06452 } } dps_results: { key: "TestRestoration-AllItems-SliverofPureIce-50346" value: { - tps: 65.8602 - hps: 4005.06138 + tps: 65.27816 + hps: 3808.00839 } } dps_results: { key: "TestRestoration-AllItems-SouloftheDead-40382" value: { - tps: 65.14919 - hps: 3893.91295 + tps: 64.55818 + hps: 3705.53997 } } dps_results: { key: "TestRestoration-AllItems-SparkofLife-37657" value: { - tps: 57.42713 - hps: 3803.51297 + tps: 56.80408 + hps: 3612.8513 } } dps_results: { key: "TestRestoration-AllItems-SphereofRedDragon'sBlood-37166" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-Stonebreaker'sTotem-33507" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-StormshroudArmor" value: { - tps: 49.01177 - hps: 2693.71012 + tps: 48.65737 + hps: 2513.73977 } } dps_results: { key: "TestRestoration-AllItems-SwiftSkyflareDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-SwiftStarflareDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-SwiftWindfireDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-TalismanofTrollDivinity-37734" value: { - tps: 56.74391 - hps: 3683.43451 + tps: 55.9568 + hps: 3479.138 } } dps_results: { key: "TestRestoration-AllItems-TearsoftheVanquished-47215" value: { - tps: 65.47264 - hps: 3978.60047 + tps: 65.02329 + hps: 3800.73212 } } dps_results: { key: "TestRestoration-AllItems-TheFistsofFury" value: { - tps: 56.10578 - hps: 3132.94344 + tps: 56.33782 + hps: 2984.10587 } } dps_results: { key: "TestRestoration-AllItems-TheGeneral'sHeart-45507" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-Thrall'sBattlegear" value: { tps: 52.38097 - hps: 2991.54543 + hps: 2828.80139 } } dps_results: { key: "TestRestoration-AllItems-Thrall'sRegalia" value: { tps: 54.2367 - hps: 3458.09991 + hps: 3278.22595 } } dps_results: { key: "TestRestoration-AllItems-ThunderingSkyflareDiamond" value: { tps: 52.95176 - hps: 3621.53931 + hps: 3434.96938 } } dps_results: { key: "TestRestoration-AllItems-TidefuryRaiment" value: { tps: 42.98929 - hps: 2627.41433 + hps: 2453.94406 } } dps_results: { key: "TestRestoration-AllItems-TinyAbominationinaJar-50351" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-TinyAbominationinaJar-50706" value: { - tps: 56.74391 - hps: 3682.60818 + tps: 55.99781 + hps: 3482.06576 } } dps_results: { key: "TestRestoration-AllItems-TirelessSkyflareDiamond" value: { tps: 52.95176 - hps: 3639.10082 + hps: 3451.57899 } } dps_results: { key: "TestRestoration-AllItems-TirelessStarflareDiamond" value: { tps: 52.95176 - hps: 3635.58852 + hps: 3448.25707 } } dps_results: { key: "TestRestoration-AllItems-TomeofArcanePhenomena-36972" value: { - tps: 56.74391 - hps: 3731.92651 + tps: 55.99781 + hps: 3530.12275 } } dps_results: { key: "TestRestoration-AllItems-TotemofElectrifyingWind-47666" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-TotemofQuakingEarth-47667" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-TotemoftheAvalanche-50463" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-TotemoftheElementalPlane-40708" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-AllItems-TrenchantEarthshatterDiamond" value: { tps: 52.95176 - hps: 3635.58852 + hps: 3448.25707 } } dps_results: { key: "TestRestoration-AllItems-TrenchantEarthsiegeDiamond" value: { tps: 52.95176 - hps: 3639.10082 + hps: 3451.57899 } } dps_results: { key: "TestRestoration-AllItems-UndeadSlayer'sBlessedArmor" value: { - tps: 48.46585 - hps: 2671.77261 + tps: 48.17483 + hps: 2494.38897 } } dps_results: { key: "TestRestoration-AllItems-Val'anyr,HammerofAncientKings-46017" value: { - tps: 62.40215 - hps: 4120.36857 + tps: 61.91113 + hps: 3912.25902 } } dps_results: { key: "TestRestoration-AllItems-WingedTalisman-37844" value: { - tps: 56.74391 - hps: 3730.35025 + tps: 55.99781 + hps: 3527.99446 } } dps_results: { key: "TestRestoration-AllItems-WorldbreakerBattlegear" value: { tps: 50.25305 - hps: 2865.10293 + hps: 2702.39368 } } dps_results: { key: "TestRestoration-AllItems-WorldbreakerGarb" value: { tps: 54.74915 - hps: 3500.30548 + hps: 3319.24504 } } dps_results: { key: "TestRestoration-AllItems-WrathfulGladiator'sTotemofSurvival-51513" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-Average-Default" value: { - tps: 62.9255 - hps: 3900.09959 + tps: 62.37614 + hps: 3708.36073 } } dps_results: { key: "TestRestoration-Settings-Troll-P1-Standard-FullBuffs-LongMultiTarget" value: { - tps: 1230.46051 - hps: 3833.42196 + tps: 1219.91141 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-Settings-Troll-P1-Standard-FullBuffs-LongSingleTarget" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } dps_results: { key: "TestRestoration-Settings-Troll-P1-Standard-FullBuffs-ShortSingleTarget" value: { - tps: 182.46109 - hps: 6584.10737 + tps: 181.21109 + hps: 6507.22714 } } dps_results: { key: "TestRestoration-Settings-Troll-P1-Standard-NoBuffs-LongMultiTarget" value: { - tps: 621.81075 - hps: 2141.61554 + tps: 611.81075 + hps: 1961.12664 } } dps_results: { key: "TestRestoration-Settings-Troll-P1-Standard-NoBuffs-LongSingleTarget" value: { - tps: 31.09054 - hps: 2141.61554 + tps: 30.59054 + hps: 1961.12664 } } dps_results: { key: "TestRestoration-Settings-Troll-P1-Standard-NoBuffs-ShortSingleTarget" value: { - tps: 119.37665 - hps: 5503.32882 + tps: 118.12665 + hps: 5429.84121 } } dps_results: { key: "TestRestoration-SwitchInFrontOfTarget-Default" value: { - tps: 61.52303 - hps: 3833.42196 + tps: 60.99557 + hps: 3639.46075 } } diff --git a/sim/shaman/restoration/restoration.go b/sim/shaman/restoration/restoration.go index 709d4b2f73..0db14fbf8d 100644 --- a/sim/shaman/restoration/restoration.go +++ b/sim/shaman/restoration/restoration.go @@ -50,10 +50,10 @@ func NewRestorationShaman(character core.Character, options *proto.Player) *Rest resto.EnableResumeAfterManaWait(resto.tryUseGCD) if resto.HasMHWeapon() { - resto.ApplyEarthlivingImbueToItem(resto.GetMHWeapon(), false) + resto.ApplyEarthlivingImbueToItem(resto.GetMHWeapon()) } if resto.HasOHWeapon() { - resto.ApplyEarthlivingImbueToItem(resto.GetOHWeapon(), false) + resto.ApplyEarthlivingImbueToItem(resto.GetOHWeapon()) } return resto @@ -89,10 +89,14 @@ func (resto *RestorationShaman) Initialize() { resto.CurrentTarget = resto.GetMainTarget() // Has to be here because earthliving can cast hots and needs Env to be set to create the hots. - resto.RegisterEarthlivingImbue( - resto.HasMHWeapon(), - resto.HasOHWeapon(), - ) + procMask := core.ProcMaskUnknown + if resto.HasMHWeapon() { + procMask |= core.ProcMaskMeleeMH + } + if resto.HasOHWeapon() { + procMask |= core.ProcMaskMeleeOH + } + resto.RegisterEarthlivingImbue(procMask) resto.Shaman.Initialize() resto.Shaman.RegisterHealingSpells() diff --git a/sim/shaman/weapon_imbues.go b/sim/shaman/weapon_imbues.go index 06f81897c7..98b11819c0 100644 --- a/sim/shaman/weapon_imbues.go +++ b/sim/shaman/weapon_imbues.go @@ -74,36 +74,34 @@ func (shaman *Shaman) newWindfuryImbueSpell(isMH bool) *core.Spell { return shaman.RegisterSpell(spellConfig) } -func (shaman *Shaman) RegisterWindfuryImbue(mh bool, oh bool) { - if !mh && !oh { +func (shaman *Shaman) RegisterWindfuryImbue(procMask core.ProcMask) { + if procMask == core.ProcMaskUnknown { return } + if procMask.Matches(core.ProcMaskMeleeMH) { + shaman.MainHand().TempEnchant = 3787 + } + if procMask.Matches(core.ProcMaskMeleeOH) { + shaman.OffHand().TempEnchant = 3787 + } + var proc = 0.2 - if mh && oh { + if procMask == core.ProcMaskMelee { proc = 0.36 } if shaman.HasMajorGlyph(proto.ShamanMajorGlyph_GlyphOfWindfuryWeapon) { proc += 0.02 //TODO: confirm how this actually works } - mhSpell := shaman.newWindfuryImbueSpell(true) - ohSpell := shaman.newWindfuryImbueSpell(false) - icd := core.Cooldown{ Timer: shaman.NewTimer(), Duration: time.Second * 3, } - if mh { - shaman.MainHand().TempEnchant = 3787 - } - - if oh { - shaman.OffHand().TempEnchant = 3787 - } + mhSpell := shaman.newWindfuryImbueSpell(true) + ohSpell := shaman.newWindfuryImbueSpell(false) - procMask := core.GetMeleeProcMaskForHands(mh, oh) aura := shaman.RegisterAura(core.Aura{ Label: "Windfury Imbue", Duration: core.NeverExpires, @@ -134,9 +132,16 @@ func (shaman *Shaman) RegisterWindfuryImbue(mh bool, oh bool) { shaman.RegisterOnItemSwapWithImbue(3787, &procMask, aura) } -func (shaman *Shaman) newFlametongueImbueSpell(isMH bool) *core.Spell { +func (shaman *Shaman) newFlametongueImbueSpell(weapon *core.Item, isDownranked bool) *core.Spell { + spellID := 58790 + baseDamage := 68.5 + if isDownranked { + spellID = 58789 + baseDamage = 64 + } + return shaman.RegisterSpell(core.SpellConfig{ - ActionID: core.ActionID{SpellID: 58790}, + ActionID: core.ActionID{SpellID: int32(spellID)}, SpellSchool: core.SpellSchoolFire, ProcMask: core.ProcMaskWeaponProc, Flags: core.SpellFlagNoOnCastComplete, @@ -147,16 +152,10 @@ func (shaman *Shaman) newFlametongueImbueSpell(isMH bool) *core.Spell { ThreatMultiplier: 1, ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { - weapon := core.Ternary(isMH, shaman.GetMHWeapon(), shaman.GetOHWeapon()) - - var damage float64 - if weapon != nil { - baseDamage := weapon.SwingSpeed * 68.5 - spellCoeff := 0.1 * weapon.SwingSpeed / 2.6 - damage = baseDamage + spellCoeff*spell.SpellPower() + if weapon.SwingSpeed != 0 { + damage := weapon.SwingSpeed * (baseDamage + 0.1/2.6*spell.SpellPower()) + spell.CalcAndDealDamage(sim, target, damage, spell.OutcomeMagicHitAndCrit) } - - spell.CalcAndDealDamage(sim, target, damage, spell.OutcomeMagicHitAndCrit) }, }) } @@ -167,120 +166,52 @@ func (shaman *Shaman) ApplyFlametongueImbueToItem(item *core.Item, isDownranked } spBonus := 211.0 - spMod := 1.0 + 0.1*float64(shaman.Talents.ElementalWeapons) - id := 3781 + enchantID := 3781 if isDownranked { spBonus = 186.0 - id = 3780 + enchantID = 3780 } + spMod := 1.0 + 0.1*float64(shaman.Talents.ElementalWeapons) + newStats := stats.Stats{stats.SpellPower: spBonus * spMod} if shaman.HasMajorGlyph(proto.ShamanMajorGlyph_GlyphOfFlametongueWeapon) { newStats = newStats.Add(stats.Stats{stats.SpellCrit: 2 * core.CritRatingPerCritChance}) } item.Stats = item.Stats.Add(newStats) - item.TempEnchant = int32(id) + item.TempEnchant = int32(enchantID) } -func (shaman *Shaman) RegisterFlametongueImbue(mh bool, oh bool) { - if !mh && !oh && !shaman.ItemSwap.IsEnabled() { +func (shaman *Shaman) RegisterFlametongueImbue(procMask core.ProcMask, isDownranked bool) { + if procMask == core.ProcMaskUnknown && !shaman.ItemSwap.IsEnabled() { return } - if mh { - shaman.ApplyFlametongueImbueToItem(shaman.GetMHWeapon(), false) + if procMask.Matches(core.ProcMaskMeleeMH) { + shaman.ApplyFlametongueImbueToItem(shaman.MainHand(), isDownranked) } - if oh { - shaman.ApplyFlametongueImbueToItem(shaman.GetOHWeapon(), false) + if procMask.Matches(core.ProcMaskMeleeOH) { + shaman.ApplyFlametongueImbueToItem(shaman.OffHand(), isDownranked) } - ftIcd := core.Cooldown{ + icd := core.Cooldown{ Timer: shaman.NewTimer(), Duration: time.Millisecond, } - mhSpell := shaman.newFlametongueImbueSpell(true) - ohSpell := shaman.newFlametongueImbueSpell(false) - - procMask := core.GetMeleeProcMaskForHands(mh, oh) - aura := shaman.RegisterAura(core.Aura{ - Label: "Flametongue Imbue", - Duration: core.NeverExpires, - OnReset: func(aura *core.Aura, sim *core.Simulation) { - aura.Activate(sim) - }, - OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { - if !result.Landed() || !spell.ProcMask.Matches(procMask) { - return - } - - if !ftIcd.IsReady(sim) { - return - } - - ftIcd.Use(sim) - - if spell.IsMH() { - mhSpell.Cast(sim, result.Target) - } else { - ohSpell.Cast(sim, result.Target) - } - }, - }) - - shaman.RegisterOnItemSwapWithImbue(3781, &procMask, aura) -} - -func (shaman *Shaman) newFlametongueDownrankImbueSpell(isMH bool) *core.Spell { - return shaman.RegisterSpell(core.SpellConfig{ - ActionID: core.ActionID{SpellID: 58789}, - SpellSchool: core.SpellSchoolFire, - ProcMask: core.ProcMaskWeaponProc, - Flags: core.SpellFlagNoOnCastComplete, - - BonusHitRating: float64(shaman.Talents.ElementalPrecision) * core.SpellHitRatingPerHitChance, - DamageMultiplier: 1, - CritMultiplier: shaman.ElementalCritMultiplier(0), - ThreatMultiplier: 1, - - ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { - weapon := core.Ternary(isMH, shaman.GetMHWeapon(), shaman.GetOHWeapon()) - - var damage float64 - if weapon != nil { - baseDamage := weapon.SwingSpeed * 64 - spellCoeff := 0.1 * weapon.SwingSpeed / 2.6 - damage = baseDamage + spellCoeff*spell.SpellPower() - } - - spell.CalcAndDealDamage(sim, target, damage, spell.OutcomeMagicHitAndCrit) - }, - }) -} - -func (shaman *Shaman) RegisterFlametongueDownrankImbue(mh bool, oh bool) { - if !mh && !oh && !shaman.ItemSwap.IsEnabled() { - return - } - - if mh { - shaman.ApplyFlametongueImbueToItem(shaman.GetMHWeapon(), true) - } - if oh { - shaman.ApplyFlametongueImbueToItem(shaman.GetOHWeapon(), true) - } + mhSpell := shaman.newFlametongueImbueSpell(shaman.MainHand(), isDownranked) + ohSpell := shaman.newFlametongueImbueSpell(shaman.OffHand(), isDownranked) - ftDownrankIcd := core.Cooldown{ - Timer: shaman.NewTimer(), - Duration: time.Millisecond, + label := "Flametongue Imbue" + enchantID := 3781 + if isDownranked { + label = "Flametongue Imbue (downranked)" + enchantID = 3780 } - mhSpell := shaman.newFlametongueDownrankImbueSpell(true) - ohSpell := shaman.newFlametongueDownrankImbueSpell(false) - procMask := core.GetMeleeProcMaskForHands(mh, oh) aura := shaman.RegisterAura(core.Aura{ - Label: "Flametongue Imbue (downranked)", + Label: label, Duration: core.NeverExpires, OnReset: func(aura *core.Aura, sim *core.Simulation) { aura.Activate(sim) @@ -290,11 +221,11 @@ func (shaman *Shaman) RegisterFlametongueDownrankImbue(mh bool, oh bool) { return } - if !ftDownrankIcd.IsReady(sim) { + if !icd.IsReady(sim) { return } - ftDownrankIcd.Use(sim) + icd.Use(sim) if spell.IsMH() { mhSpell.Cast(sim, result.Target) @@ -304,7 +235,7 @@ func (shaman *Shaman) RegisterFlametongueDownrankImbue(mh bool, oh bool) { }, }) - shaman.RegisterOnItemSwapWithImbue(3780, &procMask, aura) + shaman.RegisterOnItemSwapWithImbue(int32(enchantID), &procMask, aura) } func (shaman *Shaman) FrostbrandDebuffAura(target *core.Unit) *core.Aura { @@ -354,23 +285,23 @@ func (shaman *Shaman) newFrostbrandImbueSpell() *core.Spell { }) } -func (shaman *Shaman) RegisterFrostbrandImbue(mh bool, oh bool) { - if !mh && !oh { +func (shaman *Shaman) RegisterFrostbrandImbue(procMask core.ProcMask) { + if procMask == core.ProcMaskUnknown { return } - mhSpell := shaman.newFrostbrandImbueSpell() - ohSpell := shaman.newFrostbrandImbueSpell() - procMask := core.GetMeleeProcMaskForHands(mh, oh) - ppmm := shaman.AutoAttacks.NewPPMManager(9.0, procMask) - - if mh { + if procMask.Matches(core.ProcMaskMeleeMH) { shaman.MainHand().TempEnchant = 3784 } - if oh { + if procMask.Matches(core.ProcMaskMeleeOH) { shaman.OffHand().TempEnchant = 3784 } + ppmm := shaman.AutoAttacks.NewPPMManager(9.0, procMask) + + mhSpell := shaman.newFrostbrandImbueSpell() + ohSpell := shaman.newFrostbrandImbueSpell() + fbDebuffAuras := shaman.NewEnemyAuraArray(shaman.FrostbrandDebuffAura) aura := shaman.RegisterAura(core.Aura{ @@ -431,7 +362,7 @@ func (shaman *Shaman) newEarthlivingImbueSpell() *core.Spell { }) } -func (shaman *Shaman) ApplyEarthlivingImbueToItem(item *core.Item, isDownranked bool) { +func (shaman *Shaman) ApplyEarthlivingImbueToItem(item *core.Item) { if item == nil || item.TempEnchant == 3350 || item.TempEnchant == 3349 { // downranking not implemented yet but put the temp enchant ID there. return @@ -446,26 +377,25 @@ func (shaman *Shaman) ApplyEarthlivingImbueToItem(item *core.Item, isDownranked item.TempEnchant = int32(id) } -func (shaman *Shaman) RegisterEarthlivingImbue(mh bool, oh bool) { - if !mh && !oh && !shaman.ItemSwap.IsEnabled() { +func (shaman *Shaman) RegisterEarthlivingImbue(procMask core.ProcMask) { + if procMask == core.ProcMaskEmpty && !shaman.ItemSwap.IsEnabled() { return } - if mh { - shaman.ApplyEarthlivingImbueToItem(shaman.GetMHWeapon(), false) + if procMask.Matches(core.ProcMaskMeleeMH) { + shaman.ApplyEarthlivingImbueToItem(shaman.MainHand()) } - if oh { - shaman.ApplyEarthlivingImbueToItem(shaman.GetOHWeapon(), false) + if procMask.Matches(core.ProcMaskMeleeOH) { + shaman.ApplyEarthlivingImbueToItem(shaman.OffHand()) } - mhSpell := shaman.newEarthlivingImbueSpell() - ohSpell := shaman.newEarthlivingImbueSpell() - procChance := 0.2 if shaman.HasMajorGlyph(proto.ShamanMajorGlyph_GlyphOfEarthlivingWeapon) { procChance += 0.05 } - procMask := core.GetMeleeProcMaskForHands(mh, oh) + + imbueSpell := shaman.newEarthlivingImbueSpell() + aura := shaman.RegisterAura(core.Aura{ Label: "Earthliving Imbue", Duration: core.NeverExpires, @@ -476,10 +406,13 @@ func (shaman *Shaman) RegisterEarthlivingImbue(mh bool, oh bool) { if spell != shaman.ChainHeal && spell != shaman.LesserHealingWave && spell != shaman.HealingWave && spell != shaman.Riptide { return } - if mhSpell != nil && sim.RandomFloat("earthliving") < procChance { - mhSpell.Cast(sim, result.Target) - } else if ohSpell != nil && sim.RandomFloat("earthliving") < procChance { - ohSpell.Cast(sim, result.Target) + + if procMask.Matches(core.ProcMaskMeleeMH) && sim.RandomFloat("earthliving") < procChance { + imbueSpell.Cast(sim, result.Target) + } + + if procMask.Matches(core.ProcMaskMeleeOH) && sim.RandomFloat("earthliving") < procChance { + imbueSpell.Cast(sim, result.Target) } }, })