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

28 lines
1.3 KiB
Plaintext
Raw Normal View History

Example: * Princess and the Pea
Location: Begin and end
RecipeLocation: Furniture
Index: Finding the bottom of a pile
Description: The player is unable to sleep on a mattress (or stack of mattresses) because the bottom one has something uncomfortable under it.
For: Z-Machine
2019-02-05 02:44:07 +02:00
The main point here is that we need to figure out where the stack meets the floor:
{*}"Princess and the Pea"
The Topmost Turret is a room. A mattress is a kind of supporter. A mattress is always enterable. A mattress is portable.
2019-02-05 02:44:07 +02:00
A large mattress is a mattress in the Turret. A medium mattress is a mattress in the Turret. A small mattress is a mattress in the Turret.
Instead of sleeping when the player is on a mattress (called the bed):
let the item be the bed;
while the holder of the item is not a room:
let the item be the holder of the item;
say "You can still feel something very uncomfortable under [the item]."
2019-02-05 02:44:07 +02:00
Instead of sleeping:
say "You can't sleep standing up!"
2019-02-05 02:44:07 +02:00
Instead of looking under a mattress, say "You scout around, but are unable to determine what's causing you this discomfort. If only your maid Winnie were here. She's very good at this."
Test me with "sleep / enter small / sleep / get up / get small / put small on medium / get on small / sleep / get up / g / get medium / put medium on large / get on small / look / sleep".