I’ve tried the Yeti Eater Level with no avail of how to solve it. What should I do?
# Yetis surround us and we need to defeat them. # Luckily the wizard had time to cast the sleep spell. # Your hero can devour the yetis' vital powers when they are defeated. # Defeat them in the order from weakest to the strongest. # The wizard sorted enemies, but in the order from the strongest to the weakest. wizard = hero.findNearest(hero.findFriends()) yetis = wizard.findEnemies() # You need iterate the yetis list in the reverse order with a 'for-loop'. # The start value should be 'len(yetis) - 1'. # Iterate while the index greater than -1. # Use the negative step -1. for i in range(len(yetis) - 1): while yetis.index > -1: yetis.index -= 1 # Attack each enemy while its health greater than 0. for yeti in yetis: if yeti.health > 0: food = yeti while True: if hero.isReady("devour"): if food.health > 0: hero.devour(food) else: yetis.index += 1