From 443613d9e665e5930e000880361a2f5e89dbe7f7 Mon Sep 17 00:00:00 2001 From: vigo Date: Fri, 31 Mar 2023 23:58:05 +0200 Subject: [PATCH 1/2] =?UTF-8?q?[paladin]=C2=A0sprinkled=20some=20comments,?= =?UTF-8?q?=20changed=20hand=20of=20reckoning's=20spell=20ID,=20and=20make?= =?UTF-8?q?=20it=20always=20hit=20via=20OutcomeApplier=20[items]=C2=A0shad?= =?UTF-8?q?owmourne=20now=20procs=20chaos=20bane=20when=20reaching=20the?= =?UTF-8?q?=2010th,=20not=20the=2011th=20soul=20fragment;=20chaos=20bane?= =?UTF-8?q?=20is=20now=20an=20AOE=20[items]=C2=A0searched=20EJ=20posts=20a?= =?UTF-8?q?bout=20shadowmourne,=20bryntroll,=20and=20tiny=20abomination=20?= =?UTF-8?q?in=20a=20jar,=20but=20mostly=20just=20left=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sim/common/wotlk/other_effects.go | 3 ++ sim/common/wotlk/shadowmourne.go | 37 ++++++++++--------- sim/core/stats/stats.go | 35 +++++++----------- sim/deathknight/dps/TestBlood.results | 4 +- sim/deathknight/tank/TestBloodTank.results | 4 +- sim/paladin/hand_of_reckoning.go | 8 ++-- .../retribution/TestRetribution.results | 4 +- sim/paladin/soc.go | 2 +- sim/paladin/sov.go | 2 +- 9 files changed, 47 insertions(+), 52 deletions(-) diff --git a/sim/common/wotlk/other_effects.go b/sim/common/wotlk/other_effects.go index afc0b4b980..4e2a0c991b 100644 --- a/sim/common/wotlk/other_effects.go +++ b/sim/common/wotlk/other_effects.go @@ -869,6 +869,9 @@ func init() { }) }) + // https://web.archive.org/web/20100127195814/http://elitistjerks.com/f76/t68951-retribution_updated_3_3_a/p75/ + // suggests 2 ppm; there's a test with ~1k auto attacks on this page, and mention of a previous test + // with ~10k auto attacks. NewItemEffectWithHeroic(func(isHeroic bool) { name := "Bryntroll, the Bone Arbiter" itemID := int32(50415) diff --git a/sim/common/wotlk/shadowmourne.go b/sim/common/wotlk/shadowmourne.go index 1f1afc7f56..a3f8992b1a 100644 --- a/sim/common/wotlk/shadowmourne.go +++ b/sim/common/wotlk/shadowmourne.go @@ -15,12 +15,15 @@ import ( // granting you 270 Strength for 10 sec. func init() { + // https://web.archive.org/web/20120509024819/http://elitistjerks.com/f81/t37680-depth_fury_dps_discussion/p129/ + // has some testing, and arrives at ~12 ppm (75% for 3.7 speed) const drainChance = 0.5 core.NewItemEffect(49623, func(agent core.Agent) { player := agent.GetCharacter() - tempStrProc := player.NewTemporaryStatsAura("Chaos Bane", core.ActionID{SpellID: 73422}, stats.Stats{stats.Strength: 270}, time.Second*10) + chaosBaneAura := player.NewTemporaryStatsAura("Chaos Bane", core.ActionID{SpellID: 73422}, stats.Stats{stats.Strength: 270}, time.Second*10) + choasBaneSpell := player.RegisterSpell(core.SpellConfig{ ActionID: core.ActionID{SpellID: 71904}, SpellSchool: core.SpellSchoolShadow, @@ -30,9 +33,11 @@ func init() { ThreatMultiplier: 1, ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { - baseDamage := sim.Roll(1900, 2100) - // can miss, can't crit - spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHit) + baseDamage := sim.Roll(1900, 2100) / float64(sim.GetNumTargets()) + for _, target := range sim.Encounter.TargetUnits { + // can miss, can't crit + spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHit) + } }, }) @@ -43,6 +48,13 @@ func init() { MaxStacks: 10, OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) { player.AddStatDynamic(sim, stats.Strength, float64(newStacks-oldStacks)*30) + + if newStacks == aura.MaxStacks { + choasBaneSpell.Cast(sim, nil) + chaosBaneAura.Activate(sim) + aura.SetStacks(sim, 0) + return + } }, }) @@ -53,23 +65,14 @@ func init() { return } - if stackingAura.GetStacks() == 10 { - stackingAura.Deactivate(sim) - tempStrProc.Activate(sim) - choasBaneSpell.Cast(sim, result.Target) + if chaosBaneAura.IsActive() { return } - if tempStrProc.IsActive() { - return + if sim.RandomFloat("Shadowmourne") < drainChance { + stackingAura.Activate(sim) + stackingAura.AddStack(sim) } - - if sim.RandomFloat("shadowmourne") > drainChance { - return - } - - stackingAura.Activate(sim) - stackingAura.AddStack(sim) }, })) }) diff --git a/sim/core/stats/stats.go b/sim/core/stats/stats.go index 7e7543d1f5..9f473319a6 100644 --- a/sim/core/stats/stats.go +++ b/sim/core/stats/stats.go @@ -190,29 +190,25 @@ func FromFloatArray(values []float64) Stats { // Adds two Stats together, returning the new Stats. func (stats Stats) Add(other Stats) Stats { - newStats := Stats{} - - for i, thisStat := range stats { - newStats[i] = thisStat + other[i] + var newStats Stats + for k, v := range stats { + newStats[k] = v + other[k] } - return newStats } // Subtracts another Stats from this one, returning the new Stats. func (stats Stats) Subtract(other Stats) Stats { - newStats := Stats{} - + var newStats Stats for k, v := range stats { newStats[k] = v - other[k] } - return newStats } func (stats Stats) Multiply(multiplier float64) Stats { - newStats := stats - for k, v := range newStats { + var newStats Stats + for k, v := range stats { newStats[k] = v * multiplier } return newStats @@ -221,32 +217,28 @@ func (stats Stats) Multiply(multiplier float64) Stats { // Multiplies two Stats together by multiplying the values of corresponding // stats, like a dot product operation. func (stats Stats) DotProduct(other Stats) Stats { - newStats := Stats{} - + var newStats Stats for k, v := range stats { newStats[k] = v * other[k] } - return newStats } func (stats Stats) Equals(other Stats) bool { - for i := range stats { - if stats[i] != other[i] { + for k, v := range stats { + if v != other[k] { return false } } - return true } func (stats Stats) EqualsWithTolerance(other Stats, tolerance float64) bool { - for i := range stats { - if stats[i] < other[i]-tolerance || stats[i] > other[i]+tolerance { + for k, v := range stats { + if v < other[k]-tolerance || v > other[k]+tolerance { return false } } - return true } @@ -259,8 +251,7 @@ func (stats Stats) String() string { if name == "none" || statValue == 0 { continue } - - fmt.Fprintf(&sb, "\t%s: %0.3f,\n", name, statValue) + _, _ = fmt.Fprintf(&sb, "\t%s: %0.3f,\n", name, statValue) } sb.WriteString("\n}") @@ -277,7 +268,7 @@ func (stats Stats) FlatString() string { if name == "none" || statValue == 0 { continue } - fmt.Fprintf(&sb, "\"%s\": %0.3f,", name, statValue) + _, _ = fmt.Fprintf(&sb, "\"%s\": %0.3f,", name, statValue) } sb.WriteString("}") diff --git a/sim/deathknight/dps/TestBlood.results b/sim/deathknight/dps/TestBlood.results index 88fbdf3b09..ae8698aaa5 100644 --- a/sim/deathknight/dps/TestBlood.results +++ b/sim/deathknight/dps/TestBlood.results @@ -629,8 +629,8 @@ dps_results: { dps_results: { key: "TestBlood-AllItems-Shadowmourne-49623" value: { - dps: 9382.87235 - tps: 4891.95635 + dps: 9402.5787 + tps: 4908.4703 } } dps_results: { diff --git a/sim/deathknight/tank/TestBloodTank.results b/sim/deathknight/tank/TestBloodTank.results index fdf939ea7c..89d9d36155 100644 --- a/sim/deathknight/tank/TestBloodTank.results +++ b/sim/deathknight/tank/TestBloodTank.results @@ -629,8 +629,8 @@ dps_results: { dps_results: { key: "TestBloodTank-AllItems-Shadowmourne-49623" value: { - dps: 2030.09765 - tps: 5824.94556 + dps: 2034.05719 + tps: 5820.07924 } } dps_results: { diff --git a/sim/paladin/hand_of_reckoning.go b/sim/paladin/hand_of_reckoning.go index 30c210fe6e..9b56a41042 100644 --- a/sim/paladin/hand_of_reckoning.go +++ b/sim/paladin/hand_of_reckoning.go @@ -13,7 +13,7 @@ func (paladin *Paladin) registerHandOfReckoningSpell() { } paladin.HandOfReckoning = paladin.RegisterSpell(core.SpellConfig{ - ActionID: core.ActionID{SpellID: 62124}, + ActionID: core.ActionID{SpellID: 67485}, // 62124 is the "taunt" part SpellSchool: core.SpellSchoolHoly, ProcMask: core.ProcMaskSpellDamage, Flags: core.SpellFlagMeleeMetrics, @@ -33,12 +33,10 @@ func (paladin *Paladin) registerHandOfReckoningSpell() { DamageMultiplier: 1, ThreatMultiplier: 1, CritMultiplier: paladin.SpellCritMultiplier(), - BonusHitRating: 100 * core.SpellHitRatingPerHitChance, ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { - baseDamage := 1 + - .5*spell.MeleeAttackPower() - spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit) + baseDamage := 1 + .5*spell.MeleeAttackPower() + spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicCrit) // cannot miss }, }) } diff --git a/sim/paladin/retribution/TestRetribution.results b/sim/paladin/retribution/TestRetribution.results index b5ebb4bf89..41d843e068 100644 --- a/sim/paladin/retribution/TestRetribution.results +++ b/sim/paladin/retribution/TestRetribution.results @@ -768,8 +768,8 @@ dps_results: { dps_results: { key: "TestRetribution-AllItems-Shadowmourne-49623" value: { - dps: 7579.50651 - tps: 7680.99661 + dps: 7572.40872 + tps: 7673.82549 dtps: 9.92959 } } diff --git a/sim/paladin/soc.go b/sim/paladin/soc.go index 32b50b923c..3a5fa56027 100644 --- a/sim/paladin/soc.go +++ b/sim/paladin/soc.go @@ -30,7 +30,7 @@ func (paladin *Paladin) registerSealOfCommandSpellAndAura() { onJudgementProc := paladin.RegisterSpell(core.SpellConfig{ ActionID: core.ActionID{SpellID: 20467}, // Judgement of Command SpellSchool: core.SpellSchoolHoly, - ProcMask: core.ProcMaskMeleeOrRangedSpecial, + ProcMask: core.ProcMaskMeleeOrRangedSpecial, // defense type is 2, so it's likely only ProcMaskMeleeSpecial Flags: core.SpellFlagMeleeMetrics | SpellFlagSecondaryJudgement, BonusCritRating: (6 * float64(paladin.Talents.Fanaticism) * core.CritRatingPerCritChance) + diff --git a/sim/paladin/sov.go b/sim/paladin/sov.go index b9e3c8a9bb..ae9c727f33 100644 --- a/sim/paladin/sov.go +++ b/sim/paladin/sov.go @@ -119,7 +119,7 @@ func (paladin *Paladin) registerSealOfVengeanceSpellAndAura() { onSpecialOrSwingProc := paladin.RegisterSpell(core.SpellConfig{ ActionID: core.ActionID{SpellID: 42463}, // Seal of Vengeance damage bonus. SpellSchool: core.SpellSchoolHoly, - ProcMask: core.ProcMaskEmpty, + ProcMask: core.ProcMaskEmpty, // does proc certain spell damage-based items, e.g. Black Magic, Pendulum of Telluric Currents Flags: core.SpellFlagMeleeMetrics, // (mult * weaponScaling / stacks) From 94f5d848c0fc30e6bf4a8e2a7af3186112229eb2 Mon Sep 17 00:00:00 2001 From: vigo Date: Sun, 2 Apr 2023 21:10:29 +0200 Subject: [PATCH 2/2] [items] while at it, also update Bryntroll's proc to not crit --- sim/common/wotlk/other_effects.go | 3 +-- sim/deathknight/dps/TestBlood.results | 8 ++++---- sim/deathknight/tank/TestBloodTank.results | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sim/common/wotlk/other_effects.go b/sim/common/wotlk/other_effects.go index e2266fb4fd..eb9168e60c 100644 --- a/sim/common/wotlk/other_effects.go +++ b/sim/common/wotlk/other_effects.go @@ -898,11 +898,10 @@ func init() { ProcMask: core.ProcMaskEmpty, DamageMultiplier: 1, - CritMultiplier: character.DefaultSpellCritMultiplier(), ThreatMultiplier: 1, ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { - spell.CalcAndDealDamage(sim, target, sim.Roll(minDmg, maxDmg), spell.OutcomeMagicHitAndCrit) + spell.CalcAndDealDamage(sim, target, sim.Roll(minDmg, maxDmg), spell.OutcomeMagicHit) }, }) diff --git a/sim/deathknight/dps/TestBlood.results b/sim/deathknight/dps/TestBlood.results index 02aa22a5a9..19f89b4d1f 100644 --- a/sim/deathknight/dps/TestBlood.results +++ b/sim/deathknight/dps/TestBlood.results @@ -130,15 +130,15 @@ dps_results: { dps_results: { key: "TestBlood-AllItems-Bryntroll,theBoneArbiter-50415" value: { - dps: 8484.24749 - tps: 4406.12017 + dps: 8456.8189 + tps: 4388.59242 } } dps_results: { key: "TestBlood-AllItems-Bryntroll,theBoneArbiter-50709" value: { - dps: 8609.60849 - tps: 4474.12892 + dps: 8573.17092 + tps: 4452.46303 } } dps_results: { diff --git a/sim/deathknight/tank/TestBloodTank.results b/sim/deathknight/tank/TestBloodTank.results index 9337feed02..02162dda5b 100644 --- a/sim/deathknight/tank/TestBloodTank.results +++ b/sim/deathknight/tank/TestBloodTank.results @@ -130,15 +130,15 @@ dps_results: { dps_results: { key: "TestBloodTank-AllItems-Bryntroll,theBoneArbiter-50415" value: { - dps: 1828.52493 - tps: 5274.71557 + dps: 1820.31805 + tps: 5249.57027 } } dps_results: { key: "TestBloodTank-AllItems-Bryntroll,theBoneArbiter-50709" value: { - dps: 1872.06049 - tps: 5359.85549 + dps: 1863.17887 + tps: 5345.14668 } } dps_results: {