Documentation
¶
Index ¶
- Constants
- Variables
- func ScaledAutoAttackConfig(swingSpeed float64) *core.AutoAttackOptions
- type DoomguardPet
- type InfernalPet
- type SecondaryResourceCost
- func (s *SecondaryResourceCost) CostFailureReason(_ *core.Simulation, spell *core.Spell) string
- func (s *SecondaryResourceCost) IssueRefund(sim *core.Simulation, spell *core.Spell)
- func (s *SecondaryResourceCost) MeetsRequirement(_ *core.Simulation, spell *core.Spell) bool
- func (s *SecondaryResourceCost) SpendCost(sim *core.Simulation, spell *core.Spell)
- type Warlock
- func (warlock *Warlock) AddRaidBuffs(raidBuffs *proto.RaidBuffs)
- func (warlock *Warlock) ApplyDotWithPandemic(dot *core.Dot, sim *core.Simulation)
- func (warlock *Warlock) ApplyTalents()
- func (warlock *Warlock) BuildAndRegisterSummonSpell(id int32, pet *WarlockPet)
- func (warlock *Warlock) GetCharacter() *core.Character
- func (warlock *Warlock) GetWarlock() *Warlock
- func (warlock *Warlock) HasMajorGlyph(glyph proto.WarlockMajorGlyph) bool
- func (warlock *Warlock) HasMinorGlyph(glyph proto.WarlockMinorGlyph) bool
- func (warlock *Warlock) Initialize()
- func (warlock *Warlock) NewDoomguardPet() *DoomguardPet
- func (warlock *Warlock) NewInfernalPet() *InfernalPet
- func (warlock *Warlock) OnEncounterStart(_ *core.Simulation)
- func (warlock *Warlock) RegisterCorruption(onApplyCallback WarlockSpellCastedCallback, ...) *core.Spell
- func (warlock *Warlock) RegisterDrainLife(callback WarlockSpellCastedCallback)
- func (warlock *Warlock) RegisterFelflame(callback WarlockSpellCastedCallback) *core.Spell
- func (warlock *Warlock) RegisterHellfire(callback WarlockSpellCastedCallback) *core.Spell
- func (warlock *Warlock) RegisterPet(t proto.WarlockOptions_Summon, swingSpeed float64, apScale float64, ...) *WarlockPet
- func (warlock *Warlock) Reset(sim *core.Simulation)
- func (warlock *Warlock) SimplePetStatInheritanceWithScale(apScale float64) core.PetStatInheritance
- type WarlockAgent
- type WarlockPet
- type WarlockSpellCastedCallback
Constants ¶
View Source
const ( WarlockSpellFlagNone int64 = 0 WarlockSpellConflagrate int64 = 1 << iota WarlockSpellFaBConflagrate WarlockSpellShadowBolt WarlockSpellChaosBolt WarlockSpellImmolate WarlockSpellImmolateDot WarlockSpellIncinerate WarlockSpellFaBIncinerate WarlockSpellSoulFire WarlockSpellShadowBurn WarlockSpellLifeTap WarlockSpellCorruption WarlockSpellHaunt WarlockSpellUnstableAffliction WarlockSpellCurseOfElements WarlockSpellAgony WarlockSpellDrainSoul WarlockSpellDrainLife WarlockSpellMetamorphosis WarlockSpellSeedOfCorruption WarlockSpellSeedOfCorruptionExposion WarlockSpellHandOfGuldan WarlockSpellHellfire WarlockSpellImmolationAura WarlockSpellSearingPain WarlockSpellSummonDoomguard WarlockSpellDoomguardDoomBolt WarlockSpellSummonFelguard WarlockSpellFelGuardLegionStrike WarlockSpellFelGuardFelstorm WarlockSpellSummonImp WarlockSpellImpFireBolt WarlockSpellSummonFelhunter WarlockSpellFelHunterShadowBite WarlockSpellSummonSuccubus WarlockSpellSuccubusLashOfPain WarlockSpellVoidwalkerTorment WarlockSpellSummonInfernal WarlockSpellDemonSoul WarlockSpellShadowflame WarlockSpellShadowflameDot WarlockSpellSoulBurn WarlockSpellFelFlame WarlockSpellBurningEmbers WarlockSpellEmberTap WarlockSpellRainOfFire WarlockSpellFireAndBrimstone WarlockSpellDarkSoulInsanity WarlockSpellDarkSoulKnowledge WarlockSpellDarkSoulMisery WarlockSpellMaleficGrasp WarlockSpellDemonicSlash WarlockSpellTouchOfChaos WarlockSpellChaosWave WarlockSpellCarrionSwarm WarlockSpellDoom WarlockSpellVoidray WarlockSpellSiphonLife WarlockSpellHavoc WarlockSpellAll int64 = 1<<iota - 1 WarlockShadowDamage = WarlockSpellCorruption | WarlockSpellUnstableAffliction | WarlockSpellHaunt | WarlockSpellDrainSoul | WarlockSpellDrainLife | WarlockSpellAgony | WarlockSpellShadowBolt | WarlockSpellSeedOfCorruptionExposion | WarlockSpellHandOfGuldan | WarlockSpellShadowflame | WarlockSpellFelFlame | WarlockSpellChaosBolt | WarlockSpellShadowBurn | WarlockSpellHavoc WarlockPeriodicShadowDamage = WarlockSpellCorruption | WarlockSpellUnstableAffliction | WarlockSpellDrainSoul | WarlockSpellDrainLife | WarlockSpellAgony WarlockFireDamage = WarlockSpellConflagrate | WarlockSpellImmolate | WarlockSpellIncinerate | WarlockSpellSoulFire | WarlockSpellHandOfGuldan | WarlockSpellSearingPain | WarlockSpellImmolateDot | WarlockSpellShadowflameDot | WarlockSpellFelFlame | WarlockSpellChaosBolt | WarlockSpellShadowBurn | WarlockSpellFaBConflagrate | WarlockSpellFaBIncinerate WarlockDoT = WarlockSpellCorruption | WarlockSpellUnstableAffliction | WarlockSpellDrainSoul | WarlockSpellDrainLife | WarlockSpellAgony | WarlockSpellImmolateDot | WarlockSpellShadowflameDot | WarlockSpellBurningEmbers WarlockSummonSpells = WarlockSpellSummonImp | WarlockSpellSummonSuccubus | WarlockSpellSummonFelhunter | WarlockSpellSummonFelguard WarlockDarkSoulSpell = WarlockSpellDarkSoulInsanity | WarlockSpellDarkSoulKnowledge | WarlockSpellDarkSoulMisery WarlockAllSummons = WarlockSummonSpells | WarlockSpellSummonInfernal | WarlockSpellSummonDoomguard WarlockSpellsChaoticEnergyDestro = WarlockSpellAll &^ WarlockAllSummons &^ WarlockSpellDrainLife )
Variables ¶
View Source
var ItemSetMaleficRaiment = core.NewItemSet(core.ItemSet{ Name: "Shadowflame Regalia", Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { setBonusAura.AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_CastTime_Pct, ClassMask: WarlockSpellChaosBolt | WarlockSpellHandOfGuldan | WarlockSpellHaunt, FloatValue: -0.1, }) }, 4: func(agent core.Agent, setBonusAura *core.Aura) { warlock := agent.(WarlockAgent).GetWarlock() dmgMod := warlock.AddDynamicMod(core.SpellModConfig{ Kind: core.SpellMod_DamageDone_Flat, ClassMask: WarlockSpellFelFlame, FloatValue: 3.0, }) aura := warlock.RegisterAura(core.Aura{ Label: "Fel Spark", ActionID: core.ActionID{SpellID: 89937}, Duration: 15 * time.Second, MaxStacks: 2, OnGain: func(aura *core.Aura, sim *core.Simulation) { dmgMod.Activate() }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { dmgMod.Deactivate() }, OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { if spell.Matches(WarlockSpellFelFlame) && result.Landed() { aura.RemoveStack(sim) } }, }) setBonusAura.AttachProcTrigger(core.ProcTrigger{ Name: "Item - Warlock T11 4P Bonus", ActionID: core.ActionID{SpellID: 89935}, ClassSpellMask: WarlockSpellImmolateDot | WarlockSpellUnstableAffliction, Callback: core.CallbackOnPeriodicDamageDealt, ProcChance: 0.02, Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { aura.Activate(sim) aura.SetStacks(sim, 2) }, }) }, }, })
T11
View Source
var ItemSetRegaliaOfTheHornedNightmare = core.NewItemSet(core.ItemSet{ Name: "Regalia of the Horned Nightmare", DisabledInChallengeMode: true, Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { warlock := agent.(WarlockAgent).GetWarlock() var buff *core.Aura switch warlock.Spec { case proto.Spec_SpecAfflictionWarlock: buff = warlock.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 145082}, Label: "Regalia of the Horned Nightmare - Affli - 2pc", Duration: time.Second * 10, }).AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_DamageDone_Pct, FloatValue: 0.15, ClassMask: WarlockSpellDrainSoul | WarlockSpellMaleficGrasp, }) warlock.T16_2pc_buff = buff setBonusAura.OnSpellHitDealt = func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { if spell.Matches(WarlockSpellUnstableAffliction) && result.DidCrit() && sim.Proc(0.5, "T16 - 2pc") { buff.Activate(sim) return } } case proto.Spec_SpecDemonologyWarlock: buffAction := core.ActionID{SpellID: 145075} applyBuffAura := func(unit *core.Unit) { unit.RegisterAura(core.Aura{ ActionID: buffAction, Label: "Regalia of the Horned Nightmare - Demo - 2pc", Duration: time.Second * 10, }).AttachMultiplicativePseudoStatBuff(&unit.PseudoStats.DamageDealtMultiplier, 1.2) } applyBuffAura(&warlock.Unit) for _, pet := range warlock.Pets { if pet.IsGuardian() { continue } applyBuffAura(&pet.Unit) } setBonusAura.OnSpellHitDealt = func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { if spell.Matches(WarlockSpellSoulFire) && sim.Proc(0.2, "T16 - 2pc") { warlock.GetAuraByID(buffAction).Activate(sim) for _, pet := range warlock.Pets { if pet.IsGuardian() { continue } if !pet.IsActive() { continue } pet.GetAuraByID(buffAction).Activate(sim) } } } case proto.Spec_SpecDestructionWarlock: buff = warlock.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 145075}, Label: "Regalia of the Horned Nightmare - Destro - 2pc", Duration: time.Second * 10, }).AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_BonusCrit_Percent, FloatValue: 0.1, ClassMask: WarlockSpellImmolate | WarlockSpellImmolateDot | WarlockSpellIncinerate | WarlockSpellFaBIncinerate, }) setBonusAura.OnSpellHitDealt = func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { if spell.Matches(WarlockSpellConflagrate|WarlockSpellFaBConflagrate) && result.DidCrit() && sim.Proc(0.2, "T16 - 2pc") { buff.Activate(sim) return } } default: return } }, 4: func(agent core.Agent, setBonusAura *core.Aura) { warlock := agent.(WarlockAgent).GetWarlock() switch agent.GetCharacter().Spec { case proto.Spec_SpecAfflictionWarlock: warlock.OnSpellRegistered(func(spell *core.Spell) { if !spell.Matches(WarlockSpellHaunt) { return } for _, target := range warlock.Env.Encounter.AllTargets { dot := spell.Dot(&target.Unit) if dot == nil { break } dot.ApplyOnExpire(func(_ *core.Aura, sim *core.Simulation) { if sim.Proc(0.1, "T16 4p") { warlock.GetSecondaryResourceBar().Gain(sim, 1, spell.ActionID) } }) } }) case proto.Spec_SpecDemonologyWarlock: setBonusAura.AttachProcTrigger(core.ProcTrigger{ Callback: core.CallbackOnCastComplete, ClassSpellMask: WarlockSpellShadowBolt | WarlockSpellTouchOfChaos, ProcChance: 0.08, Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { }, }) case proto.Spec_SpecDestructionWarlock: buff := warlock.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 145164}, Label: "Regalia of the Horned Nightmare - Demo - 4pc", Duration: time.Second * 5, Icd: &core.Cooldown{ Timer: warlock.NewTimer(), Duration: time.Second * 10, }, }).AttachStatBuff(stats.CritRating, core.CritRatingPerCritPercent*15) warlock.GetSecondaryResourceBar().RegisterOnGain(func( sim *core.Simulation, _, realGain float64, actionID core.ActionID, ) { if realGain == 0 || buff.Icd.IsReady(sim) { return } old := warlock.GetSecondaryResourceBar().Value() - realGain if int(old/10) == int(warlock.GetSecondaryResourceBar().Value()/10) { return } buff.Activate(sim) }) } }, }, })
T16
View Source
var ItemSetRegaliaOfTheThousandfeldHells = core.NewItemSet(core.ItemSet{ Name: "Regalia of the Thousandfold Hells", DisabledInChallengeMode: true, Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { warlock := agent.(WarlockAgent).GetWarlock() warlock.T15_2pc = agent.GetCharacter().RegisterAura(core.Aura{ Label: "Regalia of the Thousandfold Hells - 2P Buff", Duration: time.Second * 20, }).AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_DotNumberOfTicks_Flat, IntValue: 2, ClassMask: WarlockSpellHaunt, }) agent.GetCharacter().OnSpellRegistered(func(spell *core.Spell) { if spell.Matches(WarlockDarkSoulSpell) { spell.RelatedSelfBuff.ApplyOnGain(func(aura *core.Aura, sim *core.Simulation) { warlock.T15_2pc.Activate(sim) }) } }) }, 4: func(agent core.Agent, setBonusAura *core.Aura) { setBonusAura.AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_DamageDone_Pct, FloatValue: 0.05, ClassMask: WarlockSpellMaleficGrasp | WarlockSpellDrainSoul, }) warlock := agent.(WarlockAgent).GetWarlock() warlock.T15_4pc = setBonusAura }, }, })
T15
View Source
var ItemSetShaSkinRegalia = core.NewItemSet(core.ItemSet{ Name: "Sha-Skin Regalia", DisabledInChallengeMode: true, Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { setBonusAura.AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_DamageDone_Pct, FloatValue: 0.1, ClassMask: WarlockSpellCorruption, }).AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_DamageDone_Pct, FloatValue: 0.05, ClassMask: WarlockSpellIncinerate | WarlockSpellFaBIncinerate, }).AttachSpellMod(core.SpellModConfig{ Kind: core.SpellMod_DamageDone_Pct, FloatValue: 0.02, ClassMask: WarlockSpellShadowBolt | WarlockSpellDemonicSlash | WarlockSpellTouchOfChaos, }) }, 4: func(agent core.Agent, setBonusAura *core.Aura) { buff := agent.GetCharacter().RegisterAura(core.Aura{ Label: "Sha-Skin Regalia - 4P Buff", ActionID: core.ActionID{SpellID: 148463}, Duration: time.Second * 20, }).AttachMultiplicativePseudoStatBuff(&agent.GetCharacter().PseudoStats.DamageDealtMultiplier, 1.10) agent.GetCharacter().OnSpellRegistered(func(spell *core.Spell) { if spell.Matches(WarlockDarkSoulSpell) { spell.RelatedSelfBuff.ApplyOnGain(func(aura *core.Aura, sim *core.Simulation) { buff.Activate(sim) }) } }) }, }, })
T14
Functions ¶
func ScaledAutoAttackConfig ¶
func ScaledAutoAttackConfig(swingSpeed float64) *core.AutoAttackOptions
Types ¶
type DoomguardPet ¶
func (*DoomguardPet) ExecuteCustomRotation ¶
func (pet *DoomguardPet) ExecuteCustomRotation(sim *core.Simulation)
func (*DoomguardPet) GetPet ¶
func (doomguard *DoomguardPet) GetPet() *core.Pet
func (*DoomguardPet) Initialize ¶
func (pet *DoomguardPet) Initialize()
func (*DoomguardPet) OnEncounterStart ¶ added in v0.0.13
func (pet *DoomguardPet) OnEncounterStart(_ *core.Simulation)
func (*DoomguardPet) Reset ¶
func (pet *DoomguardPet) Reset(_ *core.Simulation)
type InfernalPet ¶
func (*InfernalPet) ExecuteCustomRotation ¶
func (infernal *InfernalPet) ExecuteCustomRotation(sim *core.Simulation)
func (*InfernalPet) GetPet ¶
func (infernal *InfernalPet) GetPet() *core.Pet
func (*InfernalPet) Initialize ¶
func (infernal *InfernalPet) Initialize()
func (*InfernalPet) OnEncounterStart ¶ added in v0.0.13
func (infernal *InfernalPet) OnEncounterStart(_ *core.Simulation)
func (*InfernalPet) Reset ¶
func (infernal *InfernalPet) Reset(_ *core.Simulation)
type SecondaryResourceCost ¶
func (*SecondaryResourceCost) CostFailureReason ¶
func (s *SecondaryResourceCost) CostFailureReason(_ *core.Simulation, spell *core.Spell) string
CostFailureReason implements core.ResourceCostImpl.
func (*SecondaryResourceCost) IssueRefund ¶
func (s *SecondaryResourceCost) IssueRefund(sim *core.Simulation, spell *core.Spell)
IssueRefund implements core.ResourceCostImpl.
func (*SecondaryResourceCost) MeetsRequirement ¶
func (s *SecondaryResourceCost) MeetsRequirement(_ *core.Simulation, spell *core.Spell) bool
MeetsRequirement implements core.ResourceCostImpl.
func (*SecondaryResourceCost) SpendCost ¶
func (s *SecondaryResourceCost) SpendCost(sim *core.Simulation, spell *core.Spell)
SpendCost implements core.ResourceCostImpl.
type Warlock ¶
type Warlock struct {
core.Character
Talents *proto.WarlockTalents
Options *proto.WarlockOptions
Corruption *core.Spell
CurseOfElementsAuras core.AuraArray
Immolate *core.Spell
Metamorphosis *core.Spell
Seed *core.Spell
ShadowEmbraceAuras core.AuraArray
Shadowburn *core.Spell
Hellfire *core.Spell
DrainLife *core.Spell
SiphonLife *core.Spell
ActivePet *WarlockPet
Felhunter *WarlockPet
// Felguard *WarlockPet
Imp *WarlockPet
Succubus *WarlockPet
Voidwalker *WarlockPet
Doomguard *DoomguardPet
Infernal *InfernalPet
// Item sets
T15_2pc *core.Aura
T15_4pc *core.Aura
T16_2pc_buff *core.Aura
// contains filtered or unexported fields
}
func NewWarlock ¶
func (*Warlock) AddRaidBuffs ¶
func (*Warlock) ApplyDotWithPandemic ¶
func (warlock *Warlock) ApplyDotWithPandemic(dot *core.Dot, sim *core.Simulation)
Pandemic - For now a Warlock only ability. Might be moved into core support in late expansions
func (*Warlock) ApplyTalents ¶
func (warlock *Warlock) ApplyTalents()
func (*Warlock) BuildAndRegisterSummonSpell ¶
func (warlock *Warlock) BuildAndRegisterSummonSpell(id int32, pet *WarlockPet)
func (*Warlock) GetCharacter ¶
func (*Warlock) GetWarlock ¶
func (*Warlock) HasMajorGlyph ¶
func (warlock *Warlock) HasMajorGlyph(glyph proto.WarlockMajorGlyph) bool
func (*Warlock) HasMinorGlyph ¶
func (warlock *Warlock) HasMinorGlyph(glyph proto.WarlockMinorGlyph) bool
func (*Warlock) Initialize ¶
func (warlock *Warlock) Initialize()
func (*Warlock) NewDoomguardPet ¶
func (warlock *Warlock) NewDoomguardPet() *DoomguardPet
func (*Warlock) NewInfernalPet ¶
func (warlock *Warlock) NewInfernalPet() *InfernalPet
func (*Warlock) OnEncounterStart ¶ added in v0.0.13
func (warlock *Warlock) OnEncounterStart(_ *core.Simulation)
func (*Warlock) RegisterCorruption ¶
func (warlock *Warlock) RegisterCorruption(onApplyCallback WarlockSpellCastedCallback, onTickCallback WarlockSpellCastedCallback) *core.Spell
func (*Warlock) RegisterDrainLife ¶
func (warlock *Warlock) RegisterDrainLife(callback WarlockSpellCastedCallback)
func (*Warlock) RegisterFelflame ¶
func (warlock *Warlock) RegisterFelflame(callback WarlockSpellCastedCallback) *core.Spell
func (*Warlock) RegisterHellfire ¶
func (warlock *Warlock) RegisterHellfire(callback WarlockSpellCastedCallback) *core.Spell
func (*Warlock) RegisterPet ¶
func (warlock *Warlock) RegisterPet( t proto.WarlockOptions_Summon, swingSpeed float64, apScale float64, name string, enabledOnStart bool, isGuardian bool, ) *WarlockPet
func (*Warlock) Reset ¶
func (warlock *Warlock) Reset(sim *core.Simulation)
func (*Warlock) SimplePetStatInheritanceWithScale ¶
func (warlock *Warlock) SimplePetStatInheritanceWithScale(apScale float64) core.PetStatInheritance
type WarlockAgent ¶
type WarlockAgent interface {
GetWarlock() *Warlock
}
Agent is a generic way to access underlying warlock on any of the agents.
type WarlockPet ¶
type WarlockPet struct {
core.Pet
AutoCastAbilities []*core.Spell
MinEnergy float64 // The minimum amount of energy needed to the AI casts a spell
}
func (*WarlockPet) ExecuteCustomRotation ¶
func (pet *WarlockPet) ExecuteCustomRotation(sim *core.Simulation)
func (*WarlockPet) GetPet ¶
func (pet *WarlockPet) GetPet() *core.Pet
func (*WarlockPet) OnEncounterStart ¶ added in v0.0.13
func (pet *WarlockPet) OnEncounterStart(_ *core.Simulation)
func (*WarlockPet) Reset ¶
func (pet *WarlockPet) Reset(_ *core.Simulation)
type WarlockSpellCastedCallback ¶
type WarlockSpellCastedCallback func(resultList core.SpellResultSlice, spell *core.Spell, sim *core.Simulation)
Called to handle custom resources
Source Files
¶
Click to show internal directories.
Click to hide internal directories.