rogue

package
v0.0.59 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 6 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
	RogueSpellProcRuthlessness = RogueSpellEnvenom | RogueSpellEviscerate | RogueSpellRupture
)
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 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_Rating,
				FloatValue: 5 * core.CritRatingPerCritChance,
				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.BonusCritRating += 100 * core.CritRatingPerCritChance
					rogue.Eviscerate.BonusCritRating += 100 * core.CritRatingPerCritChance
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					rogue.Envenom.BonusCritRating -= 100 * core.CritRatingPerCritChance
					rogue.Eviscerate.BonusCritRating -= 100 * core.CritRatingPerCritChance
				},
				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()

			burningWounds := rogue.RegisterSpell(core.SpellConfig{
				ActionID:    core.ActionID{SpellID: 99173},
				SpellSchool: core.SpellSchoolFire,
				ProcMask:    core.ProcMaskProc,
				Flags:       core.SpellFlagIgnoreModifiers | core.SpellFlagNoSpellMods | core.SpellFlagNoOnCastComplete,

				DamageMultiplier: 1,
				ThreatMultiplier: 1,

				Dot: core.DotConfig{
					Aura: core.Aura{
						Label:     "Burning Wounds",
						MaxStacks: 1000000,
					},
					NumberOfTicks:       2,
					TickLength:          time.Second * 2,
					AffectedByCastSpeed: false,
					OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) {

					},
					OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
						result := dot.Spell.CalcPeriodicDamage(sim, target, dot.SnapshotBaseDamage, dot.OutcomeTick)
						dot.Spell.DealPeriodicDamage(sim, result)
					},
				},

				ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
					spell.SpellMetrics[target.UnitIndex].Hits++
					spell.Dot(target).Apply(sim)
				},
			})

			var applyBurningWounds = func(sim *core.Simulation, result *core.SpellResult) {
				const IgniteTicksFresh = 2
				const IgniteTicksRefresh = 3

				newDamage := result.Damage * .06
				dot := burningWounds.Dot(result.Target)

				if dot.IsActive() {
					dot.SnapshotBaseDamage = (dot.OutstandingDmg() + newDamage) / float64(IgniteTicksRefresh)
				} else {
					dot.SnapshotBaseDamage = newDamage / IgniteTicksFresh
				}
				burningWounds.Cast(sim, result.Target)
				dot.Aura.SetStacks(sim, int32(dot.SnapshotBaseDamage))
			}

			core.MakeProcTriggerAura(&rogue.Unit, core.ProcTrigger{
				Name:     "Rogue T12 2P Bonus",
				Callback: core.CallbackOnSpellHitDealt,
				ProcMask: core.ProcMaskMelee,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if result.Landed() && result.DidCrit() {
						applyBurningWounds(sim, result)
					}
				},
			})
		},
		4: func(agent core.Agent) {

			rogue := agent.GetCharacter()

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

			lastStat := 3
			core.MakeProcTriggerAura(&agent.GetCharacter().Unit, core.ProcTrigger{
				Name:           "Rogue T12 4P Bonus",
				Callback:       core.CallbackOnApplyEffects,
				ClassSpellMask: RogueSpellTricksOfTheTradeThreat,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if lastStat == 3 {
						randomStat := int(math.Mod(sim.RandomFloat("Rogue T12 4P Bonus")*10, 3))
						lastStat = randomStat
						auraArray[lastStat].Activate(sim)
					} else {
						randomStat := int(math.Mod(sim.RandomFloat("Rogue T12 4P Bonus")*10, 1)) + 1
						lastStat = (lastStat + randomStat) % 3
						auraArray[lastStat].Activate(sim)
					}
				},
			})
		},
	},
})
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
	RestlessBladesAura   *core.Aura

	MasterPoisonerDebuffAuras core.AuraArray
	SavageCombatDebuffAuras   core.AuraArray
	WoundPoisonDebuffAuras    core.AuraArray
	// 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