warlock

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PetExpertiseScale = 1.53

Variables

View Source
var ItemSetCorruptorRaiment = core.NewItemSet(core.ItemSet{
	Name: "Corruptor Raiment",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})

T5

View Source
var ItemSetDarkCovensRegalia = core.NewItemSet(core.ItemSet{
	Name: "Dark Coven's Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {
			warlock := agent.(WarlockAgent).GetWarlock()

			deviousMindsAura := warlock.RegisterAura(core.Aura{
				Label:    "Devious Minds",
				ActionID: core.ActionID{SpellID: 70840},
				Duration: time.Second * 10,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.PseudoStats.DamageDealtMultiplier *= 1.1
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.PseudoStats.DamageDealtMultiplier /= 1.1
				},
			})

			var petDeviousMindsAura *core.Aura
			if warlock.Pet != nil {
				petDeviousMindsAura = warlock.Pet.RegisterAura(core.Aura{
					Label:    "Devious Minds",
					ActionID: core.ActionID{SpellID: 70840},
					Duration: time.Second * 10,
					OnGain: func(aura *core.Aura, sim *core.Simulation) {
						aura.Unit.PseudoStats.DamageDealtMultiplier *= 1.1
					},
					OnExpire: func(aura *core.Aura, sim *core.Simulation) {
						aura.Unit.PseudoStats.DamageDealtMultiplier /= 1.1
					},
				})
			}

			warlock.RegisterAura(core.Aura{
				Label:    "4pT10 Hidden Aura",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnPeriodicDamageDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell == warlock.UnstableAffliction || spell == warlock.Immolate {
						if sim.Proc(0.15, "4pT10") {
							deviousMindsAura.Activate(sim)
							if petDeviousMindsAura != nil {
								petDeviousMindsAura.Activate(sim)
							}
						}
					}
				},
			})
		},
	},
})

T10

View Source
var ItemSetDeathbringerGarb = core.NewItemSet(core.ItemSet{
	Name: "Deathbringer Garb",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})

T8

View Source
var ItemSetGladiatorsFelshroud = core.NewItemSet(core.ItemSet{
	Name: "Gladiator's Felshroud",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			warlock := agent.(WarlockAgent).GetWarlock()
			warlock.AddStat(stats.SpellPower, 29)
		},
		4: func(agent core.Agent) {
			warlock := agent.(WarlockAgent).GetWarlock()
			warlock.AddStat(stats.SpellPower, 88)
		},
	},
})
View Source
var ItemSetGuldansRegalia = core.NewItemSet(core.ItemSet{
	Name:            "Gul'dan's Regalia",
	AlternativeName: "Kel'Thuzad's Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			warlock := agent.(WarlockAgent).GetWarlock()
			if warlock.Pet != nil {
				warlock.Pet.AddStats(stats.Stats{
					stats.MeleeCrit: 10 * core.CritRatingPerCritChance,
					stats.SpellCrit: 10 * core.CritRatingPerCritChance,
				})
			}
		},
		4: func(agent core.Agent) {

		},
	},
})

T9

View Source
var ItemSetMaleficRaiment = core.NewItemSet(core.ItemSet{
	Name: "Malefic Raiment",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})

T6

View Source
var ItemSetOblivionRaiment = core.NewItemSet(core.ItemSet{
	Name: "Oblivion Raiment",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})

D3

View Source
var ItemSetPlagueheartGarb = core.NewItemSet(core.ItemSet{
	Name: "Plagueheart Garb",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			warlock := agent.(WarlockAgent).GetWarlock()

			const bonusCrit = 10 * core.CritRatingPerCritChance
			warlock.DemonicSoulAura = warlock.RegisterAura(core.Aura{
				Label:    "Demonic Soul",
				ActionID: core.ActionID{SpellID: 61595},
				Duration: time.Second * 10,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					warlock.ShadowBolt.BonusCritRating += bonusCrit
					warlock.Incinerate.BonusCritRating += bonusCrit
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					warlock.ShadowBolt.BonusCritRating -= bonusCrit
					warlock.Incinerate.BonusCritRating -= bonusCrit
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell == warlock.ShadowBolt || spell == warlock.Incinerate {
						warlock.DemonicSoulAura.Deactivate(sim)
					}
				},
			})

			warlock.RegisterAura(core.Aura{
				Label: "2pT7 Hidden Aura",

				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnPeriodicDamageDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if (spell == warlock.Corruption || spell == warlock.Immolate) && sim.Proc(0.15, "2pT7") {
						warlock.DemonicSoulAura.Activate(sim)
					}
				},
			})
		},
		4: func(agent core.Agent) {
			warlock := agent.(WarlockAgent).GetWarlock()

			warlock.SpiritsoftheDamnedAura = warlock.RegisterAura(core.Aura{
				Label:    "Spirits of the Damned",
				ActionID: core.ActionID{SpellID: 61082},
				Duration: time.Second * 10,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.AddStatDynamic(sim, stats.Spirit, 300)
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.AddStatDynamic(sim, stats.Spirit, -300)
				},
			})

			warlock.RegisterAura(core.Aura{
				Label:    "4pT7 Hidden Aura",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell == warlock.LifeTap {
						warlock.SpiritsoftheDamnedAura.Activate(sim)
					}
				},
			})
		},
	},
})

T7

View Source
var ItemSetVoidheartRaiment = core.NewItemSet(core.ItemSet{
	Name: "Voidheart Raiment",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			warlock := agent.(WarlockAgent).GetWarlock()

			shadowBonus := warlock.RegisterAura(core.Aura{
				Label:    "Shadowflame",
				Duration: time.Second * 15,
				ActionID: core.ActionID{SpellID: 37377},
			})

			fireBonus := warlock.RegisterAura(core.Aura{
				Label:    "Shadowflame Hellfire",
				Duration: time.Second * 15,
				ActionID: core.ActionID{SpellID: 39437},
			})

			warlock.RegisterAura(core.Aura{
				Label:    "Voidheart Raiment 2pc",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell.SpellSchool.Matches(core.SpellSchoolShadow) {
						if sim.RandomFloat("cycl4pShadow") > 0.05 {
							return
						}
						shadowBonus.Activate(sim)

					}
					if spell.SpellSchool.Matches(core.SpellSchoolFire) {
						if sim.RandomFloat("cycl4pFire") > 0.05 {
							return
						}
						fireBonus.Activate(sim)
					}
				},
			})
		},
		4: func(agent core.Agent) {

		},
	},
})

T4

View Source
var TalentTreeSizes = [3]int{28, 27, 26}

Functions

func RegisterWarlock

func RegisterWarlock()

Types

type ACLaction added in v1.0.1

type ACLaction int
const (
	ACLCast ACLaction = iota
	ACLNext
	ACLRecast
)

type ActionCondition added in v1.0.1

type ActionCondition struct {
	Spell     *core.Spell
	Condition func(*core.Simulation) (ACLaction, *core.Unit)
}

type InfernalPet

type InfernalPet struct {
	core.Pet
	// contains filtered or unexported fields
}

func (*InfernalPet) GetPet

func (infernal *InfernalPet) GetPet() *core.Pet

func (*InfernalPet) Initialize

func (infernal *InfernalPet) Initialize()

func (*InfernalPet) OnGCDReady

func (infernal *InfernalPet) OnGCDReady(sim *core.Simulation)

func (*InfernalPet) Reset

func (infernal *InfernalPet) Reset(_ *core.Simulation)

type Warlock

type Warlock struct {
	core.Character
	Talents  *proto.WarlockTalents
	Options  *proto.Warlock_Options
	Rotation *proto.Warlock_Rotation

	Pet *WarlockPet

	ShadowBolt         *core.Spell
	Incinerate         *core.Spell
	Immolate           *core.Spell
	UnstableAffliction *core.Spell
	Corruption         *core.Spell
	Haunt              *core.Spell
	LifeTap            *core.Spell
	DarkPact           *core.Spell
	ChaosBolt          *core.Spell
	SoulFire           *core.Spell
	Conflagrate        *core.Spell
	DrainSoul          *core.Spell
	Shadowburn         *core.Spell
	SearingPain        *core.Spell

	CurseOfElements      *core.Spell
	CurseOfElementsAuras core.AuraArray
	CurseOfWeakness      *core.Spell
	CurseOfWeaknessAuras core.AuraArray
	CurseOfTongues       *core.Spell
	CurseOfTonguesAuras  core.AuraArray
	CurseOfAgony         *core.Spell
	CurseOfDoom          *core.Spell
	Seed                 *core.Spell
	SeedDamageTracker    []float64

	ShadowEmbraceAuras     core.AuraArray
	NightfallProcAura      *core.Aura
	EradicationAura        *core.Aura
	DemonicEmpowerment     *core.Spell
	DemonicEmpowermentAura *core.Aura
	DemonicPactAura        *core.Aura
	DemonicSoulAura        *core.Aura
	Metamorphosis          *core.Spell
	MetamorphosisAura      *core.Aura
	ImmolationAura         *core.Spell
	HauntDebuffAuras       core.AuraArray
	MoltenCoreAura         *core.Aura
	DecimationAura         *core.Aura
	PyroclasmAura          *core.Aura
	BackdraftAura          *core.Aura
	EmpoweredImpAura       *core.Aura
	GlyphOfLifeTapAura     *core.Aura
	SpiritsoftheDamnedAura *core.Aura

	Infernal *InfernalPet
	Inferno  *core.Spell

	// The sum total of demonic pact spell power * seconds.
	DPSPAggregate float64
	PreviousTime  time.Duration
	// contains filtered or unexported fields
}

func NewWarlock

func NewWarlock(character core.Character, options *proto.Player) *Warlock

func (*Warlock) AddRaidBuffs

func (warlock *Warlock) AddRaidBuffs(raidBuffs *proto.RaidBuffs)

func (*Warlock) ApplyTalents

func (warlock *Warlock) ApplyTalents()

func (*Warlock) GetCharacter

func (warlock *Warlock) GetCharacter() *core.Character

func (*Warlock) GetWarlock

func (warlock *Warlock) GetWarlock() *Warlock

func (*Warlock) GrandFirestoneBonus

func (warlock *Warlock) GrandFirestoneBonus() float64

func (*Warlock) GrandSpellstoneBonus

func (warlock *Warlock) GrandSpellstoneBonus() float64

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

func (warlock *Warlock) NewInfernal() *InfernalPet

func (*Warlock) NewWarlockPet

func (warlock *Warlock) NewWarlockPet() *WarlockPet

func (*Warlock) OnGCDReady

func (warlock *Warlock) OnGCDReady(sim *core.Simulation)

func (*Warlock) Reset

func (warlock *Warlock) Reset(sim *core.Simulation)

func (*Warlock) ShadowEmbraceDebuffAura

func (warlock *Warlock) ShadowEmbraceDebuffAura(target *core.Unit) *core.Aura

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

	DemonicEmpowermentAura *core.Aura
	// contains filtered or unexported fields
}

func (*WarlockPet) GetPet

func (wp *WarlockPet) GetPet() *core.Pet

func (*WarlockPet) Initialize

func (wp *WarlockPet) Initialize()

func (*WarlockPet) OnGCDReady

func (wp *WarlockPet) OnGCDReady(sim *core.Simulation)

func (*WarlockPet) Reset

func (wp *WarlockPet) Reset(_ *core.Simulation)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL