Maniac mucnhkins

@ducky @CodingGeek14 @dedreous @Deadpool198 @PythonCoding @nick @Code_Master @Chaboi_3000 @DevinIV1 @shithappens
help me please this is python

# Another chest in the field for the hero to break open!
# Attack the chest to break it open.
# Some munchkins won't stand idly by while you attack it!
# Defend yourself when a munchkin gets too close.

while True:
    enemy = hero.findNearestEnemy()
    distance = hero.distanceTo(enemy)
    if hero.isReady("cleave"):
        # First priority is to cleave if it's ready:
        ready = hero.isReady("cleave")
        pass
    elif distance < 5:
        # Attack the nearest munchkin that gets too close:
        hero.attack(hero.findNearestEnemy())
        
        pass
    else:
        # Otherwise, try to break open the chest:
        # Use the name of the chest to attack: "Chest".
        hero.attack("Chest")
        pass
    

i need help on maniac munchkins i am stuck and i have been stuck on this for about two days now please help me.

what gear do you have on?

@dedreous @CodingGeek14 @ducky @Zambi25
image

thank you so much @SpunkyDaSpider

no problem message me if you get stuck again i will be happy to help
@ZAX155

Thanks for helping Spunky!

Please edit that prior post to delete the code…what you posted is a Solution to a level, which is not allowed. We don’t want someone to be able to search on it, copy and paste and then pass the level without having learned anything from the experience.

Instead, I’d recommend calling out the specific code block, or even line #, where you see the issue, and explain what is wrong with it…this would result is a ‘snippet’ of code, rather than the entire solution.