1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-08 18:14:21 +03:00
inform7/resources/Documentation/Examples/Larva.txt
2019-03-16 13:12:11 +00:00

27 lines
1.2 KiB
Plaintext

* Making new substitutions
(Substituting insults and boasts; Fifty Ways to Leave Your Larva)
Using text substitution to make characters reply differently under the same circumstances.
We can use these substitutions to put together fairly complicated variations within a single piece of text:
{*}"Fifty Ways to Leave Your Larva"
The Beekeeper's Palace is a room. Wasp is a woman in the palace. Drone is a man in the palace.
Instead of kissing someone:
say "'[denial], [insult]! [boast]!'";
In this context, [denial] is understood to refer to the denial property of the noun -- but we could spell it out with "denial of the noun" if we wanted to.
{**}A person has some text called denial. The denial of a person is usually "Stand back". The denial of Drone is "You forget yourself"
A person has some text called insult. The insult of a person is usually "Grasshopper". The insult of Wasp is "Larva".
A person has some text called boast. The boast of a person is usually "I am ferocious". The boast of Drone is "I have ferocious allies".
And then it would be trivial to insert further rules using these responses:
{**}Instead of attacking someone:
say "'Get away, [insult]!'"
Test me with "kiss wasp / hit wasp / hit drone / kiss drone".