Robin & Orchid — 52 of 88

Ryan Veeder & Emily Boegheim

Release 4

Section - Secret doors

[This code is stolen from Andrew Owen's extension Secret Doors. The extension no longer works because it's got a silly typo in it (I don't understand how it worked in the first place?), so I've copied and edited the relevant code here.]

A secret door is a kind of door.

A door can be revealed or unrevealed.

A door is revealed.

A secret door is unrevealed.

A secret door is scenery.

A secret door is closed.

To print the you can't go message:

(- L__M(##Go, 2, 0); -).

To print the you can't see message:

(- L__M(##Miscellany, 30, 0); -).

Before going through a secret door which is unrevealed:

print the you can't go message instead.

Before doing something to a secret door which is unrevealed:

if the action requires a touchable noun:

print the you can't see message instead;

otherwise:

say "You aren't aware of any such thing." instead.

Before doing something when the second noun is a secret door and the second noun is unrevealed:

if the action requires a touchable second noun:

print the you can't see message instead;

otherwise:

say "You aren't aware of any such thing." instead.