Skip to content

Commit

Permalink
Merge pull request wowsims#429 from wowsims/refactor-hunter
Browse files Browse the repository at this point in the history
Refactor Hunter to use Spell Mods where possible and move the sim to Beta status
  • Loading branch information
ToxicKevinFerm authored May 12, 2024
2 parents 7fd2165 + e8504d9 commit 6e0ab8d
Show file tree
Hide file tree
Showing 26 changed files with 1,775 additions and 1,685 deletions.
3 changes: 2 additions & 1 deletion sim/hunter/arcane_shot.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ func (hunter *Hunter) registerArcaneShotSpell() {
ProcMask: core.ProcMaskRangedSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagAPL,
MissileSpeed: 40,

MinRange: 5,
MaxRange: 40,
FocusCost: core.FocusCostOptions{
Cost: 25 - float64(hunter.Talents.Efficiency),
},
Expand Down
16 changes: 10 additions & 6 deletions sim/hunter/aspects.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ func (hunter *Hunter) registerAspectOfTheHawkSpell() {
}
func (hunter *Hunter) registerAspectOfTheFoxSpell() {
actionID := core.ActionID{SpellID: 82661}
// restoreFocus := 2
restoreFocus := 2.0
focusMetric := hunter.NewFocusMetrics(actionID)

// if hunter.Talents.OneWithNature > 0 {
// restoreFocus += 1 * float64(hunter.Talents.OneWithNature)
// }
if hunter.Talents.OneWithNature > 0 {
restoreFocus += 1 * float64(hunter.Talents.OneWithNature)
}

foxMod := hunter.AddDynamicMod(core.SpellModConfig{
Kind: core.SpellMod_AllowCastWhileMoving,
Expand All @@ -54,6 +55,11 @@ func (hunter *Hunter) registerAspectOfTheFoxSpell() {
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
foxMod.Deactivate()
},
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if aura.IsActive() {
hunter.AddFocus(sim, restoreFocus, focusMetric)
}
},
}))

hunter.applySharedAspectConfig(true, hunter.AspectOfTheFoxAura)
Expand All @@ -68,8 +74,6 @@ func (hunter *Hunter) registerAspectOfTheFoxSpell() {
})
}

// Todo: Implement Aspect of the Fox?

func (hunter *Hunter) applySharedAspectConfig(isHawk bool, aura *core.Aura) {
aura.Duration = core.NeverExpires
aura.NewExclusiveEffect("Aspect", true, core.ExclusiveEffect{})
Expand Down
Loading

0 comments on commit 6e0ab8d

Please sign in to comment.