Munchkin Swarm PLEASE HELP!

I am trying to complete Munchkin Swarm. Nothing I have tried will work. I am using python. PLEASE HELP!!

loop:
enemy = self.findNearestEnemy()
distance = self.distanceTo(enemy)
if enemy distance < 5 :
if self.isReady(“cleave”):
self.cleave(enemy)
else:
self.attack(“Chest”)

This is the code I have it says i do not have a : after self.isReady(“cleave”) maybe a bug?

Hello, Sparkle_Assassin, and welcome. Help us help you; please read the FAQ on how to properly format code.

loop:
    enemy = self.findNearestEnemy()
    distance = self.distanceTo(enemy)
    if enemy distance < 5 :
        if self.isReady("cleave"):
            self.cleave(enemy)
    else:
        self.attack("Chest")

I found out how. Thank you!

Do it like that code?

Seems like it shouldn’t really know what to do with this line:

    if enemy distance < 5 :

That should probably be

    if enemy and distance < 5 :