druid

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpellFlagNaturesGrace = core.SpellFlagAgentReserved1
	SpellFlagOmenTrigger  = core.SpellFlagAgentReserved2
)
View Source
const AnimalSpiritRegenSuppression = 0.911337

Converts from 0.009327 to 0.0085

View Source
const CryingWind int32 = 45270
View Source
const IdolAvenger int32 = 31025
View Source
const IdolSteadfastRenewal int32 = 40712

Variables

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

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

		},
	},
})
View Source
var ItemSetDreamwalkerGarb = core.NewItemSet(core.ItemSet{
	Name: "Dreamwalker Garb",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

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

		},
	},
})

T7 Balance

View Source
var ItemSetGladiatorsSanctuary = core.NewItemSet(core.ItemSet{
	Name: "Gladiator's Sanctuary",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			agent.GetCharacter().AddStat(stats.Resilience, 100)
			agent.GetCharacter().AddStat(stats.AttackPower, 50)
		},
		4: func(agent core.Agent) {
			agent.GetCharacter().AddStat(stats.AttackPower, 150)
		},
	},
})
View Source
var ItemSetGladiatorsWildhide = core.NewItemSet(core.ItemSet{
	Name: "Gladiator's Wildhide",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			druid := agent.(DruidAgent).GetDruid()
			druid.AddStat(stats.SpellPower, 29)
			druid.AddStat(stats.Resilience, 100)
		},
		4: func(agent core.Agent) {
			druid := agent.(DruidAgent).GetDruid()
			druid.AddStat(stats.SpellPower, 88)

			percentReduction := float64(time.Millisecond*1500) / float64(druid.starfireCastTime())
			swiftStarfireAura := druid.RegisterAura(core.Aura{
				Label:    "Swift Starfire",
				ActionID: core.ActionID{SpellID: 46832},
				Duration: time.Second * 15,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					druid.Starfire.CastTimeMultiplier -= percentReduction
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					druid.Starfire.CastTimeMultiplier += percentReduction
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell == druid.Starfire {
						aura.Deactivate(sim)
					}
				},
			})

			druid.RegisterAura(core.Aura{
				Label:    "Swift Starfire trigger",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell == druid.Wrath && sim.RandomFloat("Swift Starfire proc") > 0.85 {
						swiftStarfireAura.Activate(sim)
					}
				},
			})
		},
	},
})
View Source
var ItemSetLasherweaveBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Lasherweave Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

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

		},
	},
})
View Source
var ItemSetLasherweaveRegalia = core.NewItemSet(core.ItemSet{
	Name: "Lasherweave Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

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

			druid := agent.(DruidAgent).GetDruid()

			druid.Languish = druid.RegisterSpell(core.SpellConfig{
				ActionID:         core.ActionID{SpellID: 71023},
				SpellSchool:      core.SpellSchoolNature,
				ProcMask:         core.ProcMaskEmpty,
				DamageMultiplier: 1,
				ThreatMultiplier: 1,

				Dot: core.DotConfig{
					Aura: core.Aura{
						Label: "Languish",
					},
					NumberOfTicks: 2,
					TickLength:    time.Second * 2,

					OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
						dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick)
					},
				},
				ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
					spell.Dot(target).ApplyOrReset(sim)
					spell.CalcAndDealOutcome(sim, target, spell.OutcomeAlwaysHit)
				},
			})

			druid.RegisterAura(core.Aura{
				Label:    "Languish proc",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell != druid.Starfire && spell != druid.Wrath {
						return
					}
					if result.DidCrit() {
						dot := druid.Languish.Dot(result.Target)

						newDamage := result.Damage * 0.07
						outstandingDamage := core.TernaryFloat64(dot.IsActive(), dot.SnapshotBaseDamage*float64(dot.NumberOfTicks-dot.TickCount), 0)

						dot.SnapshotAttackerMultiplier = 1
						dot.SnapshotBaseDamage = (outstandingDamage + newDamage) / 2.0
						druid.Languish.Cast(sim, result.Target)
					}
				},
			})
		},
	},
})

T10 Balance

View Source
var ItemSetMalfurionsBattlegear = core.NewItemSet(core.ItemSet{
	Name:            "Malfurion's Battlegear",
	AlternativeName: "Runetotem's Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

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

		},
	},
})
View Source
var ItemSetMalfurionsRegalia = core.NewItemSet(core.ItemSet{
	Name:            "Malfurion's Regalia",
	AlternativeName: "Runetotem's Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

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

		},
	},
})

T9 Balance

View Source
var ItemSetNightsongBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Nightsong Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			druid := agent.(DruidAgent).GetDruid()

			procChance := 0.02

			cca := druid.GetAura("Clearcasting")

			icd := core.Cooldown{
				Timer:    druid.NewTimer(),
				Duration: time.Second * 15,
			}

			druid.RegisterAura(core.Aura{
				Label:    "Nightsong 2pc",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
					cca = druid.GetAura("Clearcasting")
					if cca == nil {
						panic("no valid clearcasting aura")
					}
				},
				OnPeriodicDamageDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell != druid.Rake && spell != druid.Rip && spell != druid.Lacerate {
						return
					}
					if !icd.IsReady(sim) {
						return
					}
					if sim.RandomFloat("Nightsong 2pc") < procChance {
						icd.Use(sim)
						cca.Activate(sim)
					}
				},
			})
		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetNightsongGarb = core.NewItemSet(core.ItemSet{
	Name: "Nightsong Garb",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

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

		},
	},
})

T8 Balance

View Source
var ItemSetThunderheartHarness = core.NewItemSet(core.ItemSet{
	Name: "Thunderheart Harness",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

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

		},
	},
})
View Source
var ItemSetThunderheartRegalia = core.NewItemSet(core.ItemSet{
	Name: "Thunderheart Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

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

		},
	},
})
View Source
var TalentTreeSizes = [3]int{28, 30, 27}

Functions

This section is empty.

Types

type Druid

type Druid struct {
	core.Character
	SelfBuffs
	Talents *proto.DruidTalents

	StartingForm DruidForm

	RebirthUsed       bool
	MaulRageThreshold float64
	RebirthTiming     float64
	BleedsActive      int
	AssumeBleedActive bool
	RaidBuffTargets   int
	PrePopBerserk     bool

	ReplaceBearMHFunc core.ReplaceMHSwing

	Barkskin             *core.Spell
	Berserk              *core.Spell
	DemoralizingRoar     *core.Spell
	Enrage               *core.Spell
	FaerieFire           *core.Spell
	FerociousBite        *core.Spell
	ForceOfNature        *core.Spell
	FrenziedRegeneration *core.Spell
	Hurricane            *core.Spell
	InsectSwarm          *core.Spell
	GiftOfTheWild        *core.Spell
	Lacerate             *core.Spell
	Languish             *core.Spell
	MangleBear           *core.Spell
	MangleCat            *core.Spell
	Maul                 *core.Spell
	Moonfire             *core.Spell
	Rebirth              *core.Spell
	Rake                 *core.Spell
	Rip                  *core.Spell
	SavageRoar           *core.Spell
	Shred                *core.Spell
	Starfire             *core.Spell
	Starfall             *core.Spell
	StarfallSplash       *core.Spell
	SurvivalInstincts    *core.Spell
	SwipeBear            *core.Spell
	SwipeCat             *core.Spell
	TigersFury           *core.Spell
	Typhoon              *core.Spell
	Wrath                *core.Spell

	CatForm  *core.Spell
	BearForm *core.Spell

	BarkskinAura             *core.Aura
	BearFormAura             *core.Aura
	BerserkAura              *core.Aura
	CatFormAura              *core.Aura
	ClearcastingAura         *core.Aura
	DemoralizingRoarAuras    core.AuraArray
	EarthAndMoonAura         *core.Aura
	EnrageAura               *core.Aura
	FaerieFireAuras          core.AuraArray
	FrenziedRegenerationAura *core.Aura
	MaulQueueAura            *core.Aura
	MoonkinT84PCAura         *core.Aura
	NaturesGraceProcAura     *core.Aura
	PredatoryInstinctsAura   *core.Aura
	SavageDefenseAura        *core.Aura
	SurvivalInstinctsAura    *core.Aura
	TigersFuryAura           *core.Aura
	SavageRoarAura           *core.Aura
	SolarEclipseProcAura     *core.Aura
	LunarEclipseProcAura     *core.Aura

	BleedCategories core.ExclusiveCategoryArray

	PrimalPrecisionRecoveryMetrics *core.ResourceMetrics
	SavageRoarDurationTable        [6]time.Duration

	ProcOoc func(sim *core.Simulation)

	LunarICD core.Cooldown
	SolarICD core.Cooldown
	Treant1  *TreantPet
	Treant2  *TreantPet
	Treant3  *TreantPet
	// contains filtered or unexported fields
}

func New

func New(char core.Character, form DruidForm, selfBuffs SelfBuffs, talents string) *Druid

func (*Druid) AddRaidBuffs

func (druid *Druid) AddRaidBuffs(raidBuffs *proto.RaidBuffs)

func (*Druid) ApplyTalents

func (druid *Druid) ApplyTalents()

func (*Druid) BalanceCritMultiplier added in v0.1.7

func (druid *Druid) BalanceCritMultiplier() float64

func (*Druid) CanShred

func (druid *Druid) CanShred() bool

func (*Druid) ClearForm

func (druid *Druid) ClearForm(sim *core.Simulation)

func (*Druid) CurrentFerociousBiteCost

func (druid *Druid) CurrentFerociousBiteCost() float64

func (*Druid) CurrentMangleCatCost

func (druid *Druid) CurrentMangleCatCost() float64

func (*Druid) CurrentRakeCost

func (druid *Druid) CurrentRakeCost() float64

func (*Druid) CurrentRipCost

func (druid *Druid) CurrentRipCost() float64

func (*Druid) CurrentSavageRoarCost

func (druid *Druid) CurrentSavageRoarCost() float64

func (*Druid) CurrentShredCost

func (druid *Druid) CurrentShredCost() float64

func (*Druid) CurrentSwipeCatCost

func (druid *Druid) CurrentSwipeCatCost() float64

func (*Druid) GetBearWeapon added in v0.1.8

func (druid *Druid) GetBearWeapon() core.Weapon

func (*Druid) GetCatWeapon added in v0.1.8

func (druid *Druid) GetCatWeapon() core.Weapon

func (*Druid) GetCharacter

func (druid *Druid) GetCharacter() *core.Character

func (*Druid) GetDynamicPredStrikeStats added in v0.1.32

func (druid *Druid) GetDynamicPredStrikeStats() stats.Stats

func (*Druid) GetForm

func (druid *Druid) GetForm() DruidForm

func (*Druid) GetFormShiftStats added in v0.1.7

func (druid *Druid) GetFormShiftStats() stats.Stats

Bonus stats for both cat and bear.

func (*Druid) HasMajorGlyph

func (druid *Druid) HasMajorGlyph(glyph proto.DruidMajorGlyph) bool

func (*Druid) HasMinorGlyph

func (druid *Druid) HasMinorGlyph(glyph proto.DruidMinorGlyph) bool

func (*Druid) InForm

func (druid *Druid) InForm(form DruidForm) bool

func (*Druid) Initialize

func (druid *Druid) Initialize()

func (*Druid) IsMangle

func (druid *Druid) IsMangle(spell *core.Spell) bool

func (*Druid) IsSwipeSpell

func (druid *Druid) IsSwipeSpell(spell *core.Spell) bool

func (*Druid) MaulReplaceMH added in v0.1.8

func (druid *Druid) MaulReplaceMH(sim *core.Simulation, mhSwingSpell *core.Spell) *core.Spell

Returns true if the regular melee swing should be used, false otherwise.

func (*Druid) MaxRipTicks

func (druid *Druid) MaxRipTicks() int32

func (*Druid) MeleeCritMultiplier

func (druid *Druid) MeleeCritMultiplier(castedForm DruidForm) float64

func (*Druid) NewTreant

func (druid *Druid) NewTreant() *TreantPet

func (*Druid) QueueMaul

func (druid *Druid) QueueMaul(sim *core.Simulation)

func (*Druid) RegisterBalanceSpells

func (druid *Druid) RegisterBalanceSpells()

func (*Druid) RegisterFeralCatSpells added in v0.1.8

func (druid *Druid) RegisterFeralCatSpells()

func (*Druid) RegisterFeralTankSpells added in v0.1.8

func (druid *Druid) RegisterFeralTankSpells(maulRageThreshold float64)

func (*Druid) Reset

func (druid *Druid) Reset(_ *core.Simulation)

func (*Druid) ScaleBaseArmor added in v0.1.8

func (druid *Druid) ScaleBaseArmor(multiplier float64) float64

func (*Druid) ShouldDemoralizingRoar

func (druid *Druid) ShouldDemoralizingRoar(sim *core.Simulation, filler bool, maintainOnly bool) bool

func (*Druid) ShouldFaerieFire

func (druid *Druid) ShouldFaerieFire(sim *core.Simulation, target *core.Unit) bool

func (*Druid) ShouldQueueMaul

func (druid *Druid) ShouldQueueMaul(sim *core.Simulation) bool

func (*Druid) ThickHideMultiplier added in v0.1.8

func (druid *Druid) ThickHideMultiplier() float64

func (*Druid) TotalBearArmorMultiplier added in v0.1.8

func (druid *Druid) TotalBearArmorMultiplier() float64

func (*Druid) TryMaul

func (druid *Druid) TryMaul(sim *core.Simulation, mhSwingSpell *core.Spell) *core.Spell

type DruidAgent

type DruidAgent interface {
	GetDruid() *Druid
}

Agent is a generic way to access underlying druid on any of the agents (for example balance druid.)

type DruidForm

type DruidForm uint8
const (
	Humanoid DruidForm = 1 << iota
	Bear
	Cat
	Moonkin
	Tree
)

func (DruidForm) Matches

func (form DruidForm) Matches(other DruidForm) bool

type SelfBuffs

type SelfBuffs struct {
	InnervateTarget *proto.RaidTarget
}

type TreantPet

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

func (*TreantPet) GetPet

func (treant *TreantPet) GetPet() *core.Pet

func (*TreantPet) Initialize

func (treant *TreantPet) Initialize()

func (*TreantPet) OnGCDReady

func (treant *TreantPet) OnGCDReady(_ *core.Simulation)

func (*TreantPet) Reset

func (treant *TreantPet) Reset(_ *core.Simulation)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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