1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-07 17:44:22 +03:00
inform7/resources/Documentation/Examples/MingVase.txt
2023-07-24 11:56:58 +01:00

34 lines
1.5 KiB
Plaintext

Example: * Ming Vase
Location: The noun and the second noun
RecipeLocation: Glass and Other Damage-Prone Substances
Index: ATTACK and DROP break fragile things
Description: ATTACK or DROP break and remove fragile items from play.
For: Z-Machine
In emulation of a certain annoying aspect of the original Adventure, in which there is a Ming vase that cannot safely be dropped:
{*}"Ming Vase"
A thing can be strong or fragile. A thing is usually strong.
Instead of attacking or dropping a fragile thing:
now the noun is nowhere;
say "[The noun] breaks into thousands of pieces!"
The Cave is a room. The Ming vase is carried by the player. The vase is fragile.
We could also implement an additional refinement from Adventure, that a fragile thing is safe if dropped when there is a cushion nearby.
{**}The pillow is a portable supporter. It is carried by the player.
Instead of dropping a fragile thing when the pillow is in the location: try putting the noun on the pillow instead.
After putting a fragile thing on the pillow:
say "You set [the noun] down gently on the pillow."
Test me with "drop pillow / drop vase / get vase / get pillow / drop vase".
In this rule, the pillow is the second noun; if we had a general rule about setting fragile things on soft things, we could say "You set [the noun] down gently on [the second noun]." for the same effect.
If we wanted to be more refined, we would provide extra code so that breaking a container or a supporter would leave behind their contents. We will see how to do that later.