Yeti Eater Help!

I’ve tried the Yeti Eater Level with no avail of how to solve it. What should I do?

Thank you!

# 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

2 Likes

Wait why are you actually using devour?

When you attack and kill the yeti you get more health. ** from the wizard I assume **

2 Likes

Here try to remove the while True and put the remaning ( this

) after this line

And do not use devour, just simply attack while food’s health > 0.

Here try to put an

index = len(yetis) - 1
while index > -1:
    #here put the yetis[index] in the variabile food
    index -=1

And also here put

Something like this:

while food.health > 0:
    hero.attack(food)

Andrei

3 Likes