Robin & Orchid — 13 of 88

Ryan Veeder & Emily Boegheim

Release 4

Section - Entering/Sitting/Standing/Getting In/On/Out Of/Off Things

Posture is a kind of value. The postures are standing and sitting.

A person has a posture. The posture of a person is usually standing.

A container has a posture called the usual posture. The usual posture of a container is usually standing.

A supporter has a posture called the usual posture. The usual posture of a supporter is usually standing.

The entering action has a posture called the chosen posture.

Setting action variables for entering:

if specifically sitting:

now the chosen posture is sitting;

otherwise if specifically standing:

now the chosen posture is standing;

otherwise if the noun is enterable:

now the chosen posture is the usual posture of the noun;

otherwise:

now the chosen posture is standing.

[I'm making these text matches quite specific, in case we implement a sitar or a music stand or something that might give us false matches.]

To decide if specifically sitting:

if the player's command includes "sit in" or the player's command includes "sit on":

decide yes;

decide no.

To decide if specifically standing:

if the player's command includes "stand on" or the player's command includes "step on":

decide yes;

decide no.

Understand "step on/onto/into [something]" as entering.

Check entering (this is the new can't enter what's already entered rule):

if (the actor is on the noun or the actor is in the noun) and the posture of the actor is the chosen posture:

say "You're already [chosen posture] [if the noun is a container]in[otherwise]on[end if] [the noun]." instead.

The new can't enter what's already entered rule is listed instead of the can't enter what's already entered rule in the check entering rules.

Instead of entering something held by the actor:

say "You can't [if the chosen posture is sitting]sit[otherwise]stand[end if] on [the noun] while you're still holding it."

Check entering (this is the new implicitly pass through other barriers rule):

if the holder of the actor is the noun: [this fixes a problem with the postures code]

continue the action;

if the noun is a stepper or the noun is on a stepper: [this bit is for the Towers of OCD code]

continue the action;

abide by the implicitly pass through other barriers rule.

Check entering when the location is not Storage East:

if the noun is on something (called the lower level):

say "It seems a bit dangerous to get on [the noun] while it's on [the lower level]." instead.

The new implicitly pass through other barriers rule is listed instead of the implicitly pass through other barriers rule in the check entering rules.

Carry out entering:

now the posture of the actor is the chosen posture.

Report entering when the posture of the actor is sitting:

say "You sit down [if the noun is a container]in[otherwise]on[end if] [the noun].";

rule succeeds.

Report entering when the posture of the actor is standing:

say "You [if the previous location is the noun]stand up on[otherwise]step up onto[end if] [the noun].";

rule succeeds.

Carry out exiting:

now the posture of the actor is standing.

Carry out getting off:

now the posture of the actor is standing.

Understand "climb on [something]" and "climb up on [something]" and "climb up onto [something]" and "climb onto [something]" as climbing.

Understand "go up [something]" as climbing. [mostly for stairs]

Instead of climbing an enterable thing:

try entering the noun.

Instead of going down when the player is on something or the player is in something:

try exiting.

Before climbing down:

try going down instead.

Instead of going up when the room up from the location is nothing and the posture of the player is sitting:

try exiting.

Exiting is leaving.

Going outside is leaving.

Understand the command "cross" as something new.