rogue

package
v0.0.149 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpellFlagBuilder     = core.SpellFlagAgentReserved2
	SpellFlagFinisher    = core.SpellFlagAgentReserved3
	SpellFlagColdBlooded = core.SpellFlagAgentReserved4
)
View Source
const (
	RogueSpellFlagNone int64 = 0
	RogueSpellAmbush   int64 = 1 << iota
	RogueSpellBackstab
	RogueSpellEnvenom
	RogueSpellEviscerate
	RogueSpellExposeArmor
	RogueSpellFanOfKnives
	RogueSpellFeint
	RogueSpellGarrote
	RogueSpellGouge
	RogueSpellRecuperate
	RogueSpellRupture
	RogueSpellShiv
	RogueSpellSinisterStrike
	RogueSpellSliceAndDice
	RogueSpellStealth
	RogueSpellTricksOfTheTrade
	RogueSpellTricksOfTheTradeThreat
	RogueSpellVanish
	RogueSpellHemorrhage
	RogueSpellPremeditation
	RogueSpellPreparation
	RogueSpellShadowDance
	RogueSpellShadowstep
	RogueSpellAdrenalineRush
	RogueSpellBladeFlurry
	RogueSpellKillingSpree
	RogueSpellMainGauche
	RogueSpellRevealingStrike
	RogueSpellColdBlood
	RogueSpellMutilate
	RogueSpellVendetta
	RogueSpellVenomousWounds
	RogueSpellWoundPoison
	RogueSpellInstantPoison
	RogueSpellDeadlyPoison

	RogueSpellLast
	RogueSpellsAll = RogueSpellLast<<1 - 1

	RogueSpellPoisons          = RogueSpellVenomousWounds | RogueSpellWoundPoison | RogueSpellInstantPoison | RogueSpellDeadlyPoison
	RogueSpellDamagingFinisher = RogueSpellEnvenom | RogueSpellEviscerate | RogueSpellRupture
	RogueSpellWeightedBlades   = RogueSpellSinisterStrike | RogueSpellRevealingStrike
)
View Source
const RogueBleedTag = "RogueBleed"
View Source
const RuptureEnergyCost = 25.0
View Source
const RuptureSpellID = 1943

Variables

View Source
var CataPVPSet = core.NewItemSet(core.ItemSet{
	Name: "Gladiator's Vestments",
	ID:   914,
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			agent.GetCharacter().AddStat(stats.Agility, 70)
		},
		4: func(agent core.Agent) {
			agent.GetCharacter().AddStat(stats.Agility, 90)

		},
	},
})
View Source
var FangsOfTheFather = core.NewItemSet(core.ItemSet{
	Name: "Fangs of the Father",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			cpMetrics := agent.GetCharacter().NewComboPointMetrics(core.ActionID{SpellID: 109950})

			agiAura := agent.GetCharacter().GetOrRegisterAura(core.Aura{
				Label:     "Shadows of the Destroyer",
				ActionID:  core.ActionID{SpellID: 109941},
				MaxStacks: 50,
				Duration:  30 * time.Second,
				OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) {
					aura.Unit.AddStatDynamic(sim, stats.Agility, -17*float64(oldStacks))
					aura.Unit.AddStatDynamic(sim, stats.Agility, 17*float64(newStacks))
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					aura.SetStacks(sim, 0)
				},
			})

			wingsProc := agent.GetCharacter().GetOrRegisterAura(core.Aura{
				Label:    "Fury of the Destroyer",
				ActionID: core.ActionID{SpellID: 109949},
				Duration: time.Second * 6,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.AddComboPoints(sim, 5, cpMetrics)
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell.Flags.Matches(SpellFlagFinisher) {
						aura.Unit.AddComboPoints(sim, 5, cpMetrics)
					}
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					agiAura.SetStacks(sim, 0)
					agiAura.Deactivate(sim)
				},
			})

			core.MakeProcTriggerAura(&agent.GetCharacter().Unit, core.ProcTrigger{
				Name:       "Rogue Legendary Daggers Stage 3",
				Callback:   core.CallbackOnSpellHitDealt,
				ProcMask:   core.ProcMaskMelee,
				Outcome:    core.OutcomeLanded,
				ProcChance: getFangsProcRate(agent.GetCharacter()),
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {

					stacks := float64(agiAura.GetStacks())
					if stacks > 30 && !wingsProc.IsActive() {
						if stacks == 50 || sim.Proc(1.0/(50-stacks), "Fangs of the Father") {
							wingsProc.Activate(sim)
						} else {
							agiAura.Activate(sim)
							agiAura.AddStack(sim)
						}
					} else {
						agiAura.Activate(sim)
						agiAura.AddStack(sim)
					}
				},
			})
		},
	},
})

Golad + Tiriosh

View Source
var JawsOfRetribution = core.NewItemSet(core.ItemSet{
	Name: "Jaws of Retribution",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			agiAura := agent.GetCharacter().GetOrRegisterAura(core.Aura{
				Label:     "Suffering",
				ActionID:  core.ActionID{SpellID: 109959},
				MaxStacks: 50,
				Duration:  30 * time.Second,
				OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) {
					aura.Unit.AddStatDynamic(sim, stats.Agility, -2*float64(oldStacks))
					aura.Unit.AddStatDynamic(sim, stats.Agility, 2*float64(newStacks))
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					aura.SetStacks(sim, 0)
				},
			})

			core.MakeProcTriggerAura(&agent.GetCharacter().Unit, core.ProcTrigger{
				Name:       "Rogue Legendary Daggers Stage 1",
				Callback:   core.CallbackOnSpellHitDealt,
				ProcMask:   core.ProcMaskMelee,
				Outcome:    core.OutcomeLanded,
				ProcChance: getFangsProcRate(agent.GetCharacter()),
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					agiAura.Activate(sim)
					agiAura.AddStack(sim)
				},
			})
		},
	},
})

Fear + Vengeance

View Source
var MawOfOblivion = core.NewItemSet(core.ItemSet{
	Name: "Maw of Oblivion",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			agiAura := agent.GetCharacter().GetOrRegisterAura(core.Aura{
				Label:     "Nightmare",
				ActionID:  core.ActionID{SpellID: 109955},
				MaxStacks: 50,
				Duration:  30 * time.Second,
				OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) {
					aura.Unit.AddStatDynamic(sim, stats.Agility, -5*float64(oldStacks))
					aura.Unit.AddStatDynamic(sim, stats.Agility, 5*float64(newStacks))
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					aura.SetStacks(sim, 0)
				},
			})

			core.MakeProcTriggerAura(&agent.GetCharacter().Unit, core.ProcTrigger{
				Name:       "Rogue Legendary Daggers Stage 2",
				Callback:   core.CallbackOnSpellHitDealt,
				ProcMask:   core.ProcMaskMelee,
				Outcome:    core.OutcomeLanded,
				ProcChance: getFangsProcRate(agent.GetCharacter()),
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					agiAura.Activate(sim)
					agiAura.AddStack(sim)
				},
			})
		},
	},
})

Sleeper + Dreamer

View Source
var TalentTreeSizes = [3]int{19, 19, 19}
View Source
var Tier11 = core.NewItemSet(core.ItemSet{
	Name: "Wind Dancer's Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			agent.GetCharacter().AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_BonusCrit_Percent,
				FloatValue: 5,
				ClassMask:  RogueSpellBackstab | RogueSpellMutilate | RogueSpellSinisterStrike,
			})
		},
		4: func(agent core.Agent) {

			rogue := agent.(RogueAgent).GetRogue()

			t11Proc := rogue.RegisterAura(core.Aura{
				Label:    "Deadly Scheme Proc",
				ActionID: core.ActionID{SpellID: 90472},
				Duration: time.Second * 15,

				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					rogue.Envenom.BonusCritPercent += 100
					rogue.Eviscerate.BonusCritPercent += 100
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					rogue.Envenom.BonusCritPercent -= 100
					rogue.Eviscerate.BonusCritPercent -= 100
				},
				OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell == rogue.Envenom || spell == rogue.Eviscerate {
						aura.Deactivate(sim)
					}
				},
			})

			core.MakeProcTriggerAura(&rogue.Unit, core.ProcTrigger{
				Name:       "Deadly Scheme Aura",
				Callback:   core.CallbackOnSpellHitDealt,
				ProcMask:   core.ProcMaskMeleeWhiteHit,
				Outcome:    core.OutcomeLanded,
				ProcChance: 0.01,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					t11Proc.Activate(sim)
				},
			})
		},
	},
})
View Source
var Tier12 = core.NewItemSet(core.ItemSet{
	Name: "Vestments of the Dark Phoenix",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			rogue := agent.GetCharacter()
			cata.RegisterIgniteEffect(&rogue.Unit, cata.IgniteConfig{
				ActionID:         core.ActionID{SpellID: 99173},
				DotAuraLabel:     "Burning Wounds",
				IncludeAuraDelay: true,

				ProcTrigger: core.ProcTrigger{
					Name:     "Rogue T12 2P Bonus",
					Callback: core.CallbackOnSpellHitDealt,
					ProcMask: core.ProcMaskMelee,
					Outcome:  core.OutcomeCrit,
				},

				DamageCalculator: func(result *core.SpellResult) float64 {
					return result.Damage * .06
				},
			})
		},
		4: func(agent core.Agent) {

			rogue := agent.(RogueAgent).GetRogue()

			hasteAura := rogue.GetOrRegisterAura(MakeT12StatAura(core.ActionID{SpellID: 99186}, stats.HasteRating, "Future on Fire"))
			critAura := rogue.GetOrRegisterAura(MakeT12StatAura(core.ActionID{SpellID: 99187}, stats.CritRating, "Fiery Devastation"))
			mastAura := rogue.GetOrRegisterAura(MakeT12StatAura(core.ActionID{SpellID: 99188}, stats.MasteryRating, "Master of Flames"))
			auraArray := [3]*core.Aura{hasteAura, critAura, mastAura}

			core.MakeProcTriggerAura(&agent.GetCharacter().Unit, core.ProcTrigger{
				Name:           "Rogue T12 4P Bonus",
				Callback:       core.CallbackOnApplyEffects,
				ClassSpellMask: RogueSpellTricksOfTheTrade,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if rogue.T12ToTLastBuff == 3 {
						randomStat := int(math.Mod(sim.RandomFloat("Rogue T12 4P Bonus Initial")*10, 3))
						rogue.T12ToTLastBuff = randomStat
						auraArray[rogue.T12ToTLastBuff].Activate(sim)
					} else {
						randomStat := int(math.Mod(sim.RandomFloat("Rogue T12 4P Bonus")*10, 1)) + 1
						rogue.T12ToTLastBuff = (rogue.T12ToTLastBuff + randomStat) % 3
						auraArray[rogue.T12ToTLastBuff].Activate(sim)
					}
				},
			})
		},
	},
})
View Source
var Tier13 = core.NewItemSet(core.ItemSet{
	Name: "Blackfang Battleweave",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()

			bonus60e := rogue.AddDynamicMod(core.SpellModConfig{
				Kind:       core.SpellMod_PowerCost_Flat,
				FloatValue: -12,
				ClassMask:  RogueSpellAmbush | RogueSpellBackstab | RogueSpellMutilate,
			})

			bonus45e := rogue.AddDynamicMod(core.SpellModConfig{
				Kind:       core.SpellMod_PowerCost_Flat,
				FloatValue: -9,
				ClassMask:  RogueSpellSinisterStrike | RogueSpellGouge | RogueSpellGarrote,
			})

			bonus40e := rogue.AddDynamicMod(core.SpellModConfig{
				Kind:       core.SpellMod_PowerCost_Flat,
				FloatValue: -8,
				ClassMask:  RogueSpellRevealingStrike,
			})

			bonus35e := rogue.AddDynamicMod(core.SpellModConfig{
				Kind:       core.SpellMod_PowerCost_Flat,
				FloatValue: -7,
				ClassMask:  RogueSpellEviscerate | RogueSpellEnvenom | RogueSpellHemorrhage,
			})

			bonus30e := rogue.AddDynamicMod(core.SpellModConfig{
				Kind:       core.SpellMod_PowerCost_Flat,
				FloatValue: -6,
				ClassMask:  RogueSpellRecuperate,
			})

			bonus25e := rogue.AddDynamicMod(core.SpellModConfig{
				Kind:       core.SpellMod_PowerCost_Flat,
				FloatValue: -5,
				ClassMask:  RogueSpellSliceAndDice | RogueSpellRupture,
			})

			aura := rogue.GetOrRegisterAura(core.Aura{
				Label:    "Tricks of Time",
				ActionID: core.ActionID{SpellID: 105864},
				Duration: time.Second * 6,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					bonus60e.Activate()
					bonus45e.Activate()
					bonus40e.Activate()
					bonus35e.Activate()
					bonus30e.Activate()
					bonus25e.Activate()
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					bonus60e.Deactivate()
					bonus45e.Deactivate()
					bonus40e.Deactivate()
					bonus35e.Deactivate()
					bonus30e.Deactivate()
					bonus25e.Deactivate()
				},
			})

			core.MakeProcTriggerAura(&rogue.Unit, core.ProcTrigger{
				Name:           "Rogue T13 2P Bonus",
				Callback:       core.CallbackOnApplyEffects,
				ClassSpellMask: RogueSpellTricksOfTheTrade,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					aura.Activate(sim)
				},
			})
		},

		4: func(agent core.Agent) {

		},
	},
})
View Source
var WoundPoisonActionID = core.ActionID{SpellID: 13219}

Functions

func MakeT12StatAura added in v0.0.26

func MakeT12StatAura(action core.ActionID, stat stats.Stat, name string) core.Aura

Types

type PoisonProcSource

type PoisonProcSource int
const (
	NormalProc PoisonProcSource = iota
	DeadlyProc
	ShivProc
	VilePoisonsProc
)

type Rogue

type Rogue struct {
	core.Character

	ClassSpellScaling float64

	Talents              *proto.RogueTalents
	Options              *proto.RogueOptions
	AssassinationOptions *proto.AssassinationRogue_Options
	CombatOptions        *proto.CombatRogue_Options
	SubtletyOptions      *proto.SubtletyRogue_Options

	SliceAndDiceBonus        float64
	AdditiveEnergyRegenBonus float64

	Backstab         *core.Spell
	BladeFlurry      *core.Spell
	DeadlyPoison     *core.Spell
	FanOfKnives      *core.Spell
	Feint            *core.Spell
	Garrote          *core.Spell
	Ambush           *core.Spell
	Hemorrhage       *core.Spell
	GhostlyStrike    *core.Spell
	HungerForBlood   *core.Spell
	InstantPoison    [4]*core.Spell
	WoundPoison      [4]*core.Spell
	Mutilate         *core.Spell
	MutilateMH       *core.Spell
	MutilateOH       *core.Spell
	Shiv             *core.Spell
	SinisterStrike   *core.Spell
	TricksOfTheTrade *core.Spell
	Shadowstep       *core.Spell
	Preparation      *core.Spell
	Premeditation    *core.Spell
	ShadowDance      *core.Spell
	ColdBlood        *core.Spell
	Vanish           *core.Spell
	VenomousWounds   *core.Spell
	Vendetta         *core.Spell
	RevealingStrike  *core.Spell
	KillingSpree     *core.Spell
	AdrenalineRush   *core.Spell
	Gouge            *core.Spell

	Envenom      *core.Spell
	Eviscerate   *core.Spell
	ExposeArmor  *core.Spell
	Rupture      *core.Spell
	SliceAndDice *core.Spell
	Recuperate   *core.Spell

	AdrenalineRushAura   *core.Aura
	BladeFlurryAura      *core.Aura
	EnvenomAura          *core.Aura
	ExposeArmorAuras     core.AuraArray
	HungerForBloodAura   *core.Aura
	KillingSpreeAura     *core.Aura
	OverkillAura         *core.Aura
	SliceAndDiceAura     *core.Aura
	RecuperateAura       *core.Aura
	MasterOfSubtletyAura *core.Aura
	ShadowstepAura       *core.Aura
	ShadowDanceAura      *core.Aura
	DirtyDeedsAura       *core.Aura
	HonorAmongThieves    *core.Aura
	StealthAura          *core.Aura
	BanditsGuileAura     *core.Aura

	MasterPoisonerDebuffAuras core.AuraArray
	SavageCombatDebuffAuras   core.AuraArray
	WoundPoisonDebuffAuras    core.AuraArray

	T12ToTLastBuff int
	// contains filtered or unexported fields
}

func NewRogue

func NewRogue(character *core.Character, options *proto.RogueOptions, talents string) *Rogue

func (*Rogue) AddPartyBuffs

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

func (*Rogue) AddRaidBuffs

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

func (*Rogue) ApplyAdditiveEnergyRegenBonus

func (rogue *Rogue) ApplyAdditiveEnergyRegenBonus(sim *core.Simulation, increment float64)

func (*Rogue) ApplyCutToTheChase

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

Apply the effects of the Cut to the Chase talent TODO: Put a fresh instance of SnD rather than use the original as per client TODO (TheBackstabi, 3/16/2024) - Assassination only talent, to be moved?

func (*Rogue) ApplyFinisher

func (rogue *Rogue) ApplyFinisher(sim *core.Simulation, spell *core.Spell)

Apply the effect of successfully casting a finisher to combo points

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) DWSMultiplier

func (rogue *Rogue) DWSMultiplier() float64

DWSMultiplier returns the offhand damage multiplier

func (*Rogue) EnvenomDuration

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

func (*Rogue) GetCharacter

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

func (*Rogue) GetDeadlyPoisonProcChance

func (rogue *Rogue) GetDeadlyPoisonProcChance() float64

func (*Rogue) GetRogue

func (rogue *Rogue) GetRogue() *Rogue

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) HasMajorGlyph

func (rogue *Rogue) HasMajorGlyph(glyph proto.RogueMajorGlyph) bool

func (*Rogue) HasMinorGlyph

func (rogue *Rogue) HasMinorGlyph(glyph proto.RogueMinorGlyph) bool

func (*Rogue) HasPrimeGlyph

func (rogue *Rogue) HasPrimeGlyph(glyph proto.RoguePrimeGlyph) bool

func (*Rogue) HasThrown

func (rogue *Rogue) HasThrown() bool

Does the rogue have a thrown weapon equipped in the ranged slot?

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) MeleeCritMultiplier

func (rogue *Rogue) MeleeCritMultiplier(applyLethality bool) float64

func (*Rogue) Reset

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

func (*Rogue) SpellCritMultiplier

func (rogue *Rogue) SpellCritMultiplier() float64

func (*Rogue) UpdateInstantPoisonPPM

func (rogue *Rogue) UpdateInstantPoisonPPM(bonusChance float64)

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