An interactive fiction by Juhana Leinonen (2008) - the Inform 7 source text
|Chapter Door key
The doorkey is scenery. It is by the door. The description is "You can't see the key from this side of the door and your head is too big to fit through the hole." The printed name is "key".
Understand "key" and "door key" as the doorkey.
Instead of turning the doorkey:
try opening the celldoor.
Instead of taking the doorkey:
say "You try to take the key but you're in awkward position and can't get it out."
Before unlocking the celldoor with the doorkey:
try opening the celldoor;
stop the action.
Procedural rule while unlocking the celldoor with the doorkey:
ignore the take key before unlocking rule. [otherwise it, well, tries to take the key first and fails.]