mirror of
https://github.com/ganelson/inform.git
synced 2024-07-08 01:54:21 +03:00
27 lines
1.3 KiB
Plaintext
27 lines
1.3 KiB
Plaintext
Example: * Celadon
|
||
Location: To carry, to wear, to have
|
||
RecipeLocation: Taking, Dropping, Inserting and Putting
|
||
Index: DROP applies even to objects the player carries indirectly
|
||
Description: Using the enclosure relation to let the player drop things which they only indirectly carry.
|
||
For: Z-Machine
|
||
|
||
By default, Inform only lets the player drop those things which they are carrying – that is, those directly in their possession. Things inside satchels or on portable trays have to be taken first.
|
||
|
||
If we want to change this behaviour, 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".
|
||
|