Skip to content

Commit

Permalink
First pass at hunter
Browse files Browse the repository at this point in the history
  • Loading branch information
sanguinerarogue committed Dec 29, 2024
1 parent 7d4c0a0 commit 0449643
Show file tree
Hide file tree
Showing 19 changed files with 65 additions and 767 deletions.
75 changes: 13 additions & 62 deletions proto/hunter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,51 +57,6 @@ message HunterTalents {
bool wyvern_sting = 46;
}

message HunterPetTalents {
// Cunning
int32 cobra_reflexes = 1;
bool dive = 2;
int32 great_stamina = 3;
int32 natural_armor = 4;
bool boars_speed = 5;
int32 mobility = 6;
int32 owls_focus = 7;
int32 spiked_collar = 8;
int32 culling_the_herd = 9;
int32 lionhearted = 10;
bool carrion_feeder = 11;
int32 great_resistance = 12;
int32 cornered = 13;
int32 feeding_frenzy = 14;
bool wolverine_bite = 15;
bool roar_of_recovery = 16;
bool bullheaded = 17;
int32 grace_of_the_mantis = 18;
int32 wild_hunt = 19;
bool roar_of_sacrifice = 20;

// Ferocity
int32 improved_cower = 21;
int32 bloodthirsty = 22;
bool heart_of_the_pheonix = 23;
int32 spiders_bite = 24;
bool rabid = 25;
bool lick_your_wounds = 26;
bool call_of_the_wild = 27;
int32 shark_attack = 28;

// Tenacity
bool charge = 29;
int32 blood_of_the_rhino = 30;
int32 pet_barding = 31;
int32 guard_dog = 32;
bool thunderstomp = 33;
bool last_stand = 34;
bool taunt = 35;
bool intervene = 36;
int32 silverback = 37;
}

message Hunter {
message Rotation {
enum RotationType {
Expand Down Expand Up @@ -165,16 +120,15 @@ message Hunter {
Owl = 6;
Boar = 7;
CarrionBird = 8;
CoreHound = 10;
Crab = 11;
Crocolisk = 12;
Gorilla = 15;
Hyena = 16;
Raptor = 17;
Scorpid = 18;
Spider = 21;
Tallstrider = 24;
Turtle = 25;
Crab = 9;
Crocolisk = 10;
Gorilla = 11;
Hyena = 12;
Raptor = 13;
Scorpid = 14;
Spider = 15;
Tallstrider = 16;
Turtle = 17;
}

enum PetAttackSpeed {
Expand All @@ -191,16 +145,13 @@ message Hunter {
}

PetType pet_type = 3;
HunterPetTalents pet_talents = 4;
double pet_uptime = 5;

double sniper_training_uptime = 6;
double pet_uptime = 4;

double pet_attack_speed_old = 7;
double pet_attack_speed_old = 5;

bool new_raptor_strike = 8;
bool new_raptor_strike = 6;

PetAttackSpeed pet_attack_speed = 9;
PetAttackSpeed pet_attack_speed = 7;
}
Options options = 2;
}
8 changes: 8 additions & 0 deletions sim/core/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,14 @@ func (aa *AutoAttacks) StopMeleeUntil(sim *Simulation, readyAt time.Duration, de
}
}

func (aa *AutoAttacks) StopRangedUntil(sim *Simulation, readyAt time.Duration) {
if !aa.AutoSwingRanged { // if not auto swinging, don't auto restart.
return
}
aa.ranged.swingAt = readyAt + aa.ranged.curSwingDuration
sim.rescheduleWeaponAttack(aa.ranged.swingAt)
}

// Delays all swing timers for the specified amount. Only used by Slam.
func (aa *AutoAttacks) DelayMeleeBy(sim *Simulation, delay time.Duration) {
if delay <= 0 {
Expand Down
4 changes: 2 additions & 2 deletions sim/hunter/_item_sets_pvp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

///////////////////////////////////////////////////////////////////////////
// SoD Phase 3 Item Sets
// Classic Phase 2
///////////////////////////////////////////////////////////////////////////

var ItemSetBloodGuardsChain = core.NewItemSet(core.ItemSet{
Expand Down Expand Up @@ -40,7 +40,7 @@ var ItemSetKnightLieutenantsChain = core.NewItemSet(core.ItemSet{
})

///////////////////////////////////////////////////////////////////////////
// SoD Phase 4 Item Sets
// Classic Phase 3
///////////////////////////////////////////////////////////////////////////

var ItemSetChampionsPursuit = core.NewItemSet(core.ItemSet{
Expand Down
4 changes: 3 additions & 1 deletion sim/hunter/aimed_shot.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ func (hunter *Hunter) getAimedShotConfig(rank int, timer *core.Timer) core.Spell
Timer: timer,
Duration: time.Second * 6,
},
ModifyCast: func(_ *core.Simulation, spell *core.Spell, cast *core.Cast) {
ModifyCast: func(sim *core.Simulation, spell *core.Spell, cast *core.Cast) {
cast.CastTime = spell.CastTime()
// + 1ms to fix engine issue with clipping
hunter.AutoAttacks.DelayRangedUntil(sim, sim.CurrentTime+spell.CastTime() + time.Millisecond *1)
},
IgnoreHaste: true, // Hunter GCD is locked at 1.5s
CastTime: func(spell *core.Spell) time.Duration {
Expand Down
65 changes: 1 addition & 64 deletions sim/hunter/aspects.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,67 +120,4 @@ func (hunter *Hunter) registerAspectOfTheHawkSpell() {
maxRank := hunter.getMaxHawkRank()
config := hunter.getAspectOfTheHawkSpellConfig(maxRank)
hunter.GetOrRegisterSpell(config)
}

func (hunter *Hunter) registerAspectOfTheViperSpell() {
actionID := core.ActionID{SpellID: 415423}
manaMetrics := hunter.NewManaMetrics(actionID)

var manaPA *core.PendingAction

baseManaRegenMultiplier := 0.02

aspectOfTheViperAura := hunter.GetOrRegisterAura(core.Aura{
Label: "Aspect of the Viper",
ActionID: actionID,
Duration: core.NeverExpires,

OnGain: func(aura *core.Aura, sim *core.Simulation) {
hunter.PseudoStats.DamageDealtMultiplier *= 0.9

manaPA = core.StartPeriodicAction(sim, core.PeriodicActionOptions{
Period: time.Second * 3,
OnAction: func(s *core.Simulation) {
hunter.AddMana(sim, hunter.MaxMana()*0.1, manaMetrics)
},
})
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
hunter.PseudoStats.DamageDealtMultiplier /= 0.9
manaPA.Cancel(sim)
},

OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if spell == hunter.AutoAttacks.RangedAuto() {
manaPerRangedHitMultiplier := baseManaRegenMultiplier * hunter.AutoAttacks.Ranged().SwingSpeed
hunter.AddMana(sim, hunter.MaxMana()*manaPerRangedHitMultiplier, manaMetrics)
} else if spell == hunter.AutoAttacks.MHAuto() {
manaPerMHHitMultiplier := baseManaRegenMultiplier * hunter.AutoAttacks.MH().SwingSpeed
hunter.AddMana(sim, hunter.MaxMana()*manaPerMHHitMultiplier, manaMetrics)
} else if spell == hunter.AutoAttacks.OHAuto() {
manaPerOHHitMultiplier := baseManaRegenMultiplier * hunter.AutoAttacks.OH().SwingSpeed
hunter.AddMana(sim, hunter.MaxMana()*manaPerOHHitMultiplier, manaMetrics)
}
},
})

aspectOfTheViperAura.NewExclusiveEffect("Aspect", true, core.ExclusiveEffect{})

hunter.GetOrRegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagAPL,

Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
},
ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return !aspectOfTheViperAura.IsActive()
},

ApplyEffects: func(sim *core.Simulation, _ *core.Unit, _ *core.Spell) {
aspectOfTheViperAura.Activate(sim)
},
})
}
}
9 changes: 0 additions & 9 deletions sim/hunter/hunter.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,6 @@ func (hunter *Hunter) AddRaidBuffs(raidBuffs *proto.RaidBuffs) {
}[hunter.Level])
}

// Hunter gains an additional 10% stats from Aspect of the Lion
statMultiply := 1.1
hunter.MultiplyStat(stats.Strength, statMultiply)
hunter.MultiplyStat(stats.Stamina, statMultiply)
hunter.MultiplyStat(stats.Agility, statMultiply)
hunter.MultiplyStat(stats.Intellect, statMultiply)
hunter.MultiplyStat(stats.Spirit, statMultiply)
}
func (hunter *Hunter) AddPartyBuffs(_ *proto.PartyBuffs) {
}
Expand All @@ -163,7 +156,6 @@ func (hunter *Hunter) Initialize() {
})

hunter.registerAspectOfTheHawkSpell()
hunter.registerAspectOfTheViperSpell()

multiShotTimer := hunter.NewTimer()
arcaneShotTimer := hunter.NewTimer()
Expand All @@ -185,7 +177,6 @@ func (hunter *Hunter) Initialize() {
hunter.registerImmolationTrapSpell(traps)
hunter.registerFreezingTrapSpell(traps)

// hunter.registerKillCommand()
hunter.registerRapidFire()
}

Expand Down
Loading

0 comments on commit 0449643

Please sign in to comment.