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

34 lines
1.7 KiB
Plaintext

Example: * Masochism Deli
Location: Does the player mean...
RecipeLocation: Heat
Index: Disambiguating based on properties
Description: Multiple potatoes, with rules to make the player drop the hot potato first and pick it up last.
For: Z-Machine
Here the player has several potatoes; we would like to make them more likely to drop the hot one, and more likely to pick up the cold one, all else being equal. At the same time, we want to phrase our rules so that they don't make the player try to take something they're already holding, or drop something they're not.
So:
{*}"Masochism Deli"
The Masochism Deli is a room. "Recent restructurings of corporate policy restrict the 'lunch hour' to exactly thirty-two minutes, which means that no one has time to go out. Instead, you and your coworkers eat here, in the company's very own themed lunch room."
The plural of potato is potatoes. A potato is a kind of thing. A potato is edible.
Temperature is a kind of value. The temperatures are hot and cold. A potato has a temperature. A potato is usually cold.
Understand the temperature property as describing a potato. Before printing the name of a potato (called subject): say "[temperature of subject] ". Before printing the plural name of a potato (called subject): say "[temperature of subject] ".
Does the player mean dropping a hot potato which is carried by the player: it is very likely.
Does the player mean taking a cold potato which is not carried by the player: it is very likely.
The player carries three potatoes.
After dropping a hot potato:
say "The guy from Cube B sneers at your lack of potato-holding stamina."
When play begins: now a random potato is hot.
Test me with "inventory / drop potato / g / g / get potato / g / i / get potato".