Skip to content

Commit

Permalink
add bennett buff range check
Browse files Browse the repository at this point in the history
Players should not get the bennett buff if they are out of range.
  • Loading branch information
skippi committed Aug 15, 2022
1 parent 78ab776 commit 0111db5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions internal/characters/bennett/burst.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,24 @@ func (c *char) Burst(p map[string]int) action.ActionInfo {
Mult: burst[c.TalentLvlBurst()],
}
//TODO: review bennett AOE size
c.Core.QueueAttack(ai, combat.NewCircleHit(c.Core.Combat.Player(), 5, false, combat.TargettableEnemy), 37, 37)
radius := 5.0
c.Core.QueueAttack(ai, combat.NewCircleHit(c.Core.Combat.Player(), radius, false, combat.TargettableEnemy), 37, 37)

//apply right away
stats, _ := c.Stats()
c.applyBennettField(stats)()

field := combat.NewCircleHit(c.Core.Combat.Player(), radius, false, combat.TargettablePlayer)

//add 12 ticks starting at t = 1 to t= 12
// Buff appears to start ticking right before hit
// https://discord.com/channels/845087716541595668/869210750596554772/936507730779308032
for i := burstStartFrame; i <= 720+burstStartFrame; i += 60 {
c.Core.Tasks.Add(c.applyBennettField(stats), i)
c.Core.Tasks.Add(func() {
if combat.WillCollide(field, c.Core.Combat.Player(), 0) {
c.applyBennettField(stats)()
}
}, i)
}

c.ConsumeEnergy(36)
Expand Down

0 comments on commit 0111db5

Please sign in to comment.