loop: enemy = self.findNearestEnemy() # Remember: don't attack type "burl"! if enemy.type is "burl": self.say("I'm not attacking that Burl!") # The "type" property tells you what kind of creature it is. if enemy.type is "munchkin": self.attack(enemy) self.attack(enemy) # Use "if" to attack a "thrower". if enemy.type is "thrower": self.attack(enemy) self.attack(enemy) # If it's an "ogre", run away to the village gate! if enemy.type is "orge": self.moveXY(40, 47)
Whats wrong with my code? I have spent a lot of time, trying to figure this out. I have read other forums posts and they do not make sense.