Skip to content

Commit

Permalink
Merge pull request #823 from ncberman/hunter_tntResourcefulness
Browse files Browse the repository at this point in the history
Hunter tnt resourcefulness
  • Loading branch information
kayla-glick authored Jun 28, 2024
2 parents 0c53d68 + 7ca8855 commit 3e2d050
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
1 change: 1 addition & 0 deletions assets/database/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -10131,6 +10131,7 @@
{"id":439510,"name":"Engrave Cloak - Improved Swipe","icon":"inv_misc_monsterclaw_03","type":4,"requiresLevel":1,"classAllowlist":[1]},
{"id":439733,"name":"Engrave Cloak - Tree of Life","icon":"ability_druid_treeoflife","type":4,"requiresLevel":1,"classAllowlist":[1]},
{"id":439748,"name":"Engrave Cloak - Starfall","icon":"ability_druid_starfall","type":4,"requiresLevel":1,"classAllowlist":[1]},
{"id":440529,"name":"Engrave Cloak - Resourcefulness","icon":"ability_hunter_resourcefulness","type":4,"requiresLevel":1,"classAllowlist":[2]},
{"id":440569,"name":"Engrave Cloak - Storm, Earth, and Fire","icon":"spell_shaman_stormearthfire","type":4,"requiresLevel":1,"classAllowlist":[7]},
{"id":440580,"name":"Engrave Cloak - Feral Spirit","icon":"spell_shaman_feralspirit","type":4,"requiresLevel":1,"classAllowlist":[7]},
{"id":440802,"name":"Engrave Cloak - Frozen Orb","icon":"spell_frost_frozencore","type":4,"requiresLevel":1,"classAllowlist":[3]},
Expand Down
5 changes: 3 additions & 2 deletions sim/hunter/explosive_trap.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ func (hunter *Hunter) getExplosiveTrapConfig(rank int, timer *core.Timer) core.S
MissileSpeed: 24,

ManaCost: core.ManaCostOptions{
FlatCost: manaCost,
FlatCost: manaCost * hunter.resourcefulnessManacostModifier(),
},
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: timer,
Duration: time.Second * 15,
Duration: time.Second * time.Duration(15 * hunter.resourcefulnessCooldownModifier()),
},
DefaultCast: core.Cast{
GCD: core.GCDDefault,
Expand Down Expand Up @@ -70,6 +70,7 @@ func (hunter *Hunter) getExplosiveTrapConfig(rank int, timer *core.Timer) core.S
curTarget := target
for hitIndex := int32(0); hitIndex < numHits; hitIndex++ {
baseDamage := sim.Roll(minDamage, maxDamage)
baseDamage += hunter.tntDamageFlatBonus()
baseDamage *= sim.Encounter.AOECapMultiplier()
spell.CalcAndDealDamage(sim, curTarget, baseDamage, spell.OutcomeMagicHitAndCrit)
curTarget = sim.Environment.NextTargetUnit(curTarget)
Expand Down
2 changes: 1 addition & 1 deletion sim/hunter/frost_trap.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (hunter *Hunter) getFrostTrapConfig(timer *core.Timer) core.SpellConfig {
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: timer,
Duration: time.Second * 15,
Duration: time.Second * time.Duration(15 * hunter.resourcefulnessCooldownModifier()),
},
DefaultCast: core.Cast{
GCD: core.GCDDefault,
Expand Down
5 changes: 3 additions & 2 deletions sim/hunter/immolation_trap.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (hunter *Hunter) getImmolationTrapConfig(rank int, timer *core.Timer) core.
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: timer,
Duration: time.Second * 15,
Duration: time.Second * time.Duration(15 * hunter.resourcefulnessCooldownModifier()),
},
DefaultCast: core.Cast{
GCD: core.GCDDefault,
Expand All @@ -52,7 +52,8 @@ func (hunter *Hunter) getImmolationTrapConfig(rank int, timer *core.Timer) core.
TickLength: time.Second * 3,

OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) {
dot.Snapshot(target, dotDamage/5, isRollover)
tickDamage := (dotDamage + hunter.tntDamageFlatBonus()) / float64(dot.NumberOfTicks)
dot.Snapshot(target, tickDamage, isRollover)
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTickCounted)
Expand Down
21 changes: 21 additions & 0 deletions sim/hunter/runes.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,24 @@ func (hunter *Hunter) tntDamageMultiplier() float64 {
}
return 1.0
}

func (hunter *Hunter) tntDamageFlatBonus() float64 {
if hunter.HasRune(proto.HunterRune_RuneBracersTNT) {
return hunter.GetStat(stats.AttackPower) * 0.5
}
return 0.0
}

func (hunter *Hunter) resourcefulnessManacostModifier() float64 {
if hunter.HasRune(proto.HunterRune_RuneCloakResourcefulness) {
return 0.0
}
return 1.0
}

func (hunter *Hunter) resourcefulnessCooldownModifier() float64 {
if hunter.HasRune(proto.HunterRune_RuneCloakResourcefulness) {
return 0.6
}
return 1.0
}
1 change: 0 additions & 1 deletion tools/database/rune_overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ var UnimplementedRuneOverrides = []int32{

// Hunter
440520, // Cloak - Improved Volley
440529, // Cloak - Resourcefulness
440533, // Cloak - Hit and Run

// Mage
Expand Down

0 comments on commit 3e2d050

Please sign in to comment.