rogue

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BloodSpatteredStilletto          = 216522
	ShadowflameSword                 = 228143
	DreamEater                       = 224122
	VenomousTotem                    = 230250
	RenatakisCharmofTrickery         = 231287
	ZandalarianShadowMasteryTalisman = 231336
)
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_RogueBetweentheEyes
	SpellCode_RogueBladeDance
	SpellCode_RogueBladeFlurry
	SpellCode_RogueCrimsonTempest
	SpellCode_RogueEnvenom
	SpellCode_RogueEviscerate
	SpellCode_RogueExposeArmor
	SpellCode_RogueGarrote
	SpellCode_RogueGhostlyStrike
	SpellCode_RogueHemorrhage
	SpellCode_RogueMainGauche
	SpellCode_RogueMutilate
	SpellCode_RoguePoisonedKnife
	SpellCode_RogueRupture
	SpellCode_RogueSaberSlash
	SpellCode_RogueSaberSlashDoT
	SpellCode_RogueShadowStrike
	SpellCode_RogueSinisterStrike
	SpellCode_RogueSliceandDice
)
View Source
const FanOfKnivesSpellID int32 = 409240
View Source
const RogueBleedTag = "RogueBleed"

Variables

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

		2: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			if !rogue.HasRune(proto.RogueRune_RuneRollingWithThePunches) {
				return
			}
			rogue.OnComboPointsGained(func(sim *core.Simulation) {
				rogue.RollingWithThePunchesProcAura.Activate(sim)
				rogue.RollingWithThePunchesProcAura.AddStack(sim)
			})
		},

		4: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			if !rogue.HasRune(proto.RogueRune_RuneRollingWithThePunches) {
				return
			}
			initarmor := rogue.BaseEquipStats()[stats.Armor]

			rogue.RegisterAura(core.Aura{
				Label: "S03 - Item - T2 - Rogue - Tank 4P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					oldOnStacksChange := rogue.RollingWithThePunchesProcAura.OnStacksChange
					rogue.RollingWithThePunchesProcAura.OnStacksChange = func(aura *core.Aura, sim *core.Simulation, oldStacks int32, newStacks int32) {
						oldOnStacksChange(aura, sim, oldStacks, newStacks)
						rogue.AddStatDynamic(sim, stats.Armor, float64(0.2*initarmor*float64(newStacks-oldStacks)))
					}
				},
			})
		},

		6: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			if !rogue.HasRune(proto.RogueRune_RuneMainGauche) {
				return
			}

			core.MakePermanent(rogue.RegisterAura(core.Aura{
				Label: "S03 - Item - T2 - Rogue - Tank 6P Bonus",
				OnSpellHitDealt: func(_ *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if result.DidDodge() || result.DidParry() {
						rogue.MainGauche.CD.Reset()
					}
				},
			}))
		},
	},
})
View Source
var ItemSetBloodfangThrill = core.NewItemSet(core.ItemSet{
	Name: "Bloodfang Thrill",
	Bonuses: map[int32]core.ApplyEffect{

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

			var affectedSpells []*core.Spell

			aura := rogue.RegisterAura(core.Aura{
				Label:    "Clearcasting (S03 - Item - T2 - Rogue - Damage 2P Bonus)",
				ActionID: core.ActionID{SpellID: 467735},
				Duration: time.Second * 15,
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					affectedSpells = core.FilterSlice(
						rogue.Spellbook,
						func(spell *core.Spell) bool {
							return spell != nil && spell.Cost != nil && spell.Cost.CostType() == core.CostTypeEnergy
						},
					)
				},
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					core.Each(affectedSpells, func(spell *core.Spell) { spell.Cost.Multiplier -= 100 })
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					core.Each(affectedSpells, func(spell *core.Spell) { spell.Cost.Multiplier += 100 })
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if aura.RemainingDuration(sim) == aura.Duration || spell.DefaultCast.Cost == 0 {
						return
					}
					aura.Deactivate(sim)
				},
			})

			core.MakePermanent(rogue.RegisterAura(core.Aura{
				Label: "S03 - Item - T2 - Rogue - Damage 2P Bonus",
				OnSpellHitDealt: func(_ *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if !result.Landed() || !spell.ProcMask.Matches(core.ProcMaskMeleeOrRangedSpecial) {
						return
					}
					if spell.SpellCode == SpellCode_RogueAmbush || spell.SpellCode == SpellCode_RogueGarrote {
						aura.Activate(sim)
					}
				},
			}))
		},

		4: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			rogue.OnSpellRegistered(func(spell *core.Spell) {

				if spell.SpellCode == SpellCode_RogueAmbush || spell.SpellCode == SpellCode_RogueBackstab || spell.SpellCode == SpellCode_RogueGhostlyStrike || spell.SpellCode == SpellCode_RogueHemorrhage || spell.SpellCode == SpellCode_RogueMainGauche || spell.SpellCode == SpellCode_RoguePoisonedKnife || spell.SpellCode == SpellCode_RogueSaberSlash || spell.SpellCode == SpellCode_RogueSaberSlashDoT || spell.SpellCode == SpellCode_RogueShadowStrike || spell.SpellCode == SpellCode_RogueSinisterStrike || (spell.SpellCode == SpellCode_RogueMutilate && spell.ActionID.Tag == 1) {
					spell.DamageMultiplier *= 1.20
				}
			})
		},

		6: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			rogue.RegisterAura(core.Aura{
				Label: "S03 - Item - T2 - Rogue - Damage 6P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {

					rogue.Vanish.CD.Duration = time.Second * 60
				},
			})
		},
	},
})
View Source
var ItemSetChampionsVestments = core.NewItemSet(core.ItemSet{
	Name: "Champion's Vestments",
	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.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},

		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.AddResistances(8)
		},

		8: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Armor, 200)
		},
	},
})
View Source
var ItemSetDeathdealersThrill = core.NewItemSet(core.ItemSet{
	Name: "Deathdealer's Thrill",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			if !rogue.HasRune(proto.RogueRune_RuneSaberSlash) {
				return
			}
			rogue.RegisterAura(core.Aura{
				Label: "S03 - Item - TAQ - Rogue - Damage 2P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					rogue.SaberSlash.DamageMultiplier *= 1.20
					rogue.saberSlashTick.DamageMultiplier *= 1.20
				},
			})
		},

		4: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			if !rogue.Talents.AdrenalineRush {
				return
			}
			rogue.RegisterAura(core.Aura{
				Label: "S03 - Item - TAQ - Rogue - Damage 4P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					rogue.AdrenalineRush.CD.Duration -= time.Second * 240
				},
			})
		},
	},
})
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: "S03 - Item - RAQ - Rogue - Damage 3P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					for _, finisher := range rogue.Finishers {
						finisher.Cost.Multiplier -= 50
					}
				},
			})
		},
	},
})
View Source
var ItemSetLieutenantCommandersVestments = core.NewItemSet(core.ItemSet{
	Name: "Lieutenant Commander's Vestments",
	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.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       20,
				stats.RangedAttackPower: 20,
			})
		},

		3: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			switch rogue.GetProcMaskForTypes(proto.WeaponType_WeaponTypeDagger) {
			case core.ProcMaskMelee:
				rogue.AddStat(stats.MeleeCrit, core.CritRatingPerCritChance*float64(5))
			case core.ProcMaskMeleeMH:

				rogue.AddStat(stats.MeleeCrit, core.CritRatingPerCritChance*float64(5))
				rogue.OnSpellRegistered(func(spell *core.Spell) {
					if spell.ProcMask.Matches(core.ProcMaskMeleeOH) {
						spell.BonusCritRating -= core.CritRatingPerCritChance * float64(5)
					}
				})
			case core.ProcMaskMeleeOH:
				rogue.OnSpellRegistered(func(spell *core.Spell) {
					if spell.ProcMask.Matches(core.ProcMaskMeleeOH) {
						spell.BonusCritRating += core.CritRatingPerCritChance * float64(5)
					}
				})
			}
		},

		5: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			rogue.OnSpellRegistered(func(spell *core.Spell) {
				if spell.SpellCode == SpellCode_RogueAmbush {
					spell.BonusCritRating += 30 * core.CritRatingPerCritChance
				}
			})
		},
	},
})
View Source
var ItemSetNightSlayerBattlearmor = core.NewItemSet(core.ItemSet{
	Name: "Nightslayer Battlearmor",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {

		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			rogue := agent.(RogueAgent).GetRogue()
			damageTaken := 0.5

			aura := rogue.RegisterAura(core.Aura{
				Label:    "Resilient (S03 - Item - T1 - Rogue - Tank 6P Bonus)",
				ActionID: core.ActionID{SpellID: 457469},
				Duration: time.Second * 10,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					rogue.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexPhysical] *= damageTaken
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					rogue.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexPhysical] /= damageTaken
				},
				OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell.ProcMask.Matches(core.ProcMaskMelee) && result.Outcome.Matches(core.OutcomeLanded) {
						aura.Deactivate(sim)
					}
				},
			})

			rogue.OnComboPointsSpent(func(sim *core.Simulation, spell *core.Spell, comboPoints int32) {
				if sim.Proc(0.2*float64(comboPoints), "Resilient (S03 - Item - T1 - Rogue - Tank 6P Bonus)") {
					aura.Activate(sim)
				}
			})
		},
	},
})
View Source
var ItemSetNightSlayerThrill = core.NewItemSet(core.ItemSet{
	Name: "Nightslayer Thrill",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {

		},

		4: func(agent core.Agent) {
			rogue := agent.GetCharacter()
			rogue.OnSpellRegistered(func(spell *core.Spell) {
				if spell.Flags.Matches(SpellFlagRoguePoison) {
					spell.CritDamageBonus += 1
				}
			})
		},

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

			var affectedSpells []*core.Spell

			aura := rogue.RegisterAura(core.Aura{
				Label:    "Clearcasting (S03 - Item - T1 - Rogue - Damage 6P Bonus)",
				ActionID: core.ActionID{SpellID: 457342},
				Duration: time.Second * 15,
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					affectedSpells = core.FilterSlice(
						rogue.Spellbook,
						func(spell *core.Spell) bool {
							return spell != nil && spell.Cost != nil && spell.Cost.CostType() == core.CostTypeEnergy
						},
					)
				},
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					core.Each(affectedSpells, func(spell *core.Spell) { spell.Cost.Multiplier -= 100 })
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					core.Each(affectedSpells, func(spell *core.Spell) { spell.Cost.Multiplier += 100 })
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if aura.RemainingDuration(sim) == aura.Duration || spell.DefaultCast.Cost == 0 {
						return
					}
					aura.Deactivate(sim)
				},
			})
			rogue.OnComboPointsSpent(func(sim *core.Simulation, spell *core.Spell, comboPoints int32) {
				if sim.Proc(.05*float64(comboPoints), "Clearcasting (S03 - Item - T1 - Rogue - Damage 6P Bonus)") {
					aura.Activate(sim)
				}
			})
		},
	},
})
View Source
var TalentTreeSizes = [3]int{15, 19, 17}

Functions

This section is empty.

Types

type PoisonProcSource

type PoisonProcSource int
const (
	NormalProc PoisonProcSource = iota
	ShivProc
	DeadlyBrewProc
)

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
	HungerForBlood *core.Spell
	Mutilate       *core.Spell
	MutilateMH     *core.Spell
	MutilateOH     *core.Spell
	Shiv           *core.Spell
	SinisterStrike *core.Spell
	SaberSlash     *core.Spell

	MainGauche          *core.Spell
	Shadowstep          *core.Spell
	Preparation         *core.Spell
	Premeditation       *core.Spell
	ColdBlood           *core.Spell
	Vanish              *core.Spell
	Shadowstrike        *core.Spell
	QuickDraw           *core.Spell
	ShurikenToss        *core.Spell
	BetweenTheEyes      *core.Spell
	PoisonedKnife       *core.Spell
	Blunderbuss         *core.Spell
	FanOfKnives         *core.Spell
	CrimsonTempest      *core.Spell
	CrimsonTempestBleed *core.Spell

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

	Evasion    *core.Spell
	BladeDance *core.Spell

	DeadlyPoison [3]*core.Spell

	InstantPoison [3]*core.Spell
	WoundPoison   [2]*core.Spell
	OccultPoison  *core.Spell

	AdrenalineRushAura            *core.Aura
	BladeFlurryAura               *core.Aura
	EnvenomAura                   *core.Aura
	ExposeArmorAuras              core.AuraArray
	EvasionAura                   *core.Aura
	BladeDanceAura                *core.Aura
	SliceAndDiceAura              *core.Aura
	MasterOfSubtletyAura          *core.Aura
	ShadowstepAura                *core.Aura
	ShadowDanceAura               *core.Aura
	StealthAura                   *core.Aura
	WaylayAuras                   core.AuraArray
	RollingWithThePunchesAura     *core.Aura
	RollingWithThePunchesProcAura *core.Aura
	CutthroatProcAura             *core.Aura
	VanishAura                    *core.Aura

	HonorAmongThieves *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) ApplyCutToTheChase added in v0.0.3

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

Apply the effects of the Cut to the Chase talent

func (*Rogue) ApplyEnergyTickMultiplier

func (rogue *Rogue) ApplyEnergyTickMultiplier(multiplier float64)

func (*Rogue) ApplyRunes

func (rogue *Rogue) ApplyRunes()

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) CrimsonTempestDamage added in v0.0.16

func (rogue *Rogue) CrimsonTempestDamage(comboPoints int32) float64

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

func (rogue *Rogue) HasRune(rune proto.RogueRune) bool

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 added in v0.0.14

func (rogue *Rogue) RegisterEvasionSpell()

func (*Rogue) Reset

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

func (*Rogue) RuptureDamage

func (rogue *Rogue) RuptureDamage(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