A prototype of an extension (with an example) which extends Underside by Eric Eve to allow actors to hide under objects.
Enterable Underside by Eric Conrad begins here.
"Extends Eric Eve's Underside extension by providing a means for hiding the player or a non-player character underneath an object in play. (Requires version 6 of Underside by Eric Eve, which is included here."
"thanks to Gavin Lambert for a number of suggestions"
Include Underside by Eric Eve.
Part 1 - The Underside Kind
The room description heading rule response (B) is " ([if the player is under the intermediate level]under[otherwise]on[end if] [the intermediate level])"
Part 2 - Looking Under
The clever looking under rule response (A) is "Under [the noun] [is-are a list of locale-supportable things in the underpart]."
Part 3 - The Hiding Under Action
Chapter 3a - Action definition
Hiding under is an action applying to one visible thing.
The specification of the hiding under action is "This is the action which allows a player or other character to enter the underside of something.".
Understand "hide under [something]" as hiding under. Understand "hide underneath [something]" as hiding under.
The hiding under action has an object called the ud-side.
Setting action variables for hiding under something:
Now the ud-side is a random underside that is part of the noun.
Chapter 3b - Before Rules and Preconditions
Before an actor hiding under something (this is the before hiding under rule):
if the ud-side is nothing, say "[We] [can't] put anything under [the second noun]." (A) instead;
if the actor is in the ud-side, say "[The actor] [are] already under [the noun]." (B) instead.
Chapter 3c - Check Rules
Check an actor hiding under something (this is the bulk capacity check for hiding under rule):
if ud-side is an underside and ud-side provides the property bulk capacity:
if the bulk of the actor > the bulk capacity of ud-side, say "[The actor] [are] too big to fit under [the noun]." (A) instead;
if the bulk of the actor > the free capacity of ud-side, say "[There] [are not] enough room left under [the noun]." (B) instead.
Check an actor hiding under something (this is the enterability check for hiding under rule):
if ud-side is not enterable, say "It is not possible to hide under [the noun]." (A) instead.
Chapter 3d - Carry Out Rules
Carry out an actor hiding under something (this is the usual hiding under rule):
move the actor to the ud-side;
now the ud-side is open.
Chapter 3e - Report Rules
Report an actor hiding under something (this is the usual report hiding under rule):
say "Done." (A).
Part 4 - Addenda
[ There are certainly other things that need to be checked. ]
Part 5 - Conclusion
Enterable Underside ends here.
---- DOCUMENTATION ----
Chapter: Enterable Underside
Section: The Basics
The Enterable Underside extension allows the player or non-player characters to hide underneath things which incorporate an underside. This extension requires Eric Eve's Underside extension, version 6 or later.
To use the Enterable Underside extension, we need an object which has an enterable underside. By default, an underside is dark -- if there is an ambient light source it should be declared transparent We might define:
The bed is an enterable supporter.
The under#bed is an underside. It is part of the bed. It is enterable and transparent.
To get under the bed, we use the command HIDE UNDER BED.
Example: * The Sweet Life - The husband comes home at an awkward moment.
*: "The Sweet Life"
Include Enterable Underside by Eric Conrad.
The bedroom is a room.
The bed is an enterable supporter. It is in the bedroom. The player is on the bed. Angelina is a woman on the bed.
[ Enterable allows the player to enter. Transparent is needed so the player can see. ]
The under#bed is an underside. It is part of the bed. It is enterable and transparent.
The shoebox is a container. It is in the under#bed. Roberto is a man. He is in the under#bed.
After looking under the bed:
say "'Angelina? How could you -- with Roberto?'".
[ Two normal people can just fit under the bed provided there is nothing else there. ]
The bulk of a person is usually 5.
When play begins:
now the story viewpoint is first person singular;
say "[italic type](Dedicated to those dubbed Italian comedies from the early 1970s)[roman type][paragraph break]The door to the apartment slams shut. From the hallway, the voice calls out 'Mi amore, I'm home.' Panic-stricken, Angelina looks at me and whispers 'It's Giovanni. Quickly, you must hide!' Giovanni's steps grow softer as he walks toward the kitchen. She breathes a sigh of relief as we hear the refrigerator open. 'Now hide.' She points down, under the bed.".
Arrival is a scene. Arrival begins when the player is in the under#bed.
When arrival begins:
say "As Giovanni enters the bedroom, he says, 'Mia cara! It's so fine to be home.' Angelina answers, 'O Giovanni, I missed you so. Please buy some wine to celebrate!'[paragraph break]As her husband leaves for the store, she says, 'Both of you, out!'";
try Roberto exiting.
Test me with "exit / look under bed / hide under bed / take shoebox / hide under bed / exit".