diff --git a/sim/common/mop/cloaks_phase_4_54.go b/sim/common/mop/cloaks_phase_4_54.go index 5d3fe978ec..61524aded6 100644 --- a/sim/common/mop/cloaks_phase_4_54.go +++ b/sim/common/mop/cloaks_phase_4_54.go @@ -5,6 +5,7 @@ import ( "math" "time" + "github.com/wowsims/mop/sim/common/shared" "github.com/wowsims/mop/sim/core" "github.com/wowsims/mop/sim/core/proto" ) @@ -18,74 +19,66 @@ func init() { character := agent.GetCharacter() label := "Xing-Ho, Breath of Yu'lon" - spell := character.RegisterSpell(core.SpellConfig{ - ActionID: core.ActionID{SpellID: 146198}, - SpellSchool: core.SpellSchoolFirestorm, - Flags: core.SpellFlagNoSpellMods | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell, - ProcMask: core.ProcMaskEmpty, - - DamageMultiplier: 1, - CritMultiplier: character.DefaultCritMultiplier(), - ThreatMultiplier: 1, - - Dot: core.DotConfig{ - Aura: core.Aura{ - Label: "Essence of Yu'lon", - }, - TickLength: 1 * time.Second, - NumberOfTicks: 4, - AffectedByCastSpeed: true, - HasteReducesDuration: true, - - OnSnapshot: func(_ *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) { - dot.Snapshot(target, dot.Spell.SpellPower()*2) - }, - OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) { - numTargets := min(sim.Environment.ActiveTargetCount(), 5) + parentAura := core.MakePermanent(character.RegisterAura(core.Aura{ + Label: "Essence of Yu'lon - Dummy Aura", + Duration: core.NeverExpires, + })) + + var igniteSpell *core.Spell + igniteSpell = shared.RegisterIgniteEffect(&character.Unit, shared.IgniteConfig{ + ActionID: core.ActionID{SpellID: 148008}, + SpellSchool: core.SpellSchoolFirestorm, + DisableCastMetrics: true, + DotAuraLabel: "Essence of Yu'lon", + DotAuraTag: "EssenceOfYulon", + TickLength: 1 * time.Second, + NumberOfTicks: 4, + TickImmediately: true, + CritMultiplier: character.DefaultCritMultiplier(), + ParentAura: parentAura, + + ProcTrigger: core.ProcTrigger{ + Name: label, + + DPM: character.NewRPPMProcManager(102246, false, false, core.ProcMaskSpellOrSpellProc, core.RPPMConfig{ + PPM: 2.61100006104, + }.WithHasteMod(). + WithSpecMod(0.25, proto.Spec_SpecArcaneMage). + WithSpecMod(0.20000000298, proto.Spec_SpecFireMage). + WithSpecMod(0.20000000298, proto.Spec_SpecFrostMage). + WithSpecMod(-0.75, proto.Spec_SpecProtectionPaladin). + WithSpecMod(-0.75, proto.Spec_SpecProtectionWarrior). + WithSpecMod(0.10000000149, proto.Spec_SpecBalanceDruid). + WithSpecMod(-0.75, proto.Spec_SpecGuardianDruid). + WithSpecMod(-0.75, proto.Spec_SpecBloodDeathKnight). + WithSpecMod(0, proto.Spec_SpecShadowPriest). + WithSpecMod(0.05000000075, proto.Spec_SpecElementalShaman). + WithSpecMod(0.10000000149, proto.Spec_SpecAfflictionWarlock). + WithSpecMod(0.25, proto.Spec_SpecDemonologyWarlock). + WithSpecMod(0.15000000596, proto.Spec_SpecDestructionWarlock). + WithSpecMod(-0.75, proto.Spec_SpecBrewmasterMonk), + ), - for range numTargets { - dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeSnapshotCrit) - target = sim.Environment.NextActiveTargetUnit(target) - } - }, + Callback: core.CallbackOnSpellHitDealt, + TriggerImmediately: true, + RequireDamageDealt: true, }, - ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { - spell.Dot(target).Apply(sim) + DamageCalculator: func(result *core.SpellResult) float64 { + return igniteSpell.SpellPower() * 2 }, - }) - proctrigger := character.MakeProcTriggerAura(core.ProcTrigger{ - Name: label, - - DPM: character.NewRPPMProcManager(102246, false, false, core.ProcMaskSpellOrSpellProc, core.RPPMConfig{ - PPM: 2.61100006104, - }.WithHasteMod(). - WithSpecMod(0.25, proto.Spec_SpecArcaneMage). - WithSpecMod(0.20000000298, proto.Spec_SpecFireMage). - WithSpecMod(0.20000000298, proto.Spec_SpecFrostMage). - WithSpecMod(-0.75, proto.Spec_SpecProtectionPaladin). - WithSpecMod(-0.75, proto.Spec_SpecProtectionWarrior). - WithSpecMod(0.10000000149, proto.Spec_SpecBalanceDruid). - WithSpecMod(-0.75, proto.Spec_SpecGuardianDruid). - WithSpecMod(-0.75, proto.Spec_SpecBloodDeathKnight). - WithSpecMod(0, proto.Spec_SpecShadowPriest). - WithSpecMod(0.05000000075, proto.Spec_SpecElementalShaman). - WithSpecMod(0.10000000149, proto.Spec_SpecAfflictionWarlock). - WithSpecMod(0.25, proto.Spec_SpecDemonologyWarlock). - WithSpecMod(0.15000000596, proto.Spec_SpecDestructionWarlock). - WithSpecMod(-0.75, proto.Spec_SpecBrewmasterMonk), - ), - - Callback: core.CallbackOnSpellHitDealt, - TriggerImmediately: true, - - Handler: func(sim *core.Simulation, _ *core.Spell, result *core.SpellResult) { - spell.Cast(sim, result.Target) + OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) { + numTargets := min(sim.Environment.ActiveTargetCount(), 5) + + for range numTargets { + dot.Spell.CalcAndDealPeriodicDamage(sim, target, dot.SnapshotBaseDamage, dot.OutcomeTickMagicCrit) + target = sim.Environment.NextActiveTargetUnit(target) + } }, }) - character.ItemSwap.RegisterProc(102246, proctrigger) + character.ItemSwap.RegisterProc(102246, parentAura) }) newXuenCloakEffect := func(label string, itemID int32) { diff --git a/sim/common/shared/shared_utils.go b/sim/common/shared/shared_utils.go index 31bdef0764..817d129b84 100644 --- a/sim/common/shared/shared_utils.go +++ b/sim/common/shared/shared_utils.go @@ -602,6 +602,7 @@ type IgniteConfig struct { ActionID core.ActionID ClassSpellMask int64 SpellSchool core.SpellSchool + CritMultiplier float64 // Optional crit multiplier in case the Ignite DoT can crit (Such as the legendary caster cloak) DisableCastMetrics bool DotAuraLabel string DotAuraTag string @@ -609,6 +610,8 @@ type IgniteConfig struct { DamageCalculator IgniteDamageCalculator IncludeAuraDelay bool // "munching" and "free roll-over" interactions NumberOfTicks int32 + TickImmediately bool + OnTick core.OnTick // Overrides default OnTick TickLength time.Duration ParentAura *core.Aura } @@ -628,6 +631,12 @@ func RegisterIgniteEffect(unit *core.Unit, config IgniteConfig) *core.Spell { config.NumberOfTicks = 2 } + if config.OnTick == nil { + config.OnTick = func(sim *core.Simulation, target *core.Unit, dot *core.Dot) { + dot.Spell.CalcAndDealPeriodicDamage(sim, target, dot.SnapshotBaseDamage, dot.OutcomeTick) + } + } + if config.TickLength == 0 { config.TickLength = time.Second * 2 } @@ -640,6 +649,7 @@ func RegisterIgniteEffect(unit *core.Unit, config IgniteConfig) *core.Spell { Flags: spellFlags, DamageMultiplier: 1, ThreatMultiplier: 1, + CritMultiplier: config.CritMultiplier, Dot: core.DotConfig{ Aura: core.Aura{ @@ -652,13 +662,16 @@ func RegisterIgniteEffect(unit *core.Unit, config IgniteConfig) *core.Spell { TickLength: config.TickLength, AffectedByCastSpeed: false, - OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) { - dot.Spell.CalcAndDealPeriodicDamage(sim, target, dot.SnapshotBaseDamage, dot.OutcomeTick) - }, + OnTick: config.OnTick, }, ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { - spell.Dot(target).Apply(sim) + dot := spell.Dot(target) + dot.Apply(sim) + + if config.TickImmediately { + dot.TickOnce(sim) + } }, }) diff --git a/sim/death_knight/blood/TestBlood.results b/sim/death_knight/blood/TestBlood.results index 3673a99483..128ef9e74f 100644 --- a/sim/death_knight/blood/TestBlood.results +++ b/sim/death_knight/blood/TestBlood.results @@ -3183,8 +3183,8 @@ dps_results: { dps_results: { key: "TestBlood-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 213846.33161 - tps: 1.08569398657e+06 + dps: 212948.44989 + tps: 1.08019487124e+06 dtps: 67813.38211 hps: 83796.77159 } diff --git a/sim/death_knight/frost/TestFrostMasterfrost.results b/sim/death_knight/frost/TestFrostMasterfrost.results index b9fd3ceb23..fbc61e2aee 100644 --- a/sim/death_knight/frost/TestFrostMasterfrost.results +++ b/sim/death_knight/frost/TestFrostMasterfrost.results @@ -2825,8 +2825,8 @@ dps_results: { dps_results: { key: "TestFrostMasterfrost-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 235800.2993 - tps: 214480.01668 + dps: 236229.8706 + tps: 214914.68353 hps: 2200.61331 } } diff --git a/sim/death_knight/frost/TestFrostTwoHand.results b/sim/death_knight/frost/TestFrostTwoHand.results index acf29d6fc6..f8c63c6337 100644 --- a/sim/death_knight/frost/TestFrostTwoHand.results +++ b/sim/death_knight/frost/TestFrostTwoHand.results @@ -2833,8 +2833,8 @@ dps_results: { dps_results: { key: "TestFrostTwoHand-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 237341.84042 - tps: 210400.45708 + dps: 237260.95992 + tps: 210360.92 hps: 3649.59535 } } diff --git a/sim/death_knight/unholy/TestUnholy.results b/sim/death_knight/unholy/TestUnholy.results index 7dcf6916f8..f4db147f78 100644 --- a/sim/death_knight/unholy/TestUnholy.results +++ b/sim/death_knight/unholy/TestUnholy.results @@ -2825,8 +2825,8 @@ dps_results: { dps_results: { key: "TestUnholy-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 237710.48309 - tps: 165810.22748 + dps: 238884.30916 + tps: 166567.14851 hps: 2674.74243 } } diff --git a/sim/druid/balance/TestBalance.results b/sim/druid/balance/TestBalance.results index d0aceec8b6..4c256aed9b 100644 --- a/sim/druid/balance/TestBalance.results +++ b/sim/druid/balance/TestBalance.results @@ -585,9 +585,9 @@ dps_results: { dps_results: { key: "TestBalance-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 285794.33055 - tps: 286274.08827 - hps: 28994.00598 + dps: 260277.16856 + tps: 260447.34449 + hps: 29034.27947 } } dps_results: { diff --git a/sim/druid/feral/TestFeral.results b/sim/druid/feral/TestFeral.results index de528eae19..089037238a 100644 --- a/sim/druid/feral/TestFeral.results +++ b/sim/druid/feral/TestFeral.results @@ -2777,8 +2777,8 @@ dps_results: { dps_results: { key: "TestFeral-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 251070.24682 - tps: 378120.66293 + dps: 250178.48549 + tps: 376640.81762 hps: 15951.53449 } } diff --git a/sim/druid/guardian/TestGuardian.results b/sim/druid/guardian/TestGuardian.results index 5a053269b7..67c6615aa5 100644 --- a/sim/druid/guardian/TestGuardian.results +++ b/sim/druid/guardian/TestGuardian.results @@ -3120,10 +3120,10 @@ dps_results: { dps_results: { key: "TestGuardian-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 305149.86244 - tps: 1.84608630593e+06 + dps: 305283.59371 + tps: 1.8435729794e+06 dtps: 45070.13418 - hps: 30332.73895 + hps: 30979.28224 } } dps_results: { diff --git a/sim/hunter/beast_mastery/TestBeastMastery.results b/sim/hunter/beast_mastery/TestBeastMastery.results index 9bc429bcd2..43fe629ef6 100644 --- a/sim/hunter/beast_mastery/TestBeastMastery.results +++ b/sim/hunter/beast_mastery/TestBeastMastery.results @@ -2399,7 +2399,7 @@ dps_results: { dps_results: { key: "TestBeastMastery-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 230618.42124 + dps: 230571.56096 tps: 107240.61607 } } diff --git a/sim/hunter/marksmanship/TestMarksmanship.results b/sim/hunter/marksmanship/TestMarksmanship.results index 02615002dc..fefd1d41a3 100644 --- a/sim/hunter/marksmanship/TestMarksmanship.results +++ b/sim/hunter/marksmanship/TestMarksmanship.results @@ -2745,7 +2745,7 @@ dps_results: { dps_results: { key: "TestMarksmanship-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 238271.64939 + dps: 238405.54662 tps: 180040.09514 hps: 18.00409 } diff --git a/sim/hunter/survival/TestSurvival.results b/sim/hunter/survival/TestSurvival.results index 4485bf353a..008e70c147 100644 --- a/sim/hunter/survival/TestSurvival.results +++ b/sim/hunter/survival/TestSurvival.results @@ -2399,8 +2399,8 @@ dps_results: { dps_results: { key: "TestSurvival-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 231144.17675 - tps: 174931.00797 + dps: 231188.46351 + tps: 175004.47662 } } dps_results: { diff --git a/sim/mage/arcane/TestArcane.results b/sim/mage/arcane/TestArcane.results index d9565ab49f..94ad7c6713 100644 --- a/sim/mage/arcane/TestArcane.results +++ b/sim/mage/arcane/TestArcane.results @@ -502,8 +502,8 @@ dps_results: { dps_results: { key: "TestArcane-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 305508.85149 - tps: 294721.96204 + dps: 276904.28698 + tps: 265895.01888 } } dps_results: { diff --git a/sim/mage/fire/TestFire.results b/sim/mage/fire/TestFire.results index 542cc4b33e..9289142b75 100644 --- a/sim/mage/fire/TestFire.results +++ b/sim/mage/fire/TestFire.results @@ -2399,8 +2399,8 @@ dps_results: { dps_results: { key: "TestFire-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 179621.28738 - tps: 175868.54136 + dps: 160060.00926 + tps: 156256.89683 } } dps_results: { diff --git a/sim/mage/frost/TestFrost.results b/sim/mage/frost/TestFrost.results index 103dea5371..8a91875ece 100644 --- a/sim/mage/frost/TestFrost.results +++ b/sim/mage/frost/TestFrost.results @@ -502,8 +502,8 @@ dps_results: { dps_results: { key: "TestFrost-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 190668.81085 - tps: 145587.3665 + dps: 172172.4539 + tps: 126936.81471 } } dps_results: { diff --git a/sim/monk/brewmaster/TestBrewmaster.results b/sim/monk/brewmaster/TestBrewmaster.results index 2a9ca6994a..27ace82830 100644 --- a/sim/monk/brewmaster/TestBrewmaster.results +++ b/sim/monk/brewmaster/TestBrewmaster.results @@ -3102,8 +3102,8 @@ dps_results: { dps_results: { key: "TestBrewmaster-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 259616.66969 - tps: 1.12031781181e+06 + dps: 258264.07751 + tps: 1.10918490846e+06 dtps: 17330.42724 hps: 28853.82276 } diff --git a/sim/monk/windwalker/TestWindwalker.results b/sim/monk/windwalker/TestWindwalker.results index f24eaf3e91..e2bdd4ac95 100644 --- a/sim/monk/windwalker/TestWindwalker.results +++ b/sim/monk/windwalker/TestWindwalker.results @@ -2777,9 +2777,9 @@ dps_results: { dps_results: { key: "TestWindwalker-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 265439.31463 - tps: 254167.30195 - hps: 8376.62494 + dps: 266732.59036 + tps: 255414.12426 + hps: 8188.53878 } } dps_results: { diff --git a/sim/paladin/protection/TestProtection.results b/sim/paladin/protection/TestProtection.results index 8f8c1b5d87..02ef0d992e 100644 --- a/sim/paladin/protection/TestProtection.results +++ b/sim/paladin/protection/TestProtection.results @@ -3129,8 +3129,8 @@ dps_results: { dps_results: { key: "TestProtection-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 252412.64352 - tps: 1.59702540844e+06 + dps: 231384.27754 + tps: 1.45069832766e+06 dtps: 35318.55286 hps: 36954.7631 } diff --git a/sim/paladin/retribution/TestRetribution.results b/sim/paladin/retribution/TestRetribution.results index d66f7ed5d8..d3a0025319 100644 --- a/sim/paladin/retribution/TestRetribution.results +++ b/sim/paladin/retribution/TestRetribution.results @@ -2777,8 +2777,8 @@ dps_results: { dps_results: { key: "TestRetribution-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 271005.32125 - tps: 259303.38516 + dps: 250833.18837 + tps: 239148.07718 hps: 23.70074 } } diff --git a/sim/priest/items.go b/sim/priest/items.go index 5cbd6d9366..e99fbea2a4 100644 --- a/sim/priest/items.go +++ b/sim/priest/items.go @@ -120,7 +120,7 @@ var ItemSetRegaliaOfTheTernionGlory = core.NewItemSet(core.ItemSet{ mod.Deactivate() }, OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) { - if spell.Matches(PriestSpellMindBlast | PriestSpellMindSpike | PriestSpellShadowWordDeath) { + if !spell.Matches(PriestSpellMindBlast | PriestSpellMindSpike | PriestSpellShadowWordDeath) { return } diff --git a/sim/priest/shadow/TestShadow.results b/sim/priest/shadow/TestShadow.results index aa32028983..e77f5fc5b2 100644 --- a/sim/priest/shadow/TestShadow.results +++ b/sim/priest/shadow/TestShadow.results @@ -1913,8 +1913,8 @@ dps_results: { dps_results: { key: "TestShadow-AllItems-RegaliaofTernionGlory" value: { - dps: 98352.13758 - tps: 91585.64984 + dps: 100940.76279 + tps: 94174.27505 hps: 1950.439 } } @@ -2737,9 +2737,9 @@ dps_results: { dps_results: { key: "TestShadow-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 109321.37608 - tps: 103824.13119 - hps: 1759.81811 + dps: 98203.47539 + tps: 92758.18331 + hps: 1763.24998 } } dps_results: { diff --git a/sim/rogue/assassination/TestAssassination.results b/sim/rogue/assassination/TestAssassination.results index 84f21650fe..8850857dce 100644 --- a/sim/rogue/assassination/TestAssassination.results +++ b/sim/rogue/assassination/TestAssassination.results @@ -548,8 +548,8 @@ dps_results: { dps_results: { key: "TestAssassination-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 102657.3016 - tps: 72268.94002 + dps: 102683.98093 + tps: 72288.62156 } } dps_results: { diff --git a/sim/shaman/elemental/TestElemental.results b/sim/shaman/elemental/TestElemental.results index 955bdf3725..c506f1518d 100644 --- a/sim/shaman/elemental/TestElemental.results +++ b/sim/shaman/elemental/TestElemental.results @@ -2427,8 +2427,8 @@ dps_results: { dps_results: { key: "TestElemental-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 175169.64403 - tps: 134351.24442 + dps: 157292.19099 + tps: 116225.23011 } } dps_results: { diff --git a/sim/shaman/enhancement/TestEnhancement.results b/sim/shaman/enhancement/TestEnhancement.results index 7bc2add4dd..d2f5b5ad45 100644 --- a/sim/shaman/enhancement/TestEnhancement.results +++ b/sim/shaman/enhancement/TestEnhancement.results @@ -2427,8 +2427,8 @@ dps_results: { dps_results: { key: "TestEnhancement-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 169821.27833 - tps: 147708.16615 + dps: 154386.08253 + tps: 132203.02032 } } dps_results: { diff --git a/sim/warlock/affliction/TestAffliction.results b/sim/warlock/affliction/TestAffliction.results index 003d764763..659dcd4901 100644 --- a/sim/warlock/affliction/TestAffliction.results +++ b/sim/warlock/affliction/TestAffliction.results @@ -2745,9 +2745,9 @@ dps_results: { dps_results: { key: "TestAffliction-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 291189.00963 - tps: 209862.17939 - hps: 2971.85025 + dps: 264397.59723 + tps: 183156.81702 + hps: 2992.47218 } } dps_results: { diff --git a/sim/warlock/demonology/TestDemonology.results b/sim/warlock/demonology/TestDemonology.results index 9281e13677..24b0591d2a 100644 --- a/sim/warlock/demonology/TestDemonology.results +++ b/sim/warlock/demonology/TestDemonology.results @@ -2406,8 +2406,8 @@ dps_results: { dps_results: { key: "TestDemonology-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 341892.37097 - tps: 233404.16567 + dps: 279288.29825 + tps: 170657.82951 } } dps_results: { diff --git a/sim/warlock/destruction/TestDestruction.results b/sim/warlock/destruction/TestDestruction.results index 90089b3a38..5da22130eb 100644 --- a/sim/warlock/destruction/TestDestruction.results +++ b/sim/warlock/destruction/TestDestruction.results @@ -2737,9 +2737,9 @@ dps_results: { dps_results: { key: "TestDestruction-AllItems-Xing-Ho,BreathofYu'lon-102246" value: { - dps: 265335.41244 - tps: 211398.58105 - hps: 1445.63515 + dps: 244251.32683 + tps: 190679.60395 + hps: 1445.06171 } } dps_results: {