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/Replanting.txt
2023-07-24 11:56:58 +01:00

21 lines
1.2 KiB
Plaintext

Example: * Replanting
Location: Scenery
RecipeLocation: Taking, Dropping, Inserting and Putting
Index: TAKE scenery producing a custom response
Description: Changing the response when the player tries to take something that is scenery.
For: Z-Machine
By default, "TAKE OAK" in the example above will produce the response "That's hardly portable." This is fine under many circumstances, but also a bit generic, so we might want to override it for a specific game.
{*}"Replanting"
The Orchard is a room. "Within this quadrille of pear trees, a single gnarled old oak remains as a memory of centuries past." The gnarled old oak tree is scenery in the Orchard.
Instead of taking some scenery: say "You lack the hulk-like strength."
Test me with "take oak".
Here we've used an "instead" rule; we will learn more about these in the section on actions. This allows us to define our own results for taking an object.
Note: "scenery" is a property of an object (about which we will hear more later). So when we use it in rules, we can talk about "some scenery", "something that is scenery", or even "a scenery thing" -- the last one doesn't sound much like English, but is a more plausible construction with other adjectives.