Help on Kithgard Brawl

Hey guys I am having trouble on Kithgard Brawl. It says I need to check to see if there is an enemy but as you will see in my code, I have already done that. Some pointers will be appreciated.

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

    else:
        hero.attack(enemy)

Bottom 2 lines. You need to add one more tab to them.

2 Likes

Your else statement is lined up with if enemy:. Try lining it up with if hero.isReady("cleave"):.

2 Likes

Thanks guys. I’ll be sure to try that

1 Like