1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-17 14:34:25 +03:00
inform7/resources/Documentation/Examples/GetMeToTheChurchOnTime.txt

45 lines
3.3 KiB
Plaintext
Raw Normal View History

Example: *** Get Me to the Church on Time
Location: Plural assertions
RecipeLocation: Clothing
Index: Clothing kinds
Description: Using kinds of clothing to prevent the player from wearing several pairs of trousers at the same time.
For: Z-Machine
2019-02-05 02:44:07 +02:00
Inform's default handling of wearable things does not make any rules about what can be worn together. Suppose, however, we have a game in which there are a large number of different garments, and we want to keep the player from wearing (say) more than one pair of pants at once:
{*}"Get Me to the Church on Time"
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
A pair of pants and a shirt are kinds of thing. A pair of pants and a shirt are usually wearable.
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
Some golf pants are a pair of pants. The description is "Checked in red and green, with tiny frolicking gophers every few inches."
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
Some tuxedo trousers are a pair of pants. The description is "Black, pressed, and slimming."
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
The frilly shirt is a shirt. The description of the frilly shirt is "She insisted."
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
The polo shirt is a shirt. The description is "Turquoise and bright yellow, the colors selected by your golfing buddies."
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
The player wears the golf pants and the polo shirt. The player carries the tuxedo trousers and the frilly shirt.
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
The Wedding Chapel Dressing Room is a room. "The bride's dressing room is a lavish suite with closets, hangers, dressmaker's dummies, boxes of straight pins and sewing notions, combs, lotions, brushes, and hair fixatives, plus room for fifteen female attendants and a photographer. Before they shoved you out of the room you even got a glimpse of a small reference library including '1001 French Braids' and 'Corset-Lacing For Beginners.'
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
This is the groom's dressing room. You get a framed photograph of Elvis, a dusty mirror, and the floor space of an average toilet stall."
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
The dusty mirror and the photograph of Elvis are scenery in the Dressing Room. The description of the mirror is "You can't really get more than a silhouette impression of yourself." The description of Elvis is "He reminds you that you'd better get out there before the organist switches to Hound Dog."
2019-02-05 02:44:07 +02:00
And now the rule itself, borrowed from a later chapter:
{**}Instead of wearing a pair of pants when the player is wearing a pair of pants (called the wrong trousers):
say "You'll have to take off [the wrong trousers] first."
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
Instead of wearing a shirt when the player is wearing a shirt (called the wrong top):
say "You'll have to take off [the wrong top] first."
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
When play begins:
say "From the other side of the door, you hear the organist move on from his instrumental interpretation of 'I Wanna Hold Your Hand' to a somewhat more spirited rendition of 'Help! I Need Somebody!'. Okay, okay, but you've been rushing things along since the 16th fairway, and you can't be more than a half-hour late... Surely that mother of hers can't blame you for that?"
2024-03-19 23:14:26 +02:00
2019-02-05 02:44:07 +02:00
Test me with "i / x trousers / wear trousers / x golf pants / take off golf pants / wear trousers / x frilly shirt / x polo shirt / wear frilly shirt / doff polo shirt / wear frilly shirt".
2024-03-19 23:14:26 +02:00
If we wanted to, we could make similar kinds for hats, shoes, and so on, and have a simple but effective system of clothing. A more complicated treatment might keep track of layering and describe the player's outfit differently depending on which clothes were outermost an example for a later chapter ([What Not to Wear]).