hunter

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ItemSetAhnKaharBloodHuntersBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Ahn'Kahar Blood Hunter's Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()
			const procChance = 0.05
			actionID := core.ActionID{SpellID: 70727}

			procAura := hunter.RegisterAura(core.Aura{
				Label:    "AhnKahar 2pc Proc",
				ActionID: actionID,
				Duration: time.Second * 10,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.PseudoStats.DamageDealtMultiplier *= 1.15
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.PseudoStats.DamageDealtMultiplier /= 1.15
				},
			})

			hunter.RegisterAura(core.Aura{
				Label:    "AhnKahar 2pc",
				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 == hunter.AutoAttacks.RangedAuto() && sim.RandomFloat("AhnKahar 2pc") < procChance {
						procAura.Activate(sim)
					}
				},
			})
		},
		4: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()
			const procChance = 0.05
			actionID := core.ActionID{SpellID: 70730}

			var curBonus stats.Stats
			procAura := hunter.RegisterAura(core.Aura{
				Label:    "AhnKahar 4pc Proc",
				ActionID: actionID,
				Duration: time.Second * 10,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					curBonus = stats.Stats{
						stats.AttackPower:       aura.Unit.GetStat(stats.AttackPower) * 0.1,
						stats.RangedAttackPower: aura.Unit.GetStat(stats.RangedAttackPower) * 0.1,
					}

					aura.Unit.AddStatsDynamic(sim, curBonus)
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.AddStatsDynamic(sim, curBonus.Invert())
				},
			})

			hunter.RegisterAura(core.Aura{
				Label:    "AhnKahar 4pc",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnPeriodicDamageDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell == hunter.SerpentSting && sim.RandomFloat("AhnKahar 4pc") < procChance {
						procAura.Activate(sim)
					}
				},
			})
		},
	},
})
View Source
var ItemSetCryptstalkerBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Cryptstalker Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()
			if hunter.pet != nil {
				hunter.pet.PseudoStats.DamageDealtMultiplier *= 1.05
			}
		},
		4: func(agent core.Agent) {
		},
	},
})
View Source
var ItemSetGladiatorsPursuit = core.NewItemSet(core.ItemSet{
	Name: "Gladiator's Pursuit",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()
			hunter.AddStats(stats.Stats{
				stats.AttackPower:       50,
				stats.RangedAttackPower: 50,
				stats.Resilience:        50,
			})
		},
		4: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()
			hunter.AddStats(stats.Stats{
				stats.AttackPower:       150,
				stats.RangedAttackPower: 150,
			})
		},
	},
})
View Source
var ItemSetScourgestalkerBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Scourgestalker Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
		},
		4: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()

			procAura := hunter.NewTemporaryStatsAura("Scourgestalker 4pc Proc", core.ActionID{SpellID: 64860}, stats.Stats{stats.AttackPower: 600, stats.RangedAttackPower: 600}, time.Second*15)
			const procChance = 0.1

			icd := core.Cooldown{
				Timer:    hunter.NewTimer(),
				Duration: time.Second * 45,
			}
			procAura.Icd = &icd

			hunter.RegisterAura(core.Aura{
				Label:    "Windrunner 4pc",
				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 !result.Landed() || spell != hunter.SteadyShot {
						return
					}
					if !icd.IsReady(sim) {
						return
					}
					if sim.RandomFloat("Scourgestalker 4pc") > procChance {
						return
					}

					icd.Use(sim)
					procAura.Activate(sim)
				},
			})
		},
	},
})
View Source
var ItemSetWindrunnersPursuit = core.NewItemSet(core.ItemSet{
	Name:            "Windrunner's Pursuit",
	AlternativeName: "Windrunner's Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
		},
		4: func(agent core.Agent) {
			hunter := agent.(HunterAgent).GetHunter()
			if hunter.pet == nil {
				return
			}

			procAura := hunter.pet.NewTemporaryStatsAura("Windrunner 4pc Proc", core.ActionID{SpellID: 68130}, stats.Stats{stats.AttackPower: 600}, time.Second*15)
			const procChance = 0.35

			icd := core.Cooldown{
				Timer:    hunter.NewTimer(),
				Duration: time.Second * 45,
			}
			procAura.Icd = &icd

			hunter.RegisterAura(core.Aura{
				Label:    "Windrunner 4pc",
				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 !result.Landed() || !spell.ProcMask.Matches(core.ProcMaskRanged) {
						return
					}
					if !icd.IsReady(sim) {
						return
					}
					if sim.RandomFloat("Windrunner 4pc") > procChance {
						return
					}

					icd.Use(sim)
					procAura.Activate(sim)
				},
			})
		},
	},
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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