Help request for possible bug with "Attack Wisely" (Kithgard Dungeon) [Python]

Hi All,

Not sure if it’s just me or if it’s an actual bug, but I’m having trouble with “Attack Wisely” on Kithgard Dungeon using Python.

I’ve tried and replicated the issue twice using both Chrome (slow) and Edge (faster) and each time the same problem occurs.

I’ve whittled down the code to the smallest possible amount to demonstrate the bug; note this is not enough code to demonstrate the whole level, I know that:

# Avoid all the fire-traps
# If you step on a fire-trap, you will get blown up
self.attack("Door A")
enemy = self.findNearestEnemy()

What happens is that the character will move up, attack the door, move up again, attack once, then the code skips over as though it’s not waiting for the previous code to complete. I’ve tried approaching this different ways and each time the result is the same; the code seems to start running rampant and skips over actions.

Is this just me or is anyone else experiencing this issue too?

Thanks in advance!

Played on edge, and I can’t replicated it.

Try to see if:

while > 0:


1 Like

That worked, thank you, although “technically” I haven’t been exposed to yet (but know and understand how it works).

I think the problem comes primarily from the yellow ogres when using lower grade weapons, in this case the “RoughEdge”, the animation isn’t quite keeping up with the code, de-syncing if you will, so where I was putting 3 attacks in, the loop processed 4 or 5 times before the yellow died. Visually it appeared it was only hitting twice and therefore not having an effect, as every other mob except the other yellow worked fine without the loop.

Well there is a decent work around for now.

If you have seen the Code Combat GitHub you can post the bug there with your console log, OS, and browser info to help the devs isolate and fix it.

I am also going to:

@nick bug with the attack method

Thanks Hinkle,

I actually duplicated my post here on there at the time, so it is live.