Deadly Dungeon Rescue Help?!

Hero stops doing annything after

self.attack("Treasure Chest 1")

Treasure Chest 2 will not being attacked in example case

1 Like

You just need to move to the position of the chest.

2 Likes

if you have enough health you can blow up the dungeon doors

if not then just try and finish the level

[…deleted…]

MERGED DOUBLEPOST

this is not the full code by the way il update it later

1 Like

I don’t even know where to start…

  1. Don’t post untested/non-working code. Seriously, that usually helps no one, and last time I did it I had 2 serious and 6 minor bugs in it.
  2. Don’t post your code unformatted. Just put three back-ticks (```) before and after it. The FAQ tells you how to do this!
  3. Don’t post complete level solutions. We’re all happy that you beat the level, and we’re even more happy if you help other people, but if a new player sees a complete solution, he will most likely just copy it without understanding the code, thus failing later levels because the player did not understand the concept.

Despite from that, nice creative usage of the hammer. How do you get rid of the thrower guarding the peasant? And did you try to blow up the other guards instead of fencing them in?

1 Like

Hello all first time in here.
"python"
i was trying to complete this level using flags but to even begin, my character will not even move any suggestions?

enemy = self.findNearestEnemy()
flag = self.findFlag()
loop:
    if flag:
        if flag.color is "green":
            self.pickUpFlag(flag)
    else:
        if flag:
            if flag.color is "black":
                self.attack(enemy),
                self.pickUpFlag(flag)

maybe im obsessing about writing shorter code or maybe i have no idea what im doing of course this is “INCOMPLETE CODE” in theory this should work…

1 Like

Hello, Black, and welcome.

Put your variables inside your loop. Since they are defined at the start of the level, flag is nonexistent, and enemy will stay as your nearest enemy at the start.

2 Likes

thanks for the reply this helped i got him moving, now i can try to make the rest happen
p.s., i also learned why some of my other short cuts where not working because i was sticking some above the loop.

1 Like

Hi. I’m having a similar issue as below.

I am using Python and, as you’ll see in my code, I tried switching the shoes just to see if that caused anything.

# Bust down north door
#self.moveUp(5)
self.moveXY(6, 124)

door = "North Vault Door"
self.attack(door)
self.attack(door)

# Bust chests
chest = "Treasure Chest 3"
#self.moveDown()
self.moveXY(46, 102)
self.attack(chest)

chest = "Treasure Chest"
#self.moveRight()
self.moveXY(59, 102)
self.attack(chest)

#self.moveLeft()
self.moveXY(59, 102)
#self.moveDown()
self.moveXY(48, 102)

After breaking the first chest (Chest 3) my character will no longer move. If I comment out the line for attacking the chest, then the character will move to attack the other chest. Then, stuck again.

If I comment out both attacking lines, the character will keep moving. It just seems that after attacking a chest, the character freezes.

I didn’t realize I had the flags available here, so I will try that now. I thought I’d share this though.

Update: Oh, I see. I missed what was said earlier about chests not being actual objects. Walk through/to them to collect, just like coins. Nevermind me then. :laughing:

1 Like

Do you have flags? If not I suggest you pass some levels and get to the level Cornucopia so that you will be able to control you hero.

1 Like

I have a question.
Are you supposed to destroy the thing torturing the peasant?

1 Like

You need to kill the jailer to rescue the prisoner. It does not count as a guard killed failure.

1 Like

Oh thanks, I will now repair my code to fit that.

1 Like

This…this is such a late reply , i was just looking around here, i am pretty sure i either outran the thrower or just managed to kill them somehow, i honestly forgot

1 Like

Please note that you’re replying to someone who hasn’t posted on this board for over two years.

1 Like

heh…i know…its just something that bugged me as soon as i saw it

1 Like