Introduction to Juggling
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:
We allow things to have prices, and the player's price to indicate how much money the player has:
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:
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:
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.
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.
And of course this will be no fun unless the player is allowed to use the equipment:
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".
A muffled black room with felt on the floors and walls. A glowing sign over the stage door says SHOW IN PROGRESS.
You can see a Juggling Equipment Catalog here.
>(Testing.)
>[1] read catalog
You read through the offerings, including:
economy bounce ball set: A fairly ordinary rubber ball, solid color. $10.00, comes in set of three.
acrylic contact ball: A large clear ball, not for throwing but for using in various hand tricks. $14.00, should be bought with ball polish.
UV-reactive contact ball: Similar to the ordinary acrylic contact ball, but UV-reactive. $55.00, appears to glow in dark rooms.
ball polish set: Three bottles of polish and a rag for keeping acrylic contact balls scratch-free. $10.00, useful only with acrylic contact balls.
teaching beanbag set: Soft, easily-juggled bag. $8.00, set of three.
stage ball set: Not much different in appearance from the economy bounce ball, but larger so as to be visible from a stage. $13.50, comes in set of three.
fireball set: A ball has wicking and a fuel-source inside so that it will burn while being juggled. $33.00, will not be sold to minors.
>[2] buy economy
You order an economy bounce ball set, which is delivered instantly.
>[3] buy beanbag
You order a teaching beanbag set, which is delivered instantly.
>[4] juggle economy
You're not quite ready to juggle something like the economy bounce ball set. Better to start with an easier toy.
>[5] juggle beanbag
You juggle the beanbags with basic competence.
>[6] juggle beanbag
You juggle the beanbags with basic competence.
>[7] juggle beanbag
You juggle the beanbags with basic competence.
>[8] juggle beanbag
You juggle the beanbags with basic competence.
>[9] juggle beanbag
You juggle the beanbags with basic competence.
>[10] juggle beanbag
You juggle the beanbags with basic competence.
>[11] juggle economy
You create of the balls a cascade of moving color.
>[12] juggle economy
You create of the balls a cascade of moving color.
>[13] juggle economy
You create of the balls a cascade of moving color.
>[14] buy fireball set
You order a fireball set, which is delivered instantly.
>[15] juggle fireball
You juggle the fireballs rapidly, careful never to hold any of them a moment longer than necessary.