"Sweeney"
A subject is a kind of thing. Some subjects are defined by the Table of Conversation Subjects.
Table of Conversation Subjects
subject
|
conversation
|
pies
|
Table of Pie Queries
|
employment
|
Table of Job Queries
|
Understand "job" as employment. Understand "meat" or "food" as pies.
Table of Job Queries
quip
|
discussion
|
label
|
subtopics
|
"whether there is a job available here"
|
"'Say, are you hiring?' you ask, as casually as you can manage. [The interlocutor] looks you over dubiously. 'I might be hiring someone, but I can't say it would necessarily be you.'"
|
0
|
--
|
"what happened to that boy that worked here"
|
"'Tell me, didn't you used to have a young assistant working here?' She shrugs. 'Young men these days are so unstable. He left-- who knows where he's gone? I haven't seen hair or fingernail of him for weeks.'"
|
0
|
--
|
with 3 blank rows.
|
Table of Pie Queries
quip
|
discussion
|
label
|
subtopics
|
"what pie fillings are available"
|
"'What pies do you have in today, Mrs Lovett?' you ask. She starts, then smiles. 'Meat pies, of course.'"
|
0
|
Table of Pie Flavor Queries
|
with 3 blank rows.
|
Table of Pie Flavor Queries
quip
|
discussion
|
label
|
subtopics
|
"what kind of meat"
|
"'What kind of meat goes into these pies, Mrs Lovett?' you ask pressingly. She looks shifty. 'Whatever the butcher brings this week,' she says. 'With the price of meat what it is, when you get it, you have to be glad of what you can get. If you get it.'"
|
0
|
--
|
To copy (first table - a table name) to (second table - a table name):
repeat through first table:
let copied quip be "blank";
if there is a quip entry, now the copied quip is the quip entry;
let copied discussion be "blank";
if there is a discussion entry, now the copied discussion is the discussion entry;
let copied subtopics be second table;
if there is a subtopics entry, now the copied subtopics are the subtopics entry;
choose a blank row in the second table;
if copied quip is not "blank", now quip entry is copied quip;
if copied discussion is not "blank", now discussion entry is copied discussion;
if copied subtopics is not second table, now subtopics entry is copied subtopics.
Current conversation table is a table name that varies. Current conversation table is Table of Job Queries.
Interlocutor is a person that varies.
Understand "ask [someone] about [any subject]" as asking it about the subject.
Asking it about the subject is an action applying to two visible things.
Carry out asking it about the subject:
say "You can't think of anything to say."
Instead of asking someone about the subject a subject listed in the Table of Conversation Subjects:
now interlocutor is noun;
now current conversation table is the conversation of the second noun;
if the number of filled rows in the current conversation table is 1:
repeat through current conversation table:
now label entry is 1;
now number understood is 1;
try selecting 1 instead;
if the number of filled rows in the current conversation table is 0:
say "You can think of nothing further to say on that topic.";
stop the action;
otherwise:
let index be 0;
let total be the number of filled rows in the current conversation table;
say "Do you mean ";
repeat through current conversation table:
now index is index + 1;
now label entry is index;
say "([index]) [quip entry]";
if index is total, say "?";
if index is total - 1, say ", or ";
if index is less than total - 1, say ", ".
Understand "[number]" as selecting.
Selecting is an action applying to one number.
Carry out selecting:
say "No such option is available."
Instead of selecting a label listed in the current conversation table:
say "[discussion entry][paragraph break]";
if there is a subtopics entry:
copy subtopics entry to current conversation table;
choose row with label of number understood in the current conversation table;
blank out the whole row.
Mrs Lovett's Meat Pies is a room. Mrs Lovett is a woman in Meat Pies.
Test me with "ask lovett about pies / ask lovett about employment / 1 / 2 / ask lovett about pies".
Suppose we have a whole catalog-full of equipment that the player might want to purchase and use. We'll start by defining our purchasing rules:
"Introduction to Juggling"
We allow things to have prices, and the player's price to indicate how much money the player has:
Section 1 - Mail-ordering defined
Price is a kind of value. $100.99 specifies a price.
The player has a price. The price of the player is $60.00.
Because we're allowing the player to order things that he can't currently see, we need to borrow a special kind of grammar from the Understanding chapter. All our orderable items in this example are toys, so "any toy" means any object of the toy kind, whether or not it is in view at the moment:
Understand "buy [any toy]" as ordering. Understand the command "order" as something new. Understand the command "order" as "buy".
Ordering is an action applying to one visible thing.
Check ordering:
if the cost of the noun is greater than the price of the player, say "You only have [price of the player], while [the noun] would cost [cost of the noun]." instead.
Carry out ordering:
move the noun to the player;
decrease the price of the player by the cost of the noun.
Report ordering:
say "You order [a noun], which is delivered instantly."
We should also handle the situation where the player orders another of something he has already bought and which is right in front of him:
Instead of buying something:
say "You already have [a noun]."
So much for the general rules for this scenario. Now we move on to particulars: the actual items the player is allowed to order. Each item will have a description, a price, and a difficulty representing how skilled the player must be in order to make use of that item.
Since we are going to use price and difficulty in the table that defines our juggling equipment, we need to mention these kinds of value before the line that says how toys are defined.
Section 2 - The Scenario
Difficulty is a kind of value. The difficulties are easy, moderate, hard. The player has a difficulty. The difficulty of the player is easy.
The plural of toy is toys. A toy is a kind of thing. Some toys are defined by the Table of Juggling Equipment.
Table of Juggling Equipment
toy
|
cost
|
restriction
|
description
|
difficulty
|
outcome
|
an economy bounce ball set
|
$10.00
|
"comes in set of three"
|
"A fairly ordinary rubber ball, solid color."
|
moderate
|
"You create of the balls a cascade of moving color."
|
an acrylic contact ball
|
$14.00
|
"should be bought with ball polish"
|
"A large clear ball, not for throwing but for using in various hand tricks."
|
hard
|
"You rotate the ball between your fingers and pass it over the backs of your hands."
|
a UV-reactive contact ball
|
$55.00
|
"appears to glow in dark rooms"
|
"Similar to the ordinary acrylic contact ball, but UV-reactive."
|
hard
|
"The ball glows as it passes between your fingers and over the backs of your hands, rolls up to your wrist, snaps through the air-- all apparently of its own accord."
|
a ball polish set
|
$10.00
|
"useful only with acrylic contact balls"
|
"Three bottles of polish and a rag for keeping acrylic contact balls scratch-free."
|
hard
|
"You juggle the polish bottles with difficulty, since they are full of sloshing liquid."
|
a teaching beanbag set
|
$8.00
|
"set of three"
|
"Soft, easily-juggled bag."
|
easy
|
"You juggle the beanbags with basic competence."
|
a stage ball set
|
$13.50
|
"comes in set of three"
|
"Not much different in appearance from the economy bounce ball, but larger so as to be visible from a stage."
|
moderate
|
"You create of the balls a cascade of moving color, visible from quite a distance."
|
a fireball set
|
$33.00
|
"will not be sold to minors"
|
"A ball has wicking and a fuel-source inside so that it will burn while being juggled."
|
hard
|
"You juggle the fireballs rapidly, careful never to hold any of them a moment longer than necessary."
|
Notice that we are allowed to define "description" and other already-known properties in the table as well.
Backstage is a room. "A muffled black room with felt on the floors and walls. A glowing sign over the stage door says SHOW IN PROGRESS."
The Juggling Equipment Catalog is a thing in Backstage.
Instead of examining the Catalog:
say "You read through the offerings, including: [paragraph break]";
repeat through Table of Juggling Equipment:
say "[bold type][toy entry][roman type]: [description entry] [cost entry], [restriction entry]. [paragraph break]".
When play begins:
now right hand status line is "Budget: [price of the player]";
now left hand status line is "[location], feeling [if the difficulty of player is easy]incompetent[end if][if the difficulty of player is moderate]moderately skilled[end if][if the difficulty of player is hard]highly skilled[end if]".
And of course this will be no fun unless the player is allowed to use the equipment:
Understand "juggle [something]" as juggling.
Juggling is an action applying to one thing.
Check juggling:
if the noun is not a toy listed in the Table of Juggling Equipment, say "You can't juggle [a noun]!" instead;
if the difficulty of the noun is greater than the difficulty of the player, say "You're not quite ready to juggle something like [the noun]. Better to start with an easier toy." instead.
Carry out juggling:
if a random chance of 1 in 3 succeeds:
if the difficulty of the player is less than hard and the difficulty of the player is the difficulty of the noun:
now the difficulty of the player is the difficulty after the difficulty of the player.
Report juggling:
say "[outcome of the noun][paragraph break]".
Instead of burning the fireball set:
say "It will flame by itself when you use it."
Test me with "read catalog / buy economy / buy beanbag / juggle economy / juggle beanbag / juggle beanbag / juggle beanbag / juggle beanbag / juggle beanbag / juggle beanbag / juggle economy / juggle economy / juggle economy / buy fireball set / juggle fireball".