Skip to content

Commit

Permalink
Classic version of ignite
Browse files Browse the repository at this point in the history
  • Loading branch information
sanguinerarogue committed Dec 1, 2024
1 parent 32d6cd7 commit cb76bdf
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 56 deletions.
66 changes: 33 additions & 33 deletions sim/mage/TestFire.results
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ stat_weights_results: {
weights: 0
weights: 0
weights: 0
weights: 0.61344
weights: 0.87787
weights: 0
weights: 0.30638
weights: 0.36053
weights: 0
weights: 0.30638
weights: 0.36053
weights: 0
weights: 0
weights: 0
weights: 0
weights: 0
weights: 4.0745
weights: 3.00611
weights: 4.89137
weights: 4.92328
weights: 0
weights: 0
weights: 0
Expand Down Expand Up @@ -99,98 +99,98 @@ stat_weights_results: {
dps_results: {
key: "TestFire-Phase5-Lvl60-Average-Default"
value: {
dps: 315.27056
tps: 237.16454
dps: 375.71082
tps: 279.47272
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Gnome-blank-Fire-p5_fire-FullBuffs-P5-Consumes-LongMultiTarget"
value: {
dps: 336.04823
tps: 563.87387
dps: 403.22677
tps: 610.89885
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Gnome-blank-Fire-p5_fire-FullBuffs-P5-Consumes-LongSingleTarget"
value: {
dps: 336.04823
tps: 251.66577
dps: 403.22677
tps: 298.69075
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Gnome-blank-Fire-p5_fire-FullBuffs-P5-Consumes-ShortSingleTarget"
value: {
dps: 414.69838
tps: 302.05805
dps: 516.07671
tps: 373.02288
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Gnome-blank-Fire-p5_fire-NoBuffs-P5-Consumes-LongMultiTarget"
value: {
dps: 138.88639
tps: 316.15109
dps: 154.47571
tps: 327.06362
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Gnome-blank-Fire-p5_fire-NoBuffs-P5-Consumes-LongSingleTarget"
value: {
dps: 138.88639
tps: 108.167
dps: 154.47571
tps: 119.07953
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Gnome-blank-Fire-p5_fire-NoBuffs-P5-Consumes-ShortSingleTarget"
value: {
dps: 252.45459
tps: 182.18519
dps: 287.30752
tps: 206.58225
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Troll-blank-Fire-p5_fire-FullBuffs-P5-Consumes-LongMultiTarget"
value: {
dps: 306.44466
tps: 540.41754
dps: 370.43302
tps: 585.2094
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Troll-blank-Fire-p5_fire-FullBuffs-P5-Consumes-LongSingleTarget"
value: {
dps: 306.44466
tps: 230.80658
dps: 370.43302
tps: 275.59843
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Troll-blank-Fire-p5_fire-FullBuffs-P5-Consumes-ShortSingleTarget"
value: {
dps: 402.4679
tps: 293.46973
dps: 494.5557
tps: 357.93119
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Troll-blank-Fire-p5_fire-NoBuffs-P5-Consumes-LongMultiTarget"
value: {
dps: 134.49457
tps: 313.10452
dps: 148.96234
tps: 323.23196
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Troll-blank-Fire-p5_fire-NoBuffs-P5-Consumes-LongSingleTarget"
value: {
dps: 134.49457
tps: 105.09412
dps: 148.96234
tps: 115.22155
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-Settings-Troll-blank-Fire-p5_fire-NoBuffs-P5-Consumes-ShortSingleTarget"
value: {
dps: 257.27987
tps: 185.73789
dps: 291.51501
tps: 209.70249
}
}
dps_results: {
key: "TestFire-Phase5-Lvl60-SwitchInFrontOfTarget-Default"
value: {
dps: 306.69984
tps: 230.9943
dps: 364.82987
tps: 271.68532
}
}
49 changes: 26 additions & 23 deletions sim/mage/ignite.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func (mage *Mage) applyIgnite() {
if mage.Talents.Ignite == 0 {
return
}
newIgniteDamage := 0.0

mage.RegisterAura(core.Aura{
Label: "Ignite Talent",
Expand All @@ -26,13 +27,13 @@ func (mage *Mage) applyIgnite() {
return
}
if spell.SpellSchool.Matches(core.SpellSchoolFire) && result.DidCrit() {
mage.procIgnite(sim, result)
}
},
// TODO: Classic verify mechanics match for rune based Living Bomb - I believe this can be removed in classic?
OnPeriodicDamageDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if !spell.ProcMask.Matches(core.ProcMaskSpellDamage) {
return
newIgniteDamage = result.Damage * 0.08 * float64(mage.Talents.Ignite)
dot := mage.Ignite.Dot(result.Target)
dot.ApplyOrRefresh(sim)
if dot.GetStacks() < dot.MaxStacks{
dot.AddStack(sim)
dot.TakeSnapshot(sim, true)
}
}
},
})
Expand All @@ -55,27 +56,29 @@ func (mage *Mage) applyIgnite() {
Dot: core.DotConfig{
Aura: core.Aura{
Label: "Ignite",
MaxStacks: 5,
Duration: time.Second * 4,
},
NumberOfTicks: IgniteTicks,
TickLength: time.Second * 2,

OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, applyStack bool) {
if !applyStack {
return
}

// only the first stack snapshots the multiplier
if dot.GetStacks() == 1 {
attackTable := dot.Spell.Unit.AttackTables[target.UnitIndex][dot.Spell.CastType]
dot.SnapshotAttackerMultiplier = dot.Spell.AttackerDamageMultiplier(attackTable)
dot.SnapshotBaseDamage = newIgniteDamage
} else {
dot.SnapshotBaseDamage += newIgniteDamage
}
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick)
},
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.Dot(target).ApplyOrReset(sim)
},
})
}

func (mage *Mage) procIgnite(sim *core.Simulation, result *core.SpellResult) {
dot := mage.Ignite.Dot(result.Target)

newDamage := result.Damage * 0.08 * float64(mage.Talents.Ignite)
outstandingDamage := core.TernaryFloat64(dot.IsActive(), dot.SnapshotBaseDamage*float64(dot.NumberOfTicks-dot.TickCount), 0)

dot.Snapshot(result.Target, (outstandingDamage+newDamage)/float64(IgniteTicks), false)

mage.Ignite.Cast(sim, result.Target)
}
}

0 comments on commit cb76bdf

Please sign in to comment.