Alpine Rally - what am I missing?

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.

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

1 Like

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.

1 Like

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.

1 Like

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)

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

1 Like

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.

1 Like

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

1 Like

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:

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.

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

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

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

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

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)

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

what am i doing wrong that hero wont ,i know i can only get haste on one time

while(true){
if(hero.isReady("haste")){
    hero.cast("haste", hero);
    }  
else if(hero.isReady("reset-cooldown")){
    hero.resetCooldown("haste");
    }

    
    
hero.moveXY(109,35);
hero.manaBlast();
hero.moveXY(275,37);   

}