Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BrutallusStomp = TargetAbility{ ChanceToUse: 1, InitialCD: time.Second * 10, MakeSpell: func(target *core.Target) *core.Spell { actionID := core.ActionID{SpellID: 45185} characterTarget := target.Env.Raid.GetPlayerFromUnit(target.CurrentTarget).GetCharacter() // TODO: If player's armor changes dynamically during the debuff, the value // will be incorrect. var curReduction stats.Stats stompDebuff := characterTarget.RegisterAura(core.Aura{ Label: "Stomp", ActionID: actionID, Duration: time.Second * 10, OnGain: func(aura *core.Aura, sim *core.Simulation) { aura.Unit.AddStatsDynamic(sim, curReduction.Multiply(-1)) }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { aura.Unit.AddStatsDynamic(sim, curReduction) }, }) return target.RegisterSpell(core.SpellConfig{ ActionID: actionID, SpellSchool: core.SpellSchoolPhysical, Flags: core.SpellFlagMeleeMetrics, Cast: core.CastConfig{ CD: core.Cooldown{ Timer: target.NewTimer(), Duration: time.Second * 15, }, }, ApplyEffects: core.ApplyEffectFuncDirectDamage(core.SpellEffect{ ProcMask: core.ProcMaskMeleeMHSpecial, DamageMultiplier: 1, BaseDamage: core.BaseDamageConfigRoll(18850, 21150), OutcomeApplier: target.OutcomeFuncEnemyMeleeWhite(), OnSpellHitDealt: func(sim *core.Simulation, spell *core.Spell, spellEffect *core.SpellEffect) { curReduction = characterTarget.ApplyStatDependencies(stats.Stats{stats.Armor: characterTarget.GetStat(stats.Armor) * 0.5}) stompDebuff.Activate(sim) }, }), }) }, }
Functions ¶
func AddSingleTargetBossEncounter ¶
func AddSingleTargetBossEncounter(presetTarget core.PresetTarget)
func NewDefaultAI ¶
func NewDefaultAI(abilities []TargetAbility) core.AIFactory
Types ¶
type DefaultAI ¶
type DefaultAI struct {
Target *core.Target
Abilities []TargetAbility
}
Default implementation of TargetAI which takes a list of abilities as input in order of priority.
func (*DefaultAI) DoAction ¶
func (ai *DefaultAI) DoAction(sim *core.Simulation)
func (*DefaultAI) Initialize ¶
type TargetAbility ¶
type TargetAbility struct {
// Puts ability on CD at the start of each iteration.
InitialCD time.Duration
// Probability (0-1) that this ability will be used when available.
ChanceToUse float64
// Factory function for creating the spell. Can use this or supply Spell
// directly.
MakeSpell func(*core.Target) *core.Spell
Spell *core.Spell
}
Click to show internal directories.
Click to hide internal directories.