Section - The Latches
A latch is a kind of thing. A latch can be open or closed. A latch is usually closed. The bronze latch is a latch. The bronze latch is part of the granite door. The copper latch is a latch. The copper latch is part of the granite door. The steel latch is a latch. The steel latch is part of the granite door. The description of a latch is "This latch is designed so that merely pushing it will open it, and pushing it again in the same way will close it again. It is currently [if open]open[otherwise]closed[end if]."
[code to let the player examine all the latches at once but not do anything else with them as a collective. Introducing a dummy object is more convenient here than allowing "latches" to refer to the plural of the latches, because it makes it easier to convert it into a ghost action.]
The scenery-latches are scenery in the Reliquary. The scenery-latches are plural-named. The printed name of the scenery-latches is "latches". Understand "latches" as the scenery-latches.
Instead of examining the scenery-latches:
repeat with item running through latches:
say "[item]: [description of the item]."
Instead of doing something when the current action involves the scenery-latches: say "You must specify a single latch."
Instead of an actor opening the granite door when a latch is closed: if the person asked is the player, say "The granite door won't open when [the list of closed latches] [if more than one latch is closed]are[otherwise]is[end if] closed."
Before an actor opening, closing, switching on, rubbing, touching, pulling, turning, or switching off a latch: try the actor pushing the noun instead.
Carry out an actor pushing a latch:
if the noun is closed:
now the noun is open;
otherwise:
now the noun is closed.
After pushing a closed latch:
say "You push [the noun] closed."
After pushing an open latch:
say "You push [the noun] open."
After pushing an open latch when the granite door is open:
say "You push [the noun], which spins in place on the open door."
After the ghost pushing a closed latch:
if the ghost is visible, say "The ghost pushes [the noun] closed."
After the ghost pushing an open latch:
if the ghost is visible, say "The ghost pushes [the noun] open."
After the ghost pushing an open latch when the granite door is open:
if the ghost is visible, say "The ghost pushes [the noun], which spins in place on the open door."