priest

package
v0.0.135 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PriestSpellFlagNone  int64 = 0
	PriestSpellArchangel int64 = 1 << iota
	PriestSpellDarkArchangel
	PriestSpellBindingHeal
	PriestSpellCircleOfHealing
	PriestSpellDevouringPlague
	PriestSpellDesperatePrayer
	PriestSpellDispersion
	PriestSpellDivineAegis
	PriestSpellDivineHymn
	PriestSpellEmpoweredRenew
	PriestSpellFade
	PriestSpellFlashHeal
	PriestSpellGreaterHeal
	PriestSpellGuardianSpirit
	PriestSpellHolyFire
	PriestSpellHolyNova
	PriestSpellHolyWordChastise
	PriestSpellHolyWordSanctuary
	PriestSpellHolyWordSerenity
	PriestSpellHymnOfHope
	PriestSpellImprovedDevouringPlague
	PriestSpellInnerFire
	PriestSpellInnerFocus
	PriestSpellInnerWill
	PriestSpellManaBurn
	PriestSpellMindBlast
	PriestSpellMindFlay
	PriestSpellMindSear
	PriestSpellMindSpike
	PriestSpellMindTrauma
	PriestSpellPainSuppresion
	PriestSpellPenance
	PriestSpellPowerInfusion
	PriestSpellPowerWordBarrier
	PriestSpellPowerWordShield
	PriestSpellPrayerOfHealing
	PriestSpellPrayerOfMending
	PriestSpellPsychicScream
	PriestSpellRenew
	PriestSpellShadowOrbPassive
	PriestSpellShadowWordDeath
	PriestSpellShadowWordPain
	PriestSpellShadowFiend
	PriestSpellShadowyApparation
	PriestSpellSmite
	PriestSpellVampiricEmbrace
	PriestSpellVampiricTouch

	PriestSpellLast
	PriestSpellsAll    = PriestSpellLast<<1 - 1
	PriestSpellDoT     = PriestSpellDevouringPlague | PriestSpellHolyFire | PriestSpellMindFlay | PriestSpellShadowWordPain | PriestSpellVampiricTouch | PriestSpellImprovedDevouringPlague
	PriestSpellInstant = PriestSpellCircleOfHealing |
		PriestSpellDesperatePrayer |
		PriestSpellDevouringPlague |
		PriestSpellImprovedDevouringPlague |
		PriestSpellFade |
		PriestSpellGuardianSpirit |
		PriestSpellHolyNova |
		PriestSpellHolyWordChastise |
		PriestSpellHolyWordSanctuary |
		PriestSpellHolyWordSerenity |
		PriestSpellInnerFire |
		PriestSpellPainSuppresion |
		PriestSpellPowerInfusion |
		PriestSpellPowerWordBarrier |
		PriestSpellPowerWordShield |
		PriestSpellRenew |
		PriestSpellShadowWordDeath |
		PriestSpellShadowWordPain |
		PriestSpellVampiricEmbrace
	PriestShadowSpells = PriestSpellImprovedDevouringPlague |
		PriestSpellDevouringPlague |
		PriestSpellShadowWordDeath |
		PriestSpellShadowWordPain |
		PriestSpellMindFlay |
		PriestSpellMindBlast |
		PriestSpellMindSear |
		PriestSpellMindSpike |
		PriestSpellVampiricTouch
)

Variables

View Source
var ItemSetCrimsonAcolyte = core.NewItemSet(core.ItemSet{
	Name: "Crimson Acolyte's Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_BonusCrit_Percent,
				FloatValue: 5,
				ClassMask:  PriestSpellShadowWordPain | PriestSpellDevouringPlague | PriestSpellVampiricTouch | PriestSpellImprovedDevouringPlague,
			})
		},
		4: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:      core.SpellMod_DotTickLength_Flat,
				TimeValue: -time.Millisecond * 170,
				ClassMask: PriestSpellMindFlay,
			})
		},
	},
})
View Source
var ItemSetCrimsonAcolytesRaiment = core.NewItemSet(core.ItemSet{
	Name: "Crimson Acolyte's Raiment",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			priest := agent.(PriestAgent).GetPriest()

			var curAmount float64
			procSpell := priest.RegisterSpell(core.SpellConfig{
				ActionID:    core.ActionID{SpellID: 70770},
				SpellSchool: core.SpellSchoolHoly,
				ProcMask:    core.ProcMaskEmpty,
				Flags:       core.SpellFlagNoOnCastComplete | core.SpellFlagIgnoreModifiers | core.SpellFlagHelpful,

				DamageMultiplier: 1,
				ThreatMultiplier: 1,

				Hot: core.DotConfig{
					Aura: core.Aura{
						Label: "CrimsonAcolyteRaiment2pc",
					},
					NumberOfTicks: 3,
					TickLength:    time.Second * 3,
					OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
						dot.SnapshotBaseDamage = curAmount * 0.33
						dot.SnapshotAttackerMultiplier = dot.Spell.CasterHealingMultiplier()
					},
					OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
						dot.CalcAndDealPeriodicSnapshotHealing(sim, target, dot.OutcomeTick)
					},
				},
			})

			priest.RegisterAura(core.Aura{
				Label:    "Crimson Acolytes Raiment 2pc",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnHealDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell.ClassSpellMask != PriestSpellFlashHeal || !sim.Proc(0.33, "Crimson Acolytes Raiment 2pc") {
						return
					}

					curAmount = result.Damage
					hot := procSpell.Hot(result.Target)
					hot.Apply(sim)
				},
			})
		},
		4: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_DamageDone_Pct,
				FloatValue: 0.05,
				ClassMask:  PriestSpellPowerWordShield,
			})

			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_DamageDone_Pct,
				FloatValue: 0.10,
				ClassMask:  PriestSpellCircleOfHealing,
			})
		},
	},
})
View Source
var ItemSetGladiatorsInvestiture = core.NewItemSet(core.ItemSet{
	Name: "Gladiator's Investiture",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			agent.GetCharacter().AddStat(stats.ResilienceRating, 400)
			agent.GetCharacter().AddStat(stats.Intellect, 70)
		},
		4: func(agent core.Agent) {
			agent.GetCharacter().AddStat(stats.Intellect, 90)
		},
	},
})
View Source
var ItemSetGladiatorsRaiment = core.NewItemSet(core.ItemSet{
	Name: "Gladiator's Raiment",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			agent.GetCharacter().AddStat(stats.ResilienceRating, 400)
			agent.GetCharacter().AddStat(stats.Intellect, 70)
		},
		4: func(agent core.Agent) {
			agent.GetCharacter().AddStat(stats.Intellect, 90)
		},
	},
})
View Source
var ItemSetMercurialRegalia = core.NewItemSet(core.ItemSet{
	Name: "Mercurial Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_BonusCrit_Percent,
				FloatValue: 5,
				ClassMask:  PriestSpellMindFlay | PriestSpellMindSear,
			})
		},
		4: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_DamageDone_Flat,
				FloatValue: 0.3,
				ClassMask:  PriestSpellShadowyApparation,
			})
		},
	},
})

T11 - Shadow

View Source
var ItemSetRegaliaOfTheCleansingFlame = core.NewItemSet(core.ItemSet{
	Name: "Regalia of the Cleansing Flame",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			character := agent.GetCharacter()

			character.AddStaticMod(core.SpellModConfig{
				Kind:      core.SpellMod_Cooldown_Flat,
				TimeValue: -time.Second * 75,
				ClassMask: PriestSpellShadowFiend,
			})

			priest := agent.(PriestAgent).GetPriest()
			shadowFlameProc := priest.ShadowfiendPet.RegisterSpell(core.SpellConfig{
				ActionID:         core.ActionID{SpellID: 99156},
				SpellSchool:      core.SpellSchoolFire,
				ProcMask:         core.ProcMaskEmpty,
				Flags:            core.SpellFlagIgnoreModifiers | core.SpellFlagNoSpellMods,
				BaseCost:         0,
				CritMultiplier:   1.0,
				DamageMultiplier: 1.0,
				ThreatMultiplier: 1.0,
				ManaCost: core.ManaCostOptions{
					BaseCost:   0.0,
					Multiplier: 1,
				},

				Cast: core.CastConfig{
					DefaultCast: core.Cast{
						GCD:      0,
						CastTime: 0,
					},
				},

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

			core.MakePermanent(
				core.MakeProcTriggerAura(&priest.ShadowfiendPet.Unit, core.ProcTrigger{
					ActionID:   core.ActionID{SpellID: 99155},
					Name:       "Shadowflame (T12-2P)",
					Callback:   core.CallbackOnSpellHitDealt,
					ProcMask:   core.ProcMaskMelee,
					Outcome:    core.OutcomeLanded,
					ProcChance: 1.0,
					Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {

						shadowFlameProc.BonusSpellPower = result.Damage * 0.2
						shadowFlameProc.Cast(sim, result.Target)
					},
				}))
		},
		4: func(agent core.Agent) {
			character := agent.GetCharacter()
			mbMod := character.AddDynamicMod(core.SpellModConfig{
				Kind:       core.SpellMod_DamageDone_Flat,
				FloatValue: 0.15,
				ClassMask:  PriestSpellMindBlast,
			})

			mbAura := character.RegisterAura(core.Aura{
				ActionID: core.ActionID{SpellID: 99158},
				Label:    "Dark Flames",
				Duration: core.NeverExpires,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					mbMod.Activate()
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					mbMod.Deactivate()
				},
			})

			priest := agent.(PriestAgent).GetPriest()
			dotTracker := make([]int, len(priest.Env.AllUnits))
			setHandler := func(aura *core.Aura, sim *core.Simulation) {
				if aura.IsActive() {
					dotTracker[aura.Unit.UnitIndex]++
				} else {
					dotTracker[aura.Unit.UnitIndex]--
				}

				for _, count := range dotTracker {
					if count == 3 {
						mbAura.Activate(sim)
						return
					}
				}

				mbAura.Deactivate(sim)
			}

			priest.OnSpellRegistered(func(spell *core.Spell) {
				if spell.ClassSpellMask&(PriestSpellShadowWordPain|PriestSpellVampiricTouch|PriestSpellDevouringPlague) == 0 {
					return
				}

				for _, target := range priest.Env.AllUnits {
					if target.Type == core.EnemyUnit {
						spell.Dot(target).ApplyOnGain(setHandler)
						spell.Dot(target).ApplyOnExpire(setHandler)
					}
				}
			})
		},
	},
})

T12 - Shadow

View Source
var TalentTreeSizes = [3]int{21, 21, 21}

Functions

func MindTraumaAura

func MindTraumaAura(target *core.Unit) *core.Aura

Types

type Priest

type Priest struct {
	core.Character
	SelfBuffs
	Talents *proto.PriestTalents

	SurgeOfLight bool

	Latency float64

	ShadowfiendAura *core.Aura
	ShadowfiendPet  *Shadowfiend

	// cached cast stuff
	// TODO: aoe multi-target situations will need multiple spells ticking for each target.
	HolyEvangelismProcAura *core.Aura
	DarkEvangelismProcAura *core.Aura

	SurgeOfLightProcAura *core.Aura

	// might want to move these spell / talents into spec specific initialization
	BindingHeal     *core.Spell
	CircleOfHealing *core.Spell
	FlashHeal       *core.Spell
	GreaterHeal     *core.Spell
	Penance         *core.Spell
	PenanceHeal     *core.Spell
	PowerWordShield *core.Spell
	PrayerOfHealing *core.Spell
	PrayerOfMending *core.Spell
	Renew           *core.Spell
	EmpoweredRenew  *core.Spell
	InnerFocus      *core.Spell
	HolyFire        *core.Spell
	Smite           *core.Spell
	DevouringPlague *core.Spell
	ShadowWordPain  *core.Spell
	Shadowfiend     *core.Spell
	VampiricTouch   *core.Spell

	WeakenedSouls core.AuraArray

	ProcPrayerOfMending core.ApplySpellResults

	ClassSpellScaling float64
}

func New

func New(char *core.Character, selfBuffs SelfBuffs, talents string) *Priest

func (*Priest) AddDarkEvangelismStack

func (priest *Priest) AddDarkEvangelismStack(sim *core.Simulation)

func (*Priest) AddHolyEvanglismStack

func (priest *Priest) AddHolyEvanglismStack(sim *core.Simulation)

func (*Priest) AddPartyBuffs

func (priest *Priest) AddPartyBuffs(_ *proto.PartyBuffs)

func (*Priest) ApplyGlyphs

func (priest *Priest) ApplyGlyphs()

func (*Priest) ApplyTalents

func (priest *Priest) ApplyTalents()

func (*Priest) GetCharacter

func (priest *Priest) GetCharacter() *core.Character

func (*Priest) HasMajorGlyph

func (hunter *Priest) HasMajorGlyph(glyph proto.PriestMajorGlyph) bool

func (*Priest) HasMinorGlyph

func (hunter *Priest) HasMinorGlyph(glyph proto.PriestMinorGlyph) bool

func (*Priest) HasPrimeGlyph

func (hunter *Priest) HasPrimeGlyph(glyph proto.PriestPrimeGlyph) bool

func (*Priest) Initialize

func (priest *Priest) Initialize()

func (*Priest) NewShadowfiend

func (priest *Priest) NewShadowfiend() *Shadowfiend

func (*Priest) Reset

func (priest *Priest) Reset(_ *core.Simulation)

type PriestAgent

type PriestAgent interface {
	GetPriest() *Priest
}

Agent is a generic way to access underlying priest on any of the agents.

type SelfBuffs

type SelfBuffs struct {
	UseShadowfiend bool
	UseInnerFire   bool

	PowerInfusionTarget *proto.UnitReference
}

type Shadowfiend

type Shadowfiend struct {
	core.Pet

	Priest          *Priest
	Shadowcrawl     *core.Spell
	ShadowcrawlAura *core.Aura
}

DISCLAIMER: Shadowfiend need some extensive research on Level 85 Proper Spell Scaling? Wiki says 37.5%, patch notes state 30% WoW Sims implemented priest crit scaling but we do not Right now Stats are inherited statically on spawn, but testing indicates shadow fiend scales per hit based on owner spell power

func (*Shadowfiend) ExecuteCustomRotation

func (shadowfiend *Shadowfiend) ExecuteCustomRotation(sim *core.Simulation)

func (*Shadowfiend) GetPet

func (shadowfiend *Shadowfiend) GetPet() *core.Pet

func (*Shadowfiend) Initialize

func (shadowfiend *Shadowfiend) Initialize()

func (*Shadowfiend) OnPetDisable

func (shadowfiend *Shadowfiend) OnPetDisable(sim *core.Simulation)

func (*Shadowfiend) Reset

func (shadowfiend *Shadowfiend) Reset(sim *core.Simulation)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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