Skip to content

Commit

Permalink
Merge pull request #1644 from wowsims/fix_ele_4pt8_dot
Browse files Browse the repository at this point in the history
Fix ele 4pt8 dot
  • Loading branch information
lologarithm authored Nov 8, 2022
2 parents 503b900 + 46c6c33 commit 7139823
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
4 changes: 2 additions & 2 deletions sim/shaman/elemental/TestElemental.results
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,8 @@ dps_results: {
dps_results: {
key: "TestElemental-AllItems-WorldbreakerGarb"
value: {
dps: 3827.11106
tps: 2962.69068
dps: 3871.85559
tps: 3009.5364
}
}
dps_results: {
Expand Down
4 changes: 2 additions & 2 deletions sim/shaman/enhancement/TestEnhancement.results
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,8 @@ dps_results: {
dps_results: {
key: "TestEnhancement-AllItems-WorldbreakerGarb"
value: {
dps: 5727.48088
tps: 3252.70303
dps: 5716.36848
tps: 3244.00537
}
}
dps_results: {
Expand Down
18 changes: 8 additions & 10 deletions sim/shaman/items_wotlk.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@ import (
"github.com/wowsims/wotlk/sim/core/stats"
)

var itemSetT9Bonuses = map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
// shocks.go
},
4: func(agent core.Agent) {
// lavaburst.go
},
}

var ItemSetThrallsRegalia = core.NewItemSet(core.ItemSet{
Name: "Thrall's Regalia",
AlternativeName: "Nobundo's Regalia",
Bonuses: itemSetT9Bonuses,
Bonuses: map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
// shocks.go
},
4: func(agent core.Agent) {
// lavaburst.go
},
},
})

var ItemSetEarthShatterGarb = core.NewItemSet(core.ItemSet{
Expand Down
16 changes: 12 additions & 4 deletions sim/shaman/lightning_bolt.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (shaman *Shaman) newLightningBoltSpell(isLightningOverload bool) *core.Spel
TickLength: time.Second * 2,
NumberOfTicks: 2,
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
dot.SnapshotBaseDamage = lbdotDmg / 2 // spread dot over 2 ticks
dot.SnapshotBaseDamage = lbdotDmg
dot.SnapshotAttackerMultiplier = dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex])
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand All @@ -92,9 +92,17 @@ func (shaman *Shaman) newLightningBoltSpell(isLightningOverload bool) *core.Spel
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)

if result.Landed() {
if applyDot && result.DidCrit() { // need to merge in the 4pt8 effect
lbdotDmg = result.Damage * 0.08 // TODO: does this pool with a currently ticking dot?
lbDot.Apply(sim) // will resnapshot
if applyDot && result.DidCrit() {
oldDmg := lbdotDmg
lbdotDmg = (result.Damage * 0.08) / 2
if lbDot.IsActive() {
remainingTicks := lbDot.NumberOfTicks - lbDot.TickCount
if remainingTicks > 0 {
lbdotDmg += (oldDmg * float64(remainingTicks)) / 2
lbDot.TakeSnapshot(sim, false)
}
}
lbDot.ApplyOrRefresh(sim)
}
if canLO && sim.RandomFloat("LB Lightning Overload") <= lightningOverloadChance {
shaman.LightningBoltLO.Cast(sim, target)
Expand Down

0 comments on commit 7139823

Please sign in to comment.