Backwoods Standoff : Help me?


#1

This hasn’t been working, even though I am using the python format the computer gives me.

What I do:

enemy = hero.findNearestEnemy()
if enemy:
    ready = hero.isReady("cleave")
    hero.cleave(enemy)

else:
    ready = hero.isReady("cleave")
    hero.attack(enemy)
    hero.attack(enemy)

What the computer tells me to do:

enemy = hero.findNearestEnemy()
# Use an if-statement with isReady to check "cleave":

    # Cleave!
    
# Else, if cleave is not ready:

    # Attack the nearest ogre!

I’m pretty sure I’m doing it the correct way, but I don’t know. Can anyone help me?


#2

Well, the hero.isReady("cleave") doesn’t work like that. You are supposed to type down
if hero.isReady("cleave"):, then under that put four spaces and type down hero.cleave(enemy). And put the else: two lines under if hero.isReady("cleave").