Inform 7 Home Page / Documentation
§13.4. To carry, to wear, to have
Inform has altogether five mutually exclusive ways in which one thing can be physically joined to another one:
containment relation - The coin is in the purse.
support relation - The coin is on the table.
incorporation relation - The coin is part of the sculpture.
carrying relation - The coin is carried by Peter.
wearing relation - The jacket is worn by Peter.
This is why we cannot have
The coin is on the table.
The coin is part of the table.
simultaneously, and it is a rare exception to the general rule that having one relation does not affect having another.
But there is also a sixth relation used in Inform for these meanings: the possession relation, which is the meaning of the verb "to have". At first sight this looks the same as the carrying relation, but in fact it is a convenient shorthand for "carrying or wearing", provided for conditions rather than assertions:
if Mr Darcy has a wet shirt ...
will be true during play if he is either carrying or wearing the shirt.
Still another relation exists which can be tested, but not declared to be true or false: the concealment relation, which is the meaning of the verb "to conceal". So we can ask:
if Mr Darcy conceals a fob watch ...
|
ExampleCeladon
Using the enclosure relation to let the player drop things which he only indirectly carries.
|
|
By default, Inform only lets the player drop those things which he is carrying -- that is, those directly in his possession. Things inside satchels or on portable trays have to be taken first.
If we want to change this behavior, we might add a dropping rule that distinguishes between carrying and mere enclosure (introduced back in "The location of something" in the chapter on Things):
"Celadon"
The Tea Room is a room. The player carries a black lacquer tray. The lacquer tray is portable. On the lacquer tray are a celadon teapot and a napkin.
Before dropping something:
if the player does not carry the noun and the player encloses the noun:
say "(first taking [the noun] from [the holder of the noun])[command clarification break]";
silently try taking the noun;
if the player does not carry the noun, stop the action.
Instead of taking the napkin:
say "It seems to be stuck to the tray, possibly by an underlying wad of gum."
Test me with "i / drop teapot / i / look / drop teapot / drop napkin / i / drop tray".
|
ExampleInterrogation
A wand which, when waved, reveals the concealed items carried by people the player can see.
|
|
"Interrogation"
The X-Ray Vision Wand is carried by the player.
Instead of waving the X-Ray Vision Wand:
say "Disappointingly, nothing happens."
Instead of waving the X-Ray Vision Wand when the player can see someone who is concealing something:
say "The wand glows green. Immediately you see on the monitor [a list of things which are concealed by people who can be seen by the player]."
After printing the name of a thing (called target) which is carried by someone while waving the wand:
say " (carried by [a random person who carries the target])"
The Interrogation Chamber is a room. "Despite its gothic name, this room is a rather civilized place for your work, with large plate-glass windows and a fitted carpet."
A thing can be secret or obvious. A thing is usually obvious.
Brian is in the Interrogation Chamber."Brian lounges against the wall." Brian carries a quantity of plastic explosive. The explosive is secret.
Janine is in the Interrogation Chamber. "Janine toys nervously with a laptop bag." Janine carries a chocolate biscuit, a laptop bag, and a microfilm. The microfilm is secret. The laptop bag is wearable. In the bag is a laptop computer.
Rule for deciding the concealed possessions of something: if the particular possession is secret, yes; otherwise no.
Instead of examining someone: say "[The noun] is openly carrying [a list of unconcealed things carried by the noun]."
Test me with "wave wand / examine janine / examine brian".