Skip to content

Commit

Permalink
Merge pull request #1016 from wowsims/feature/death-knight-t12
Browse files Browse the repository at this point in the history
[DK] Minor T12 implementation fixes
  • Loading branch information
1337LutZ authored Sep 15, 2024
2 parents d81331f + b467d4d commit 6226eba
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
21 changes: 14 additions & 7 deletions sim/core/runic_power.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,16 @@ func (rp *runicPowerBar) maybeFireChange(sim *Simulation, changeType RuneChangeT
}
}

func (rp *runicPowerBar) addRunicPowerInternal(sim *Simulation, amount float64, metrics *ResourceMetrics) {
func (rp *runicPowerBar) addRunicPowerInternal(sim *Simulation, amount float64, metrics *ResourceMetrics, withMultiplier bool) {
if amount < 0 {
panic("Trying to add negative runic power!")
}

newRunicPower := min(rp.currentRunicPower+(amount*rp.runicRegenMultiplier), rp.maxRunicPower)
runicRegenMultiplier := rp.runicRegenMultiplier
if !withMultiplier {
runicRegenMultiplier = 1.0
}
newRunicPower := min(rp.currentRunicPower+(amount*runicRegenMultiplier), rp.maxRunicPower)

metrics.AddEvent(amount, newRunicPower-rp.currentRunicPower)

Expand All @@ -188,7 +192,14 @@ func (rp *runicPowerBar) addRunicPowerInternal(sim *Simulation, amount float64,
}

func (rp *runicPowerBar) AddRunicPower(sim *Simulation, amount float64, metrics *ResourceMetrics) {
rp.addRunicPowerInternal(sim, amount, metrics)
rp.addRunicPowerInternal(sim, amount, metrics, true)
if rp.onRunicPowerGain != nil {
rp.onRunicPowerGain(sim)
}
}

func (rp *runicPowerBar) AddUnscaledRunicPower(sim *Simulation, amount float64, metrics *ResourceMetrics) {
rp.addRunicPowerInternal(sim, amount, metrics, false)
if rp.onRunicPowerGain != nil {
rp.onRunicPowerGain(sim)
}
Expand Down Expand Up @@ -723,10 +734,6 @@ func (rp *runicPowerBar) MultiplyRunicRegen(multiply float64) {
rp.runicRegenMultiplier *= multiply
}

func (rp *runicPowerBar) GetRunicRegenMultiplier() float64 {
return rp.runicRegenMultiplier
}

func (rp *runicPowerBar) getTotalRegenMultiplier() float64 {
hasteMultiplier := 1.0 + rp.unit.GetStat(stats.HasteRating)/(100*HasteRatingPerHastePercent)
totalMultiplier := 1 / (hasteMultiplier * rp.runeRegenMultiplier)
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 @@ -414,8 +414,8 @@ dps_results: {
dps_results: {
key: "TestBlood-AllItems-ElementiumDeathplateBattlearmor"
value: {
dps: 13660.39377
tps: 66627.0652
dps: 13682.51911
tps: 66746.16372
hps: 3461.04681
}
}
Expand Down
4 changes: 2 additions & 2 deletions sim/death_knight/frost/TestFrost.results
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ dps_results: {
dps_results: {
key: "TestFrost-AllItems-ElementiumDeathplateBattlearmor"
value: {
dps: 18974.0291
tps: 17159.17864
dps: 18988.77758
tps: 17173.92712
hps: 232.60539
}
}
Expand Down
11 changes: 2 additions & 9 deletions sim/death_knight/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,7 @@ var ItemSetElementiumDeathplateBattlegear = core.NewItemSet(core.ItemSet{
pa = core.StartPeriodicAction(sim, core.PeriodicActionOptions{
Period: time.Second * 5,
OnAction: func(sim *core.Simulation) {
// Make sure the multiplier is always 1 as this effect doesn't seem to scale
runicMulti := dk.GetRunicRegenMultiplier()
dk.MultiplyRunicRegen(1 / runicMulti)
dk.AddRunicPower(sim, 3, rpMetrics)
dk.MultiplyRunicRegen(runicMulti)
dk.AddUnscaledRunicPower(sim, 3, rpMetrics)
},
})
},
Expand Down Expand Up @@ -178,7 +174,7 @@ var ItemSetElementiumDeathplateBattlearmor = core.NewItemSet(core.ItemSet{
dk.BurningBloodSpell = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 98957},
SpellSchool: core.SpellSchoolFire,
Flags: core.SpellFlagIgnoreModifiers | core.SpellFlagAPL | core.SpellFlagPassiveSpell,
Flags: core.SpellFlagAPL | core.SpellFlagPassiveSpell,
ProcMask: core.ProcMaskEmpty,
DamageMultiplier: 1,
CritMultiplier: dk.DefaultMeleeCritMultiplier(),
Expand All @@ -193,9 +189,6 @@ var ItemSetElementiumDeathplateBattlearmor = core.NewItemSet(core.ItemSet{

OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) {
baseDamage := 800.0
if target.HasActiveAuraWithTag(core.SpellDamageEffectAuraTag) {
baseDamage *= 1.08
}
dot.Snapshot(target, baseDamage)
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
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 @@ -414,8 +414,8 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-ElementiumDeathplateBattlearmor"
value: {
dps: 27761.66056
tps: 20670.48197
dps: 27776.45224
tps: 20685.27365
hps: 519.07712
}
}
Expand Down

0 comments on commit 6226eba

Please sign in to comment.