Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[Solved] Help with Summits Gate

I see what you mean, but that is the incorrect way to use the function. Currently you are just returning the last friend in the list not the friend with the lowest health, but since you need someone to meet your elif statement it works. I’m not sure why you have the code below checking for a friend with the lowest health and then healing the hero. If you are only looking to heal the hero, I’d remove the function and adjust the code just for the hero. One of my changes below.

            elif mostHurt and friend.canCast("heal"):
                self.command(friend, "cast", "heal", self)

After changing my gear to match yours and made three changes from your code. I was able to complete the level.

# with def findSkeletons(enemies): on line 3 
# line 96
            elif friend.canCast("heal") and < hero.maxHealth:
                self.command(friend, "cast", "heal", self)
# line 163 fix the or combination with () like you did with the chieftain
        elif warlock and hero.canCast("chain-lightning", warlock) or hero.isReady("bash"):  
# line 74
        elif self.pos.x < 275:
            self.move(points[3])  # change to [2]

So, this might be more related to your computer system than the code. I was able to complete everything when I was on my gaming computer with no problem, but my laptop gets the error
“Code never finished. It’s either really slow or has an infinite loop” when I run it.

Potentially Good News!! But, when I hit submit, it did complete everything and passes even with the error. Try that once.

That would make sense, I will try on my gaming computer soon.

Yay! It worked!!
Thanks SO much!