Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 53 additions & 60 deletions sim/common/mop/cloaks_phase_4_54.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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) {
Expand Down
21 changes: 17 additions & 4 deletions sim/common/shared/shared_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,13 +602,16 @@ 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
ProcTrigger core.ProcTrigger // Ignores the Handler field and creates a custom one, but uses all others.
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
}
Expand All @@ -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
}
Expand All @@ -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{
Expand All @@ -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)
}
},
})

Expand Down
4 changes: 2 additions & 2 deletions sim/death_knight/blood/TestBlood.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions sim/death_knight/frost/TestFrostMasterfrost.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
4 changes: 2 additions & 2 deletions sim/death_knight/frost/TestFrostTwoHand.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
4 changes: 2 additions & 2 deletions sim/death_knight/unholy/TestUnholy.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
6 changes: 3 additions & 3 deletions sim/druid/balance/TestBalance.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions sim/druid/feral/TestFeral.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
6 changes: 3 additions & 3 deletions sim/druid/guardian/TestGuardian.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion sim/hunter/beast_mastery/TestBeastMastery.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion sim/hunter/marksmanship/TestMarksmanship.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions sim/hunter/survival/TestSurvival.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions sim/mage/arcane/TestArcane.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions sim/mage/fire/TestFire.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions sim/mage/frost/TestFrost.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions sim/monk/brewmaster/TestBrewmaster.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions sim/monk/windwalker/TestWindwalker.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions sim/paladin/protection/TestProtection.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions sim/paladin/retribution/TestRetribution.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion sim/priest/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Loading