druid

package
v0.0.44 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpellFlagNaturesGrace = core.SpellFlagAgentReserved1
	SpellFlagOmenTrigger  = core.SpellFlagAgentReserved2
)
View Source
const (
	DruidSpellFlagNone int64 = 0
	DruidSpellBarkskin int64 = 1 << iota
	DruidSpellCyclone
	DruidSpellEntanglingRoots
	DruidSpellFearieFire
	DruidSpellHibernate
	DruidSpellHurricane
	DruidSpellInnervate
	DruidSpellInsectSwarm
	DruidSpellMoonfire
	DruidSpellMoonfireDoT
	DruidSpellNaturesGrasp
	DruidSpellStarfall
	DruidSpellStarfire
	DruidSpellStarsurge
	DruidSpellSunfire
	DruidSpellSunfireDoT
	DruidSpellThorns
	DruidSpellTyphoon
	DruidSpellWildMushroom
	DruidSpellWildMushroomDetonate
	DruidSpellWrath

	DruidSpellHealingTouch
	DruidSpellRegrowth
	DruidSpellLifebloom
	DruidSpellRejuvenation
	DruidSpellNourish
	DruidSpellTranquility
	DruidSpellMarkOfTheWild
	DruidSpellSwiftmend
	DruidSpellWildGrowth

	DruidSpellLast
	DruidSpellsAll      = DruidSpellLast<<1 - 1
	DruidSpellDoT       = DruidSpellInsectSwarm | DruidSpellMoonfireDoT | DruidSpellSunfireDoT
	DruidSpellHoT       = DruidSpellRejuvenation | DruidSpellLifebloom | DruidSpellRegrowth | DruidSpellWildGrowth
	DruidSpellInstant   = DruidSpellBarkskin | DruidSpellInsectSwarm | DruidSpellMoonfire | DruidSpellStarfall | DruidSpellSunfire | DruidSpellFearieFire | DruidSpellBarkskin
	DruidArcaneSpells   = DruidSpellMoonfire | DruidSpellMoonfireDoT | DruidSpellStarfire | DruidSpellStarsurge | DruidSpellStarfall
	DruidNatureSpells   = DruidSpellInsectSwarm | DruidSpellStarsurge | DruidSpellSunfire | DruidSpellSunfireDoT | DruidSpellTyphoon | DruidSpellHurricane
	DruidHealingSpells  = DruidSpellHealingTouch | DruidSpellRegrowth | DruidSpellRejuvenation | DruidSpellLifebloom | DruidSpellNourish | DruidSpellSwiftmend
	DruidDamagingSpells = DruidArcaneSpells | DruidNatureSpells
)
View Source
const AnimalSpiritRegenSuppression = 0.911337

Converts from 0.009327 to 0.0085

View Source
const RipBaseNumTicks = int32(8)

Variables

View Source
var ItemSetGladiatorsSanctuary = core.NewItemSet(core.ItemSet{
	ID:   922,
	Name: "Gladiator's Sanctuary",

	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			druid := agent.(DruidAgent).GetDruid()
			druid.AddStats(stats.Stats{
				stats.Agility: 70,
			})
		},
		4: func(agent core.Agent) {
			druid := agent.(DruidAgent).GetDruid()
			druid.AddStats(stats.Stats{
				stats.Agility: 90,
			})
		},
	},
})

PvP Feral

View Source
var ItemSetStormridersBattlegarb = core.NewItemSet(core.ItemSet{
	Name: "Stormrider's Battlegarb",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {
			druid := agent.(DruidAgent).GetDruid()
			var apDepByStackCount = map[int32]*stats.StatDependency{}

			for i := 1; i <= 3; i++ {
				apDepByStackCount[int32(i)] = druid.NewDynamicMultiplyStat(stats.AttackPower, 1.0+0.01*float64(i))
			}

			druid.StrengthOfThePantherAura = druid.RegisterAura(core.Aura{
				Label:     "Strength of the Panther",
				ActionID:  core.ActionID{SpellID: 90166},
				Duration:  time.Second * 30,
				MaxStacks: 3,

				OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks int32, newStacks int32) {
					if oldStacks > 0 {
						druid.DisableDynamicStatDep(sim, apDepByStackCount[oldStacks])
					}

					if newStacks > 0 {
						druid.EnableDynamicStatDep(sim, apDepByStackCount[newStacks])
					}
				},
			})
		},
	},
})

T11 Feral

View Source
var ItemSetStormridersRegalia = core.NewItemSet(core.ItemSet{
	Name: "Stormrider's Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_BonusCrit_Rating,
				FloatValue: 5 * core.CritRatingPerCritChance,
				ClassMask:  DruidSpellDoT | DruidSpellMoonfire | DruidSpellSunfire,
			})
		},
		4: func(agent core.Agent) {
			druid := agent.(DruidAgent).GetDruid()

			tierSet4pMod := druid.AddDynamicMod(core.SpellModConfig{
				School: core.SpellSchoolArcane | core.SpellSchoolNature,
				Kind:   core.SpellMod_BonusCrit_Rating,
			})

			tierSet4pAura := druid.RegisterAura(core.Aura{
				ActionID:  core.ActionID{SpellID: 90163},
				Label:     "Druid T11 Balance 4P Bonus",
				Duration:  time.Second * 8,
				MaxStacks: 3,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					aura.SetStacks(sim, aura.MaxStacks)

					tierSet4pMod.UpdateFloatValue(float64(aura.GetStacks()) * 5 * core.CritRatingPerCritChance)
					tierSet4pMod.Activate()
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					tierSet4pMod.Deactivate()
				},
				OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if result.DidCrit() && aura.GetStacks() > 0 {
						aura.RemoveStack(sim)
						tierSet4pMod.UpdateFloatValue(float64(aura.GetStacks()) * 5 * core.CritRatingPerCritChance)
					}
				},
			})

			druid.AddEclipseCallback(func(_ Eclipse, gained bool, sim *core.Simulation) {
				if gained {
					tierSet4pAura.Activate(sim)
				} else {
					tierSet4pAura.Deactivate(sim)
				}
			})
		},
	},
})

T11 Balance

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

Functions

This section is empty.

Types

type APLValueCurrentEclipsePhase

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

func (*APLValueCurrentEclipsePhase) GetBool

func (value *APLValueCurrentEclipsePhase) GetBool(sim *core.Simulation) bool

func (*APLValueCurrentEclipsePhase) String

func (value *APLValueCurrentEclipsePhase) String() string

func (*APLValueCurrentEclipsePhase) Type

type APLValueCurrentLunarEnergy

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

func (*APLValueCurrentLunarEnergy) GetInt

func (value *APLValueCurrentLunarEnergy) GetInt(sim *core.Simulation) int32

func (*APLValueCurrentLunarEnergy) String

func (value *APLValueCurrentLunarEnergy) String() string

func (*APLValueCurrentLunarEnergy) Type

type APLValueCurrentSolarEnergy

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

func (*APLValueCurrentSolarEnergy) GetInt

func (value *APLValueCurrentSolarEnergy) GetInt(sim *core.Simulation) int32

func (*APLValueCurrentSolarEnergy) String

func (value *APLValueCurrentSolarEnergy) String() string

func (*APLValueCurrentSolarEnergy) Type

type Druid

type Druid struct {
	core.Character
	SelfBuffs

	Talents *proto.DruidTalents

	ClassSpellScaling float64

	StartingForm DruidForm

	RebirthUsed       bool
	RebirthTiming     float64
	BleedsActive      int
	AssumeBleedActive bool
	LeatherSpecActive bool
	RipTfSnapshot     bool

	MHAutoSpell       *core.Spell
	ReplaceBearMHFunc core.ReplaceMHSwing

	Barkskin              *DruidSpell
	Berserk               *DruidSpell
	CatCharge             *DruidSpell
	DemoralizingRoar      *DruidSpell
	Enrage                *DruidSpell
	FaerieFire            *DruidSpell
	FerociousBite         *DruidSpell
	ForceOfNature         *DruidSpell
	FrenziedRegeneration  *DruidSpell
	Hurricane             *DruidSpell
	HurricaneTickSpell    *DruidSpell
	InsectSwarm           *DruidSpell
	GiftOfTheWild         *DruidSpell
	Lacerate              *DruidSpell
	Languish              *DruidSpell
	MangleBear            *DruidSpell
	MangleCat             *DruidSpell
	Maul                  *DruidSpell
	MaulQueueSpell        *DruidSpell
	Moonfire              *DruidSpell
	Pulverize             *DruidSpell
	Rebirth               *DruidSpell
	Rake                  *DruidSpell
	Ravage                *DruidSpell
	Rip                   *DruidSpell
	SavageRoar            *DruidSpell
	Shred                 *DruidSpell
	Starfire              *DruidSpell
	Starfall              *DruidSpell
	Starsurge             *DruidSpell
	Sunfire               *DruidSpell
	SurvivalInstincts     *DruidSpell
	SwipeBear             *DruidSpell
	SwipeCat              *DruidSpell
	TigersFury            *DruidSpell
	Thrash                *DruidSpell
	Typhoon               *DruidSpell
	Wrath                 *DruidSpell
	WildMushrooms         *DruidSpell
	WildMushroomsDetonate *DruidSpell

	CatForm  *DruidSpell
	BearForm *DruidSpell

	BarkskinAura             *core.Aura
	BearFormAura             *core.Aura
	BerserkAura              *core.Aura
	BerserkProcAura          *core.Aura
	CatFormAura              *core.Aura
	ClearcastingAura         *core.Aura
	DemoralizingRoarAuras    core.AuraArray
	EnrageAura               *core.Aura
	FaerieFireAuras          core.AuraArray
	FrenziedRegenerationAura *core.Aura
	LunarEclipseProcAura     *core.Aura
	MaulQueueAura            *core.Aura
	MoonkinT84PCAura         *core.Aura
	NaturesGraceProcAura     *core.Aura
	OwlkinFrenzyAura         *core.Aura
	PredatoryInstinctsAura   *core.Aura
	PrimalMadnessAura        *core.Aura
	PulverizeAura            *core.Aura
	SavageDefenseAura        *core.Aura
	SavageRoarAura           *core.Aura
	SolarEclipseProcAura     *core.Aura
	StampedeCatAura          *core.Aura
	StampedeBearAura         *core.Aura
	StrengthOfThePantherAura *core.Aura
	SurvivalInstinctsAura    *core.Aura
	TigersFuryAura           *core.Aura

	BleedCategories core.ExclusiveCategoryArray

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

	ProcOoc func(sim *core.Simulation)

	ExtendingMoonfireStacks int

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

func (eb *Druid) AddEclipseCallback(callback EclipseCallback)

func (*Druid) AddEclipseEnergy

func (eb *Druid) AddEclipseEnergy(amount float64, kind EclipseEnergy, sim *core.Simulation, metrics *core.ResourceMetrics)

func (*Druid) AddRaidBuffs

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

func (*Druid) ApplyBloodletting

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

func (*Druid) ApplyGlyphs

func (druid *Druid) ApplyGlyphs()

func (*Druid) ApplyTalents

func (druid *Druid) ApplyTalents()

func (*Druid) BalanceCritMultiplier

func (druid *Druid) BalanceCritMultiplier() float64

func (*Druid) BearArmorMultiplier

func (druid *Druid) BearArmorMultiplier() float64

func (*Druid) CanApplyFaerieFireDebuff

func (druid *Druid) CanApplyFaerieFireDebuff(target *core.Unit) bool

func (*Druid) CanGainEnergy

func (eb *Druid) CanGainEnergy(kind EclipseEnergy) bool

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

func (eb *Druid) CurrentLunarEnergy() int32

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

func (eb *Druid) CurrentSolarEnergy() int32

func (*Druid) CurrentSwipeCatCost

func (druid *Druid) CurrentSwipeCatCost() float64

func (*Druid) EnableEclipseBar

func (druid *Druid) EnableEclipseBar()

func (*Druid) ForceEclipse added in v0.0.2

func (eb *Druid) ForceEclipse(eclipse Eclipse, sim *core.Simulation)

func (*Druid) ForceSolarEclipse added in v0.0.2

func (druid *Druid) ForceSolarEclipse(sim *core.Simulation, mastery 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) GetSavageRoarMultiplier

func (druid *Druid) GetSavageRoarMultiplier() float64

func (*Druid) HasEclipseBar

func (druid *Druid) HasEclipseBar() bool

func (*Druid) HasMajorGlyph

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

func (*Druid) HasMinorGlyph

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

func (*Druid) HasPrimeGlyph

func (druid *Druid) HasPrimeGlyph(glyph proto.DruidPrimeGlyph) 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) MaxRipTicks

func (druid *Druid) MaxRipTicks() int32

func (*Druid) NewAPLValue

func (druid *Druid) NewAPLValue(rot *core.APLRotation, config *proto.APLValue) core.APLValue

func (*Druid) NewLunarEnergyMetrics

func (unit *Druid) NewLunarEnergyMetrics(actionID core.ActionID) *core.ResourceMetrics

func (*Druid) NewSolarEnergyMetrics

func (unit *Druid) NewSolarEnergyMetrics(actionID core.ActionID) *core.ResourceMetrics

func (*Druid) NewTreant

func (druid *Druid) NewTreant() *TreantPet

func (*Druid) RazorClawsMultiplier

func (druid *Druid) RazorClawsMultiplier(masteryRating float64) float64

func (*Druid) RegisterBalanceSpells

func (druid *Druid) RegisterBalanceSpells()

func (*Druid) RegisterEclipseAuras

func (druid *Druid) RegisterEclipseAuras()

func (*Druid) RegisterFeralCatSpells

func (druid *Druid) RegisterFeralCatSpells()

func (*Druid) RegisterFeralTankSpells

func (druid *Druid) RegisterFeralTankSpells()

func (*Druid) RegisterSpell

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

func (*Druid) Reset

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

func (*Druid) SetEclipse

func (eb *Druid) SetEclipse(eclipse Eclipse, sim *core.Simulation)

func (*Druid) ShouldFaerieFire

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

func (*Druid) ThickHideMultiplier

func (druid *Druid) ThickHideMultiplier() float64

func (*Druid) TryApplyFaerieFireEffect

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

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
}

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 Eclipse

type Eclipse byte
const (
	NoEclipse    Eclipse = 0
	SolarEclipse Eclipse = 1
	LunarEclipse Eclipse = 2
)

type EclipseCallback

type EclipseCallback func(eclipse Eclipse, gained bool, sim *core.Simulation)

type EclipseEnergy

type EclipseEnergy byte
const (
	SolarEnergy         EclipseEnergy = 1
	LunarEnergy         EclipseEnergy = 2
	SolarAndLunarEnergy               = SolarEnergy | LunarEnergy
)

type SelfBuffs

type SelfBuffs struct {
	InnervateTarget *proto.UnitReference
}

type TreantPet

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

func (*TreantPet) ExecuteCustomRotation

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

func (*TreantPet) GetPet

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

func (*TreantPet) Initialize

func (treant *TreantPet) Initialize()

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