Skip to content

Commit

Permalink
Merge pull request #3317 from wowsims/balance-settings-cleanup
Browse files Browse the repository at this point in the history
Balance settings cleanup
  • Loading branch information
Gashiraa authored Jul 14, 2023
2 parents 9818f97 + 679113b commit bcf673a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 29 deletions.
2 changes: 1 addition & 1 deletion proto/druid.proto
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ message BalanceDruid {
enum IsUsage {
NoIs = 0;
BeforeSolar = 1;
MaximizeIs = 2;
OptimizeIs = 2;
MultidotIs = 3;
}
IsUsage is_usage = 3;
Expand Down
8 changes: 4 additions & 4 deletions sim/druid/balance/TestBalancePhase3.results
Original file line number Diff line number Diff line change
Expand Up @@ -915,8 +915,8 @@ dps_results: {
dps_results: {
key: "TestBalancePhase3-Settings-Tauren-P3-Default-FullBuffs-LongMultiTarget"
value: {
dps: 16644.11888
tps: 19482.60859
dps: 16601.28562
tps: 19435.22438
}
}
dps_results: {
Expand All @@ -936,8 +936,8 @@ dps_results: {
dps_results: {
key: "TestBalancePhase3-Settings-Tauren-P3-Default-NoBuffs-LongMultiTarget"
value: {
dps: 7653.4313
tps: 8600.40001
dps: 7637.96063
tps: 8596.52107
}
}
dps_results: {
Expand Down
2 changes: 1 addition & 1 deletion sim/druid/balance/balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (moonkin *BalanceDruid) Reset(sim *core.Simulation) {

if moonkin.Rotation.Type == proto.BalanceDruid_Rotation_Default {
moonkin.Rotation.MfUsage = proto.BalanceDruid_Rotation_BeforeLunar
moonkin.Rotation.IsUsage = proto.BalanceDruid_Rotation_MaximizeIs
moonkin.Rotation.IsUsage = proto.BalanceDruid_Rotation_OptimizeIs
moonkin.Rotation.WrathUsage = proto.BalanceDruid_Rotation_RegularWrath
moonkin.Rotation.UseBattleRes = false
moonkin.Rotation.UseStarfire = true
Expand Down
4 changes: 2 additions & 2 deletions sim/druid/balance/balance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ var PlayerOptionsAdaptive = &proto.Player_BalanceDruid{
Options: &proto.BalanceDruid_Options{},
Rotation: &proto.BalanceDruid_Rotation{
MfUsage: proto.BalanceDruid_Rotation_BeforeLunar,
IsUsage: proto.BalanceDruid_Rotation_MaximizeIs,
IsUsage: proto.BalanceDruid_Rotation_OptimizeIs,
WrathUsage: proto.BalanceDruid_Rotation_RegularWrath,
UseBattleRes: false,
UseStarfire: true,
Expand Down Expand Up @@ -150,7 +150,7 @@ var PlayerOptionsMultidotMf = &proto.Player_BalanceDruid{
Options: &proto.BalanceDruid_Options{},
Rotation: &proto.BalanceDruid_Rotation{
MfUsage: proto.BalanceDruid_Rotation_MultidotMf,
IsUsage: proto.BalanceDruid_Rotation_MaximizeIs,
IsUsage: proto.BalanceDruid_Rotation_OptimizeIs,
WrathUsage: proto.BalanceDruid_Rotation_RegularWrath,
UseBattleRes: false,
UseStarfire: true,
Expand Down
20 changes: 5 additions & 15 deletions sim/druid/balance/rotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ func (moonkin *BalanceDruid) rotation(sim *core.Simulation) (*core.Spell, *core.
if rotation.SnapshotMf {
flareProc := moonkin.GetAura("Flare of the Heavens Proc")
pleaProc := moonkin.GetAura("Pandora's Plea Proc")
lightweaveProc := moonkin.GetAura("Lightweave Proc")
wildMagicProc := moonkin.GetAura("Potion of Wild Magic")
shouldCheckForSnapshot := flareProc.IsActive() || lightweaveProc.IsActive() || pleaProc.IsActive() || (wildMagicProc.IsActive() && sim.CurrentTime > 60*time.Second)
shouldCheckForSnapshot := flareProc.IsActive() || pleaProc.IsActive() || (wildMagicProc.IsActive() && sim.CurrentTime > 60*time.Second)
if shouldCheckForSnapshot {
if moonkin.shouldSnapshotMf(sim, flareProc) || moonkin.shouldSnapshotMf(sim, lightweaveProc) || moonkin.shouldSnapshotMf(sim, wildMagicProc) || moonkin.shouldSnapshotMf(sim, pleaProc) {
if moonkin.shouldSnapshotMf(sim, flareProc) || moonkin.shouldSnapshotMf(sim, wildMagicProc) || moonkin.shouldSnapshotMf(sim, pleaProc) {
return moonkin.Moonfire, target
}
}
Expand Down Expand Up @@ -81,7 +80,7 @@ func (moonkin *BalanceDruid) rotation(sim *core.Simulation) (*core.Spell, *core.
shouldHoldIs := core.Ternary(moonkin.MoonkinT84PCAura == nil, lunarIsActive, lunarIsActive && moonkin.HasActiveAuraWithTag(core.BloodlustAuraTag))

// Max IS uptime
if rotation.IsUsage == proto.BalanceDruid_Rotation_MaximizeIs && !shouldHoldIs {
if rotation.IsUsage == proto.BalanceDruid_Rotation_OptimizeIs && !shouldHoldIs {
if moonkin.InsectSwarm.CurDot().RemainingDuration(sim) <= 0 {
return moonkin.InsectSwarm, target
}
Expand Down Expand Up @@ -110,6 +109,7 @@ func (moonkin *BalanceDruid) rotation(sim *core.Simulation) (*core.Spell, *core.
playerLatency := time.Duration(core.MaxInt32(rotation.PlayerLatency, 0)) * time.Millisecond
lunarICD := moonkin.LunarICD.Timer.TimeToReady(sim)
solarICD := moonkin.SolarICD.Timer.TimeToReady(sim)
canExtendMf := rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendAlways || rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendOutsideSolar

if moonkin.Talents.Eclipse > 0 {
solarUptime := moonkin.SolarEclipseProcAura.ExpiresAt() - sim.CurrentTime
Expand All @@ -136,7 +136,6 @@ func (moonkin *BalanceDruid) rotation(sim *core.Simulation) (*core.Spell, *core.
// Eclipse
if solarIsActive || lunarIsActive {
if lunarIsActive {
canExtendMf := rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendAlways || rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendOutsideSolar || rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendDuringLunar
if canExtendMf && moonkin.ExtendingMoonfireStacks == 0 {
if extendTarget := moonkin.tryExtendMoonfire(sim); extendTarget != nil {
return moonkin.Moonfire, extendTarget
Expand All @@ -157,7 +156,6 @@ func (moonkin *BalanceDruid) rotation(sim *core.Simulation) (*core.Spell, *core.
return moonkin.Starfire, target
}
}
canExtendMf := rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendAlways || rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendDuringSolar
if canExtendMf && moonkin.ExtendingMoonfireStacks == 0 {
if extendTarget := moonkin.tryExtendMoonfire(sim); extendTarget != nil {
return moonkin.Moonfire, extendTarget
Expand All @@ -181,20 +179,12 @@ func (moonkin *BalanceDruid) rotation(sim *core.Simulation) (*core.Spell, *core.
}
}

canExtendMf := rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendAlways || rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendOutsideSolar

fishingForLunar := lunarICD <= solarICD
if rotation.EclipsePrio == proto.BalanceDruid_Rotation_Solar {
fishingForLunar = lunarICD < solarICD
}

if fishingForLunar && (canExtendMf || rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendFishingForLunar) && moonkin.ExtendingMoonfireStacks == 0 {
if extendTarget := moonkin.tryExtendMoonfire(sim); extendTarget != nil {
return moonkin.Moonfire, extendTarget
}
}

if !fishingForLunar && (canExtendMf || rotation.MfExtension == proto.BalanceDruid_Rotation_ExtendFishingForSolar) && moonkin.ExtendingMoonfireStacks == 0 {
if canExtendMf && moonkin.ExtendingMoonfireStacks == 0 {
if extendTarget := moonkin.tryExtendMoonfire(sim); extendTarget != nil {
return moonkin.Moonfire, extendTarget
}
Expand Down
6 changes: 1 addition & 5 deletions ui/balance_druid/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ export const BalanceDruidRotationConfig = {
label: 'Moonfire Extension',
labelTooltip: 'When should the rotation try to extend Moonfire on the main target.',
values: [
{ name: 'Extend fishing for lunar', value: MfExtension.ExtendFishingForLunar },
{ name: 'Extend fishing for solar', value: MfExtension.ExtendFishingForSolar },
{ name: 'Extend during lunar', value: MfExtension.ExtendDuringLunar },
{ name: 'Extend during solar', value: MfExtension.ExtendDuringSolar },
{ name: 'Extend always', value: MfExtension.ExtendAlways },
{ name: 'Extend outside solar', value: MfExtension.ExtendOutsideSolar },
{ name: 'Do not extend', value: MfExtension.DontExtend },
Expand All @@ -98,7 +94,7 @@ export const BalanceDruidRotationConfig = {
values: [
{ name: 'Unused', value: IsUsage.NoIs },
{ name: 'Before solar', value: IsUsage.BeforeSolar },
{ name: 'Maximize', value: IsUsage.MaximizeIs },
{ name: 'Optimize', value: IsUsage.OptimizeIs },
{ name: 'Multidot', value: IsUsage.MultidotIs },
],
showWhen: (player: Player<Spec.SpecBalanceDruid>) => player.getRotation().type == RotationType.Manual,
Expand Down
2 changes: 1 addition & 1 deletion ui/balance_druid/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const DefaultRotation = BalanceDruidRotation.create({
maintainFaerieFire: true,
useSmartCooldowns: true,
mfUsage: BalanceDruid_Rotation_MfUsage.BeforeLunar,
isUsage: BalanceDruid_Rotation_IsUsage.MaximizeIs,
isUsage: BalanceDruid_Rotation_IsUsage.OptimizeIs,
wrathUsage: BalanceDruid_Rotation_WrathUsage.RegularWrath,
useStarfire: true,
useBattleRes: false,
Expand Down

0 comments on commit bcf673a

Please sign in to comment.