From f1daafeb95f0af9e3e93a2eec209b4642d7c8a36 Mon Sep 17 00:00:00 2001 From: Kayla Glick Date: Tue, 30 Jan 2024 11:53:19 -0500 Subject: [PATCH 1/4] update moonfire+sunfire damage calculations --- sim/druid/moonfire.go | 5 +++-- sim/druid/runes.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sim/druid/moonfire.go b/sim/druid/moonfire.go index c34cd09dd0..ffa34804fe 100644 --- a/sim/druid/moonfire.go +++ b/sim/druid/moonfire.go @@ -15,6 +15,7 @@ func (druid *Druid) getMoonfireBaseConfig(rank int) core.SpellConfig { manaCost := [11]float64{0, 25, 50, 75, 105, 150, 190, 235, 280, 325, 375}[rank] level := [11]int{0, 4, 10, 16, 22, 28, 34, 40, 46, 52, 58}[rank] + ticks := core.TernaryInt32(rank < 2, 3, 4) impMf := float64(druid.Talents.ImprovedMoonfire) moonfury := float64(druid.Talents.Moonfury) @@ -40,10 +41,10 @@ func (druid *Druid) getMoonfireBaseConfig(rank int) core.SpellConfig { Label: "Moonfire", ActionID: core.ActionID{SpellID: spellId}, }, - NumberOfTicks: core.TernaryInt32(rank < 2, 3, 4), + NumberOfTicks: ticks, TickLength: time.Second * 3, OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) { - dot.SnapshotBaseDamage = (baseDotDamage / 3.0) + spellDotCoeff*dot.Spell.SpellPower() + dot.SnapshotBaseDamage = (baseDotDamage / float64(ticks)) + spellDotCoeff*dot.Spell.SpellPower() dot.SnapshotAttackerMultiplier = 1 // dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex]) }, OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) { diff --git a/sim/druid/runes.go b/sim/druid/runes.go index c3288fa8de..98e0e5400e 100644 --- a/sim/druid/runes.go +++ b/sim/druid/runes.go @@ -69,7 +69,7 @@ func (druid *Druid) applySunfire() { NumberOfTicks: ticks, TickLength: time.Second * 3, OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) { - dot.SnapshotBaseDamage = (baseDotDamage / float64(ticks)) + 0.13*dot.Spell.SpellPower() + dot.SnapshotBaseDamage = baseDotDamage + 0.13*dot.Spell.SpellPower() dot.SnapshotAttackerMultiplier = 1 }, OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) { From 89611fed63777c4f6a919a5201f6cec067096a83 Mon Sep 17 00:00:00 2001 From: Kayla Glick Date: Tue, 30 Jan 2024 11:57:49 -0500 Subject: [PATCH 2/4] update test results --- sim/druid/balance/TestBalance.results | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sim/druid/balance/TestBalance.results b/sim/druid/balance/TestBalance.results index a1ad4aa1f6..b86ec73516 100644 --- a/sim/druid/balance/TestBalance.results +++ b/sim/druid/balance/TestBalance.results @@ -51,84 +51,84 @@ character_stats_results: { dps_results: { key: "TestBalance-AllItems-BlackfathomElementalist'sHide" value: { - dps: 21.63495 - tps: 21.63495 + dps: 22.07856 + tps: 22.07856 } } dps_results: { key: "TestBalance-AllItems-BlackfathomSlayer'sLeather" value: { - dps: 19.57376 - tps: 19.57376 + dps: 19.9279 + tps: 19.9279 } } dps_results: { key: "TestBalance-AllItems-StormshroudArmor" value: { - dps: 7.81282 - tps: 7.81282 + dps: 7.58782 + tps: 7.58782 } } dps_results: { key: "TestBalance-AllItems-TwilightInvoker'sVestments" value: { - dps: 21.62409 - tps: 21.62409 + dps: 22.17498 + tps: 22.17498 } } dps_results: { key: "TestBalance-Average-Default" value: { - dps: 37.91015 - tps: 37.91015 + dps: 39.41323 + tps: 39.41323 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-FullBuffs-LongMultiTarget" value: { - dps: 37.98287 - tps: 37.98287 + dps: 39.47124 + tps: 39.47124 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-FullBuffs-LongSingleTarget" value: { - dps: 37.98287 - tps: 37.98287 + dps: 39.47124 + tps: 39.47124 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-FullBuffs-ShortSingleTarget" value: { - dps: 40.29015 - tps: 40.29015 + dps: 41.70085 + tps: 41.70085 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-NoBuffs-LongMultiTarget" value: { - dps: 36.14656 - tps: 36.14656 + dps: 37.28812 + tps: 37.28812 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-NoBuffs-LongSingleTarget" value: { - dps: 36.14656 - tps: 36.14656 + dps: 37.28812 + tps: 37.28812 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-NoBuffs-ShortSingleTarget" value: { - dps: 39.29645 - tps: 39.29645 + dps: 40.70715 + tps: 40.70715 } } dps_results: { key: "TestBalance-SwitchInFrontOfTarget-Default" value: { - dps: 37.98287 - tps: 37.98287 + dps: 39.47124 + tps: 39.47124 } } From 3d775e06e7ea6daf77d6337f0db6a9378f049514 Mon Sep 17 00:00:00 2001 From: Kayla Glick Date: Tue, 30 Jan 2024 17:01:45 -0500 Subject: [PATCH 3/4] fix issue with aspect of the lion --- ui/balance_druid/gear_sets/phase_1.gear.json | 2 +- ui/balance_druid/sim.ts | 15 +++++++++------ ui/core/components/inputs/buffs_debuffs.ts | 6 ++++-- ui/core/components/inputs/stat_options.ts | 9 +++++++-- ui/core/raid.ts | 1 - 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/ui/balance_druid/gear_sets/phase_1.gear.json b/ui/balance_druid/gear_sets/phase_1.gear.json index 6c8ac66163..efe4703977 100644 --- a/ui/balance_druid/gear_sets/phase_1.gear.json +++ b/ui/balance_druid/gear_sets/phase_1.gear.json @@ -3,7 +3,7 @@ {"id":211507}, {"id":209686}, {"id":215365}, - {"id":7356}, + {"id":7356,"randomSuffix":1804}, {"id":211509,"enchant":847,"rune":414799}, {"id":209578,"enchant":823}, {"id":211455,"rune":414684}, diff --git a/ui/balance_druid/sim.ts b/ui/balance_druid/sim.ts index 55d82f5f24..04a5c842c2 100644 --- a/ui/balance_druid/sim.ts +++ b/ui/balance_druid/sim.ts @@ -30,6 +30,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecBalanceDruid, { Stat.StatIntellect, Stat.StatSpirit, Stat.StatSpellPower, + Stat.StatArcanePower, Stat.StatNaturePower, Stat.StatSpellHit, Stat.StatSpellCrit, @@ -57,12 +58,14 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecBalanceDruid, { gear: Presets.DefaultGear.gear, // Default EP weights for sorting gear in the gear picker. epWeights: Stats.fromMap({ - [Stat.StatIntellect]: 0.43, - [Stat.StatSpirit]: 0.34, - [Stat.StatSpellPower]: 1, - [Stat.StatSpellCrit]: 0.82, - [Stat.StatSpellHaste]: 0.80, - [Stat.StatMP5]: 0.00, + [Stat.StatIntellect]: 0.43, + [Stat.StatSpirit]: 0.34, + [Stat.StatSpellPower]: 1, + [Stat.StatArcanePower]: 0.49, + [Stat.StatNaturePower]: 0.51, + [Stat.StatSpellCrit]: 0.82, + [Stat.StatSpellHaste]: 0.80, + [Stat.StatMP5]: 0.00, }), // Default consumes settings. consumes: Presets.DefaultConsumes, diff --git a/ui/core/components/inputs/buffs_debuffs.ts b/ui/core/components/inputs/buffs_debuffs.ts index d5289de6d2..ee55a8a6d4 100644 --- a/ui/core/components/inputs/buffs_debuffs.ts +++ b/ui/core/components/inputs/buffs_debuffs.ts @@ -314,12 +314,14 @@ export const RAID_BUFFS_CONFIG = [ { config: AllStatsPercentBuffAlliance, picker: MultiIconPicker, - stats: [] + stats: [], + faction: Faction.Alliance, }, { config: AllStatsPercentBuffHorde, picker: IconPicker, - stats: [] + stats: [], + faction: Faction.Horde, }, { config: ArmorBuff, diff --git a/ui/core/components/inputs/stat_options.ts b/ui/core/components/inputs/stat_options.ts index be5d572e48..42035a77e0 100644 --- a/ui/core/components/inputs/stat_options.ts +++ b/ui/core/components/inputs/stat_options.ts @@ -18,6 +18,7 @@ export interface ActionInputConfig { export interface StatOption { stats: Array, + faction?: Faction } export interface ItemStatOption extends StatOption { @@ -54,9 +55,13 @@ export function relevantStatOptions | ): StatOptions { return options .filter(option => + // Filter by faction if there's a faction restriction + (!option.faction || option.faction == simUI.player.getFaction()) && + // Filter out excluded options + !simUI.individualConfig.excludeBuffDebuffInputs.includes(option.config) && + // Compare EP stats option.stats.length == 0 || option.stats.some(stat => simUI.individualConfig.epStats.includes(stat)) || + // Check included options simUI.individualConfig.includeBuffDebuffInputs.includes(option.config)) - .filter(option => - !simUI.individualConfig.excludeBuffDebuffInputs.includes(option.config)) } diff --git a/ui/core/raid.ts b/ui/core/raid.ts index 9ecabdf432..b73d881554 100644 --- a/ui/core/raid.ts +++ b/ui/core/raid.ts @@ -127,7 +127,6 @@ export class Raid { if (RaidBuffs.equals(this.buffs, newBuffs)) return; - // Make a defensive copy this.buffs = RaidBuffs.clone(newBuffs); From 2b6e35b24216801d1b87647cf5142aa808b8dc1a Mon Sep 17 00:00:00 2001 From: Kayla Glick Date: Tue, 30 Jan 2024 17:37:07 -0500 Subject: [PATCH 4/4] load suffixes into the test DB, fix balance tests --- sim/core/database_load.go | 13 ++++- sim/druid/balance/TestBalance.results | 52 ++++++++++---------- ui/balance_druid/gear_sets/phase_1.gear.json | 2 +- 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/sim/core/database_load.go b/sim/core/database_load.go index 7c14b900b6..186f9c6d05 100644 --- a/sim/core/database_load.go +++ b/sim/core/database_load.go @@ -14,8 +14,9 @@ func init() { WITH_DB = true simDB := &proto.SimDatabase{ - Items: make([]*proto.SimItem, len(db.Items)), - Enchants: make([]*proto.SimEnchant, len(db.Enchants)), + Items: make([]*proto.SimItem, len(db.Items)), + Enchants: make([]*proto.SimEnchant, len(db.Enchants)), + RandomSuffixes: make([]*proto.ItemRandomSuffix, len(db.RandomSuffixes)), } for i, item := range db.Items { @@ -42,5 +43,13 @@ func init() { } } + for i, suffix := range db.RandomSuffixes { + simDB.RandomSuffixes[i] = &proto.ItemRandomSuffix{ + Id: suffix.Id, + Name: suffix.Name, + Stats: suffix.Stats, + } + } + addToDatabase(simDB) } diff --git a/sim/druid/balance/TestBalance.results b/sim/druid/balance/TestBalance.results index b86ec73516..449a98cf62 100644 --- a/sim/druid/balance/TestBalance.results +++ b/sim/druid/balance/TestBalance.results @@ -11,7 +11,7 @@ character_stats_results: { final_stats: 0 final_stats: 0 final_stats: 0 - final_stats: 14 + final_stats: 21 final_stats: 0 final_stats: 20 final_stats: 1 @@ -27,7 +27,7 @@ character_stats_results: { final_stats: 2301.1 final_stats: 0 final_stats: 0 - final_stats: 1651.38 + final_stats: 1650.38 final_stats: 0 final_stats: 0 final_stats: 0 @@ -51,84 +51,84 @@ character_stats_results: { dps_results: { key: "TestBalance-AllItems-BlackfathomElementalist'sHide" value: { - dps: 22.07856 - tps: 22.07856 + dps: 22.25252 + tps: 22.25252 } } dps_results: { key: "TestBalance-AllItems-BlackfathomSlayer'sLeather" value: { - dps: 19.9279 - tps: 19.9279 + dps: 20.08196 + tps: 20.08196 } } dps_results: { key: "TestBalance-AllItems-StormshroudArmor" value: { - dps: 7.58782 - tps: 7.58782 + dps: 7.77958 + tps: 7.77958 } } dps_results: { key: "TestBalance-AllItems-TwilightInvoker'sVestments" value: { - dps: 22.17498 - tps: 22.17498 + dps: 22.34349 + tps: 22.34349 } } dps_results: { key: "TestBalance-Average-Default" value: { - dps: 39.41323 - tps: 39.41323 + dps: 39.96123 + tps: 39.96123 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-FullBuffs-LongMultiTarget" value: { - dps: 39.47124 - tps: 39.47124 + dps: 40.01711 + tps: 40.01711 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-FullBuffs-LongSingleTarget" value: { - dps: 39.47124 - tps: 39.47124 + dps: 40.01711 + tps: 40.01711 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-FullBuffs-ShortSingleTarget" value: { - dps: 41.70085 - tps: 41.70085 + dps: 42.17794 + tps: 42.17794 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-NoBuffs-LongMultiTarget" value: { - dps: 37.28812 - tps: 37.28812 + dps: 37.83259 + tps: 37.83259 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-NoBuffs-LongSingleTarget" value: { - dps: 37.28812 - tps: 37.28812 + dps: 37.83259 + tps: 37.83259 } } dps_results: { key: "TestBalance-Settings-Tauren-25-phase_1-Default-default-NoBuffs-ShortSingleTarget" value: { - dps: 40.70715 - tps: 40.70715 + dps: 41.17445 + tps: 41.17445 } } dps_results: { key: "TestBalance-SwitchInFrontOfTarget-Default" value: { - dps: 39.47124 - tps: 39.47124 + dps: 40.01711 + tps: 40.01711 } } diff --git a/ui/balance_druid/gear_sets/phase_1.gear.json b/ui/balance_druid/gear_sets/phase_1.gear.json index efe4703977..af468807f2 100644 --- a/ui/balance_druid/gear_sets/phase_1.gear.json +++ b/ui/balance_druid/gear_sets/phase_1.gear.json @@ -3,7 +3,7 @@ {"id":211507}, {"id":209686}, {"id":215365}, - {"id":7356,"randomSuffix":1804}, + {"id":15340,"randomSuffix":1993}, {"id":211509,"enchant":847,"rune":414799}, {"id":209578,"enchant":823}, {"id":211455,"rune":414684},