1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-08 01:54:21 +03:00
inform7/resources/Documentation/Examples/Celadon.txt
2024-03-19 21:14:26 +00:00

27 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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".