warlock

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DDBC_ShadowVulnerability int = iota
	DDBC_Decimation
	DDBC_Total
)

Slots in a target's per-caster damage multipliers (core.EnableDamageDoneByCaster / AttachDDBC), one per warlock effect that raises only this warlock's damage against the target: a debuff, or Decimation's bonus against a target below 35%. Each needs its own slot so one debuff's expiry cannot clear another's, and every caller passes DDBC_Total so the slice is sized alike.

View Source
const (
	WarlockSpellFlagNone    int64 = 0
	WarlockSpellConflagrate int64 = 1 << iota
	WarlockSpellShadowBolt
	WarlockSpellImmolate
	WarlockSpellIncinerate
	WarlockSpellSoulFire
	WarlockSpellShadowBurn
	WarlockSpellLifeTap
	WarlockSpellCorruption
	WarlockSpellCurseOfElements
	WarlockSpellBaneOfAgony
	WarlockSpellBaneOfDoom
	WarlockSpellDrainLife
	WarlockSpellHellfire
	WarlockSpellSearingPain
	WarlockSpellImpFireBolt
	WarlockSpellSuccubusLashOfPain
	WarlockSpellRainOfFire
	WarlockSpellCurseOfRecklessness
	WarlockSpellCurseOfWeakness
	WarlockSpellSiphonLife
	WarlockSpellWrack
	WarlockSpellDrainSoul
	WarlockSpellDeathCoil
	WarlockSpellSummonDemon
	WarlockSpellAll int64 = 1<<iota - 1
)

Variables

View Source
var ItemSetChampionsDreadgear = core.NewItemSet(core.ItemSet{
	ID:      541,
	Name:    "Champion's Dreadgear",
	Slots:   sixPieceSlots,
	Bonuses: pvpSetBonuses(2, 4, 6),
})
View Source
var ItemSetChampionsThreads = core.NewItemSet(core.ItemSet{
	ID:      345,
	Name:    "Champion's Threads",
	Slots:   sixPieceSlots,
	Bonuses: pvpSetBonuses(2, 4, 6),
})
View Source
var ItemSetDemonheartRaiment = core.NewItemSet(core.ItemSet{
	ID:    2100,
	Name:  "Demonheart Raiment",
	Slots: sixPieceSlots,
	Bonuses: map[int32]core.ApplySetBonus{
		2: parsedSetBonus(demonheartHit),

		4: func(agent core.Agent, setBonusAura *core.Aura) {
			warlock := agent.(WarlockAgent).GetWarlock()
			effect := demonheartDemons.EffectN(1)
			bonus := stats.Stats{stats.SpellDamage: effect.BaseValue()}
			mobTypes := spelldata.MobTypes(effect.Misc)

			setBonusAura.
				ApplyOnGain(func(_ *core.Aura, _ *core.Simulation) {
					warlock.AddMobTypeBonusStats(bonus, mobTypes...)
				}).
				ApplyOnExpire(func(_ *core.Aura, _ *core.Simulation) {
					warlock.AddMobTypeBonusStats(bonus.Invert(), mobTypes...)
				})
		},

		5: func(agent core.Agent, setBonusAura *core.Aura) {
			warlock := agent.(WarlockAgent).GetWarlock()
			setBonusAura.AttachAdditivePseudoStatBuff(&warlock.lifeTapManaBonus, demonheartLifeTap.EffectN(1).Percent())
		},
	},
})

Tier 1 The ItemSet row lists six pieces, head and chest among them, but the game files ship only the shoulders, hands, legs and feet, so the 5-piece bonus cannot be worn yet. The 3-piece bonus shortens Banish, which the sim does not cast.

View Source
var ItemSetDemoniacsThreads = core.NewItemSet(core.ItemSet{
	ID:   481,
	Name: "Demoniac's Threads",
	Slots: []proto.ItemSlot{
		proto.ItemSlot_ItemSlotNeck,
		proto.ItemSlot_ItemSlotShoulder,
		proto.ItemSlot_ItemSlotChest,
		proto.ItemSlot_ItemSlotWrist,
		proto.ItemSlot_ItemSlotTrinket1,
		proto.ItemSlot_ItemSlotTrinket2,
	},
	Bonuses: map[int32]core.ApplySetBonus{
		2: parsedSetBonus(demoniacDamage),
		3: parsedSetBonus(demoniacCorrupt),
		5: parsedSetBonus(demoniacDeathCoil),
	},
})

Zul'Gurub

View Source
var ItemSetDoomcallersAttire = core.NewItemSet(core.ItemSet{
	ID:   499,
	Name: "Doomcaller's Attire",
	Slots: []proto.ItemSlot{
		proto.ItemSlot_ItemSlotHead,
		proto.ItemSlot_ItemSlotShoulder,
		proto.ItemSlot_ItemSlotChest,
		proto.ItemSlot_ItemSlotLegs,
		proto.ItemSlot_ItemSlotFeet,
	},
	Bonuses: map[int32]core.ApplySetBonus{
		3: parsedSetBonus(doomcallerImmo),
		5: parsedSetBonus(doomcallerBolt),
	},
})

Ahn'Qiraj

View Source
var ItemSetFieldMarshalsThreads = core.NewItemSet(core.ItemSet{
	ID:      392,
	Name:    "Field Marshal's Threads",
	Slots:   sixPieceSlots,
	Bonuses: pvpSetBonuses(6, 3, 2),
})
View Source
var ItemSetImplementsOfUnspokenNames = core.NewItemSet(core.ItemSet{
	ID:   500,
	Name: "Implements of Unspoken Names",
	Slots: []proto.ItemSlot{
		proto.ItemSlot_ItemSlotBack,
		proto.ItemSlot_ItemSlotFinger1,
		proto.ItemSlot_ItemSlotFinger2,
		proto.ItemSlot_ItemSlotMainHand,
	},
	Bonuses: map[int32]core.ApplySetBonus{

		3: func(agent core.Agent, _ *core.Aura) {
			warlock := agent.(WarlockAgent).GetWarlock()
			petMult := 1 + unspokenPets.EffectN(2).Percent()
			for _, pet := range warlock.demons() {
				pet.PseudoStats.DamageDealtMultiplier *= petMult
			}
		},
	},
})

Ahn'Qiraj

View Source
var ItemSetLieutenantCommandersDreadgear = core.NewItemSet(core.ItemSet{
	ID:      547,
	Name:    "Lieutenant Commander's Dreadgear",
	Slots:   sixPieceSlots,
	Bonuses: pvpSetBonuses(2, 4, 6),
})
View Source
var ItemSetLieutenantCommandersThreads = core.NewItemSet(core.ItemSet{
	ID:      346,
	Name:    "Lieutenant Commander's Threads",
	Slots:   sixPieceSlots,
	Bonuses: pvpSetBonuses(2, 4, 6),
})
View Source
var ItemSetPlagueheartRaiment = core.NewItemSet(core.ItemSet{
	ID:    529,
	Name:  "Plagueheart Raiment",
	Slots: shared.TierThreeSlots,
	Bonuses: map[int32]core.ApplySetBonus{

		4: shared.ParsedSetBonus(plagueCorruption),

		6: shared.ParsedSetBonus(plagueThreat),
	},
})

Tier 3

View Source
var ItemSetWarlordsThreads = core.NewItemSet(core.ItemSet{
	ID:      391,
	Name:    "Warlord's Threads",
	Slots:   sixPieceSlots,
	Bonuses: pvpSetBonuses(6, 3, 2),
})
View Source
var TalentTreeSizes = [3]int{17, 19, 16}

Functions

func RegisterWarlock

func RegisterWarlock()

Types

type APLActionCastWarlockAssignedCurse

type APLActionCastWarlockAssignedCurse struct {
	// contains filtered or unexported fields
}

func (*APLActionCastWarlockAssignedCurse) Execute

func (*APLActionCastWarlockAssignedCurse) Finalize

func (*APLActionCastWarlockAssignedCurse) GetAPLValues

func (x *APLActionCastWarlockAssignedCurse) GetAPLValues() []core.APLValue

func (*APLActionCastWarlockAssignedCurse) GetInnerActions

func (x *APLActionCastWarlockAssignedCurse) GetInnerActions() []*core.APLAction

func (*APLActionCastWarlockAssignedCurse) GetNextAction

func (*APLActionCastWarlockAssignedCurse) GetSpellFromAction

func (x *APLActionCastWarlockAssignedCurse) GetSpellFromAction(sim *core.Simulation) *core.Spell

func (*APLActionCastWarlockAssignedCurse) IsReady

func (*APLActionCastWarlockAssignedCurse) PostFinalize

func (*APLActionCastWarlockAssignedCurse) ReplaceAPLValues

func (x *APLActionCastWarlockAssignedCurse) ReplaceAPLValues(func(core.APLValue) core.APLValue)

func (*APLActionCastWarlockAssignedCurse) Reset

func (*APLActionCastWarlockAssignedCurse) String

type APLValueWarlockActiveOnAllTargets

type APLValueWarlockActiveOnAllTargets struct {
	core.DefaultAPLValueImpl
	// contains filtered or unexported fields
}

True while every target that is up holds one of the spells.

func (*APLValueWarlockActiveOnAllTargets) GetBool

func (*APLValueWarlockActiveOnAllTargets) String

func (*APLValueWarlockActiveOnAllTargets) Type

type APLValueWarlockActivePet

type APLValueWarlockActivePet struct {
	core.DefaultAPLValueImpl
	// contains filtered or unexported fields
}

func (*APLValueWarlockActivePet) GetBool

func (*APLValueWarlockActivePet) String

func (x *APLValueWarlockActivePet) String() string

func (*APLValueWarlockActivePet) Type

type APLValueWarlockAssignedCurseIsActive

type APLValueWarlockAssignedCurseIsActive struct {
	core.DefaultAPLValueImpl
	// contains filtered or unexported fields
}

func (*APLValueWarlockAssignedCurseIsActive) GetBool

func (*APLValueWarlockAssignedCurseIsActive) String

func (*APLValueWarlockAssignedCurseIsActive) Type

type APLValueWarlockIsAssignedCurse

type APLValueWarlockIsAssignedCurse struct {
	core.DefaultAPLValueImpl
	// contains filtered or unexported fields
}

func (*APLValueWarlockIsAssignedCurse) GetBool

func (*APLValueWarlockIsAssignedCurse) GetSpellFromAction

func (x *APLValueWarlockIsAssignedCurse) GetSpellFromAction(sim *core.Simulation) *core.Spell

func (*APLValueWarlockIsAssignedCurse) String

func (*APLValueWarlockIsAssignedCurse) Type

type Warlock

type Warlock struct {
	core.Character
	Talents *proto.WarlockTalents
	Options *proto.WarlockOptions

	// Base Spells
	Corruption  *core.Spell
	DrainLife   *core.Spell
	DrainSoul   *core.Spell
	Hellfire    *core.Spell
	Immolate    []*core.Spell // Every registered rank
	Incinerate  *core.Spell
	RainOfFire  *core.Spell
	SearingPain *core.Spell
	ShadowBolt  *core.Spell
	Soulfire    *core.Spell

	LifeTap *core.Spell

	// Curses
	CurseOfElements          *core.Spell
	CurseOfElementsAuras     core.AuraArray
	CurseOfRecklessness      *core.Spell
	CurseOfRecklessnessAuras core.AuraArray
	CurseOfWeakness          *core.Spell
	CurseOfWeaknessAuras     core.AuraArray
	CurseOfWeaknessAmpAuras  core.AuraArray
	Curses                   []*core.Spell

	// Banes
	BaneOfAgony *core.Spell
	BaneOfDoom  *core.Spell
	Banes       []*core.Spell

	BaneOfHavoc      *core.Spell
	BaneOfHavocAuras core.AuraArray

	// Summons
	SummonImp        *core.Spell
	SummonVoidwalker *core.Spell
	SummonSuccubus   *core.Spell
	SummonFelhunter  *core.Spell

	// Talent Tree Spells
	AmplifyCurse     *core.Spell
	DemonicSacrifice *core.Spell
	Conflagrate      *core.Spell
	Shadowburn       *core.Spell
	SiphonLife       *core.Spell
	Wrack            *core.Spell

	// Auras
	DemonicSacrificeAuras  map[proto.WarlockOptions_Summon]*core.Aura // Demonic Sacrifice's effect, by the demon sacrificed
	FelDominationAura      *core.Aura
	AmplifyCurseAura       *core.Aura
	AmplifyCurseMultiplier float64

	ShadowVulnerabilityAuras core.AuraArray
	DemonicBrandAuras        core.AuraArray

	NightfallProcAura    *core.Aura
	ShadowEmbraceAura    *core.Aura
	DemonicKnowledgeAura *core.Aura

	// Pets
	ActivePet  *WarlockPet
	Felhunter  *WarlockPet
	Imp        *WarlockPet
	Succubus   *WarlockPet
	Voidwalker *WarlockPet

	// Armors
	DemonArmor *core.Aura

	SoulShardsAura *core.Aura // the Soul Shards left this iteration, as its stacks
	// contains filtered or unexported fields
}

func NewWarlock

func NewWarlock(character *core.Character, options *proto.Player, warlockOptions *proto.WarlockOptions, raid *proto.Raid) *Warlock

func (*Warlock) AddRaidBuffs

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

func (*Warlock) AfflictionCount

func (warlock *Warlock) AfflictionCount(target *core.Unit) float64

The number of this warlock's Corruption, Siphon Life and Bane of Agony effects active on the target, the effects Soul Siphon's tooltip counts. One rank of Corruption is up at a time, so the count is at most three.

func (*Warlock) ApplyTalents

func (warlock *Warlock) ApplyTalents()

func (*Warlock) GetAssignedCurse

func (warlock *Warlock) GetAssignedCurse() *core.Spell

Nil under NoCurse. Elements is the default: any value it does not name falls back to it.

func (*Warlock) GetCharacter

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

func (*Warlock) GetWarlock

func (warlock *Warlock) GetWarlock() *Warlock

func (*Warlock) Initialize

func (warlock *Warlock) Initialize()

func (*Warlock) NewAPLAction

func (warlock *Warlock) NewAPLAction(rot *core.APLRotation, config *proto.APLAction) core.APLActionImpl

func (*Warlock) NewAPLValue

func (warlock *Warlock) NewAPLValue(rot *core.APLRotation, config *proto.APLValue) core.APLValue

func (*Warlock) OnEncounterStart

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

func (*Warlock) Reset

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

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
	MinMana           float64 // The mana the pet keeps before it casts again
	// contains filtered or unexported fields
}

func (*WarlockPet) ExecuteCustomRotation

func (pet *WarlockPet) ExecuteCustomRotation(sim *core.Simulation)

Casts the first ability that is ready once the pet has its MinMana; otherwise waits until it has the mana for the cheapest one, or until the GCD and the cooldown of an ability it has the mana for end.

func (*WarlockPet) GetPet

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

func (*WarlockPet) Initialize

func (pet *WarlockPet) Initialize()

Each demon registers its own abilities, as the pet initializes.

func (*WarlockPet) OnEncounterStart

func (pet *WarlockPet) OnEncounterStart(_ *core.Simulation)

func (*WarlockPet) Reset

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

Jump to

Keyboard shortcuts

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