Endangered Burl - Update?


#1

I am having trouble with the “Endangered Burl” level. My code that I entered is below. In short, my charcter won’t even move. I’ve been stuck for a few days now. Can anyone help? Many thinks in advance.

  loop:

    enemy = self.findNearestEnemy()
    if enemy:
        if enemy.type is 'munchkin':
            self.attack(enemy)
        elif enemy.type is 'thrower':
            self.attack(enemy)
        elif enemy.type is 'burl':
            self.moveXY(22, 47)
        else:
            self.say("I'm never going near that thing.")
    else:
        pass

#2

Try to use self.say(enemy.type) and see if this type matches any of the types you specified. Be aware that Upper-/lowercase matters.


#3

Thank you for your help. After I followed your advice, I was given an error message that I had not equipped the proper glasses to find my nearest enemy.

Onward and upward!


#4

Advanced glasses need self.findNearest(self.findEnemies()) (similar for items).