I haven’t heard anyone else talk about this, but there seems to be a design error in Cursed Wonderglade. Even when the code is correct, the player has a random chance of dying anyway. If the hero is closer to the burl than the archer at the end, the hero will die because it checks for the closest enemy. For whatever reason, after copy-pasting my code a couple times, it fixed the issue. There were no changes to the code.
My code is as follows
# Wonderglade has changed since our last visit.
# Ogres cursed it and we should defeat them.
# The burl still is collecting gems, so don't touch them.
# Also don't attack the burl.
while True:
# Find the nearest item.
# Collect it (if it exists) only if its type isn't "gem".
item = hero.findNearestItem()
if item and item.type != "gem":
hero.moveXY(item.pos.x, item.pos.y)
# Find the nearest enemy.
enemy = hero.findNearestEnemy()
if enemy and enemy.type != "burl":
hero.attack(enemy)
pass