Skip to content

Commit

Permalink
Merge pull request #3079 from wowsims/subtlety-builder-option
Browse files Browse the repository at this point in the history
Add dropdown menu for Subtlety builder
  • Loading branch information
catszeid authored May 12, 2023
2 parents b231381 + 04eeb85 commit 16a4fd6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
6 changes: 6 additions & 0 deletions proto/rogue.proto
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ message Rogue {
}
AssassinationPriority assassination_finisher_priority = 5;

enum SubtletyBuilder {
Hemorrhage = 0;
BackstabSub = 1;
}
SubtletyBuilder subtlety_builder = 26;

enum SubtletyPriority {
SubtletyEviscerate = 0;
SubtletyEnvenom = 1;
Expand Down
5 changes: 3 additions & 2 deletions sim/rogue/rotation_subtlety.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package rogue

import (
"golang.org/x/exp/slices"
"log"
"time"

"golang.org/x/exp/slices"

"github.com/wowsims/wotlk/sim/core"
"github.com/wowsims/wotlk/sim/core/proto"
)
Expand Down Expand Up @@ -320,7 +321,7 @@ func (x *rotation_subtlety) setSubtletyBuilder(sim *core.Simulation, rogue *Rogu
return
}
// Backstab
if !rogue.Rotation.HemoWithDagger && !rogue.PseudoStats.InFrontOfTarget && rogue.HasDagger(core.MainHand) {
if rogue.Rotation.SubtletyBuilder == proto.Rogue_Rotation_BackstabSub && !rogue.PseudoStats.InFrontOfTarget && rogue.HasDagger(core.MainHand) {
x.builder = rogue.Backstab
return
}
Expand Down
17 changes: 11 additions & 6 deletions ui/rogue/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Rogue_Rotation_AssassinationPriority as AssassinationPriority,
Rogue_Rotation_CombatPriority as CombatPriority,
Rogue_Rotation_CombatBuilder as CombatBuilder,
Rogue_Rotation_SubtletyBuilder as SubtletyBuilder,
Rogue_Rotation_SubtletyPriority as SubtletyPriority,
Rogue_Rotation_Frequency as Frequency,
Rogue_Options_PoisonImbue as Poison,
Expand Down Expand Up @@ -114,6 +115,16 @@ export const RogueRotationConfig = {
],
showWhen: (player: Player<Spec.SpecRogue>) => player.getTalents().mutilate
}),
InputHelpers.makeRotationEnumInput<Spec.SpecRogue, SubtletyBuilder>({
fieldName: 'subtletyBuilder',
label: "Builder",
labelTooltip: 'Use Hemorrhage or Backstab as builder.',
values: [
{ name: "Hemorrhage", value: SubtletyBuilder.Hemorrhage },
{ name: "Backstab", value: SubtletyBuilder.BackstabSub },
],
showWhen: (player: Player<Spec.SpecRogue>) => player.getTalents().honorAmongThieves > 0
}),
InputHelpers.makeRotationEnumInput<Spec.SpecRogue, SubtletyPriority>({
fieldName: 'subtletyFinisherPriority',
label: "Finisher Priority",
Expand Down Expand Up @@ -141,12 +152,6 @@ export const RogueRotationConfig = {
labelTooltip: 'Minimum number of combo points spent if Slice and Dice has frequency: Once',
showWhen: (player: Player<Spec.SpecRogue>) => player.getRotation().multiTargetSliceFrequency == Frequency.Once
}),
InputHelpers.makeRotationBooleanInput<Spec.SpecRogue>({
fieldName: 'hemoWithDagger',
label: 'Hemorrhage with Dagger',
labelTooltip: 'Use Hemorrhage with Dagger in mainhand',
showWhen: (player: Player<Spec.SpecRogue>) => player.getTalents().hemorrhage
}),
InputHelpers.makeRotationBooleanInput<Spec.SpecRogue>({
fieldName: 'openWithGarrote',
label: 'Open with Garrote',
Expand Down
3 changes: 2 additions & 1 deletion ui/rogue/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Rogue_Rotation_CombatBuilder,
Rogue_Rotation_CombatPriority,
Rogue_Rotation_Frequency,
Rogue_Rotation_SubtletyBuilder,
Rogue_Rotation_SubtletyPriority,
RogueMajorGlyph,
} from '../core/proto/rogue.js';
Expand Down Expand Up @@ -73,10 +74,10 @@ export const DefaultRotation = RogueRotation.create({
assassinationFinisherPriority: Rogue_Rotation_AssassinationPriority.EnvenomRupture,
combatBuilder: Rogue_Rotation_CombatBuilder.SinisterStrike,
combatFinisherPriority: Rogue_Rotation_CombatPriority.RuptureEviscerate,
subtletyBuilder: Rogue_Rotation_SubtletyBuilder.Hemorrhage,
subtletyFinisherPriority: Rogue_Rotation_SubtletyPriority.SubtletyEviscerate,
minimumComboPointsPrimaryFinisher: 4,
minimumComboPointsSecondaryFinisher: 4,
hemoWithDagger: true,
});

export const DefaultOptions = RogueOptions.create({
Expand Down

0 comments on commit 16a4fd6

Please sign in to comment.