From b2c34dd97f92eb637f965ea8fd609cb5ae382bbb Mon Sep 17 00:00:00 2001 From: Adrian Klingen <adrian.klingen@deptagency.com> Date: Sun, 15 Sep 2024 12:07:00 +0200 Subject: [PATCH 1/3] Minor T12 implementation fixes --- sim/core/runic_power.go | 21 ++++++++++++++------- sim/death_knight/items.go | 11 ++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sim/core/runic_power.go b/sim/core/runic_power.go index d1c9c060a3..273defe500 100644 --- a/sim/core/runic_power.go +++ b/sim/core/runic_power.go @@ -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, shouldScale bool) { if amount < 0 { panic("Trying to add negative runic power!") } - newRunicPower := min(rp.currentRunicPower+(amount*rp.runicRegenMultiplier), rp.maxRunicPower) + runicRegenMultiplier := rp.runicRegenMultiplier + if !shouldScale { + runicRegenMultiplier = 1.0 + } + newRunicPower := min(rp.currentRunicPower+(amount*runicRegenMultiplier), rp.maxRunicPower) metrics.AddEvent(amount, newRunicPower-rp.currentRunicPower) @@ -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) } @@ -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) diff --git a/sim/death_knight/items.go b/sim/death_knight/items.go index 9646dc7c3e..48e87b92af 100644 --- a/sim/death_knight/items.go +++ b/sim/death_knight/items.go @@ -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) }, }) }, @@ -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(), @@ -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) { From 6e35287c63442673a1fe62f659f88e4b793eff25 Mon Sep 17 00:00:00 2001 From: Adrian Klingen <adrian.klingen@deptagency.com> Date: Sun, 15 Sep 2024 12:09:33 +0200 Subject: [PATCH 2/3] Rename property --- sim/core/runic_power.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim/core/runic_power.go b/sim/core/runic_power.go index 273defe500..52e2f89eb1 100644 --- a/sim/core/runic_power.go +++ b/sim/core/runic_power.go @@ -171,13 +171,13 @@ func (rp *runicPowerBar) maybeFireChange(sim *Simulation, changeType RuneChangeT } } -func (rp *runicPowerBar) addRunicPowerInternal(sim *Simulation, amount float64, metrics *ResourceMetrics, shouldScale bool) { +func (rp *runicPowerBar) addRunicPowerInternal(sim *Simulation, amount float64, metrics *ResourceMetrics, withMultiplier bool) { if amount < 0 { panic("Trying to add negative runic power!") } runicRegenMultiplier := rp.runicRegenMultiplier - if !shouldScale { + if !withMultiplier { runicRegenMultiplier = 1.0 } newRunicPower := min(rp.currentRunicPower+(amount*runicRegenMultiplier), rp.maxRunicPower) From b467d4d2f1771d9fefd5a28baac585292ce9d3cd Mon Sep 17 00:00:00 2001 From: Adrian Klingen <adrian.klingen@deptagency.com> Date: Sun, 15 Sep 2024 12:19:30 +0200 Subject: [PATCH 3/3] Update tests --- sim/death_knight/blood/TestBlood.results | 4 ++-- sim/death_knight/frost/TestFrost.results | 4 ++-- sim/death_knight/unholy/TestUnholy.results | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sim/death_knight/blood/TestBlood.results b/sim/death_knight/blood/TestBlood.results index e718589abb..3960a5e4f7 100644 --- a/sim/death_knight/blood/TestBlood.results +++ b/sim/death_knight/blood/TestBlood.results @@ -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 } } diff --git a/sim/death_knight/frost/TestFrost.results b/sim/death_knight/frost/TestFrost.results index 789c314475..a53d77cb63 100644 --- a/sim/death_knight/frost/TestFrost.results +++ b/sim/death_knight/frost/TestFrost.results @@ -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 } } diff --git a/sim/death_knight/unholy/TestUnholy.results b/sim/death_knight/unholy/TestUnholy.results index 4ac18f67ed..c41c272ae4 100644 --- a/sim/death_knight/unholy/TestUnholy.results +++ b/sim/death_knight/unholy/TestUnholy.results @@ -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 } }