death_knight

package
v0.0.147 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HitCapRatio             = 17.0 / 8.0 // 2.125
	ExpertiseCapRatio       = 6.5 / 8.0  // 0.8125
	PetExpertiseRatingScale = ExpertiseCapRatio * (4 * core.ExpertisePerQuarterPercentReduction)
)
View Source
const (
	DDBC_MercilessCombat   int = 0
	DDBC_EbonPlaguebringer     = iota
	DDBC_RuneOfRazorice

	DDBC_Total
)

Damage Done By Caster setup

View Source
const (
	DeathKnightSpellFlagNone int64 = 0
	DeathKnightSpellIcyTouch int64 = 1 << iota
	DeathKnightSpellDeathCoil
	DeathKnightSpellDeathCoilHeal
	DeathKnightSpellDeathAndDecay
	DeathKnightSpellOutbreak
	DeathKnightSpellEmpowerRuneWeapon
	DeathKnightSpellUnholyFrenzy
	DeathKnightSpellDarkTransformation
	DeathKnightSpellSummonGargoyle
	DeathKnightSpellArmyOfTheDead
	DeathKnightSpellRaiseDead
	DeathKnightSpellBloodTap
	DeathKnightSpellObliterate
	DeathKnightSpellFrostStrike
	DeathKnightSpellRuneStrike
	DeathKnightSpellPlagueStrike
	DeathKnightSpellFesteringStrike
	DeathKnightSpellScourgeStrike
	DeathKnightSpellScourgeStrikeShadow
	DeathKnightSpellHeartStrike
	DeathKnightSpellDeathStrike
	DeathKnightSpellDeathStrikeHeal
	DeathKnightSpellFrostFever
	DeathKnightSpellBloodPlague
	DeathKnightSpellHowlingBlast
	DeathKnightSpellHornOfWinter
	DeathKnightSpellPillarOfFrost
	DeathKnightSpellPestilence
	DeathKnightSpellBloodBoil
	DeathKnightSpellRuneTap
	DeathKnightSpellVampiricBlood
	DeathKnightSpellIceboundFortitude
	DeathKnightSpellBoneShield
	DeathKnightSpellDancingRuneWeapon
	DeathKnightSpellDeathPact
	DeathKnightSpellUnholyBlight
	DeathKnightSpellBloodStrike

	DeathKnightSpellKillingMachine     // Used to react to km procs
	DeathKnightSpellConvertToDeathRune // Used to react to death rune gains

	DeathKnightSpellLast
	DeathKnightSpellsAll = DeathKnightSpellLast<<1 - 1

	DeathKnightSpellDisease = DeathKnightSpellFrostFever | DeathKnightSpellBloodPlague
)
View Source
const (
	GhoulSpellNone int64 = 0
	GhoulSpellClaw int64 = 1 << iota

	GhoulSpellLast
	GhoulSpellsAll = DeathKnightSpellLast<<1 - 1
)

Variables

View Source
var BloodBoilActionID = core.ActionID{SpellID: 48721}
View Source
var BloodStrikeActionID = core.ActionID{SpellID: 45902}
View Source
var DeathCoilActionID = core.ActionID{SpellID: 47541}
View Source
var DeathStrikeActionID = core.ActionID{SpellID: 49998}

TODO: Cleanup death strike the same way we did for plague strike

View Source
var FesteringStrikeActionID = core.ActionID{SpellID: 85948}
View Source
var HowlingBlastActionID = core.ActionID{SpellID: 49184}
View Source
var IcyTouchActionID = core.ActionID{SpellID: 45477}
View Source
var ItemSetElementiumDeathplateBattlearmor = core.NewItemSet(core.ItemSet{
	Name: "Elementium Deathplate Battlearmor",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			dk := agent.(DeathKnightAgent).GetDeathKnight()

			dk.BurningBloodSpell = dk.RegisterSpell(core.SpellConfig{
				ActionID:         core.ActionID{SpellID: 98957},
				SpellSchool:      core.SpellSchoolFire,
				Flags:            core.SpellFlagAPL | core.SpellFlagPassiveSpell,
				ProcMask:         core.ProcMaskEmpty,
				DamageMultiplier: 1,
				CritMultiplier:   dk.DefaultMeleeCritMultiplier(),
				ThreatMultiplier: 1,

				Dot: core.DotConfig{
					Aura: core.Aura{
						Label: "Burning Blood" + dk.Label,
					},
					NumberOfTicks: 3,
					TickLength:    time.Second * 2,

					OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) {
						baseDamage := 800.0
						dot.Snapshot(target, baseDamage)
					},
					OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
						dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeSnapshotCrit)
					},
				},

				ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
					spell.Dot(target).Apply(sim)
				},
			})

			core.MakeProcTriggerAura(&dk.Unit, core.ProcTrigger{
				Name:       "Burning Blood Trigger",
				ActionID:   core.ActionID{SpellID: 98956},
				ProcMask:   core.ProcMaskMelee,
				Callback:   core.CallbackOnSpellHitDealt,
				Outcome:    core.OutcomeLanded,
				ProcChance: 1,
				Harmful:    true,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					dk.BurningBloodSpell.Cast(sim, result.Target)
				},
			})

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

		},
	},
})

T12 - Tank

View Source
var ItemSetElementiumDeathplateBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Elementium Deathplate Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			dk := agent.(DeathKnightAgent).GetDeathKnight()

			actionID := core.ActionID{SpellID: 98971}
			rpMetrics := dk.NewRunicPowerMetrics(actionID)
			var pa *core.PendingAction

			buff := dk.RegisterAura(core.Aura{
				Label:    "Smoldering Rune",
				ActionID: actionID,
				Duration: time.Minute * core.TernaryDuration(dk.HasMinorGlyph(proto.DeathKnightMinorGlyph_GlyphOfHornOfWinter), 3, 2),
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					pa = core.StartPeriodicAction(sim, core.PeriodicActionOptions{
						Period: time.Second * 5,
						OnAction: func(sim *core.Simulation) {
							dk.AddUnscaledRunicPower(sim, 3, rpMetrics)
						},
					})
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					pa.Cancel(sim)
				},
			})

			core.MakeProcTriggerAura(&dk.Unit, core.ProcTrigger{
				Name:           "Smolering Rune Trigger",
				ActionID:       actionID,
				ClassSpellMask: DeathKnightSpellHornOfWinter,
				Callback:       core.CallbackOnCastComplete,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					buff.Activate(sim)
				},
			})

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

			dk := agent.(DeathKnightAgent).GetDeathKnight()
			damage := 0.0

			newFlamingTormentSpell := func(spellID int32) core.SpellConfig {
				actionID := core.ActionID{SpellID: spellID}

				return core.SpellConfig{
					ActionID:    actionID.WithTag(3),
					SpellSchool: core.SpellSchoolFire,
					ProcMask:    core.ProcMaskEmpty,
					Flags:       core.SpellFlagMeleeMetrics | core.SpellFlagNoOnCastComplete | core.SpellFlagNoOnDamageDealt | core.SpellFlagIgnoreModifiers | core.SpellFlagPassiveSpell,

					DamageMultiplier: 1,
					ThreatMultiplier: 1,

					ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
						spell.CalcAndDealDamage(sim, spell.Unit.CurrentTarget, damage, spell.OutcomeAlwaysHit)
					},
				}
			}

			var flamingTormentSpellForObliterate = dk.RegisterSpell(newFlamingTormentSpell(49020))
			var flamingTormentSpellForScourgeStrike = dk.RegisterSpell(newFlamingTormentSpell(55090))

			core.MakeProcTriggerAura(&dk.Unit, core.ProcTrigger{
				Name:           "Flaming Torment Trigger",
				Callback:       core.CallbackOnSpellHitDealt,
				ClassSpellMask: DeathKnightSpellObliterate | DeathKnightSpellScourgeStrike | DeathKnightSpellScourgeStrikeShadow,
				Outcome:        core.OutcomeLanded,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					damage = result.Damage * 0.06
					if spell.ClassSpellMask == DeathKnightSpellObliterate {
						flamingTormentSpellForObliterate.Cast(sim, result.Target)
					} else {
						flamingTormentSpellForScourgeStrike.Cast(sim, result.Target)
					}
				},
			})

		},
	},
})

T12 - DPS

View Source
var ItemSetMagmaPlatedBattlearmor = core.NewItemSet(core.ItemSet{
	Name: "Magma Plated Battlearmor",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			agent.GetCharacter().AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_DamageDone_Flat,
				ClassMask:  DeathKnightSpellDeathStrike,
				FloatValue: 0.05,
			})
		},
		4: func(agent core.Agent) {

		},
	},
})

T11 - Tank

View Source
var ItemSetMagmaPlatedBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Magma Plated Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			agent.GetCharacter().AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_BonusCrit_Percent,
				ClassMask:  DeathKnightSpellDeathCoil | DeathKnightSpellDeathCoilHeal | DeathKnightSpellFrostStrike,
				FloatValue: 5,
			})
		},
		4: func(agent core.Agent) {

			character := agent.GetCharacter()

			apDep := make([]*stats.StatDependency, 3)
			for i := 1; i <= 3; i++ {
				apDep[i-1] = character.NewDynamicMultiplyStat(stats.AttackPower, 1.0+float64(i)*0.01)
			}

			aura := character.GetOrRegisterAura(core.Aura{
				Label:     "Death Eater",
				ActionID:  core.ActionID{SpellID: 90507},
				Duration:  time.Second * 30,
				MaxStacks: 3,
				OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) {
					if oldStacks > 0 {
						character.DisableDynamicStatDep(sim, apDep[oldStacks-1])
					}
					if newStacks > 0 {
						character.EnableDynamicStatDep(sim, apDep[newStacks-1])
					}
				},
			})

			core.MakeProcTriggerAura(&agent.GetCharacter().Unit, core.ProcTrigger{
				Name:           "Magma Plated Battlegear",
				Callback:       core.CallbackOnCastComplete,
				ClassSpellMask: DeathKnightSpellConvertToDeathRune | DeathKnightSpellKillingMachine,
				ICD:            time.Millisecond * 10,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					aura.Activate(sim)
					aura.AddStack(sim)
				},
			})
		},
	},
})

T11 - DPS

View Source
var ItemSetNecroticBoneplateBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Necrotic Boneplate Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

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

		},
	},
})

T13 - DPS

View Source
var OutbreakActionID = core.ActionID{SpellID: 77575}
View Source
var PestilenceActionID = core.ActionID{SpellID: 50842}
View Source
var PlagueStrikeActionID = core.ActionID{SpellID: 45462}
View Source
var RuneStrikeActionID = core.ActionID{SpellID: 56815}
View Source
var RuneTapActionID = core.ActionID{SpellID: 48982}
View Source
var TalentTreeSizes = [3]int{20, 20, 20}

Functions

func CopySpellMultipliers

func CopySpellMultipliers(sourceSpell *core.Spell, targetSpell *core.Spell, target *core.Unit)

Types

type BloodwormPet

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

func (*BloodwormPet) ExecuteCustomRotation

func (bloodworm *BloodwormPet) ExecuteCustomRotation(_ *core.Simulation)

func (*BloodwormPet) GetPet

func (bloodworm *BloodwormPet) GetPet() *core.Pet

func (*BloodwormPet) Initialize

func (bloodworm *BloodwormPet) Initialize()

func (*BloodwormPet) Reset

func (bloodworm *BloodwormPet) Reset(_ *core.Simulation)

type DeathKnight

type DeathKnight struct {
	core.Character
	Talents *proto.DeathKnightTalents

	ClassSpellScaling float64

	Inputs DeathKnightInputs

	// Pets
	Ghoul      *GhoulPet
	Gargoyle   *GargoylePet
	ArmyGhoul  []*GhoulPet
	RuneWeapon *RuneWeaponPet
	Bloodworm  []*BloodwormPet

	// Diseases
	FrostFeverSpell  *core.Spell
	BloodPlagueSpell *core.Spell
	EbonPlagueAura   core.AuraArray
	ScarletFeverAura core.AuraArray

	// T12 spell
	BurningBloodSpell *core.Spell

	// Runic power decay, used during pre pull
	RunicPowerDecayAura *core.Aura
	// contains filtered or unexported fields
}

func NewDeathKnight

func NewDeathKnight(character *core.Character, inputs DeathKnightInputs, talents string, deathRuneConvertSpellId int32) *DeathKnight

func (*DeathKnight) AddPartyBuffs

func (dk *DeathKnight) AddPartyBuffs(partyBuffs *proto.PartyBuffs)

func (*DeathKnight) AddRaidBuffs

func (dk *DeathKnight) AddRaidBuffs(raidBuffs *proto.RaidBuffs)

func (*DeathKnight) ApplyBloodTalents

func (dk *DeathKnight) ApplyBloodTalents()

func (*DeathKnight) ApplyFrostTalents

func (dk *DeathKnight) ApplyFrostTalents()

func (*DeathKnight) ApplyGlyphs

func (dk *DeathKnight) ApplyGlyphs()

func (*DeathKnight) ApplyTalents

func (dk *DeathKnight) ApplyTalents()

func (*DeathKnight) ApplyUnholyTalents

func (dk *DeathKnight) ApplyUnholyTalents()

func (*DeathKnight) DiseasesAreActive

func (dk *DeathKnight) DiseasesAreActive(target *core.Unit) bool

func (*DeathKnight) GetCharacter

func (dk *DeathKnight) GetCharacter() *core.Character

func (*DeathKnight) GetDeathKnight

func (dk *DeathKnight) GetDeathKnight() *DeathKnight

func (*DeathKnight) GetDiseaseMulti

func (dk *DeathKnight) GetDiseaseMulti(target *core.Unit, base float64, increase float64) float64

func (*DeathKnight) GetTentacles added in v0.0.119

func (deathKnight *DeathKnight) GetTentacles() []*cata.TentacleOfTheOldOnesPet

func (*DeathKnight) HasMajorGlyph

func (dk *DeathKnight) HasMajorGlyph(glyph proto.DeathKnightMajorGlyph) bool

func (*DeathKnight) HasMinorGlyph

func (dk *DeathKnight) HasMinorGlyph(glyph proto.DeathKnightMinorGlyph) bool

func (*DeathKnight) HasPrimeGlyph

func (dk *DeathKnight) HasPrimeGlyph(glyph proto.DeathKnightPrimeGlyph) bool

func (*DeathKnight) Initialize

func (dk *DeathKnight) Initialize()

func (*DeathKnight) NewArmyGhoulPet

func (dk *DeathKnight) NewArmyGhoulPet(_ int) *GhoulPet

func (*DeathKnight) NewBloodwormPet

func (dk *DeathKnight) NewBloodwormPet(_ int) *BloodwormPet

func (*DeathKnight) NewGargoyle

func (dk *DeathKnight) NewGargoyle() *GargoylePet

func (*DeathKnight) NewGhoulPet

func (dk *DeathKnight) NewGhoulPet(permanent bool) *GhoulPet

func (*DeathKnight) NewRuneWeapon

func (dk *DeathKnight) NewRuneWeapon() *RuneWeaponPet

func (*DeathKnight) NewTentacleOfTheOldOnesPet added in v0.0.119

func (dk *DeathKnight) NewTentacleOfTheOldOnesPet() *cata.TentacleOfTheOldOnesPet

func (*DeathKnight) Reset

func (dk *DeathKnight) Reset(sim *core.Simulation)

func (*DeathKnight) SetupGhoul

func (dk *DeathKnight) SetupGhoul(ghoulPet *GhoulPet, apScaling float64)

func (*DeathKnight) ThreatOfThassarianProc

func (dk *DeathKnight) ThreatOfThassarianProc(sim *core.Simulation, result *core.SpellResult, ohSpell *core.Spell)

type DeathKnightAgent

type DeathKnightAgent interface {
	GetDeathKnight() *DeathKnight
}

type DeathKnightInputs

type DeathKnightInputs struct {
	// Option Vars
	IsDps bool

	UnholyFrenzyTarget *proto.UnitReference

	StartingRunicPower float64
	PetUptime          float64

	// Rotation Vars
	UseAMS            bool
	AvgAMSSuccessRate float64
	AvgAMSHit         float64

	Spec proto.Spec
}

type GargoylePet

type GargoylePet struct {
	core.Pet

	GargoyleStrike *core.Spell
	// contains filtered or unexported fields
}

func (*GargoylePet) ExecuteCustomRotation

func (garg *GargoylePet) ExecuteCustomRotation(sim *core.Simulation)

func (*GargoylePet) GetPet

func (garg *GargoylePet) GetPet() *core.Pet

func (*GargoylePet) Initialize

func (garg *GargoylePet) Initialize()

func (*GargoylePet) Reset

func (garg *GargoylePet) Reset(_ *core.Simulation)

type GhoulPet

type GhoulPet struct {
	core.Pet

	DarkTransformationAura *core.Aura
	Claw                   *core.Spell
	// contains filtered or unexported fields
}

func (*GhoulPet) Enable added in v0.0.130

func (ghoulPet *GhoulPet) Enable(sim *core.Simulation, petAgent core.PetAgent)

func (*GhoulPet) ExecuteCustomRotation

func (ghoulPet *GhoulPet) ExecuteCustomRotation(sim *core.Simulation)

func (*GhoulPet) GetPet

func (ghoulPet *GhoulPet) GetPet() *core.Pet

func (*GhoulPet) Initialize

func (ghoulPet *GhoulPet) Initialize()

func (*GhoulPet) Reset

func (ghoulPet *GhoulPet) Reset(_ *core.Simulation)

type RuneWeaponPet

type RuneWeaponPet struct {
	core.Pet

	// Diseases
	FrostFeverSpell  *core.Spell
	BloodPlagueSpell *core.Spell
	// contains filtered or unexported fields
}

func (*RuneWeaponPet) AddCopySpell

func (runeWeapon *RuneWeaponPet) AddCopySpell(actionId core.ActionID, spell *core.Spell)

func (*RuneWeaponPet) DiseasesAreActive

func (runeWeapon *RuneWeaponPet) DiseasesAreActive(target *core.Unit) bool

func (*RuneWeaponPet) ExecuteCustomRotation

func (runeWeapon *RuneWeaponPet) ExecuteCustomRotation(_ *core.Simulation)

func (*RuneWeaponPet) GetDiseaseMulti

func (runeWeapon *RuneWeaponPet) GetDiseaseMulti(target *core.Unit, base float64, increase float64) float64

func (*RuneWeaponPet) GetPet

func (runeWeapon *RuneWeaponPet) GetPet() *core.Pet

func (*RuneWeaponPet) Initialize

func (runeWeapon *RuneWeaponPet) Initialize()

func (*RuneWeaponPet) Reset

func (runeWeapon *RuneWeaponPet) Reset(_ *core.Simulation)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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