Cleave the chest

Hello,
I wrote my code this way in munchkin herd level, backwoods forest in python :slight_smile:

while True:
# Vérifiez la distance avec l’ennemi le plus proche.
nearestEnemy = hero.findNearestEnemy()
distance = hero.distanceTo(nearestEnemy)
# Si ils se rapprochent à moins de 10 mètres, cleave les!
enemy = hero.findNearestEnemy()

if hero.distanceTo(nearestEnemy):
    nearestEnemy < 10
    hero.cleave(nearestEnemy)
    
# Sinon, attaquer le "coffre" par son nom.
else:
    nearestEnemy = hero.findNearestEnemy("Chest")
    distance = hero.distanceTo("Chest")
    chest = hero.findNearestEnemy
    
    if hero.distanceTo("Chest"):
        chest < 100
        hero.cleave("Chest")
        
    pass
            

pass

And I don’t open the “Chest”.
Could you please tell me how to fix it guyz ? Thanks a lot !

@anonymous11

You can’t cleave a chest.
Just attack it normally.

hero.attack("Chest")

Also, delete the

And don’t do

Instead, do

    else:
        hero.attack("Chest")
        

Hope this helps

Also, is the level you are talking about, Munchkin Swarm?