mirror of
https://github.com/ganelson/inform.git
synced 2024-07-08 01:54:21 +03:00
47 lines
2.5 KiB
Plaintext
47 lines
2.5 KiB
Plaintext
Example: * Police State
|
||
Location: Persuasion
|
||
RecipeLocation: Reactive Characters
|
||
Index: Disorderly conduct
|
||
Description: Several friends who obey you; a policeman who doesn't (but who takes a dim view of certain kinds of antics).
|
||
For: Z-Machine
|
||
|
||
{*}"Police State"
|
||
|
||
Seventh Avenue is a room. "The bars are all closed now, and there aren't any good clubs to go to, so you're on your own for open-air entertainment."
|
||
|
||
Persuasion rule for asking the policeman to try doing something: persuasion fails.
|
||
|
||
Persuasion rule for asking someone to try doing something: persuasion succeeds.
|
||
|
||
Note that the policeman will never get to the second persuasion rule, so he will always refuse to do the player's nefarious bidding.
|
||
|
||
{**}Charles, Thomas, and Larry are men in Seventh Avenue. Patricia is a woman in Seventh Avenue.
|
||
|
||
And here's an unnecessary aesthetic touch from a later chapter, which will round up the descriptions of your friends into a single paragraph:
|
||
|
||
{**}Rule for writing a paragraph about someone who is not the policeman:
|
||
let X be the number of visible people who are not the policeman;
|
||
say "It's just [X in words] of you now: [a list of visible people who are not the policeman]. But it sure has been a rip-roaring evening."
|
||
|
||
The policeman is a man in Seventh Avenue. "A policeman with a very guarded expression is watching you."
|
||
|
||
Singing is an action applying to nothing. Understand "sing" as singing.
|
||
|
||
Report singing:
|
||
say "A little the worse for wear, you sing."
|
||
|
||
Smelling a person is disorderly conduct. Tasting a person is disorderly conduct. Jumping is disorderly conduct. Singing is disorderly conduct.
|
||
|
||
Instead of someone trying disorderly conduct in the presence of the policeman:
|
||
say "The policeman arrests [the person asked]!";
|
||
now the person asked is nowhere;
|
||
the rule succeeds.
|
||
|
||
Instead of disorderly conduct in the presence of the policeman:
|
||
end the story saying "The policeman arrests you!"
|
||
|
||
Test me with "charles, look / charles, jump / look / policeman, sing / thomas, taste policeman / patricia, sing / look / jump".
|
||
|
||
Notice the difference between the two rules about disorderly conduct: the one for other people says 'the rule succeeds' to make sure that the action is counted as a success and not (as normally happens with instead rules) a failure. Most of the time we don't care whether actions are judged successes or failures, but it matters here, because if we type ``CHARLES, JUMP`` and the result fails, then text such as 'Charles is unable to.' will be printed–which would get in the way. So we declare the action a success.
|
||
|