I am wondering how to dodge sparkbombs, they do more than 300 damage so I want to avoid them.
Here’s what I tried
while True:
missiles = hero.findEnemyMissiles()
bomb = None
bombPos = Vector(0, 0)
for missile in missiles:
if missile.type == 'spark-bomb':
bomb = missile
bombPos = missile.pos
if bomb and hero.distanceTo(bomb.targetPos) < 5:
if hero.distanceTo(bombPos) < 10:
hero.blink(Vector(26, 49))
I also have the twilight glasses
ducky
March 25, 2020, 5:23pm
2
Maybe try automatic blinking
ducky
March 25, 2020, 5:31pm
4
You don’t have to! It’s automatic .
But I also need to attack
I can phase shift before It hits me so I need to know when the sparkbomb is about to hit me.
ducky
March 25, 2020, 7:24pm
7
Well, you can use a function to automatically blink and put it into your while loop, therefore every time you attack, you blink. I have a function that does that.
That will lower my dps and I don’t want to waste my blink every second.
I found this and it’s still not working.
while True:
missiles = hero.findEnemyMissiles()
bomb = None
bombPos = Vector(0, 0)
for missile in missiles:
if missile.type == 'sparkbomb-missile':
bomb = missile
bombPos = missile.pos
if bomb and hero.distanceTo(bomb.targetPos) < 5:
if hero.distanceTo(bombPos) < 10:
hero.blink(Vector(26, 49))
1 Like
I figured it out
Use the missile id
for missile in missiles:
name = missile.id
if name == 'Sparkbomb Missile':
bomb = missile
bombPos = missile.pos
if bomb and hero.distanceTo(bomb) < 17:
blinkAway(bombPos)
3 Likes