Documentation
¶
Index ¶
- Constants
- Variables
- func MakeT12StatAura(action core.ActionID, stat stats.Stat, name string) core.Aura
- type PoisonProcSource
- type Rogue
- func (rogue *Rogue) AddPartyBuffs(_ *proto.PartyBuffs)
- func (rogue *Rogue) AddRaidBuffs(_ *proto.RaidBuffs)
- func (rogue *Rogue) ApplyAdditiveEnergyRegenBonus(sim *core.Simulation, increment float64)
- func (rogue *Rogue) ApplyCutToTheChase(sim *core.Simulation)
- func (rogue *Rogue) ApplyFinisher(sim *core.Simulation, spell *core.Spell)
- func (rogue *Rogue) ApplyTalents()
- func (rogue *Rogue) BreakStealth(sim *core.Simulation)
- func (rogue *Rogue) DWSMultiplier() float64
- func (rogue *Rogue) EnvenomDuration(comboPoints int32) time.Duration
- func (rogue *Rogue) GetCharacter() *core.Character
- func (rogue *Rogue) GetDeadlyPoisonProcChance() float64
- func (rogue *Rogue) GetMasteryBonus() float64
- func (rogue *Rogue) GetMasteryBonusFromRating(masteryRating float64) float64
- func (rogue *Rogue) GetRogue() *Rogue
- func (rogue *Rogue) HasDagger(hand core.Hand) bool
- func (rogue *Rogue) HasMajorGlyph(glyph proto.RogueMajorGlyph) bool
- func (rogue *Rogue) HasMinorGlyph(glyph proto.RogueMinorGlyph) bool
- func (rogue *Rogue) HasPrimeGlyph(glyph proto.RoguePrimeGlyph) bool
- func (rogue *Rogue) HasThrown() bool
- func (rogue *Rogue) Initialize()
- func (rogue *Rogue) IsStealthed() bool
- func (rogue *Rogue) MeleeCritMultiplier(applyLethality bool) float64
- func (rogue *Rogue) Reset(sim *core.Simulation)
- func (rogue *Rogue) SpellCritMultiplier() float64
- func (rogue *Rogue) UpdateDeadlyPoisonPPH(bonusChance float64)
- func (rogue *Rogue) UpdateInstantPoisonPPM(bonusChance float64)
- type RogueAgent
Constants ¶
const ( SpellFlagBuilder = core.SpellFlagAgentReserved2 SpellFlagFinisher = core.SpellFlagAgentReserved3 SpellFlagColdBlooded = core.SpellFlagAgentReserved4 )
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 RogueSpellKillingSpreeHit 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 )
const RogueBleedTag = "RogueBleed"
const RuptureEnergyCost = 25.0
const RuptureSpellID = 1943
Variables ¶
var CataPVPSet = core.NewItemSet(core.ItemSet{ Name: "Gladiator's Vestments", ID: 914, Bonuses: map[int32]core.ApplySetBonus{ 2: func(_ core.Agent, setBonusAura *core.Aura) { setBonusAura.AttachStatBuff(stats.Agility, 70) }, 4: func(agent core.Agent, setBonusAura *core.Aura) { character := agent.GetCharacter() setBonusAura.AttachStatBuff(stats.Agility, 90) actionID := core.ActionID{SpellID: 21975} energyMetrics := character.NewEnergyMetrics(actionID) setBonusAura.ApplyOnGain(func(_ *core.Aura, sim *core.Simulation) { character.UpdateMaxEnergy(sim, 10, energyMetrics) }) setBonusAura.ApplyOnExpire(func(_ *core.Aura, sim *core.Simulation) { character.UpdateMaxEnergy(sim, -10, energyMetrics) }) setBonusAura.ExposeToAPL(actionID.SpellID) }, }, })
var FangsOfTheFather = core.NewItemSet(core.ItemSet{ Name: "Fangs of the Father", Slots: core.MeleeWeaponSlots(), Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { character := agent.GetCharacter() cpMetrics := character.NewComboPointMetrics(core.ActionID{SpellID: 109950}) agiAura := core.MakeStackingAura(character, core.StackingStatAura{ Aura: core.Aura{ Label: "Shadows of the Destroyer", ActionID: core.ActionID{SpellID: 109941}, Duration: time.Second * 30, MaxStacks: 50, }, BonusPerStack: stats.Stats{stats.Agility: 17}, }) wingsProc := character.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) }, }) setBonusAura.AttachProcTrigger(core.ProcTrigger{ Name: "Rogue Legendary Daggers Stage 3", Callback: core.CallbackOnSpellHitDealt, ProcMask: core.ProcMaskMelee, Outcome: core.OutcomeLanded, ProcChance: getFangsProcRate(character), 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
var JawsOfRetribution = core.NewItemSet(core.ItemSet{ Name: "Jaws of Retribution", Slots: core.MeleeWeaponSlots(), Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { character := agent.GetCharacter() agiAura := core.MakeStackingAura(character, core.StackingStatAura{ Aura: core.Aura{ Label: "Suffering", ActionID: core.ActionID{SpellID: 109959}, Duration: time.Second * 30, MaxStacks: 50, }, BonusPerStack: stats.Stats{stats.Agility: 2}, }) setBonusAura.AttachProcTrigger(core.ProcTrigger{ Name: "Rogue Legendary Daggers Stage 1", Callback: core.CallbackOnSpellHitDealt, ProcMask: core.ProcMaskMelee, Outcome: core.OutcomeLanded, ProcChance: getFangsProcRate(character), Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { agiAura.Activate(sim) agiAura.AddStack(sim) }, }) }, }, })
Fear + Vengeance
var MawOfOblivion = core.NewItemSet(core.ItemSet{ Name: "Maw of Oblivion", Slots: core.MeleeWeaponSlots(), Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { character := agent.GetCharacter() agiAura := core.MakeStackingAura(character, core.StackingStatAura{ Aura: core.Aura{ Label: "Nightmare", ActionID: core.ActionID{SpellID: 109955}, Duration: time.Second * 30, MaxStacks: 50, }, BonusPerStack: stats.Stats{stats.Agility: 5}, }) setBonusAura.AttachProcTrigger(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
var TalentTreeSizes = [3]int{19, 19, 19}
var Tier11 = core.NewItemSet(core.ItemSet{ Name: "Wind Dancer's Regalia", Bonuses: map[int32]core.ApplySetBonus{ 2: func(_ core.Agent, setBonusAura *core.Aura) { setBonusAura.AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_BonusCrit_Percent, FloatValue: 5, ClassMask: RogueSpellBackstab | RogueSpellMutilate | RogueSpellSinisterStrike, }) }, 4: func(agent core.Agent, setBonusAura *core.Aura) { 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) } }, }) setBonusAura.AttachProcTrigger(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) }, }) }, }, })
var Tier12 = core.NewItemSet(core.ItemSet{ Name: "Vestments of the Dark Phoenix", Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { rogue := agent.GetCharacter() cata.RegisterIgniteEffect(&rogue.Unit, cata.IgniteConfig{ ActionID: core.ActionID{SpellID: 99173}, DotAuraLabel: "Burning Wounds", IncludeAuraDelay: true, SetBonusAura: setBonusAura, 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, setBonusAura *core.Aura) { 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} setBonusAura.AttachProcTrigger(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) } }, }) }, }, })
var Tier13 = core.NewItemSet(core.ItemSet{ Name: "Blackfang Battleweave", Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { rogue := agent.(RogueAgent).GetRogue() bonus60e := rogue.AddDynamicMod(core.SpellModConfig{ Kind: core.SpellMod_PowerCost_Flat, IntValue: -12, ClassMask: RogueSpellAmbush | RogueSpellBackstab | RogueSpellMutilate, }) bonus45e := rogue.AddDynamicMod(core.SpellModConfig{ Kind: core.SpellMod_PowerCost_Flat, IntValue: -9, ClassMask: RogueSpellSinisterStrike | RogueSpellGouge | RogueSpellGarrote, }) bonus40e := rogue.AddDynamicMod(core.SpellModConfig{ Kind: core.SpellMod_PowerCost_Flat, IntValue: -8, ClassMask: RogueSpellRevealingStrike, }) bonus35e := rogue.AddDynamicMod(core.SpellModConfig{ Kind: core.SpellMod_PowerCost_Flat, IntValue: -7, ClassMask: RogueSpellEviscerate | RogueSpellEnvenom | RogueSpellHemorrhage, }) bonus30e := rogue.AddDynamicMod(core.SpellModConfig{ Kind: core.SpellMod_PowerCost_Flat, IntValue: -6, ClassMask: RogueSpellRecuperate, }) bonus25e := rogue.AddDynamicMod(core.SpellModConfig{ Kind: core.SpellMod_PowerCost_Flat, IntValue: -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() }, }) setBonusAura.AttachProcTrigger(core.ProcTrigger{ Name: "Rogue T13 2P Bonus", Callback: core.CallbackOnApplyEffects, ClassSpellMask: RogueSpellTricksOfTheTradeThreat, Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { aura.Activate(sim) }, }) }, 4: func(agent core.Agent, setBonusAura *core.Aura) { rogue := agent.(RogueAgent).GetRogue() vendettaDurationIncrease := core.DurationFromSeconds(9.0 * core.TernaryFloat64(rogue.HasPrimeGlyph(proto.RoguePrimeGlyph_GlyphOfVendetta), 1.2, 1.0)) setBonusAura.AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_DebuffDuration_Flat, ClassMask: RogueSpellVendetta, KeyValue: "Vendetta", TimeValue: vendettaDurationIncrease, }) setBonusAura.AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_BuffDuration_Flat, ClassMask: RogueSpellAdrenalineRush, TimeValue: time.Second * 3, }) setBonusAura.AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_BuffDuration_Flat, ClassMask: RogueSpellShadowDance, TimeValue: time.Second * 2, }) }, }, })
var Tier6 = core.NewItemSet(core.ItemSet{ Name: "Slayer's Armor", Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { rogue := agent.(RogueAgent).GetRogue() setBonusAura.AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_Custom, ClassMask: RogueSpellSliceAndDice, ApplyCustom: func(mod *core.SpellMod, spell *core.Spell) { rogue.SliceAndDiceBonusFlat += 0.05 }, RemoveCustom: func(mod *core.SpellMod, spell *core.Spell) { rogue.SliceAndDiceBonusFlat -= 0.05 }, }) }, 4: func(agent core.Agent, setBonusAura *core.Aura) { setBonusAura.AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_DamageDone_Flat, ClassMask: RogueSpellBackstab | RogueSpellSinisterStrike | RogueSpellMutilate | RogueSpellHemorrhage, FloatValue: .06, }) }, }, })
var WoundPoisonActionID = core.ActionID{SpellID: 13219}
Functions ¶
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
MasteryBaseValue float64
MasteryMultiplier float64
SliceAndDiceBonusFlat float64 // The flat bonus Attack Speed bonus before Mastery is applied
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 (*Rogue) AddPartyBuffs ¶
func (rogue *Rogue) AddPartyBuffs(_ *proto.PartyBuffs)
func (*Rogue) AddRaidBuffs ¶
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 ¶
DWSMultiplier returns the offhand damage multiplier
func (*Rogue) EnvenomDuration ¶
func (*Rogue) GetCharacter ¶
func (*Rogue) GetDeadlyPoisonProcChance ¶
func (*Rogue) GetMasteryBonus ¶ added in v0.0.179
func (*Rogue) GetMasteryBonusFromRating ¶ added in v0.0.179
func (*Rogue) HasDagger ¶
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) Initialize ¶
func (rogue *Rogue) Initialize()
func (*Rogue) IsStealthed ¶
Check if the rogue is considered in "stealth" for the purpose of casting abilities
func (*Rogue) MeleeCritMultiplier ¶
func (*Rogue) Reset ¶
func (rogue *Rogue) Reset(sim *core.Simulation)
func (*Rogue) SpellCritMultiplier ¶
func (*Rogue) UpdateDeadlyPoisonPPH ¶ added in v0.0.212
func (*Rogue) UpdateInstantPoisonPPM ¶
type RogueAgent ¶
type RogueAgent interface {
GetRogue() *Rogue
}
Agent is a generic way to access underlying rogue on any of the agents.