Summit's Gate seems to have a bug

Try:

friends = hero.findFriends()
if friends:
    for friend in friends:
        if friend and friend.health < lowestHealth and friend.health < friend.maxHealth:
            lowestHealth = friend.health
            lowestFriend = friend

I think you should write:
if weakFriend and paladin.canCast("heal"):

I dont think, that you should write “paladin” after shield.

Maybe elif enemy:?

I think you should remove “for”. Also, “thrower” is array, “catapult” and “enemies” are undefined. Where is if enemy:?

What is “enemy”? It’s undefined. And maybe hero.command(soldier,"attack",enemy), and you don’t need “for”?

Again “enemy” is undefined. And I don’t think, that you can attack position.

if friends:? if friend:?

Do you mean “soldier”?

Where is hero() function?
And I don’t think, that you can pass this level with your equipment. I think you need better sword and helmet.
Dima

1 Like