# replacing %s, %d, etc. with regex wildcards, so the variable messages
# within the dungeon definition will actually match
needle = re.escape(needle) \
+ .replace("\\n", "\n") \
+ .replace("\\t", "\t") \
.replace("\%S", ".*") \
.replace("\%s", ".*") \
.replace("\%d", ".*") \
The grate is locked.
-> yes
-
-Guess again.
-
> blast
There is a loud explosion, and a twenty-foot hole appears in the far
and find yourself in the main office, where a cheering band of
friendly elves carry the conquering adventurer off into the sunset.
-You scored 423 out of a possible 430, using 469 turns.
+You scored 423 out of a possible 430, using 468 turns.
Your score puts you in Master Adventurer Class A.