1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-16 14:04:24 +03:00
inform7/resources/Documentation/Examples/TryingTakingManhattan.txt

33 lines
1.6 KiB
Plaintext
Raw Normal View History

Example: *** Trying Taking Manhattan
Location: Making actions work for other people
RecipeLocation: Inventory
Index: INVENTORY revised for other characters
Description: Replacing the inventory reporting rule with another which does something slightly different.
For: Z-Machine
2019-02-05 02:44:07 +02:00
Inform has built-in commands for other people, and sometimes we may want to adjust the way these work without completely disabling and replacing the command. Suppose, for instance, that instead of
2019-02-05 02:44:07 +02:00
Kermit the Frog looks through his possessions.
2023-05-14 08:08:43 +03:00
we'd like someone taking inventory to report what they have, thus:
2019-02-05 02:44:07 +02:00
Kermit the Frog says, "I seem to be carrying a microphone and wearing a hat and a trenchcoat."
To do this, we could replace the built-in report rule with a different one.
{*}"Trying Taking Manhattan"
2019-02-05 02:44:07 +02:00
The loud inventory rule is listed instead of the report other people taking inventory rule in the report taking inventory rules.
This is the loud inventory rule:
unless the player is the person asked:
say "[The person asked] says, 'I seem to be carrying [a list of things carried by the person asked][if the person asked is wearing something] and wearing [a list of things worn by the person asked][end if].'"
Persuasion rule for asking someone to try doing something: persuasion succeeds.
2019-02-05 02:44:07 +02:00
Grand Central Station is a room. "Here you are in New York, New York. Any minute now someone is going to burst into song."
Kermit the Frog is a man in Grand Central Station. "Kermit the Frog stands nearby, enjoying being green." Kermit is wearing a hat and a trenchcoat. He is carrying a microphone.
2023-05-14 08:08:43 +03:00
Test me with "inventory / kermit, inventory".