Can't get past Endangered Burl PLEASE HELP

This is what I have and I can’t see what is wrong with it

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)

Use “if” to attack a “thrower”.

if enemy.type is “thrower”:
self.attack(enemy)

If it’s an “ogre”, run away to the village

if enemy.type is “ogre”:
self.moveXY(41, 37)

First edi your post and make you code inside a tag

like this 

now remember that if monsters names is invisible then you have to use findnearstenemy and attack it

how do I make it inside a tag

Select your text and press the ending html tag icon , it’s look like this “</>”

Hiya Stephen! To format the code, You can write it, highight it, and hit Ctl-K, or use this method:
http://discourse.codecombat.com/t/how-to-post-your-code-with-radiant-harmonious-formatting/1484?u=bunchofcrooks

1 Like

You guys need to in more simple ways because I am only 11.

I just when to go ask my dad what a html was.

Does your code have a

enemy=findNearestEnemy() 

at the beginning?

1 Like
# 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)



# Use "if" to attack a "thrower".
  if enemy.type is "thrower":
      self.attack(enemy)

# If it's an "ogre", run away to the village 
if enemy.type is "ogre":
    self.moveXY(41, 37)

does that awnser your question

Nice formating! You need to add something to your code to find the nearest enemy, and name whomever that is enemy…

2 Likes

have you played the level I’m on

Yup… if you are still stuck, you might want to review some earlier levels… let me take a look for a good one. We try to get folks to figure it out on their own rather than giving it to them on here… one min.

2 Likes

Replaying the level called “Master of Names” in the dungeon area will refresh your memory. Let me know how it comes out!

2 Likes

I replayed it and for my code I got this

enemy = self.findNearestEnemy()

    

if "type burl":
    self.say("I'm not attacking that Burl!")

if "type munchkin":
      self.attack(enemy)

if "type thrower":
      self.attack(enemy)

if "type ogre":
    self.moveXY(41, 37)

It still doesn’t work and now I ambored cause it is no fun when you try a level for three days and still can’t get it

Your earlier code has enemy.type in it… I think you need it here.

2 Likes

You have just put one good code and remove the other one , please focus more , and it’s a good age to start programming , good luck

the game said that it didn’t like the enemy. type but it likes the new one. But the new one keeps attacking the burls and I don’t know why. =(

don’t know why i couldn’t find that lvl in the map Oo can you post the link of the lvl please
Edit found it