Skip to content

Commit

Permalink
Merge pull request #1 from wowsims/kg/hunter-pr-tweaks
Browse files Browse the repository at this point in the history
a few tweaks to the hunter code
  • Loading branch information
ncberman authored Sep 4, 2024
2 parents 7ff9a55 + 0af253b commit 54f6f12
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 56 deletions.
16 changes: 8 additions & 8 deletions sim/hunter/hunter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
var TalentTreeSizes = [3]int{16, 14, 16}

const (
SpellFlagShot = core.SpellFlagAgentReserved1
SpellFlagShot = core.SpellFlagAgentReserved1
SpellFlagStrike = core.SpellFlagAgentReserved2
SpellFlagSting = core.SpellFlagAgentReserved3
SpellFlagTrap = core.SpellFlagAgentReserved4
SpellFlagSting = core.SpellFlagAgentReserved3
SpellFlagTrap = core.SpellFlagAgentReserved4
)

const (
Expand Down Expand Up @@ -70,7 +70,7 @@ type Hunter struct {
AmmoDPS float64
AmmoDamageBonus float64
NormalizedAmmoDamageBonus float64
SerpentStingAPCoeff float64
SerpentStingAPCoeff float64

curQueueAura *core.Aura
curQueuedAutoSpell *core.Spell
Expand Down Expand Up @@ -102,10 +102,10 @@ type Hunter struct {
CarveOH *core.Spell
WingClip *core.Spell

Shots []*core.Spell
Strikes []*core.Spell
Shots []*core.Spell
Strikes []*core.Spell
MeleeSpells []*core.Spell
LastShot *core.Spell
LastShot *core.Spell

SerpentStingChimeraShot *core.Spell

Expand All @@ -121,7 +121,7 @@ type Hunter struct {
ImprovedSteadyShotAura *core.Aura
LockAndLoadAura *core.Aura
RapidFireAura *core.Aura
BestialWrathPetAura *core.Aura
BestialWrathPetAura *core.Aura

HasPredatorArmor [6]bool
}
Expand Down
29 changes: 12 additions & 17 deletions sim/hunter/item_sets_pve.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ var ItemSetDragonstalkerProwess = core.NewItemSet(core.ItemSet{
6: func(agent core.Agent) {
hunter := agent.(HunterAgent).GetHunter()
core.MakePermanent(hunter.RegisterAura(core.Aura{
Label: "S03 - Item - T2 - Hunter - Melee 6P Bonus Trigger",
Label: "S03 - Item - T2 - Hunter - Melee 6P Bonus Trigger",
ActionID: core.ActionID{SpellID: 467334},
OnPeriodicDamageDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if sim.Proc(0.05, "T2 Melee 6PC Strike Reset") {
Expand Down Expand Up @@ -332,42 +332,37 @@ var ItemSetPredatorArmor = core.NewItemSet(core.ItemSet{
// Increases the Attack Power your Beast pet gains from your attributes by 20%.
3: func(agent core.Agent) {
hunter := agent.(HunterAgent).GetHunter()

if hunter.pet == nil {
return
}

core.MakePermanent(hunter.RegisterAura(core.Aura{
Label: "Predator's Armor 3P",
OnInit: func(aura *core.Aura, sim *core.Simulation) {
if hunter.pet != nil {
oldStatInheritance := hunter.pet.GetStatInheritance()
hunter.pet.UpdateStatInheritance(
func(ownerStats stats.Stats) stats.Stats {
s := oldStatInheritance(ownerStats)
s[stats.AttackPower] *= 1.20
return s
})
}
oldStatInheritance := hunter.pet.GetStatInheritance()
hunter.pet.UpdateStatInheritance(
func(ownerStats stats.Stats) stats.Stats {
s := oldStatInheritance(ownerStats)
s[stats.AttackPower] *= 1.20
return s
},
)
},
}))
},
// Increases the Focus regeneration of your Beast pet by 20%.
5: func(agent core.Agent) {
hunter := agent.(HunterAgent).GetHunter()

if hunter.pet == nil {
return
}

core.MakePermanent(hunter.RegisterAura(core.Aura{
hunter.RegisterAura(core.Aura{
Label: "Predator's Armor 5P",
OnInit: func(aura *core.Aura, sim *core.Simulation) {
if hunter.pet != nil {
hunter.pet.AddFocusRegenMultiplier(1.20)
}
hunter.pet.AddFocusRegenMultiplier(1.20)
},
}))
})
},
},
})
47 changes: 23 additions & 24 deletions sim/hunter/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ import (
)

const (
DevilsaurEye = 19991
DevilsaurTooth = 19992
SignetOfBeasts = 209823
BloodlashBow = 216516
GurubashiPitFightersBow = 221450
BloodChainVices = 227075
KnightChainVices = 227077
BloodChainGrips = 227081
KnightChainGrips = 227087
WhistleOfTheBeast = 228432
MaelstromsWrath = 231320
ZandalarPredatorsMantle = 231321
ZandalarPredatorsBelt = 231322
ZandalarPredatorsBracers= 231323
DevilsaurEye = 19991
DevilsaurTooth = 19992
SignetOfBeasts = 209823
BloodlashBow = 216516
GurubashiPitFightersBow = 221450
BloodChainVices = 227075
KnightChainVices = 227077
BloodChainGrips = 227081
KnightChainGrips = 227087
WhistleOfTheBeast = 228432
MaelstromsWrath = 231320
ZandalarPredatorsMantle = 231321
ZandalarPredatorsBelt = 231322
ZandalarPredatorsBracers = 231323
)

func init() {
Expand Down Expand Up @@ -280,26 +280,26 @@ func init() {

core.NewItemEffect(MaelstromsWrath, func(a core.Agent) {
hunter := a.(HunterAgent).GetHunter()

if hunter.pet == nil {
return
}

hunter.pet.PseudoStats.DamageDealtMultiplier *= 1.02

if hunter.Talents.BestialWrath {
hunter.RegisterAura(core.Aura{
Label: "Maelstroms's Wrath Bestial Wrath",
OnInit: func(aura *core.Aura, sim *core.Simulation) {
hunter.BestialWrathPetAura.Duration += (time.Second * 3)
},
})
if !hunter.Talents.BestialWrath {
return
}

hunter.RegisterAura(core.Aura{
Label: "Maelstroms's Wrath Bestial Wrath",
OnInit: func(aura *core.Aura, sim *core.Simulation) {
hunter.BestialWrathPetAura.Duration += (time.Second * 3)
},
})
})

core.NewItemEffect(ZandalarPredatorsMantle, func(a core.Agent) {
hunter := a.(HunterAgent).GetHunter()

if hunter.pet == nil {
return
}
Expand All @@ -309,7 +309,6 @@ func init() {

core.NewItemEffect(ZandalarPredatorsBelt, func(a core.Agent) {
hunter := a.(HunterAgent).GetHunter()

if hunter.pet == nil {
return
}
Expand Down
13 changes: 6 additions & 7 deletions sim/hunter/runes.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,15 @@ func (hunter *Hunter) applyCobraStrikes() {
},
})

hunter.RegisterAura(core.Aura{
core.MakePermanent(hunter.RegisterAura(core.Aura{
Label: "Cobra Strikes Trigger",
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if spell.Flags.Matches(SpellFlagShot | SpellFlagStrike) || spell.SpellCode == SpellCode_HunterMongooseBite {
if result.DidCrit() {
hunter.CobraStrikesAura.Activate(sim)
hunter.CobraStrikesAura.SetStacks(sim, 2)
}
if result.DidCrit() && (spell.Flags.Matches(SpellFlagShot|SpellFlagStrike) || spell.SpellCode == SpellCode_HunterMongooseBite) {
hunter.CobraStrikesAura.Activate(sim)
hunter.CobraStrikesAura.SetStacks(sim, 2)
}
},
})
}))
}

func (hunter *Hunter) applyLockAndLoad() {
Expand Down

0 comments on commit 54f6f12

Please sign in to comment.