paladin

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SanctifiedOrb                        = 20512
	LibramOfHope                         = 22401
	LibramOfFervor                       = 23203
	LibramDiscardedTenetsOfTheSilverHand = 209574
	LibramOfBenediction                  = 215435
	LibramOfDraconicDestruction          = 221457
	LibramOfTheDevoted                   = 228174
	LibramOfAvenging                     = 232421
	Truthbearer2H                        = 229749
	Truthbearer1H                        = 229806
	HammerOfTheLightbringer              = 230003
	ScrollsOfBlindingLight               = 230272
	GrileksCharmOfValor                  = 231285
	HerosBrand                           = 231328
	ZandalarFreethinkersBreastplate      = 231329
	ZandalarFreethinkersBelt             = 231330
	LibramOfWrath                        = 232420
)

Libram IDs

View Source
const (
	SpellFlag_RV          = core.SpellFlagAgentReserved1
	SpellFlag_Forbearance = core.SpellFlagAgentReserved2
)
View Source
const (
	SpellCode_PaladinNone = iota

	SpellCode_PaladinExorcism
	SpellCode_PaladinHolyShock
	SpellCode_PaladinHolyWrath
	SpellCode_PaladinJudgementOfCommand
	SpellCode_PaladinConsecration
	SpellCode_PaladinAvengersShield
	SpellCode_PaladinHolyShield
	SpellCode_PaladinHolyShieldProc
	SpellCode_PaladinLayOnHands
)
View Source
const RVTicks = 4

Variables

View Source
var HolyShieldValues = []struct {
	level    int32
	spellID  int32
	procID   int32
	manaCost float64
	damage   float64
}{
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
}
View Source
var ItemSetFreethinkersArmor = core.NewItemSet(core.ItemSet{
	Name: "Freethinker's Armor",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.HolyPower: 14,
			})
		},
		3: func(agent core.Agent) {

			paladin := agent.GetCharacter()
			paladin.OnSpellRegistered(func(spell *core.Spell) {
				if spell.SpellCode == SpellCode_PaladinHolyShock {

					spell.DamageMultiplier += 0.5
				}
			})
		},
		5: func(agent core.Agent) {

			paladin := agent.(PaladinAgent).GetPaladin()
			paladin.RegisterAura(core.Aura{
				Label: "S03 - Item - ZG - Paladin - Caster 5P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					for _, spell := range paladin.exorcism {
						spell.CD.Duration -= time.Second * 3
						spell.DamageMultiplier *= 1.50
					}
				},
			})
		},
	},
})
View Source
var ItemSetLawbringerRadiance = core.NewItemSet(core.ItemSet{
	Name: "Lawbringer Radiance",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStat(stats.MeleeCrit, 2)
			character.AddStat(stats.SpellCrit, 2)
		},
		6: func(agent core.Agent) {

			paladin := agent.(PaladinAgent).GetPaladin()
			core.MakePermanent(paladin.RegisterAura(core.Aura{
				Label: "S03 - Item - T1 - Paladin - Retribution 6P Bonus",
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					paladin.lingerDuration = time.Second * 6
					paladin.enableMultiJudge = true
				},
			}))
		},
	},
})
View Source
var ItemSetLawbringerWill = core.NewItemSet(core.ItemSet{
	Name: "Lawbringer Will",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			character := agent.GetCharacter()
			character.AddStat(stats.BlockValue, 30)
		},
		4: func(agent core.Agent) {

			paladin := agent.(PaladinAgent).GetPaladin()
			c := agent.GetCharacter()
			actionID := core.ActionID{SpellID: 456540}

			bastionOfLight := paladin.RegisterSpell(core.SpellConfig{
				ActionID:         actionID,
				SpellSchool:      core.SpellSchoolHoly,
				DefenseType:      core.DefenseTypeMagic,
				ProcMask:         core.ProcMaskSpellHealing,
				Flags:            core.SpellFlagHelpful,
				DamageMultiplier: 1,
				ThreatMultiplier: 1,
				ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
					baseHeal := sim.Roll(189, 211)
					spell.CalcAndDealHealing(sim, target, baseHeal, spell.OutcomeHealingCrit)
				},
			})

			handler := func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
				bastionOfLight.Cast(sim, result.Target)
			}

			core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
				ActionID:   actionID,
				Name:       "S03 - Item - T1 - Paladin - Protection 4P Bonus",
				Callback:   core.CallbackOnSpellHitTaken,
				Outcome:    core.OutcomeBlock,
				ProcChance: 1.0,
				ICD:        time.Millisecond * 3500,
				Handler:    handler,
			})
		},
		6: func(agent core.Agent) {

			paladin := agent.(PaladinAgent).GetPaladin()

			paladin.RegisterAura(core.Aura{
				Label: "S03 - Item - T1 - Paladin - Protection 6P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					auras := paladin.holyShieldAura
					procs := paladin.holyShieldProc
					blockBonus := 30.0 * core.BlockRatingPerBlockChance

					for i, values := range HolyShieldValues {

						if paladin.Level < values.level {
							break
						}

						damage := values.damage

						procs[i].ApplyEffects = func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
							sbv := paladin.BlockValue() * 0.8

							spell.CalcAndDealDamage(sim, target, (damage + sbv), spell.OutcomeMagicCrit)
						}

						auras[i].MaxStacks = 0

						auras[i].OnGain = func(aura *core.Aura, sim *core.Simulation) {
							paladin.AddStatDynamic(sim, stats.Block, blockBonus)
						}

						auras[i].OnSpellHitTaken = func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
							if result.DidBlock() {
								procs[i].Cast(sim, spell.Unit)
							}
						}
					}
				},
			})
		},
	},
})
View Source
var ItemSetLieutenantCommandersRedemption = core.NewItemSet(core.ItemSet{
	Name: "Lieutenant Commander's Redemption",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.HealingPower, 44)
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},
	},
})
View Source
var ItemSetLieutenantCommandersVindication = core.NewItemSet(core.ItemSet{
	Name: "Lieutenant Commander's Vindication",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},
	},
})
View Source
var ItemSetMercifulJudgement = core.NewItemSet(core.ItemSet{
	Name: "Merciful Judgement",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			paladin := agent.GetCharacter()
			paladin.OnSpellRegistered(func(spell *core.Spell) {
				if spell.SpellCode == SpellCode_PaladinHolyShock {
					spell.BonusCritRating += 5.0
				}
			})
		},
		4: func(agent core.Agent) {

			paladin := agent.GetCharacter()
			paladin.OnSpellRegistered(func(spell *core.Spell) {
				if spell.SpellCode == SpellCode_PaladinConsecration {
					spell.AOEDot().DamageMultiplier *= 1.5
				}
			})
		},
		6: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetObsessedProphetsPlate = core.NewItemSet(core.ItemSet{
	Name: "Obsessed Prophet's Plate",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.MeleeCrit, 1*core.CritRatingPerCritChance)
			c.AddStat(stats.SpellCrit, 1*core.SpellCritRatingPerCritChance)
		},
		3: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.PseudoStats.SchoolBonusCritChance[stats.SchoolIndexHoly] += 3 * core.SpellCritRatingPerCritChance
		},
	},
})
View Source
var ItemSetRadiantJudgement = core.NewItemSet(core.ItemSet{
	Name: "Radiant Judgement",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			paladin := agent.(PaladinAgent).GetPaladin()
			paladin.RegisterAura(core.Aura{
				Label: "S03 - Item - T2 - Paladin - Retribution 2P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					for _, judgeSpells := range paladin.allJudgeSpells {
						for _, judgeRankSpell := range judgeSpells {
							judgeRankSpell.DamageMultiplier *= 1.2
						}
					}

					paladin.consumeSealsOnJudge = false
				},
			})
		},
		4: func(agent core.Agent) {

			paladin := agent.(PaladinAgent).GetPaladin()
			paladin.RegisterAura(core.Aura{
				Label: "S03 - Item - T2 - Paladin - Retribution 4P Bonus",

				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					paladin.judgement.CD.Duration -= 5 * time.Second
					paladin.enableMultiJudge = false
				},
			})
		},
		6: func(agent core.Agent) {

			paladin := agent.(PaladinAgent).GetPaladin()

			t2Judgement6pcAura := paladin.GetOrRegisterAura(core.Aura{
				Label:     "Swift Judgement",
				ActionID:  core.ActionID{SpellID: 467530},
				Duration:  time.Second * 8,
				MaxStacks: 5,

				OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks int32, newStacks int32) {
					aura.Unit.PseudoStats.SchoolDamageDealtMultiplier[stats.SchoolIndexHoly] /= (1.0 + (float64(oldStacks) * 0.01))
					aura.Unit.PseudoStats.SchoolDamageDealtMultiplier[stats.SchoolIndexHoly] *= (1.0 + (float64(newStacks) * 0.01))
				},
			})

			paladin.RegisterAura(core.Aura{
				Label: "S03 - Item - T2 - Paladin - Retribution 6P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					originalApplyEffects := paladin.judgement.ApplyEffects

					paladin.judgement.ApplyEffects = func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
						originalApplyEffects(sim, target, spell)

						t2Judgement6pcAura.Activate(sim)
						t2Judgement6pcAura.AddStack(sim)
					}
				},
			})
		},
	},
})
View Source
var ItemSetSoulforgeArmor = core.NewItemSet(core.ItemSet{
	Name: "Soulforge Armor",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
				stats.HealingPower:      40,
			})
		},

		4: func(agent core.Agent) {
			c := agent.GetCharacter()
			actionID := core.ActionID{SpellID: 450625}

			procAura := c.NewTemporaryStatsAura("Crusader's Wrath", core.ActionID{SpellID: 27499}, stats.Stats{stats.SpellPower: 95}, time.Second*10)
			handler := func(sim *core.Simulation, spell *core.Spell, _ *core.SpellResult) {
				procAura.Activate(sim)
			}

			core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
				ActionID:   actionID,
				Name:       "Item - Crusader's Wrath Proc - Lightforge Armor (Melee Auto)",
				Callback:   core.CallbackOnSpellHitDealt,
				Outcome:    core.OutcomeLanded,
				ProcMask:   core.ProcMaskMeleeWhiteHit,
				ProcChance: 0.06,
				Handler:    handler,
			})
			core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
				ActionID:   actionID,
				Name:       "Item - Crusader's Wrath Proc - Lightforge Armor (Spell Cast)",
				Callback:   core.CallbackOnCastComplete,
				ProcMask:   core.ProcMaskSpellDamage | core.ProcMaskSpellHealing,
				ProcChance: 0.04,
				Handler:    handler,
			})
		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddResistances(8)
		},

		8: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Armor, 200)
		},
	},
})
View Source
var ItemSetWilfullJudgement = core.NewItemSet(core.ItemSet{
	Name: "Wilfull Judgement",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

			paladin := agent.(PaladinAgent).GetPaladin()
			blockBonus := 40.0 * core.BlockRatingPerBlockChance
			numCharges := int32(4)

			paladin.RegisterAura(core.Aura{
				Label: "S03 - Item - T2 - Paladin - Protection 2P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					for i, hsAura := range paladin.holyShieldAura {
						if paladin.Level < HolyShieldValues[i].level {
							break
						}
						hsAura.OnGain = func(aura *core.Aura, sim *core.Simulation) {
							aura.SetStacks(sim, numCharges)
							paladin.AddStatDynamic(sim, stats.Block, blockBonus)
						}
						hsAura.OnExpire = func(aura *core.Aura, sim *core.Simulation) {
							paladin.AddStatDynamic(sim, stats.Block, -blockBonus)
						}
					}
				},
			})
		},
		4: func(agent core.Agent) {

			paladin := agent.(PaladinAgent).GetPaladin()

			paladin.RegisterAura(core.Aura{
				Label: "S03 - Item - T2 - Paladin - Protection 4P Bonus",
				OnInit: func(aura *core.Aura, sim *core.Simulation) {
					for i, hsAura := range paladin.holyShieldAura {
						if paladin.Level < HolyShieldValues[i].level {
							break
						}
						oldOnGain := hsAura.OnGain
						oldOnExpire := hsAura.OnExpire

						hsAura.OnGain = func(aura *core.Aura, sim *core.Simulation) {
							oldOnGain(aura, sim)
							paladin.PseudoStats.DamageTakenMultiplier *= 0.9
						}
						hsAura.OnExpire = func(aura *core.Aura, sim *core.Simulation) {
							oldOnExpire(aura, sim)
							paladin.PseudoStats.DamageTakenMultiplier /= 0.9
						}
					}
				},
			})
		},
		6: func(agent core.Agent) {

			c := agent.GetCharacter()
			actionID := core.ActionID{SpellID: 20178}
			paladin := agent.(PaladinAgent).GetPaladin()
			procChance := 0.2 * float64(paladin.Talents.Reckoning)

			handler := func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
				paladin.AutoAttacks.ExtraMHAttack(sim, 1, actionID, spell.ActionID)
			}

			core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
				Name:       "Item - T2 - Paladin - Protection 6P Bonus",
				Callback:   core.CallbackOnSpellHitTaken,
				Outcome:    core.OutcomeBlock,
				ProcChance: procChance,
				Handler:    handler,
			})
		},
	},
})
View Source
var KnightLieutenantsImbuedPlate = core.NewItemSet(core.ItemSet{
	Name: "Knight-Lieutenant's Imbued Plate",
	Bonuses: map[int32]core.ApplyEffect{
		3: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 15)
		},
		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.HealingPower, 33)
		},
	},
})
View Source
var KnightLieutenantsLamellarPlate = core.NewItemSet(core.ItemSet{
	Name: "Knight-Lieutenant's Lamellar Plate",
	Bonuses: map[int32]core.ApplyEffect{
		3: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 15)
		},
		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.SpellPower, 18)
		},
	},
})
View Source
var TalentTreeSizes = [3]int{14, 15, 15}

Functions

This section is empty.

Types

type APLActionCastPaladinPrimarySeal

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

func (*APLActionCastPaladinPrimarySeal) Execute

func (*APLActionCastPaladinPrimarySeal) Finalize

func (*APLActionCastPaladinPrimarySeal) GetAPLValues

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

func (*APLActionCastPaladinPrimarySeal) GetInnerActions

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

func (*APLActionCastPaladinPrimarySeal) GetNextAction

func (*APLActionCastPaladinPrimarySeal) IsReady

func (*APLActionCastPaladinPrimarySeal) Reset

func (*APLActionCastPaladinPrimarySeal) String

type APLValueCurrentSealRemainingTime

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

func (*APLValueCurrentSealRemainingTime) GetDuration

func (*APLValueCurrentSealRemainingTime) String

func (*APLValueCurrentSealRemainingTime) Type

type Paladin

type Paladin struct {
	core.Character

	Talents *proto.PaladinTalents
	Options *proto.PaladinOptions
	// contains filtered or unexported fields
}

func NewPaladin

func NewPaladin(character *core.Character, options *proto.Player, paladinOptions *proto.PaladinOptions) *Paladin

maybe need to add stat dependencies

func (*Paladin) AddPartyBuffs

func (paladin *Paladin) AddPartyBuffs(_ *proto.PartyBuffs)

func (*Paladin) AddRaidBuffs

func (paladin *Paladin) AddRaidBuffs(_ *proto.RaidBuffs)

func (*Paladin) ApplyRunes

func (paladin *Paladin) ApplyRunes()

func (*Paladin) ApplyTalents

func (paladin *Paladin) ApplyTalents()

func (*Paladin) GetCharacter

func (paladin *Paladin) GetCharacter() *core.Character

func (*Paladin) GetPaladin

func (paladin *Paladin) GetPaladin() *Paladin

func (*Paladin) Initialize

func (paladin *Paladin) Initialize()

func (*Paladin) NewAPLAction

func (paladin *Paladin) NewAPLAction(rot *core.APLRotation, config *proto.APLAction) core.APLActionImpl

The APLAction for casting the current Seal

func (*Paladin) NewAPLValue

func (paladin *Paladin) NewAPLValue(rot *core.APLRotation, config *proto.APLValue) core.APLValue

func (*Paladin) Reset

func (paladin *Paladin) Reset(_ *core.Simulation)

func (*Paladin) ResetCurrentPaladinAura added in v0.0.17

func (paladin *Paladin) ResetCurrentPaladinAura()

func (*Paladin) ResetPrimarySeal added in v0.0.7

func (paladin *Paladin) ResetPrimarySeal(primarySeal proto.PaladinSeal)

type PaladinAgent

type PaladinAgent interface {
	GetPaladin() *Paladin
}

Implemented by each Paladin spec.

type SealJudgeCode added in v0.0.24

type SealJudgeCode uint8
const (
	SealJudgeCodeNone        SealJudgeCode = 0
	SealJudgeOfMartyrdomCode SealJudgeCode = 1 << iota
	SealJudgeOfRighteousnessCode
	SealJudgeOfCommandCode
	SealJudgeOfTheCrusaderCode
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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