Munchkin Swarm PLEASE HELP!


#1

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


#2

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?


#3

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


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

#5

I found out how. Thank you!


#6

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 :