druid

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpellCode_DruidNone int32 = iota
	SpellCode_DruidMoonfire
	SpellCode_DruidShred
	SpellCode_DruidStarfire
	SpellCode_DruidStarsurge
	SpellCode_DruidWrath
)
View Source
const (
	WolfsheadHelm             = 8345
	IdolMindExpandingMushroom = 209576
	Catnip                    = 213407
	IdolOfWrath               = 216490
	BloodBarkCrusher          = 216499
	RitualistsHammer          = 221446
	IdolOfTheDream            = 220606
)

Totem Item IDs

View Source
const (
	Gore_BearResetProcChance = .15
	Gore_CatResetProcChance  = .05
)
View Source
const (
	ElunesFires_MaxExtensions = 3

	ElunesFires_BonusMoonfireTicks = int32(2)
	ElunesFires_BonusSunfireTicks  = int32(1)
	ElunesFires_BonusRipTicks      = int32(1)

	ElunesFires_MaxBonusMoonfireTicks = ElunesFires_BonusMoonfireTicks * ElunesFires_MaxExtensions
	ElunesFires_MaxSunfireTicks       = SunfireTicks + ElunesFires_BonusSunfireTicks*ElunesFires_MaxExtensions
	ElunesFires_MaxRipTicks           = RipTicks + ElunesFires_BonusRipTicks*ElunesFires_MaxExtensions
)
View Source
const MoonfireRanks = 10
View Source
const RipTicks int32 = 6
View Source
const (
	SpellFlagOmen = core.SpellFlagAgentReserved1
)
View Source
const StarfireRanks = 7
View Source
const SunfireTicks = int32(4)
View Source
const WrathRanks = 8

Variables

View Source
var ItemSetBloodGuardsCracklingLeather = core.NewItemSet(core.ItemSet{
	Name: "Blood Guard's Crackling Leather",
	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 ItemSetBloodGuardsRestoredLeather = core.NewItemSet(core.ItemSet{
	Name: "Blood Guard's Restored Leather",
	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 ItemSetCoagulateBloodguardsLeathers = core.NewItemSet(core.ItemSet{
	Name: "Coagulate Bloodguard's Leathers",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Strength, 10)
		},
		3: func(agent core.Agent) {
			druid := agent.(DruidAgent).GetDruid()

			procAura := druid.GetOrRegisterAura(core.Aura{
				Label:    "Power Shredder Proc",
				ActionID: core.ActionID{SpellID: 449925},
				Duration: time.Second * 10,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					druid.CatForm.CostMultiplier -= 0.3

				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					druid.CatForm.CostMultiplier += 0.3

				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell == druid.CatForm.Spell {
						aura.Deactivate(sim)
					}
				},
			})

			core.MakeProcTriggerAura(&druid.Unit, core.ProcTrigger{
				Name:     "Power Shredder",
				ActionID: core.ActionID{SpellID: 449924},
				Callback: core.CallbackOnCastComplete,
				Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell.SpellCode == SpellCode_DruidShred {
						procAura.Activate(sim)
					}
				},
			})

		},
	},
})
View Source
var ItemSetEmeraldDreamkeeperGarb = core.NewItemSet(core.ItemSet{
	Name: "Emerald Dreamkeeper Garb",
	Bonuses: map[int32]core.ApplyEffect{
		3: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 10)
		},
		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.HealingPower, 22)
		},
	},
})
View Source
var ItemSetEmeraldWatcherVestments = core.NewItemSet(core.ItemSet{
	Name: "Emerald Watcher Vestments",
	Bonuses: map[int32]core.ApplyEffect{
		3: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 10)
		},
		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.SpellPower, 12)
		},
	},
})
View Source
var ItemSetExiledProphetsRaiment = core.NewItemSet(core.ItemSet{
	Name: "Exiled Prophet's Raiment",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.MP5, 4)
		},
		3: func(agent core.Agent) {
			druid := agent.(DruidAgent).GetDruid()

			if druid.HasRune(proto.DruidRune_RuneFeetDreamstate) {
				core.MakeProcTriggerAura(&druid.Unit, core.ProcTrigger{
					Name:       "Exiled Dreamer",
					ActionID:   core.ActionID{SpellID: 449929},
					Callback:   core.CallbackOnHealDealt,
					ProcMask:   core.ProcMaskSpellHealing,
					Outcome:    core.OutcomeCrit,
					ProcChance: 0.5,
					Handler: func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) {
						druid.DreamstateManaRegenAura.Activate(sim)
					},
				})
			}
		},
	},
})
View Source
var ItemSetKnightLieutenantsCracklingLeather = core.NewItemSet(core.ItemSet{
	Name: "Knight-Lieutenant's Crackling Leather",
	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 ItemSetKnightLieutenantsRestoredLeather = core.NewItemSet(core.ItemSet{
	Name: "Knight-Lieutenant's Restored Leather",
	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 ItemSetLostWorshippersArmor = core.NewItemSet(core.ItemSet{
	Name: "Lost Worshipper's Armor",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.MeleeHit, 1)
			c.AddStat(stats.SpellHit, 1)
		},
		3: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.OnSpellRegistered(func(spell *core.Spell) {
				if spell.SpellCode == SpellCode_DruidWrath || spell.SpellCode == SpellCode_DruidStarfire {
					spell.BonusCritRating += 3 * core.CritRatingPerCritChance
				}
			})
		},
	},
})
View Source
var MoonfireBaseDamage = [MoonfireRanks + 1][]float64{{0}, {9, 12}, {17, 21}, {30, 37}, {44, 53}, {70, 82}, {91, 108}, {117, 137}, {143, 168}, {172, 200}, {195, 228}}
View Source
var MoonfireBaseDotDamage = [MoonfireRanks + 1]float64{0, 12, 32, 52, 80, 124, 164, 212, 264, 320, 384}
View Source
var MoonfireDotTicks = [MoonfireRanks + 1]int32{0, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4}
View Source
var MoonfireLevel = [MoonfireRanks + 1]int{0, 4, 10, 16, 22, 28, 34, 40, 46, 52, 58}
View Source
var MoonfireManaCost = [MoonfireRanks + 1]float64{0, 25, 50, 75, 105, 150, 190, 235, 280, 325, 375}
View Source
var MoonfireSpellId = [MoonfireRanks + 1]int32{0, 8921, 8924, 8925, 8926, 8927, 8928, 8929, 9833, 9834, 9835}
View Source
var MoonfiresSellDotCoeff = [MoonfireRanks + 1]float64{0, .052, .081, .111, .13, .13, .13, .13, .13, .13, .13}
View Source
var MoonfiresSpellCoeff = [MoonfireRanks + 1]float64{0, .06, .094, .128, .15, .15, .15, .15, .15, .15, .15}
View Source
var StarfireBaseDamage = [StarfireRanks + 1][]float64{{0}, {95, 115}, {146, 177}, {212, 253}, {293, 348}, {378, 445}, {451, 531}, {496, 584}}
View Source
var StarfireLevel = [StarfireRanks + 1]int{0, 20, 26, 34, 42, 50, 58, 60}
View Source
var StarfireManaCost = [StarfireRanks + 1]float64{0, 95, 135, 180, 230, 275, 315, 340}
View Source
var StarfireSpellId = [StarfireRanks + 1]int32{0, 2912, 8949, 8950, 8951, 9875, 9876, 25298}
View Source
var TalentTreeSizes = [3]int{16, 16, 15}
View Source
var WrathBaseDamage = [WrathRanks + 1][]float64{{0}, {13, 16}, {28, 33}, {48, 57}, {69, 79}, {108, 123}, {148, 167}, {198, 221}, {248, 277}}
View Source
var WrathCastTime = [WrathRanks + 1]int{0, 1500, 1700, 2000, 2000, 2000, 2000, 2000, 2000}
View Source
var WrathLevel = [WrathRanks + 1]int{0, 1, 6, 14, 22, 30, 38, 46, 54}
View Source
var WrathManaCost = [WrathRanks + 1]float64{0, 20, 35, 55, 70, 100, 125, 155, 180}
View Source
var WrathSpellCoeff = [WrathRanks + 1]float64{0, 0.123, 0.231, 0.443, 0.571, 0.571, 0.571, 0.571, 0.571}
View Source
var WrathSpellId = [WrathRanks + 1]int32{0, 5176, 5177, 5178, 5179, 5180, 6780, 8905, 9912}

Functions

This section is empty.

Types

type Druid

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

	StartingForm DruidForm

	RebirthTiming     float64
	BleedsActive      int
	AssumeBleedActive bool

	ReplaceBearMHFunc core.ReplaceMHSwing

	Barkskin             *DruidSpell
	DemoralizingRoar     *DruidSpell
	Enrage               *DruidSpell
	FaerieFire           *DruidSpell
	FerociousBite        *DruidSpell
	ForceOfNature        *DruidSpell
	FrenziedRegeneration *DruidSpell
	Hurricane            []*DruidSpell
	InsectSwarm          *DruidSpell
	GiftOfTheWild        *DruidSpell
	Lacerate             *DruidSpell
	Languish             *DruidSpell
	MangleBear           *DruidSpell
	MangleCat            *DruidSpell
	Berserk              *DruidSpell
	Maul                 *DruidSpell
	MaulQueueSpell       *DruidSpell
	Moonfire             []*DruidSpell
	Rebirth              *DruidSpell
	Rake                 *DruidSpell
	Rip                  *DruidSpell
	SavageRoar           *DruidSpell
	Shred                *DruidSpell
	Starfire             []*DruidSpell
	Starfall             *DruidSpell
	StarfallSplash       *DruidSpell
	Starsurge            *DruidSpell
	Sunfire              *DruidSpell
	SunfireCat           *DruidSpell
	SurvivalInstincts    *DruidSpell
	SwipeBear            *DruidSpell
	SwipeCat             *DruidSpell
	TigersFury           *DruidSpell
	Typhoon              *DruidSpell
	Wrath                []*DruidSpell

	BearForm    *DruidSpell
	CatForm     *DruidSpell
	MoonkinForm *DruidSpell

	BarkskinAura             *core.Aura
	BearFormAura             *core.Aura
	BerserkAura              *core.Aura
	CatFormAura              *core.Aura
	ClearcastingAura         *core.Aura
	DemoralizingRoarAuras    core.AuraArray
	DreamstateManaRegenAura  *core.Aura
	EnrageAura               *core.Aura
	EclipseAura              *core.Aura
	FaerieFireAuras          core.AuraArray
	FrenziedRegenerationAura *core.Aura
	FurorAura                *core.Aura
	FuryOfStormrageAura      *core.Aura
	MaulQueueAura            *core.Aura
	MoonkinFormAura          *core.Aura
	NaturesGraceProcAura     *core.Aura
	PredatoryInstinctsAura   *core.Aura
	SurvivalInstinctsAura    *core.Aura
	TigersFuryAura           *core.Aura
	SavageRoarAura           *core.Aura
	SolarEclipseProcAura     *core.Aura
	LunarEclipseProcAura     *core.Aura
	WildStrikesBuffAura      *core.Aura

	BleedCategories core.ExclusiveCategoryArray

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

	MoonfireDotMultiplier float64
	SunfireDotMultiplier  float64
	// 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) ApplyRunes

func (druid *Druid) ApplyRunes()

func (*Druid) ApplyTalents

func (druid *Druid) ApplyTalents()

func (*Druid) BearArmorMultiplier

func (druid *Druid) BearArmorMultiplier() float64

func (*Druid) CanShred

func (druid *Druid) CanShred() bool

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

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

TODO: don't hardcode numbers

func (*Druid) GetCharacter

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

func (*Druid) GetDynamicPredStrikeStats

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

func (*Druid) GetForm

func (druid *Druid) GetForm() DruidForm

func (*Druid) GetFormShiftStats

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

TODO: Class bonus stats for both cat and bear.

func (*Druid) HasRune

func (druid *Druid) HasRune(rune proto.DruidRune) bool

func (*Druid) ImprovedMoonfireCritBonus

func (druid *Druid) ImprovedMoonfireCritBonus() float64

func (*Druid) ImprovedMoonfireDamageMultiplier

func (druid *Druid) ImprovedMoonfireDamageMultiplier() float64

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

func (druid *Druid) MoonfuryDamageMultiplier() float64

func (*Druid) NaturesGraceCastTime

func (druid *Druid) NaturesGraceCastTime() func(spell *core.Spell) time.Duration

func (*Druid) RegisterBalanceSpells

func (druid *Druid) RegisterBalanceSpells()

func (*Druid) RegisterFeralCatSpells

func (druid *Druid) RegisterFeralCatSpells()

TODO: Classic feral

func (*Druid) RegisterFeralTankSpells

func (druid *Druid) RegisterFeralTankSpells()

TODO: Classic feral tank

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

func (druid *Druid) ThickHideMultiplier() float64

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 FerociousBiteRankInfo

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

type RakeRankInfo

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

type RipRankInfo

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

type SelfBuffs

type SelfBuffs struct {
	InnervateTarget *proto.UnitReference
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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