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/Grilling.txt

27 lines
1.3 KiB
Plaintext

Example: * Grilling
Location: Instead rules
RecipeLocation: Heat
Index: Supporter from which the player cannot take things
Description: A grill, from which the player is not allowed to take anything lest they're burned.
For: Z-Machine
Descriptions of objects can be used in `Instead` rules: we can not only say `Instead of taking the steak`, but also `Instead of taking something` or `Instead of taking something which is on the grill`.
That last rule is useful if, for example, we want to prevent the player from interacting with anything on a specific supporter:
{*}"Grilling"
The Patio is a room. The Patio contains a grill and an ice chest. The ice chest contains a cold beer. On the grill are a steak and a hot dog.
Mom is a woman in the Patio.
Instead of taking something which is on the grill:
say "'Hey, you'll burn yourself,' says Mom."
Test me with "get steak / get all from grill / get all".
We could just as easily adapt this rule to affect a container: `Instead of taking something which is in the ice chest`, for example.
Note also that in older versions of Inform, the pattern ``GET ALL FROM...`` was treated differently from ``GET STEAK``, and had to be accounted for separately. This is no longer the case; this `instead of taking` rule will handle all the phrasings which the player might use to try to acquire this object.