druid

package
v0.0.183 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DruidSpellFlagNone int64 = 0
	DruidSpellBarkskin int64 = 1 << iota
	DruidSpellFearieFire
	DruidSpellHurricane
	DruidSpellAstralStorm
	DruidSpellAstralCommunion
	DruidSpellFerociousBite
	DruidSpellFrenziedRegeneration
	DruidSpellInnervate
	DruidSpellLacerate
	DruidSpellMangleBear
	DruidSpellMangleCat
	DruidSpellMaul
	DruidSpellMightOfUrsoc
	DruidSpellMoonfire
	DruidSpellMoonfireDoT
	DruidSpellRake
	DruidSpellRavage
	DruidSpellRip
	DruidSpellSavageDefense
	DruidSpellSavageRoar
	DruidSpellShred
	DruidSpellStarfall
	DruidSpellStarfire
	DruidSpellStarsurge
	DruidSpellSunfire
	DruidSpellSunfireDoT
	DruidSpellSwipeBear
	DruidSpellSwipeCat
	DruidSpellThrashBear
	DruidSpellThrashCat
	DruidSpellTigersFury
	DruidSpellWildMushroom
	DruidSpellWildMushroomDetonate
	DruidSpellWrath

	DruidSpellHealingTouch
	DruidSpellRegrowth
	DruidSpellLifebloom
	DruidSpellRejuvenation
	DruidSpellNourish
	DruidSpellTranquility
	DruidSpellMarkOfTheWild
	DruidSpellSwiftmend
	DruidSpellWildGrowth
	DruidSpellCenarionWard
	DruidSpellCelestialAlignment

	DruidSpellLast
	DruidSpellsAll               = DruidSpellLast<<1 - 1
	DruidSpellDoT                = DruidSpellMoonfireDoT | DruidSpellSunfireDoT
	DruidSpellHoT                = DruidSpellRejuvenation | DruidSpellLifebloom | DruidSpellRegrowth | DruidSpellWildGrowth
	DruidSpellInstant            = DruidSpellBarkskin | DruidSpellMoonfire | DruidSpellStarfall | DruidSpellSunfire | DruidSpellFearieFire | DruidSpellBarkskin
	DruidSpellMangle             = DruidSpellMangleBear | DruidSpellMangleCat
	DruidSpellThrash             = DruidSpellThrashBear | DruidSpellThrashCat
	DruidSpellSwipe              = DruidSpellSwipeBear | DruidSpellSwipeCat
	DruidSpellBuilder            = DruidSpellMangleCat | DruidSpellShred | DruidSpellRake | DruidSpellRavage
	DruidSpellFinisher           = DruidSpellFerociousBite | DruidSpellRip | DruidSpellSavageRoar
	DruidArcaneSpells            = DruidSpellMoonfire | DruidSpellMoonfireDoT | DruidSpellStarfire | DruidSpellStarsurge | DruidSpellStarfall
	DruidNatureSpells            = DruidSpellWrath | DruidSpellStarsurge | DruidSpellSunfire | DruidSpellSunfireDoT | DruidSpellHurricane
	DruidHealingNonInstantSpells = DruidSpellHealingTouch | DruidSpellRegrowth | DruidSpellNourish
	DruidHealingSpells           = DruidHealingNonInstantSpells | DruidSpellRejuvenation | DruidSpellLifebloom | DruidSpellSwiftmend
	DruidDamagingSpells          = DruidArcaneSpells | DruidNatureSpells
)
View Source
const (
	HealingTouchBonusCoeff = 1.86
	HealingTouchCoeff      = 18.388
	HealingTouchVariance   = 0.166
)
View Source
const (
	HurricaneBonusCoeff = 0.31
	HurricaneCoeff      = 0.31
)
View Source
const (
	MoonfireBonusCoeff = 0.24

	MoonfireDotCoeff = 0.24

	MoonfireImpactCoeff    = 0.571
	MoonfireImpactVariance = 0.2
)
View Source
const (
	RejuvenationBonusCoeff = 0.39199998975
	RejuvenationCoeff      = 3.86800003052
)
View Source
const (
	WrathBonusCoeff = 1.338
	WrathCoeff      = 2.676
	WrathVariance   = 0.25
)
View Source
const AnimalSpiritRegenSuppression = 0.911337

Converts from 0.009327 to 0.0085

View Source
const BaseBearArmorMulti = 2.2

Thick Hide contribution handled separately in talents code for cleanliness and UI stats display.

View Source
const RendAndTearBonusCritPercent = 35.0
View Source
const RendAndTearDamageMultiplier = 1.2

Variables

View Source
var ItemSetArmorOfTheEternalBlossom = core.NewItemSet(core.ItemSet{
	Name:                    "Armor of the Eternal Blossom",
	DisabledInChallengeMode: true,
	Bonuses: map[int32]core.ApplySetBonus{
		2: func(_ core.Agent, setBonusAura *core.Aura) {

			setBonusAura.AttachSpellMod(core.SpellModConfig{
				Kind:      core.SpellMod_Cooldown_Flat,
				ClassMask: DruidSpellMightOfUrsoc,
				TimeValue: time.Second * -60,
			}).ExposeToAPL(123086)
		},
		4: func(agent core.Agent, setBonusAura *core.Aura) {
			druid := agent.(DruidAgent).GetDruid()

			druid.OnSpellRegistered(func(spell *core.Spell) {
				if !spell.Matches(DruidSpellSavageDefense) {
					return
				}

				hasDodgeBonus := false
				spell.RelatedSelfBuff.ApplyOnGain(func(_ *core.Aura, sim *core.Simulation) {
					if setBonusAura.IsActive() {
						druid.PseudoStats.BaseDodgeChance += 0.05
						hasDodgeBonus = true
					}
				}).ApplyOnExpire(func(_ *core.Aura, sim *core.Simulation) {
					if hasDodgeBonus {
						druid.PseudoStats.BaseDodgeChance -= 0.05
						hasDodgeBonus = false
					}
				})
			})

			setBonusAura.AttachSpellMod(core.SpellModConfig{
				Kind:       core.SpellMod_DamageDone_Pct,
				ClassMask:  DruidSpellFrenziedRegeneration,
				FloatValue: 0.1,
			})

			setBonusAura.ExposeToAPL(123087)
		},
	},
})

T14 Guardian

View Source
var ItemSetBattlegearOfTheEternalBlossom = core.NewItemSet(core.ItemSet{
	Name:                    "Battlegear of the Eternal Blossom",
	DisabledInChallengeMode: true,
	Bonuses: map[int32]core.ApplySetBonus{
		2: func(_ core.Agent, setBonusAura *core.Aura) {

			setBonusAura.AttachSpellMod(core.SpellModConfig{
				Kind:       core.SpellMod_DamageDone_Pct,
				ClassMask:  DruidSpellMangleCat | DruidSpellShred,
				FloatValue: 0.05,
			})
		},
		4: func(agent core.Agent, setBonusAura *core.Aura) {

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

			setBonusAura.ApplyOnGain(func(_ *core.Aura, _ *core.Simulation) {
				druid.RipBaseNumTicks += 2
				druid.RipMaxNumTicks += 2
			})

			setBonusAura.ApplyOnExpire(func(_ *core.Aura, _ *core.Simulation) {
				druid.RipBaseNumTicks -= 2
				druid.RipMaxNumTicks -= 2
			})
		},
	},
})

T14 Feral

View Source
var ItemSetBattlegearOfTheHauntedForest = core.NewItemSet(core.ItemSet{
	Name:                    "Battlegear of the Haunted Forest",
	DisabledInChallengeMode: true,
	Bonuses: map[int32]core.ApplySetBonus{
		2: func(agent core.Agent, setBonusAura *core.Aura) {

			druid := agent.(DruidAgent).GetDruid()
			actionID := core.ActionID{SpellID: 138352}
			cpMetrics := druid.NewComboPointMetrics(actionID)

			var cpSnapshot int32
			var resultLanded bool

			proc2pT15 := func(sim *core.Simulation, unit *core.Unit, isRoar bool) {
				procChance := 0.15 * float64(cpSnapshot)

				if sim.Proc(procChance, "2pT15") && (resultLanded || isRoar) {
					unit.AddComboPoints(sim, 1, unit.CurrentComboTarget, cpMetrics)
				}

				cpSnapshot = 0
				resultLanded = false
			}

			setBonusAura.OnApplyEffects = func(aura *core.Aura, _ *core.Simulation, _ *core.Unit, spell *core.Spell) {
				if spell.Matches(DruidSpellFinisher) {
					cpSnapshot = aura.Unit.ComboPoints()
				}
			}

			setBonusAura.OnSpellHitDealt = func(_ *core.Aura, _ *core.Simulation, spell *core.Spell, result *core.SpellResult) {
				if spell.Matches(DruidSpellFinisher) && result.Landed() {
					resultLanded = true
				}
			}

			setBonusAura.OnCastComplete = func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
				if spell.Matches(DruidSpellFinisher) {
					proc2pT15(sim, aura.Unit, spell.Matches(DruidSpellSavageRoar))
				}
			}

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

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

			if druid.Spec != proto.Spec_SpecFeralDruid {
				return
			}

			druid.registerTigersFury4PT15()

			setBonusAura.OnCastComplete = func(_ *core.Aura, sim *core.Simulation, spell *core.Spell) {
				if spell.Matches(DruidSpellTigersFury) {
					druid.TigersFury4PT15Aura.Activate(sim)
				}
			}
		},
	},
})

T15 Feral

View Source
var ItemSetGladiatorSanctuary = core.NewItemSet(core.ItemSet{
	Name:                    "Gladiator's Sanctuary",
	DisabledInChallengeMode: true,
	Bonuses: map[int32]core.ApplySetBonus{
		2: func(_ core.Agent, _ *core.Aura) {

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

			druid := agent.(DruidAgent).GetDruid()
			druid.registerStampede()
			druid.registerStampedePending()
			setBonusAura.ApplyOnEncounterStart(func(_ *core.Aura, sim *core.Simulation) {
				druid.StampedeAura.Activate(sim)
			})
		},
	},
})

Feral PvP

View Source
var ItemSetRegaliaOfTheShatteredVale = core.NewItemSet(core.ItemSet{
	ID:                      1197,
	DisabledInChallengeMode: true,
	Name:                    "Regalia of the Shattered Vale",
	Bonuses: map[int32]core.ApplySetBonus{
		2: func(agent core.Agent, setBonusAura *core.Aura) {

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

		},
	},
})

T16 Balance

Functions

This section is empty.

Types

type DefaultTreantImpl

type DefaultTreantImpl struct {
	core.Pet
}

Embed this in spec-specific treant structs.

func (*DefaultTreantImpl) Enable

func (treant *DefaultTreantImpl) Enable(sim *core.Simulation)

func (*DefaultTreantImpl) ExecuteCustomRotation

func (treant *DefaultTreantImpl) ExecuteCustomRotation(_ *core.Simulation)

func (*DefaultTreantImpl) GetPet

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

func (*DefaultTreantImpl) Initialize

func (treant *DefaultTreantImpl) Initialize()

Overwrite these for spec variants that register spells.

func (*DefaultTreantImpl) OnEncounterStart added in v0.0.13

func (treant *DefaultTreantImpl) OnEncounterStart(_ *core.Simulation)

func (*DefaultTreantImpl) Reset

func (treant *DefaultTreantImpl) Reset(sim *core.Simulation)

type Druid

type Druid struct {
	core.Character
	SelfBuffs

	Talents *proto.DruidTalents

	ClassSpellScaling float64

	StartingForm DruidForm

	Treants TreantAgents

	BleedsActive      map[*core.Unit]int32
	AssumeBleedActive bool
	CannotShredTarget bool
	RipBaseNumTicks   int32
	RipMaxNumTicks    int32

	MHAutoSpell *core.Spell

	Barkskin              *DruidSpell
	Berserk               *DruidSpell
	CatCharge             *DruidSpell
	Dash                  *DruidSpell
	DisplacerBeast        *DruidSpell
	FaerieFire            *DruidSpell
	FerociousBite         *DruidSpell
	ForceOfNature         *DruidSpell
	FrenziedRegeneration  *DruidSpell
	HealingTouch          *DruidSpell
	Hurricane             *DruidSpell
	HurricaneTickSpell    *DruidSpell
	Lacerate              *DruidSpell
	MangleBear            *DruidSpell
	MangleCat             *DruidSpell
	Maul                  *DruidSpell
	MightOfUrsoc          *DruidSpell
	Moonfire              *DruidSpell
	NaturesSwiftness      *DruidSpell
	Prowl                 *DruidSpell
	Rake                  *DruidSpell
	Ravage                *DruidSpell
	Rejuvenation          *DruidSpell
	Rip                   *DruidSpell
	SurvivalInstincts     *DruidSpell
	SwipeBear             *DruidSpell
	SwipeCat              *DruidSpell
	ThrashBear            *DruidSpell
	ThrashCat             *DruidSpell
	Typhoon               *DruidSpell
	Wrath                 *DruidSpell
	WildMushrooms         *DruidSpell
	WildMushroomsDetonate *DruidSpell

	CatForm     *DruidSpell
	BearForm    *DruidSpell
	MoonkinForm *DruidSpell

	BarkskinAura             *core.Aura
	BearFormAura             *core.Aura
	BerserkBearAura          *core.Aura
	BerserkCatAura           *core.Aura
	CatFormAura              *core.Aura
	DashAura                 *core.Aura
	DisplacerBeastAura       *core.Aura
	FaerieFireAuras          core.AuraArray
	FrenziedRegenerationAura *core.Aura
	LunarEclipseProcAura     *core.Aura
	MightOfUrsocAura         *core.Aura
	MoonkinFormAura          *core.Aura
	ProwlAura                *core.Aura
	StampedeAura             *core.Aura
	StampedePendingAura      *core.Aura
	TigersFury4PT15Aura      *core.Aura
	SurvivalInstinctsAura    *core.Aura
	WeakenedBlowsAuras       core.AuraArray

	// Guardian leather specialization is form-specific
	GuardianLeatherSpecTracker *core.Aura
	GuardianLeatherSpecDep     *stats.StatDependency
	// contains filtered or unexported fields
}

func New

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

func (*Druid) ApplyBloodletting

func (druid *Druid) ApplyBloodletting(target *core.Unit)

func (*Druid) ApplyGlyphs added in v0.0.4

func (druid *Druid) ApplyGlyphs()

func (*Druid) ApplyLeaderOfThePack

func (druid *Druid) ApplyLeaderOfThePack()

func (*Druid) ApplyNurturingInstinct

func (druid *Druid) ApplyNurturingInstinct()

func (*Druid) ApplyPrimalFury

func (druid *Druid) ApplyPrimalFury()

func (*Druid) ApplyTalents

func (druid *Druid) ApplyTalents()

func (*Druid) CanApplyFaerieFireDebuff

func (druid *Druid) CanApplyFaerieFireDebuff(target *core.Unit) 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) CurrentSwipeCatCost

func (druid *Druid) CurrentSwipeCatCost() float64

func (*Druid) GetBearWeapon

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

func (*Druid) GetCatWeapon

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

func (*Druid) GetCharacter

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

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) NewDefaultTreant

func (druid *Druid) NewDefaultTreant(config TreantConfig) *DefaultTreantImpl

func (*Druid) OnEncounterStart added in v0.0.13

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

func (*Druid) RegisterBaselineSpells added in v0.0.4

func (druid *Druid) RegisterBaselineSpells()

func (*Druid) RegisterBearFormAura

func (druid *Druid) RegisterBearFormAura()

func (*Druid) RegisterCatFormAura

func (druid *Druid) RegisterCatFormAura()

func (*Druid) RegisterFeralCatSpells

func (druid *Druid) RegisterFeralCatSpells()

func (*Druid) RegisterFeralTankSpells

func (druid *Druid) RegisterFeralTankSpells()

func (*Druid) RegisterMoonkinFormAura added in v0.0.71

func (druid *Druid) RegisterMoonkinFormAura()

func (*Druid) RegisterMoonkinFormSpell added in v0.0.71

func (druid *Druid) RegisterMoonkinFormSpell()

func (*Druid) RegisterSharedFeralHotwMods added in v0.0.29

func (druid *Druid) RegisterSharedFeralHotwMods() (*core.SpellMod, *core.SpellMod, *core.SpellMod)

func (*Druid) RegisterSpell

func (druid *Druid) RegisterSpell(formMask DruidForm, config core.SpellConfig) *DruidSpell

func (*Druid) Reset

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

func (*Druid) ShouldFaerieFire

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

func (*Druid) TryApplyFaerieFireEffect

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

func (*Druid) UpdateBleedPower

func (druid *Druid) UpdateBleedPower(bleedSpell *DruidSpell, sim *core.Simulation, target *core.Unit, updateCurrent bool, updateNew bool)

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
	Any = Humanoid | Bear | Cat | Moonkin | Tree
)

func (DruidForm) Matches

func (form DruidForm) Matches(other DruidForm) bool

type DruidSpell

type DruidSpell struct {
	*core.Spell
	FormMask DruidForm

	// Optional fields used in snapshotting calculations
	CurrentSnapshotPower float64
	NewSnapshotPower     float64
	ShortName            string
}

func (*DruidSpell) CanCast

func (ds *DruidSpell) CanCast(sim *core.Simulation, target *core.Unit) bool

func (*DruidSpell) IsEqual

func (ds *DruidSpell) IsEqual(s *core.Spell) bool

func (*DruidSpell) IsReady

func (ds *DruidSpell) IsReady(sim *core.Simulation) bool

type SelfBuffs

type SelfBuffs struct {
	InnervateTarget *proto.UnitReference
}

type TreantAgent

type TreantAgent interface {
	core.PetAgent

	Enable(sim *core.Simulation)
}

Extension of PetAgent interface, for treants.

type TreantAgents

type TreantAgents [3]TreantAgent

type TreantConfig

type TreantConfig struct {
	NonHitExpStatInheritance core.PetStatInheritance
	EnableAutos              bool
	WeaponDamageCoefficient  float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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