Scroll Thief — 34 of 138

Daniel M. Stelzer

Release 2

Book L - Looking Between Rooms

Definition: a room is light-filled rather than darkness-filled if I6 routine "OffersLight" says so (it contains a light source).

Definition: a thing is light-filled rather than darkness-filled if I6 routine "OffersLight" says so (it contains a light source).

A thing can be visible between rooms. A thing is usually not visible between rooms. A person is usually visible between rooms.

A thing has some text called distant appearance.

Definition: a thing (called the item) is distantly nondescript rather than distantly not-nondescript:

if the distant appearance of the item is not "", no;

if the initial appearance of the item is "", yes;

if it is handled, yes;

no.

To say describe (item - a thing) from a distance:

if the distant appearance of the item is not "":

say "[distant appearance of the item]";

otherwise:

say "[initial appearance of the item]";

say paragraph break.

After distantly describing an object (called the place) (this is the describe things visible between rooms rule):

unless the place is light-filled:

say "It's too dark to really see anything else, however.";

otherwise if there is a visible between rooms thing in the place:

repeat with the item running through distantly not-nondescript visible between rooms things in the place:

say "[describe the item from a distance]";

if there is a distantly nondescript visible between rooms thing in the place:

say "You can [if there is a distantly not-nondescript visible between rooms thing in the place]also [end if]see [a list of distantly nondescript visible between rooms things in the place] there."

Definition: a door (called the occluder) is adjacent:

if the front side of the occluder is the location, yes;

if the back side of the occluder is the location, yes;

no.

Scope adjustment (this is the see nearby rooms rule):

repeat with the target room running through rooms adjacent to the location:

if the target room is light-filled:

now the target room is marked in scope;

repeat with the item running through visible between rooms things in the target room:

now the item is marked in scope;

[if the item is a person: [For persuasion parsing.]

now everything carried by the item is marked in scope;]

repeat with the item running through present doors liminal to the target room:

now the item is marked in scope;

now the nonlocal visibility flag is true;

repeat with the target door running through present doors liminal to the location:

let the target room be the other side of the target door from the location;

if the target room is light-filled:

if the target door is open or the target door is transparent:

now the target room is marked in scope;

repeat with the item running through visible between rooms things in the target room:

now the item is marked in scope;

[if the item is a person:

now everything carried by the item is marked in scope;]

repeat with the item running through present doors liminal to the target room:

now the item is marked in scope;

now the nonlocal visibility flag is true.