Skip to content

Commit

Permalink
Commit before fixing rogue tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyt857 committed Jan 5, 2024
1 parent ad05e9b commit 2df56b8
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 2,222 deletions.
13 changes: 0 additions & 13 deletions sim/rogue/feint.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,4 @@ func (rogue *Rogue) registerFeintSpell() {
spell.CalcAndDealOutcome(sim, target, spell.OutcomeMeleeSpecialHit)
},
})
// Feint
if rogue.Rotation.UseFeint {
rogue.AddMajorCooldown(core.MajorCooldown{
Spell: rogue.Feint,
Priority: core.CooldownPriorityDefault,
Type: core.CooldownTypeDPS,
//don't feint if you're gonna waste energy by using the gcd
ShouldActivate: func(sim *core.Simulation, character *core.Character) bool {
thresh := 55.0 //55 simmed best with standard settings for now 3/12/2023, will refine with the rotational refinements. 55 was definitely best for combat, didn't make a difference for muti
return rogue.CurrentEnergy() <= thresh
},
})
}
}
53 changes: 4 additions & 49 deletions sim/rogue/rogue.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package rogue

import (
"math"
"time"

"github.com/wowsims/wotlk/sim/core"
Expand Down Expand Up @@ -39,21 +38,14 @@ const RogueBleedTag = "RogueBleed"
type Rogue struct {
core.Character

Talents *proto.RogueTalents
Options *proto.Rogue_Options
Rotation *proto.Rogue_Rotation

rotation rotation
Talents *proto.RogueTalents
Options *proto.Rogue_Options

bleedCategory *core.ExclusiveCategory

sliceAndDiceDurations [6]time.Duration
exposeArmorDurations [6]time.Duration

allMCDsDisabled bool

maxEnergy float64

Backstab *core.Spell
BladeFlurry *core.Spell
DeadlyPoison *core.Spell
Expand Down Expand Up @@ -185,13 +177,6 @@ func (rogue *Rogue) Initialize() {
rogue.registerVanishSpell()

rogue.finishingMoveEffectApplier = rogue.makeFinishingMoveEffectApplier()

if !rogue.IsUsingAPL && rogue.Rotation.TricksOfTheTradeFrequency != proto.Rogue_Rotation_Never && !rogue.HasSetBonus(Tier10, 2) {
rogue.RegisterPrepullAction(-10*time.Second, func(sim *core.Simulation) {
rogue.TricksOfTheTrade.Cast(sim, nil)
rogue.UpdateMajorCooldowns()
})
}
}

func (rogue *Rogue) ApplyEnergyTickMultiplier(multiplier float64) {
Expand All @@ -202,30 +187,6 @@ func (rogue *Rogue) Reset(sim *core.Simulation) {
for _, mcd := range rogue.GetMajorCooldowns() {
mcd.Disable()
}
rogue.allMCDsDisabled = true

if !rogue.IsUsingAPL {
// Stealth triggered effects (Overkill and Master of Subtlety) pre-pull activation
if rogue.Rotation.OpenWithGarrote || rogue.Rotation.OpenWithPremeditation {
rogue.AutoAttacks.CancelAutoSwing(sim)
rogue.StealthAura.Activate(sim)
} else {
if rogue.Options.StartingOverkillDuration > 0 {
if rogue.Talents.Overkill {
duration := time.Second * time.Duration(math.Min(float64(rogue.Options.StartingOverkillDuration), 20))
rogue.OverkillAura.Activate(sim)
rogue.OverkillAura.UpdateExpires(duration)
}
if rogue.Talents.MasterOfSubtlety > 0 {
duration := time.Second * time.Duration(math.Min(float64(rogue.Options.StartingOverkillDuration), 6))
rogue.MasterOfSubtletyAura.Activate(sim)
rogue.MasterOfSubtletyAura.UpdateExpires(duration)
}
}
}
}

rogue.setupRotation(sim)
}

func (rogue *Rogue) MeleeCritMultiplier(applyLethality bool) float64 {
Expand All @@ -248,13 +209,13 @@ func NewRogue(character *core.Character, options *proto.Player) *Rogue {
Character: *character,
Talents: &proto.RogueTalents{},
Options: rogueOptions.Options,
Rotation: rogueOptions.Rotation,
}
core.FillTalentsProto(rogue.Talents.ProtoReflect(), options.TalentsString, TalentTreeSizes)

// Passive rogue threat reduction: https://wotlk.wowhead.com/spell=21184/rogue-passive-dnd
rogue.PseudoStats.ThreatMultiplier *= 0.71
rogue.PseudoStats.CanParry = true

maxEnergy := 100.0
if rogue.Talents.Vigor {
maxEnergy += 10
Expand All @@ -265,8 +226,7 @@ func NewRogue(character *core.Character, options *proto.Player) *Rogue {
if rogue.HasSetBonus(Arena, 4) {
maxEnergy += 10
}
rogue.maxEnergy = maxEnergy
rogue.EnableEnergyBar(maxEnergy, rogue.OnEnergyGain)
rogue.EnableEnergyBar(maxEnergy)
rogue.ApplyEnergyTickMultiplier([]float64{0, 0.08, 0.16, 0.25}[rogue.Talents.Vitality])

rogue.EnableAutoAttacks(rogue, core.AutoAttackOptions{
Expand Down Expand Up @@ -303,11 +263,6 @@ func (rogue *Rogue) BreakStealth(sim *core.Simulation) {
}
}

// Can the rogue fulfil the weapon equipped requirement for Mutilate?
func (rogue *Rogue) CanMutilate() bool {
return rogue.Talents.Mutilate && rogue.HasDagger(core.MainHand) && rogue.HasDagger(core.OffHand)
}

// Does the rogue have a dagger equipped in the specified hand (main or offhand)?
func (rogue *Rogue) HasDagger(hand core.Hand) bool {
if hand == core.MainHand {
Expand Down
36 changes: 12 additions & 24 deletions sim/rogue/rogue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,79 +236,67 @@ var SubtletyGlyphs = &proto.Glyphs{

var PlayerOptionsCombatDI = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: DeadlyInstant,
Rotation: &proto.Rogue_Rotation{},
Options: DeadlyInstant,
},
}
var PlayerOptionsCombatDD = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: DeadlyDeadly,
Rotation: &proto.Rogue_Rotation{},
Options: DeadlyDeadly,
},
}
var PlayerOptionsCombatID = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: InstantDeadly,
Rotation: &proto.Rogue_Rotation{},
Options: InstantDeadly,
},
}
var PlayerOptionsCombatII = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: InstantInstant,
Rotation: &proto.Rogue_Rotation{},
Options: InstantInstant,
},
}

var PlayerOptionsNoLethality = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: DeadlyInstant,
Rotation: &proto.Rogue_Rotation{},
Options: DeadlyInstant,
},
}

var PlayerOptionsNoPotW = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: DeadlyInstant,
Rotation: &proto.Rogue_Rotation{},
Options: DeadlyInstant,
},
}

var PlayerOptionsNoLethalityNoPotW = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: DeadlyInstant,
Rotation: &proto.Rogue_Rotation{},
Options: DeadlyInstant,
},
}

var PlayerOptionsAssassinationDI = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: DeadlyInstant,
Rotation: &proto.Rogue_Rotation{},
Options: DeadlyInstant,
},
}
var PlayerOptionsAssassinationDD = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: DeadlyDeadly,
Rotation: &proto.Rogue_Rotation{},
Options: DeadlyDeadly,
},
}
var PlayerOptionsAssassinationID = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: InstantDeadly,
Rotation: &proto.Rogue_Rotation{},
Options: InstantDeadly,
},
}
var PlayerOptionsAssassinationII = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: InstantInstant,
Rotation: &proto.Rogue_Rotation{},
Options: InstantInstant,
},
}

var PlayerOptionsSubtletyID = &proto.Player_Rogue{
Rogue: &proto.Rogue{
Options: InstantDeadly,
Rotation: &proto.Rogue_Rotation{},
Options: InstantDeadly,
},
}

Expand Down
77 changes: 0 additions & 77 deletions sim/rogue/rotation.go

This file was deleted.

Loading

0 comments on commit 2df56b8

Please sign in to comment.