[size=85][code]Understand “look [direction]” as facing.
Facing is an action applying to one visible thing.
Carry out facing:
let the viewed item be the room noun from the location;
if the viewed item is not a room, say “You can’t see anything promising that way.” instead;
try looking toward the viewed item.
Understand “look toward [any adjacent room]” as looking toward. Understand “examine [any adjacent room]” and “look at [any adjacent room]” as looking toward.
Looking toward is an action applying to one visible thing.
Carry out looking toward:
let heading be the best route from the location to the noun, using even locked doors;
say “[The noun] is to the [heading].”;
After examining yourself:
if the player is wearing anything:
say “You’re wearing [the list of things worn by the player].”;
Definition: a direction (called thataway) is viable if the room thataway from the location is a room.
Instead of going nowhere:
let count of exits be the number of viable directions;
if the count of exits is 0, say “You appear to be trapped in here.”;
if the count of exits is 1, say “From here, the only way out is [list of viable directions].”;
otherwise say “From here, you can go [list of viable directions].”;
Table of Fancy Status
left central right
" [locationtext in title case]" “” “score: [score]”
" [goingplaces]" “” “”
to say goingplaces:
let count of exits be the number of viable directions;
if the count of exits is 0, say “You appear to be trapped in here.”;
if the count of exits is 1, say “From here, the only way out is [list of viable directions].”;
otherwise say “From here, you can go [list of viable directions].”;
locationtext is text that varies.
Rule for constructing the status line:
now locationtext is “[location]”;
fill status bar with Table of Fancy Status;
rule succeeds.
A thing can be examined or unexamined.
After taking something unexamined:
say “You take [the noun]. [run paragraph on]”;
try examining the noun.
Carry out examining something:
now the noun is examined.
Taking inventory is acting confused. Looking is acting confused. Examining an examined thing is acting confused.
After acting confused for the sixth turn:
say “(If you are feeling lost, you could try the HELP command.)”;
Understand “help” as a mistake (“You’re doing fine! Just keep at what you’re doing now.”).
understand “look behind [something]” and “look under [something]” as searching.
Before searching something:
say “You thoroughly inspect [the noun] … [run paragraph on]”;
if the noun is a container:
if the noun is closed:
try silently opening the noun;
if the noun is open:
say “of course you start by opening [the noun]. [run paragraph on]”;
otherwise:
stop the action;[/code][/size]Okay this is the stuff that works. I have no idea how to do the things in the top post aside from starting with “after looking:”
suggestions are welcome