rogue

package
v1.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VenomousTotem            = 19342
	RenatakisCharmofTrickery = 19954
)
View Source
const (
	SpellFlagBuilder      = core.SpellFlagAgentReserved1
	SpellFlagColdBlooded  = core.SpellFlagAgentReserved2
	SpellFlagDeadlyBrewed = core.SpellFlagAgentReserved3
	SpellFlagCarnage      = core.SpellFlagAgentReserved4 // for Carnage
	SpellFlagRoguePoison  = core.SpellFlagAgentReserved5 // RogueT1
)
View Source
const (
	SpellCode_RogueNone int32 = iota

	SpellCode_RogueAmbush
	SpellCode_RogueAdrenalineRush
	SpellCode_RogueBackstab
	SpellCode_RogueBladeFlurry
	SpellCode_RogueEviscerate
	SpellCode_RogueExposeArmor
	SpellCode_RogueGarrote
	SpellCode_RogueGhostlyStrike
	SpellCode_RogueHemorrhage
	SpellCode_RogueRupture
	SpellCode_RogueSinisterStrike
	SpellCode_RogueSliceandDice
	SpellCode_RogueVanish
)

Variables

View Source
var AdrenalineRushActionID = core.ActionID{SpellID: 13750}
View Source
var ItemSetBloodfangArmor = core.NewItemSet(core.ItemSet{
	Name: "Bloodfang Armor",
	Bonuses: map[int32]core.ApplyEffect{

		3: func(agent core.Agent) {
			c := agent.(RogueAgent).GetRogue()
			c.RegisterAura(core.Aura{
				Label: "Improved Poisons",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					c.additivePoisonBonusChance += .05
				},
			})
		},

		5: func(agent core.Agent) {

		},

		8: func(agent core.Agent) {
			c := agent.GetCharacter()

			bloodfangHeal := c.GetOrRegisterSpell(core.SpellConfig{
				ActionID:    core.ActionID{SpellID: 23580},
				SpellSchool: core.SpellSchoolPhysical,
				DefenseType: core.DefenseTypeMelee,
				ProcMask:    core.ProcMaskEmpty,
				Flags:       core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,
				Hot: core.DotConfig{
					Aura: core.Aura{
						Label: "Bloodfang",
					},
					NumberOfTicks: 6,
					TickLength:    time.Second,
					OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
						dot.SnapshotBaseDamage = 50
					},
					OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
						dot.CalcAndDealPeriodicSnapshotHealing(sim, target, dot.OutcomeTick)
					},
				},
				ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
					spell.Hot(&c.Unit).Apply(sim)
				},
			})

			procSpell := c.GetOrRegisterSpell(core.SpellConfig{
				ActionID:    core.ActionID{SpellID: 23581},
				SpellSchool: core.SpellSchoolPhysical,
				DefenseType: core.DefenseTypeMelee,
				ProcMask:    core.ProcMaskEmpty,
				Flags:       core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

				DamageMultiplier: 1,
				ThreatMultiplier: 1,

				ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
					spell.CalcAndDealDamage(sim, target, sim.Roll(283, 317), spell.OutcomeMagicCrit)
				},
			})

			core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
				Name:              "Bloodfang",
				Callback:          core.CallbackOnSpellHitDealt,
				Outcome:           core.OutcomeLanded,
				ProcMask:          core.ProcMaskMelee,
				SpellFlagsExclude: core.SpellFlagSuppressWeaponProcs,
				PPM:               1,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					procSpell.Cast(sim, result.Target)
					bloodfangHeal.Cast(sim, result.Target)
				},
			})
		},
	},
})
View Source
var ItemSetBonescytheArmor = core.NewItemSet(core.ItemSet{
	Name: "Bonescythe Armor",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.(RogueAgent).GetRogue()
			actionID := core.ActionID{SpellID: 28817}
			healthMetrics := c.NewHealthMetrics(actionID)

			core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
				ActionID: actionID,
				Name:     "Invigorate",
				Callback: core.CallbackOnSpellHitDealt,
				Outcome:  core.OutcomeLanded,
				ProcMask: core.ProcMaskMelee,
				PPM:      1,
				Handler: func(sim *core.Simulation, spell *core.Spell, _ *core.SpellResult) {
					c.GainHealth(sim, sim.Roll(90, 110), healthMetrics)
				},
			})
		},

		4: func(agent core.Agent) {
			c := agent.(RogueAgent).GetRogue()
			actionID := core.ActionID{SpellID: 28813}
			energyMetrics := c.NewEnergyMetrics(actionID)

			c.RegisterAura(core.Aura{
				Label:    "Head Rush",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if (spell.SpellCode == SpellCode_RogueBackstab || spell.SpellCode == SpellCode_RogueSinisterStrike || spell.SpellCode == SpellCode_RogueHemorrhage) && result.DidCrit() {
						c.AddEnergy(sim, 5, energyMetrics)
					}
				},
			})
		},

		6: func(agent core.Agent) {
			c := agent.(RogueAgent).GetRogue()
			c.RegisterAura(core.Aura{
				Label: "Reduced Threat",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					c.Backstab.ThreatMultiplier /= 1.08
					c.SinisterStrike.ThreatMultiplier /= 1.08
					if c.Talents.Hemorrhage {
						c.Hemorrhage.ThreatMultiplier /= 1.08
					}
					c.Eviscerate.ThreatMultiplier /= 1.08
				},
			})
		},

		8: func(agent core.Agent) {
			c := agent.(RogueAgent).GetRogue()
			actionID := core.ActionID{SpellID: 28815}

			aura := c.RegisterAura(core.Aura{
				Label:    "Revealed Flaw",
				ActionID: actionID,
				Duration: core.NeverExpires,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					c.Backstab.BonusCritRating += 100 * core.CritRatingPerCritChance
					c.SinisterStrike.BonusCritRating += 100 * core.CritRatingPerCritChance
					if c.Talents.Hemorrhage {
						c.Hemorrhage.BonusCritRating += 100 * core.CritRatingPerCritChance
					}
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					c.Backstab.BonusCritRating -= 100 * core.CritRatingPerCritChance
					c.SinisterStrike.BonusCritRating -= 100 * core.CritRatingPerCritChance
					if c.Talents.Hemorrhage {
						c.Hemorrhage.BonusCritRating -= 100 * core.CritRatingPerCritChance
					}
				},
				OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell.SpellCode == SpellCode_RogueBackstab || spell.SpellCode == SpellCode_RogueSinisterStrike || spell.SpellCode == SpellCode_RogueHemorrhage {
						aura.Deactivate(sim)
					}
				},
			})

			c.OnComboPointsSpent(func(sim *core.Simulation, spell *core.Spell, comboPoints int32) {
				if spell.SpellCode == SpellCode_RogueEviscerate {

					if sim.Proc(0.05*float64(comboPoints), "Revealed Flaw") {
						aura.Activate(sim)
					}
				}
			})
		},
	},
})

https://www.wowhead.com/classic/item-set=524/bonescythe-armor

View Source
var ItemSetChampionsGuard = core.NewItemSet(core.ItemSet{
	Name: "Champion's Guard",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},
	},
})
View Source
var ItemSetDarkmantleArmor = core.NewItemSet(core.ItemSet{
	Name: "Darkmantle Armor",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddResistances(8)
		},

		4: func(agent core.Agent) {
			c := agent.GetCharacter()
			actionID := core.ActionID{SpellID: 27787}
			energyMetrics := c.NewEnergyMetrics(actionID)

			core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
				ActionID: actionID,
				Name:     "Rogue Armor Energize",
				Callback: core.CallbackOnSpellHitDealt,
				Outcome:  core.OutcomeLanded,
				ProcMask: core.ProcMaskMeleeWhiteHit,
				PPM:      1,
				Handler: func(sim *core.Simulation, spell *core.Spell, _ *core.SpellResult) {
					if c.HasEnergyBar() {
						c.AddEnergy(sim, 35, energyMetrics)
					}
				},
			})
		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},

		8: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Armor, 200)
		},
	},
})

https://www.wowhead.com/classic/item-set=512/darkmantle-armor

View Source
var ItemSetDeathdealersEmbrace = core.NewItemSet(core.ItemSet{
	Name: "Deathdealer's Embrace",
	Bonuses: map[int32]core.ApplyEffect{

		3: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			rogue.RegisterAura(core.Aura{
				Label: "Deathdealer Evasion Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					if rogue.Evasion != nil {
						rogue.Evasion.CD.Duration -= time.Second * 60
					}
				},
			})
		},

		5: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			rogue.RegisterAura(core.Aura{
				Label: "Deathdealer Eviscerate Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					rogue.Eviscerate.DamageMultiplierAdditive += 0.15
				},
			})
		},
	},
})

https://www.wowhead.com/classic/item-set=497/deathdealers-embrace

View Source
var ItemSetEmblemsOfVeiledShadows = core.NewItemSet(core.ItemSet{
	Name: "Emblems of Veiled Shadows",
	Bonuses: map[int32]core.ApplyEffect{
		3: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			rogue.RegisterAura(core.Aura{
				Label: "Emblems of Veiled Shadows 3pc",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					rogue.SliceAndDice.Cost.FlatModifier -= 10
				},
			})
		},
	},
})

https://www.wowhead.com/classic/item-set=498/emblems-of-veiled-shadows

View Source
var ItemSetFieldMarshalsVestments = core.NewItemSet(core.ItemSet{
	Name: "Field Marshal's Vestments",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},
	},
})
View Source
var ItemSetLieutenantCommandersGuard = core.NewItemSet(core.ItemSet{
	Name: "Lieutenant Commander's Guard",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},
	},
})
View Source
var ItemSetMadcapsOutfit = core.NewItemSet(core.ItemSet{
	Name: "Madcap's Outfit",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.(RogueAgent).GetRogue()
			c.AddStats(stats.Stats{
				stats.AttackPower:       20,
				stats.RangedAttackPower: 20,
			})
		},

		3: func(agent core.Agent) {

		},

		5: func(agent core.Agent) {
			c := agent.(RogueAgent).GetRogue()

			core.MakePermanent(c.RegisterAura(core.Aura{
				Label: "Improved Eviscerate and Rupture",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					c.Eviscerate.Cost.FlatModifier -= 5
					c.Rupture.Cost.FlatModifier -= 5
				},
			}))
		},
	},
})
View Source
var ItemSetNightslayerArmor = core.NewItemSet(core.ItemSet{
	Name: "Nightslayer Armor",
	Bonuses: map[int32]core.ApplyEffect{

		3: func(agent core.Agent) {
			c := agent.(RogueAgent).GetRogue()
			c.RegisterAura(core.Aura{
				Label: "Improved Vanish",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					c.Vanish.CD.Duration -= time.Second * 30
				},
			})
		},

		5: func(agent core.Agent) {
			c := agent.GetCharacter()
			if c.HasEnergyBar() {
				c.EnableEnergyBar(c.MaxEnergy() + 10)
			}
		},

		8: func(agent core.Agent) {
			c := agent.GetCharacter()
			healthMetrics := c.NewHealthMetrics(core.ActionID{SpellID: 23582})

			core.MakePermanent(c.RegisterAura(core.Aura{
				Label: "Clean Escape",
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell.SpellCode == SpellCode_RogueVanish {
						c.GainHealth(sim, 500, healthMetrics)
					}
				},
			}))
		},
	},
})
View Source
var ItemSetWarlordsVestments = core.NewItemSet(core.ItemSet{
	Name: "Warlord's Vestments",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},
	},
})
View Source
var TalentTreeSizes = [3]int{15, 19, 17}

Functions

This section is empty.

Types

type PoisonProcSource

type PoisonProcSource int
const (
	NormalProc PoisonProcSource = iota
)

type Rogue

type Rogue struct {
	core.Character

	Talents *proto.RogueTalents
	Options *proto.RogueOptions

	AdrenalineRush *core.Spell
	Backstab       *core.Spell
	BladeFlurry    *core.Spell
	Feint          *core.Spell
	Garrote        *core.Spell
	Ambush         *core.Spell
	Hemorrhage     *core.Spell
	GhostlyStrike  *core.Spell
	SinisterStrike *core.Spell
	Shadowstep     *core.Spell
	Preparation    *core.Spell
	Premeditation  *core.Spell
	ColdBlood      *core.Spell
	Vanish         *core.Spell

	Eviscerate   *core.Spell
	ExposeArmor  *core.Spell
	Rupture      *core.Spell
	SliceAndDice *core.Spell
	Finishers    []*core.Spell

	Evasion *core.Spell

	DeadlyPoison *core.Spell

	InstantPoison *core.Spell
	WoundPoison   *core.Spell

	AdrenalineRushAura *core.Aura
	BladeFlurryAura    *core.Aura
	ExposeArmorAuras   core.AuraArray
	EvasionAura        *core.Aura
	SliceAndDiceAura   *core.Aura
	StealthAura        *core.Aura
	VanishAura         *core.Aura
	// contains filtered or unexported fields
}

func NewRogue

func NewRogue(character *core.Character, options *proto.Player, rogueOptions *proto.RogueOptions) *Rogue

func (*Rogue) AddPartyBuffs

func (rogue *Rogue) AddPartyBuffs(_ *proto.PartyBuffs)

func (*Rogue) AddRaidBuffs

func (rogue *Rogue) AddRaidBuffs(_ *proto.RaidBuffs)

func (*Rogue) ApplyEnergyTickMultiplier

func (rogue *Rogue) ApplyEnergyTickMultiplier(multiplier float64)

func (*Rogue) ApplyTalents

func (rogue *Rogue) ApplyTalents()

func (*Rogue) BreakStealth

func (rogue *Rogue) BreakStealth(sim *core.Simulation)

Deactivate Stealth if it is active. This must be added to all abilities that cause Stealth to fade.

func (*Rogue) GetCharacter

func (rogue *Rogue) GetCharacter() *core.Character

func (*Rogue) GetDeadlyPoisonProcChance

func (rogue *Rogue) GetDeadlyPoisonProcChance() float64

func (*Rogue) GetInstantPoisonProcChance

func (rogue *Rogue) GetInstantPoisonProcChance() float64

func (*Rogue) GetRogue

func (rogue *Rogue) GetRogue() *Rogue

func (*Rogue) GetWoundPoisonProcChance

func (rogue *Rogue) GetWoundPoisonProcChance() float64

func (*Rogue) HasDagger

func (rogue *Rogue) HasDagger(hand core.Hand) bool

Does the rogue have a dagger equipped in the specified hand (main or offhand)?

func (*Rogue) Initialize

func (rogue *Rogue) Initialize()

func (*Rogue) IsStealthed

func (rogue *Rogue) IsStealthed() bool

Check if the rogue is considered in "stealth" for the purpose of casting abilities

func (*Rogue) RegisterEvasionSpell

func (rogue *Rogue) RegisterEvasionSpell()

func (*Rogue) Reset

func (rogue *Rogue) Reset(_ *core.Simulation)

func (*Rogue) RuptureDamage

func (rogue *Rogue) RuptureDamage(target *core.Unit, comboPoints int32) float64

func (*Rogue) RuptureDuration

func (rogue *Rogue) RuptureDuration(comboPoints int32) time.Duration

func (*Rogue) RuptureTicks

func (rogue *Rogue) RuptureTicks(comboPoints int32) int32

type RogueAgent

type RogueAgent interface {
	GetRogue() *Rogue
}

Agent is a generic way to access underlying rogue on any of the agents.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL