hunter

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpellCode_HunterNone int32 = iota

	SpellCode_HunterAimedShot
	SpellCode_HunterMongooseBite
	SpellCode_HunterRaptorStrike
	SpellCode_HunterMultiShot
)
View Source
const (
	DevilsaurEye            = 19991
	DevilsaurTooth          = 19992
	SignetOfBeasts          = 209823
	BloodlashBow            = 216516
	GurubashiPitFightersBow = 221450
	BloodChainVices         = 227075
	KnightChainVices        = 227077
	BloodChainGrips         = 227081
	KnightChainGrips        = 227087
	WhistleOfTheBeast       = 228432
)
View Source
const PetGCD = time.Millisecond * 1600

Pet AI doesn't use abilities immediately, so model this with a 1.6s GCD.

View Source
const RaptorFuryPerStackDamageMultiplier = 0.1
View Source
const RaptorStrikeRanks = 8
View Source
const (
	SpellFlagShot = core.SpellFlagAgentReserved1
)

Variables

View Source
var ItemSetBeastmasterArmor = core.NewItemSet(core.ItemSet{
	Name: "Beastmaster Armor",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},

		4: func(agent core.Agent) {
			c := agent.GetCharacter()
			actionID := core.ActionID{SpellID: 450577}
			manaMetrics := c.NewManaMetrics(actionID)

			core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
				ActionID:   actionID,
				Name:       "S03 - Mana Proc on Cast - Beaststalker Armor",
				Callback:   core.CallbackOnSpellHitDealt,
				Outcome:    core.OutcomeLanded,
				ProcMask:   core.ProcMaskWhiteHit,
				ProcChance: 0.06,
				Handler: func(sim *core.Simulation, spell *core.Spell, _ *core.SpellResult) {
					if c.HasManaBar() {
						c.AddMana(sim, 300, manaMetrics)
					}
				},
			})
		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddResistances(8)
		},

		8: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Armor, 200)
		},
	},
})
View Source
var ItemSetBloodGuardsChain = core.NewItemSet(core.ItemSet{
	Name: "Blood Guard's Chain",
	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.AttackPower, 30)
			c.AddStat(stats.RangedAttackPower, 20)
		},
	},
})
View Source
var ItemSetChampionsProwess = core.NewItemSet(core.ItemSet{
	Name: "Champion's Prowess",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},
	},
})
View Source
var ItemSetChampionsPursuit = core.NewItemSet(core.ItemSet{
	Name: "Champion's Pursuit",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Agility, 20)
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},
	},
})
View Source
var ItemSetDreadHuntersChain = core.NewItemSet(core.ItemSet{
	Name: "Dread Hunter's Chain",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.AttackPower, 20)
			c.AddStat(stats.RangedAttackPower, 20)
		},
		3: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.MeleeCrit, 1*core.CritRatingPerCritChance)
		},
	},
})
View Source
var ItemSetGiantstalkerProwess = core.NewItemSet(core.ItemSet{
	Name: "Giantstalker Prowess",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()

			debuffAuras := hunter.NewEnemyAuraArray(func(target *core.Unit, level int32) *core.Aura {
				return target.RegisterAura(core.Aura{
					Label:    "S03 - Item - T1 - Hunter - Melee 2P Bonus",
					ActionID: core.ActionID{SpellID: 456389},
					Duration: time.Second * 30,
					OnGain: func(aura *core.Aura, sim *core.Simulation) {
						aura.Unit.AddStatDynamic(sim, stats.Dodge, -1)
						aura.Unit.PseudoStats.BonusMeleeHitRatingTaken += 1 * core.MeleeHitRatingPerHitChance
						aura.Unit.PseudoStats.BonusSpellHitRatingTaken += 1 * core.SpellHitRatingPerHitChance
					},
					OnExpire: func(aura *core.Aura, sim *core.Simulation) {
						aura.Unit.AddStatDynamic(sim, stats.Dodge, 1)
						aura.Unit.PseudoStats.BonusMeleeHitRatingTaken += 1 * core.MeleeHitRatingPerHitChance
						aura.Unit.PseudoStats.BonusSpellHitRatingTaken += 1 * core.SpellHitRatingPerHitChance
					},
				})
			})

			core.MakePermanent(hunter.RegisterAura(core.Aura{
				Label: "S03 - Item - T1 - Hunter - Melee 2P Bonus Trigger",
				OnSpellHitDealt: func(_ *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell.SpellCode == SpellCode_HunterMongooseBite && result.Landed() {
						debuffAuras.Get(result.Target).Activate(sim)
					}
				},
			}))
		},

		4: func(agent core.Agent) {
			c := agent.GetCharacter()

			c.PseudoStats.DamageDealtMultiplier *= 1.03
		},

		6: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()
			core.MakePermanent(hunter.RegisterAura(core.Aura{
				Label: "S03 - Item - T1 - Hunter - Melee 6P Bonus Trigger",
				OnSpellHitDealt: func(_ *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell.ProcMask.Matches(core.ProcMaskMelee) && (result.Outcome == core.OutcomeMiss || result.Outcome == core.OutcomeBlock || result.Outcome == core.OutcomeParry) {
						hunter.DefensiveState.Activate(sim)
					}
				},
			}))
		},
	},
})
View Source
var ItemSetGiantstalkerPursuit = core.NewItemSet(core.ItemSet{
	Name: "Giantstalker Pursuit",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {

		},

		4: func(agent core.Agent) {
			c := agent.GetCharacter()

			c.PseudoStats.DamageDealtMultiplier *= 1.03
		},

		6: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()

			if !hunter.Talents.AimedShot {
				return
			}

			procAura := hunter.RegisterAura(core.Aura{
				ActionID: core.ActionID{SpellID: 456379},
				Label:    "S03 - Item - T1 - Hunter - Ranged 6P Bonus",
				Duration: time.Second * 12,

				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					for _, spell := range hunter.Shots {
						if spell != nil {
							spell.DamageMultiplier *= 1.20
						}
					}
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					for _, spell := range hunter.Shots {
						if spell != nil {
							spell.DamageMultiplier /= 1.20
						}
					}
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if !spell.Flags.Matches(SpellFlagShot) || (aura.RemainingDuration(sim) == aura.Duration && spell.SpellCode == SpellCode_HunterAimedShot) {
						return
					}

					aura.Deactivate(sim)
				},
			})

			core.MakePermanent(hunter.RegisterAura(core.Aura{
				Label: "S03 - Item - T1 - Hunter - Ranged 6P Bonus Trigger",
				OnCastComplete: func(_ *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell.SpellCode == SpellCode_HunterAimedShot {
						procAura.Activate(sim)
					}
				},
			}))
		},
	},
})
View Source
var ItemSetKnightLieutenantsChain = core.NewItemSet(core.ItemSet{
	Name: "Knight-Lieutenant's Chain",
	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.AttackPower, 30)
			c.AddStat(stats.RangedAttackPower, 20)
		},
	},
})
View Source
var ItemSetLieutenantCommandersProwess = core.NewItemSet(core.ItemSet{
	Name: "Lieutenant Commander's Prowess",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStats(stats.Stats{
				stats.AttackPower:       40,
				stats.RangedAttackPower: 40,
			})
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},
	},
})
View Source
var ItemSetLieutenantCommandersPursuit = core.NewItemSet(core.ItemSet{
	Name: "Lieutenant Commander's Pursuit",
	Bonuses: map[int32]core.ApplyEffect{

		2: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Agility, 20)
		},

		4: func(agent core.Agent) {

		},

		6: func(agent core.Agent) {
			c := agent.GetCharacter()
			c.AddStat(stats.Stamina, 20)
		},
	},
})
View Source
var PetConfigs = map[proto.Hunter_Options_PetType]PetConfig{
	proto.Hunter_Options_Cat: {
		Name:           "Cat",
		SpecialAbility: Bite,
		FocusDump:      Claw,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.1,
	},
	proto.Hunter_Options_WindSerpent: {
		Name:           "Wind Serpent",
		SpecialAbility: Unknown,
		FocusDump:      LightningBreath,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.07,
	},
	proto.Hunter_Options_Bat: {
		Name: "Bat",

		FocusDump: Claw,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Bear: {
		Name:           "Bear",
		SpecialAbility: Swipe,
		FocusDump:      Claw,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Boar: {
		Name: "Boar",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_CarrionBird: {
		Name:           "Carrion Bird",
		SpecialAbility: DemoralizingScreech,
		FocusDump:      Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Chimaera: {
		Name: "Chimaera",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_CoreHound: {
		Name: "Core Hound",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Crab: {
		Name: "Crab",

		FocusDump: Claw,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Crocolisk: {
		Name: "Crocolisk",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Devilsaur: {
		Name: "Devilsaur",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Dragonhawk: {
		Name: "Dragonhawk",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Gorilla: {
		Name: "Gorilla",

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Hyena: {
		Name: "Hyena",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Raptor: {
		Name: "Raptor",

		FocusDump: Claw,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Scorpid: {
		Name:           "Scorpid",
		SpecialAbility: ScorpidPoison,
		FocusDump:      Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Serpent: {
		Name: "Serpent",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Silithid: {
		Name: "Silithid",

		FocusDump: Claw,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Spider: {
		Name: "Spider",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_SpiritBeast: {
		Name: "Spirit Beast",

		FocusDump: Claw,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_SporeBat: {
		Name: "Spore Bat",

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Tallstrider: {
		Name: "Tallstrider",

		FocusDump: Claw,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Turtle: {
		Name: "Turtle",

		FocusDump: Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
	proto.Hunter_Options_Wolf: {
		Name:           "Wolf",
		SpecialAbility: FuriousHowl,
		FocusDump:      Bite,

		Health: 1.0,
		Armor:  1.0,
		Damage: 1.0,
	},
}

Abilities reference: https://wotlk.wowhead.com/hunter-pets https://wotlk.wowhead.com/guides/hunter-dps-best-pets-taming-loyalty-burning-crusade-classic

View Source
var RaptorStrikeBaseDamage = [RaptorStrikeRanks + 1]float64{0, 5, 11, 21, 34, 50, 80, 110, 140}
View Source
var RaptorStrikeLevel = [RaptorStrikeRanks + 1]int{0, 1, 8, 16, 24, 32, 40, 48, 56}
View Source
var RaptorStrikeManaCost = [RaptorStrikeRanks + 1]float64{0, 15, 25, 35, 45, 55, 70, 80, 100}
View Source
var RaptorStrikeSpellId = [RaptorStrikeRanks + 1]int32{0, 2973, 14260, 14261, 14262, 14263, 14264, 14265, 14266}
View Source
var RaptorStrikeSpellIdMeleeSpecialist = [RaptorStrikeRanks + 1]int32{0, 415335, 415336, 415337, 415338, 415340, 415341, 415342, 415343}
View Source
var TalentTreeSizes = [3]int{16, 14, 16}

Functions

func RegisterHunter

func RegisterHunter()

Types

type Hunter

type Hunter struct {
	core.Character

	Talents *proto.HunterTalents
	Options *proto.Hunter_Options

	AmmoDPS                   float64
	AmmoDamageBonus           float64
	NormalizedAmmoDamageBonus float64

	AimedShot      *core.Spell
	ArcaneShot     *core.Spell
	ChimeraShot    *core.Spell
	ExplosiveShot  *core.Spell
	ExplosiveTrap  *core.Spell
	ImmolationTrap *core.Spell
	FrostTrap      *core.Spell
	KillCommand    *core.Spell
	KillShot       *core.Spell
	MultiShot      *core.Spell
	FocusFire      *core.Spell
	RapidFire      *core.Spell
	RaptorStrike   *core.Spell
	RaptorStrikeMH *core.Spell
	RaptorStrikeOH *core.Spell
	FlankingStrike *core.Spell
	WyvernStrike   *core.Spell
	MongooseBite   *core.Spell
	ScorpidSting   *core.Spell
	SerpentSting   *core.Spell
	SilencingShot  *core.Spell
	SteadyShot     *core.Spell
	Volley         *core.Spell
	CarveMH        *core.Spell
	CarveOH        *core.Spell
	WingClip       *core.Spell

	Shots []*core.Spell

	SerpentStingChimeraShot *core.Spell

	FlankingStrikeAura *core.Aura
	RaptorFuryAura     *core.Aura
	SniperTrainingAura *core.Aura
	CobraStrikesAura   *core.Aura
	HitAndRunAura      *core.Aura

	// The aura that allows you to cast Mongoose Bite
	DefensiveState *core.Aura

	ImprovedSteadyShotAura *core.Aura
	LockAndLoadAura        *core.Aura
	RapidFireAura          *core.Aura
	// contains filtered or unexported fields
}

func NewHunter

func NewHunter(character *core.Character, options *proto.Player) *Hunter

func (*Hunter) AddPartyBuffs

func (hunter *Hunter) AddPartyBuffs(_ *proto.PartyBuffs)

func (*Hunter) AddRaidBuffs

func (hunter *Hunter) AddRaidBuffs(raidBuffs *proto.RaidBuffs)

func (*Hunter) ApplyRunes

func (hunter *Hunter) ApplyRunes()

func (*Hunter) ApplyTalents

func (hunter *Hunter) ApplyTalents()

func (*Hunter) GetCharacter

func (hunter *Hunter) GetCharacter() *core.Character

func (*Hunter) GetHunter

func (hunter *Hunter) GetHunter() *Hunter

func (*Hunter) HasRune

func (hunter *Hunter) HasRune(rune proto.HunterRune) bool

func (*Hunter) Initialize

func (hunter *Hunter) Initialize()

func (*Hunter) NewHunterPet

func (hunter *Hunter) NewHunterPet() *HunterPet

func (*Hunter) OnGCDReady

func (hunter *Hunter) OnGCDReady(_ *core.Simulation)

func (*Hunter) Reset

func (hunter *Hunter) Reset(sim *core.Simulation)

func (*Hunter) TryRaptorStrike

func (hunter *Hunter) TryRaptorStrike(sim *core.Simulation, mhSwingSpell *core.Spell) *core.Spell

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

type HunterAgent

type HunterAgent interface {
	GetHunter() *Hunter
}

Agent is a generic way to access underlying hunter on any of the agents.

type HunterPet

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

func (*HunterPet) ApplyTalents

func (hp *HunterPet) ApplyTalents()

func (*HunterPet) ExecuteCustomRotation

func (hp *HunterPet) ExecuteCustomRotation(sim *core.Simulation)

func (*HunterPet) GetPet

func (hp *HunterPet) GetPet() *core.Pet

func (*HunterPet) Initialize

func (hp *HunterPet) Initialize()

func (*HunterPet) NewPetAbility

func (hp *HunterPet) NewPetAbility(abilityType PetAbilityType, isPrimary bool) *core.Spell

func (*HunterPet) Reset

func (hp *HunterPet) Reset(_ *core.Simulation)

func (*HunterPet) Talents

func (hp *HunterPet) Talents() *proto.HunterPetTalents

type PetAbilityType

type PetAbilityType int
const (
	Unknown PetAbilityType = iota
	Bite
	Claw
	DemoralizingScreech
	FuriousHowl
	LightningBreath
	ScorpidPoison
	Swipe
)

type PetConfig

type PetConfig struct {
	Name string

	SpecialAbility PetAbilityType
	FocusDump      PetAbilityType

	Health float64
	Armor  float64
	Damage float64

	// Randomly select between abilities instead of using a prio.
	RandomSelection bool
}

Jump to

Keyboard shortcuts

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