Stuck in Summits Gate (Python)

def moveTo(position, fast=True):
    if (hero.isReady("jump") and hero.distanceTo > 10 and fast):

# pickup coin
def pickUpNearestItem(items):
    nearestItem = hero.findNearest(items)
    if nearestItem:

# add soldier
summonTypes = ['griffin-rider', 'soldier', 'archer']

def summonTroops():
    type = summonTypes[len(hero.built) % len(summonTypes)]
    if > hero.costOf(type):

def findNearest(index):
    top = False
    left = False
    if (index == 0):
        top = True
        left = True
    elif (index == 1):
        top = True
    elif (index == 3):
        left = True
    items = hero.findItems()
    for item in items:
        if (item.pos.y > 66 and top and left and item.pos.x < 76):
            return item
        elif (item.pos.y < 66 and not top and left and item.pos.x < 76):
            return item
        elif (item.pos.y > 66 and top and not left and item.pos.x > 76):
            return item
        elif (item.pos.y < 66 and not top and not left and item.pos.x > 76):
            return item
    return None

# commands attack
def commandTroops():
    index = 0
    for friend in hero.findFriends():
        if friend.type == 'peasant':
            item = findNearest(index)
            index += 1
            if item:
                hero.command(friend, 'move', item.pos)
            enemy = hero.findNearestEnemy()
            if enemy:
                hero.command(friend, "attack", enemy)

def attack(target):
    if target:
        if (hero.distanceTo(target) > 10):
        elif (hero.isReady("bash")):
        elif (hero.isReady("power-up")):
        elif (hero.isReady("cleave")):

while True:
    enemy = hero.findNearestEnemy()

HALP! This is my code for Summits gate. it works perfectly fine but stops right before the entrance to the inner sanctum. I NEED to know why this is happening because i am in the middle of a race with a friend to beat this game.


@Beatrice_Prior I know this is not your own work, because there are no items to be collected in Summit’s gate.

Please try to solve this level yourself. Do not search online for solutions. It just takes away the point of the game.


i have been trying for about the past week to solve this level alone. after that didn’t succeed, I asked my programming teacher for help, and he couldn’t help me. I was at my wits end, so I went onto GitHub and got this code. I just need to finish this level so that I can move onto the glacier. I honestly don’t care about applying different techniques at this point, and just want to move onto glacier no matter what.


If you can’t beat this level, what can you do in glacier? The levels increase in difficulty as you move on.


I’ve already beaten the majority of glacier
this level is just really tricky for me



She doesn’t care. She’s just copying and pasting solutions that she finds to win a race. She’s not trying to actually learn anything.


Im not copying solutions. Im doing almost all of these on my own, but this specific level is giving me alot of trouble


6 hours ago you were trying to “move onto glacier” and didn’t “care about applying different techniques.” And now, just a mere 6 hours later, you’ve “already beaten the majority of glacier.” Wow. You’re good. With ninja coding skills like that, this level should be a piece of cake for you.


Todays a snow day at school so I have alot of time on my hands. ive literally been playing this, strike force heroes, and uncharted 4 all day


Wow. Plus you’ve been playing two other games in between your ninja coding.

Very impressive.


Wow. You’ve been a (removed) this entire time, even while monitoring other new topics.


LOL. What are you, 12? 13? LOL



I just want some help on this god forsaken level.


also im 15 years old


STOP breaking the rules. First you beg for solutions, then you revive dead threads, and then you cuss. @Bryukh please make @Beatrice_Prior stop breaking the rules.


You know @MunkeyShynes is > 18 years old, right?


“Your own work” No.

You got your code from GitHub.


I told you stop think up rules. There is no a rule about “dead” topic. There are not dead topics.


… The first time I ever posted on this forum, I got shouted for reviving a dead thread :confused:


We had that discussion already and I told you that there is not a rule about that.