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

25 lines
982 B
Plaintext

Example: * Candy
Location: Random choices of things
RecipeLocation: Food
Index: Assigning attributes randomly at the start of play
Description: One of several identical candies chosen at the start of play to be poisonous.
For: Z-Machine
Suppose we want to give the player a bag of candies, of which a random one is poisonous. We can pick which one should be poisoned at the start of play, like this:
{*}"Candy"
The plural of piece of candy is pieces of candy. A piece of candy is a kind of thing. A piece of candy is always edible. Four pieces of candy are in the Halloween bag.
Toxicity is a kind of value. The toxicities are safe and poisonous. A piece of candy has a toxicity. A piece of candy is usually safe.
The Porch is a room. The player carries the Halloween bag.
After eating a poisonous piece of candy:
say "Oh, that didn't taste right at all. Oh well!"
When play begins:
now a random piece of candy is poisonous.
Test me with "eat candy / g / g / g".