Skip to content

Commit

Permalink
Merge pull request #98 from wowsims/gnomer_phys_mail_set
Browse files Browse the repository at this point in the history
Add Electromantic Devastator's Mail set bonus
  • Loading branch information
Foknetics authored Feb 7, 2024
2 parents 4ef3f08 + 5b0f6dd commit 6b57b09
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 0 deletions.
53 changes: 53 additions & 0 deletions sim/common/sod/melee_sets.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,59 @@ var ItemSetBlackfathomSlayerLeather = core.NewItemSet(core.ItemSet{
},
})

var ItemSetElectromanticDevastator = core.NewItemSet(core.ItemSet{
Name: "Electromantic Devastator's Mail",
Bonuses: map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
c := agent.GetCharacter()
c.AddStat(stats.AttackPower, 24)
},
3: func(agent core.Agent) {
c := agent.GetCharacter()
if !c.HasManaBar() {
return
}
metrics := c.NewManaMetrics(core.ActionID{SpellID: 435982})
proc := c.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 435981},
SpellSchool: core.SpellSchoolHoly,
ApplyEffects: func(sim *core.Simulation, u *core.Unit, spell *core.Spell) {
c.AddMana(sim, 100, metrics)
},
})
procChance := 0.05
c.RegisterAura(core.Aura{
Label: "Electromantic Devastator's Mail 3pc",
ActionID: core.ActionID{SpellID: 435982},
Duration: core.NeverExpires,
OnReset: func(aura *core.Aura, sim *core.Simulation) {
aura.Activate(sim)
},
// Modeled after WotLK JoW https://github.com/wowsims/wotlk/blob/master/sim/core/debuffs.go#L202
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if spell.ProcMask.Matches(core.ProcMaskEmpty | core.ProcMaskProc | core.ProcMaskWeaponProc) {
return // Phantom spells don't proc
}

if spell.ProcMask.Matches(core.ProcMaskWhiteHit | core.ProcMaskRanged) { // Ranged/melee can proc on miss
if sim.RandomFloat("Electromantic Devastator's Mail 3pc") > procChance {
return
}
} else { // Spell Casting only procs on hits
if !result.Landed() {
return
}
if sim.RandomFloat("Electromantic Devastator's Mail 3pc") > procChance {
return
}
}
proc.Cast(sim, result.Target)
},
})
},
},
})

var ItemSetInsulatedLeather = core.NewItemSet(core.ItemSet{
Name: "Insulated Leathers",
Bonuses: map[int32]core.ApplyEffect{
Expand Down
7 changes: 7 additions & 0 deletions sim/shaman/elemental/TestElemental.results
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ dps_results: {
tps: 52.75475
}
}
dps_results: {
key: "TestElemental-AllItems-ElectromanticDevastator'sMail"
value: {
dps: 40.91039
tps: 34.38805
}
}
dps_results: {
key: "TestElemental-AllItems-HyperconductiveMender'sMeditation"
value: {
Expand Down
7 changes: 7 additions & 0 deletions sim/shaman/enhancement/TestEnhancement.results
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ dps_results: {
tps: 19.95903
}
}
dps_results: {
key: "TestEnhancement-AllItems-ElectromanticDevastator'sMail"
value: {
dps: 11.85564
tps: 10.12279
}
}
dps_results: {
key: "TestEnhancement-AllItems-HyperconductiveMender'sMeditation"
value: {
Expand Down
7 changes: 7 additions & 0 deletions sim/warrior/dps/TestArms.results
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ dps_results: {
tps: 0.36667
}
}
dps_results: {
key: "TestArms-AllItems-ElectromanticDevastator'sMail"
value: {
dps: 2.77504
tps: 9.15833
}
}
dps_results: {
key: "TestArms-AllItems-H.A.Z.A.R.D.Suit"
value: {
Expand Down
7 changes: 7 additions & 0 deletions sim/warrior/dps/TestFury.results
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ dps_results: {
tps: 0.36667
}
}
dps_results: {
key: "TestFury-AllItems-ElectromanticDevastator'sMail"
value: {
dps: 2.77504
tps: 9.15833
}
}
dps_results: {
key: "TestFury-AllItems-H.A.Z.A.R.D.Suit"
value: {
Expand Down
4 changes: 4 additions & 0 deletions sim/warrior/protection/TestProtectionWarrior.results
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ dps_results: {
key: "TestProtectionWarrior-AllItems-BlackfathomSlayer'sLeather"
value: {}
}
dps_results: {
key: "TestProtectionWarrior-AllItems-ElectromanticDevastator'sMail"
value: {}
}
dps_results: {
key: "TestProtectionWarrior-AllItems-H.A.Z.A.R.D.Suit"
value: {}
Expand Down

0 comments on commit 6b57b09

Please sign in to comment.