Counterfeit Monkey — 49 of 292

Emily Short

Release 6

Section 3 - Facing

Include Facing by Emily Short.

Instead of examining a direction:

try facing the noun.

Rule for distantly describing a proper-named room (called target) (this is the new distant description rule):

say "[You] make out [the target] that way."

The default distant description rule is not listed in any rulebook.

Rule for distantly describing a room (called target):

let N be indexed text;

let N be "[the target]";

say "[You] can make out [N in lower case] that way."

Rule for distantly describing a room (called target) which encloses someone when the location is indoors:

let N be indexed text;

let N be "[the target]";

say "That way [you] can see [unless the target is proper-named][N in lower case][otherwise][the target][end if], in which [is-are a list of people enclosed by the target]."

When play begins:

change nothing-to-see-that-way to "[You] can't see anything interesting in that direction."

Screening relates various backdrops to various directions. The verb to screen (it screens, they screen, it screened, it is screened) implies the screening relation.

Check facing when the location contains a backdrop:

repeat with the item running through backdrops in the location:

if the item screens the noun:

if the noun is not up and the noun is not down:

say "To the [noun] [is-are of the item] [an item]. [run paragraph on]";

try examining the item instead. [We want to be able to fill in what's that way.]

Check facing when the location contains a facade:

repeat with item running through facades in the location:

if the item fronts the noun:

if the noun is not up and the noun is not down:

say "To the [noun] [is-are of the item] [an item]. [run paragraph on]";

try examining the item instead. [We want to be able to fill in what's that way.]

A direction has a direction called left-alt. A direction has a direction called right-alt.

The left-alt of north is northwest. The right-alt of north is northeast.

The left-alt of northwest is west. The right-alt of northwest is north.

The left-alt of west is southwest. The right-alt of west is northwest.

The left-alt of southwest is south. The right-alt of southwest is west.

The left-alt of south is southeast. The right-alt of south is southwest.

The left-alt of southeast is east. The right-alt of southeast is south.

The left-alt of east is northeast. The right-alt of east is southeast.

The left-alt of northeast is north. The right-alt of northeast is east.

To say is-are of (item - a room):

say "is"

Last check facing:

if the noun is up or the noun is down:

make no decision;

let leftway be left-alt of the noun;

let rightway be right-alt of the noun;

let leftward thing be the thing seen facing leftway;

let rightward thing be the thing seen facing rightway;

if leftward thing is nothing and rightward thing is nothing:

make no decision;

if leftward thing is nothing:

say "There is nothing of note to [the leftway], but to [the rightway] [is-are of rightward thing] [the rightward thing]." instead;

if rightward thing is nothing:

say "There is nothing of note to [the rightway], but to [the leftway] [is-are of leftward thing] [the leftward thing]." instead;

if the location is indoors:

say "That way is just a corner of the room, though [you] could go [leftway] to [the leftward thing] or [rightway] to [the rightward thing]." instead;

otherwise if leftward thing is a road and rightward thing is a road:

say "That way is the corner of [the leftward thing] and [the rightward thing]." instead;

otherwise if leftward thing is a facade and rightward thing is a facade:

say "In that direction [one of][the leftward thing] abut[s] [the rightward thing], and there's no good way between them[or][the leftward thing] meet[s] the edge of [the rightward thing][or]lies the corner between [the leftward thing] and [the rightward thing][at random]." instead;

otherwise if leftward thing is a road:

say "That way is the corner of [the rightward thing] and the beginning of [leftward thing] running [leftway]." instead;

otherwise if rightward thing is a road:

say "That way is the corner of [the leftward thing] and the beginning of [rightward thing] running [rightway]." instead;

otherwise:

say "To [the noun] [the leftward thing] meet[s] [the rightward thing]." instead.

To decide what object is the thing seen facing (dir - a direction):

if a backdrop (called target) in the location screens dir:

decide on the target;

otherwise if a facade (called second target) in the location fronts dir:

decide on the second target;

otherwise if the door dir of the location is a door:

decide on the door dir of the location;

otherwise if the room dir of the location is a room:

decide on the room dir of the location.

Understand "look behind [something]" or "search behind/under [something]" as looking under.

A room can be indoors or outdoors. A room is usually outdoors.

Report facing when the location is indoors:

if the viewed location is not a room:

if the noun is up or the noun is down:

say "There's nothing remarkable [noun] there." instead;

say "There's no door in that direction." instead.

The sky is a distant backdrop. It screens up. The sun is part of the sky. The description of the sky is "[sky-description]". The description of the sun is "[sun-description]".

When play begins:

move the sky backdrop to all outdoors rooms.