Alpine Rally - what am I missing?


#1

If I cast haste and reset cooldown before I start running, it takes too long and the yeti gets me. If I try to cast them after mana blasting the orcs, it takes too long and the yetis get me. I think I’ve tried every conceivable option but the reset cooldown just takes too long. Am I missing something?

Side note: I’m using moveXY as that seems to go faster than move, on account of if I use move, the yetis get me really quickly.

My code does not have errors per se, so I think the problem must lie in the solutions I’m using.


#2

Try summoning some skeleton or burl to distract the yeti or build decoys.


#3

Try cast haste than move to where all the ogre is cast manaBlast than reset cooldown for haste and then summon some skeleton or burl to distract the yeti or build decoys and move to the X.


#4

Post your code it might have logic errors.

Scheme like this works for me.

Haste --> manaBlast —> resetCooldown —> haste.
for moving --> hero.move( { x : 0, y : 0 } )

There is thing like inertia. It is useful in case like this.


#5

Here’s my code. If I don’t immediately run after mana blast, hero dies at wall. If I run for 40, hero dies casting haste (not reset cooldown).
If I run for 50 her o dies casting reset reset cooldown.

# Escape off the right side of the map.
# To outrun the  yeti, you'll have to make yourself faster.
# Use resetCooldown to use a spell or skill more frequently.
# manaBlast can help clear the path.
hero.cast("haste", hero)
hero.moveXY(hero.pos.x + 80, hero.pos.y)
hero.manaBlast()
hero.moveXY(hero.pos.x + 40, hero.pos.y)
hero.resetCooldown("haste")
hero.cast("haste", hero)
hero.moveXY(300, 38)

#6

Maybe instead of using moveXY, think of how the logic would be if you were only going to use ManaBlast if there is an enemy nearby using move


#7

Add

moveXY( hero.pos.x + 2,hero.pos.y )

after mana blast for exploit of inertia.
then resetCooldown

You should recast “haste” while buff is still active.


#8

After you use manaBlast try to build decoy to distract the ogre.


#9

how do I do it!!? Its so difficult! someone help me! :cry: im really mad know that even though I have watched the tutorial, I still die! :rage:


#10

If you’ve watched the tutorial and you still die, it’s probably because your hero doesn’t have enough health. Try equipping your hero with stronger gear.


#11

when I follow the video tutorial, I end up having an infinite loop :cry: what do I do ??!! :cry::cry::cry:


#12

heres my code:

while True:
moveTo = {“x”: hero.pos.x + 20, “y”: hero.pos.y }
hero.move(moveTo)

if hero.canCast("haste", hero):
    hero.cast("haste", hero)
elif hero.isReady("reset-cooldown"):
    hero.resetCooldown("haste")
    
enemies = hero.findEnemies()
enemyIndex = 0
while enemyIndex < len(enemies):
    enemy = enemies[enemyIndex]
    if enemy.type == 'scout' and hero.distanceTo(enemy) < 5:
        hero.manaBlast()
        enemyIndex += 1

#13

actually its not mine I followed the video tutorial’s code :sweat_smile:


#14

I also went to github to get their code but it does not work as well


#15

if you want to see what their code is like then this is how it looks like:

invis = -5
while True:
if (hero.now() - invis > 4):
if (hero.canCast(‘haste’, self)):
hero.cast(‘haste’, self)
if (hero.canCast(‘invisibility’, self)):
hero.cast(‘invisibility’, self)
invis = hero.now()
if(not(hero.hasEffect(‘invisibility’)) and hero.canCast(‘earthskin’, self)):
hero.cast(‘earthskin’, self)
direction = Vector(hero.pos.x + 30, hero.pos.y)
enemy = hero.findNearest(hero.findByType(‘scout’))
if(hero.canCast(‘chain-lightning’, enemy)):
hero.cast(‘chain-lightning’, enemy)
hero.move(direction)


#18

I summoned a soldier after the mana blast and man :slight_smile: the struggle of 2 days of failure ended :slight_smile: