[SOLVED] Backwoods Standoff Level Help

I am stuck on the backwoods standoof level and I tried everything I can think of but it does not work.

1 Like

Can you send your code here so I can help you?

# Munchkins are attacking!
# The swarms will come at regular intervals.
# Whenever you can, cleave to clear the mass of enemies.

while True:
    enemy = hero.findNearestEnemy()
    # Use an if-statement with isReady to check "cleave":
    if enemy:
        (enemy and hero.isReady("cleave"))
        # Cleave!
        hero.cleave(enemy)
    # Else, if cleave is not ready:
    else:
        hero.attack(enemy)
        # Attack the nearest ogre!
        hero.maxHealth


1 Like

It’s… strange.
Maybe

if hero.isReady("cleave"):

Also, can you change your topic to “level help”?

Also, try to delete “hero.maxHealth” and else should be to if hero.isReady("cleave")

Okay! I do not quite understand what this means.Screenshot 2020-09-11 at 8.08.32 AM|690x387

1 Like

Try to “tab” “#” comments and else have to be like:

       if hero.isReady("cleave"):
            hero.cleave(enemy)
        else:

Now it’s doing this.

No, in else you have to attack, because else is to hero doesn’t ready cleave.

while True:
    enemy = hero.findNearestEnemy()
    # Use an if-statement with isReady to check "cleave":
    if enemy:
        (enemy and hero.isReady("cleave"))
        # Cleave!
        if hero.isReady("cleave"):
            hero.cleave(enemy)
    # Else, if cleave is not ready:
    else:
        if hero.isReady("cleave"):
        # Attack the nearest ogre!
        if enemy:
            hero.attack(enemy)

I keep running out of time

Try to delete these parts.

Okay I did but it does not work.

I kill all of them except for 2 of them and it’s not even doing the else statement

No, you have to write

if hero.isReady("cleave"):
   hero.cleave(enemy)

Did you complete the level?

Yes I did sorry I forgot to let you know.

1 Like

Congratulations with completing the level! :partying_face: I’m glad I could help! :partying_face:

1 Like

BTW, it’s [SOLVED]? (20 chars)

Congrats! :partying_face: :partying_face:
Lydia