Counterfeit Monkey — 45 of 292

Emily Short

Release 6

Section 3 - Approaches and Describing Distance Travel

Include Approaches by Emily Short. Use slow route-finding.

A room can be nonsecret or forbidden. A room is usually nonsecret.

Carry out going to a forbidden room (called target):

now the target is nonsecret.

Understand "go to [any nonsecret room]" or "goto [any nonsecret room]" or "go back to [any nonsecret room]" or "return to [any nonsecret room]" or "revisit [any nonsecret room]" as approaching.

The new approach refusal rule is listed instead of the refusing bad headings rule in the approach-finding rules.

This is the new approach refusal rule:

if approach-heading is not a direction:

say "Neither of us can think how to get there from here.";

rule fails.

The new approach heading finding rule is listed instead of the approach-heading selection rule in the approach-finding rules.

This is the new approach heading finding rule:

change approach-heading to the best route from the location to the noun, using doors;

if approach-heading is not a direction:

change approach-heading to the best route from the location to the noun, using even locked doors;

Path description count is a number that varies. [let's count how many times we've invoked this activity this turn!]

Every turn:

now path description count is 0.

Rule for describing path of the player:

let N be the number of entries in the described motion of the player;

if N is greater than 0:

let C be indexed text;

if path description count is greater than 0:

let C be "[one of]Then[or]Next[or]From there[or]After that[as decreasingly likely outcomes] ";

let C be "[C][one of][You] [or][You] have a [walk-length for N][or][You] make the [optional walk-length for N][or]It's a [walk-length for N][at random]";

say "[C in sentence case]";

say "[walk-drive]";

if the intervening regions of the player is not empty:

say "[through the intervening regions]";

if the location is not the final destination:

say " [one of]to[or]over to[or]as far as[at random] [the location]. [run paragraph on]";

otherwise:

say ". [run paragraph on]";

increase path description count by 1;

clear path-walked for player.

To say optional walk-length for (N - a number):

if the player is in the car:

let N be N divided by 2; [distances should be adjusted to mode of transport]

if N is less than 5:

say "[one of][one of]short[or]brief[or]quick[at random] [or][cycling]";

otherwise if N is less than 8:

say "[one of][one of]fair[or]healthy[at random] [or][cycling]";

otherwise:

say "[one of][one of]long[or]lengthy[or]rather tiring[at random] [or][cycling]";

To say walk-length for (N - a number):

if the player is in the car:

let N be N divided by 2; [distances should be adjusted to mode of transport]

if N is less than 5:

say "[one of]short[or]brief[or]quick[at random] ";

otherwise if N is less than 8:

say "[one of]fair[or]healthy[at random] ";

otherwise:

say "[one of]long[or]lengthy[or]rather tiring[at random] ";

[The rather odd cycling guarantees that we don't repeat a word.]

To say walk-drive:

if the player is enclosed by a vehicle:

say "drive";

otherwise:

say "[one of]walk[or]hike[as decreasingly likely outcomes]".

To say through the intervening regions:

repeat through the Table of Region Descriptions:

if the intervening regions of the player is the intervening entry:

say " [description entry]";

Table of Region Descriptions

interveningdescription
{Marina}"through the marina district"
{Walltop}"along the top of the walls"
{Open-Air}"[one of]pushing through the dense crowds[or]among the crowds[or]among the booths of the fair[at random]"
{Open-Air, Walltop}"away from the crowds and the fair and over the top of the old walls"
{Open-Air, Walltop, Wealthy District}"from the kitschy splend[our] of the fair along the old walls and into the placid sunlight among the villas of the rich"
{Walltop, Open-Air}"back into the crowded area of the fair"
{Walltop, Wealthy District}"down from the walls and through the wide peaceful streets where the rich live"
{Wealthy District, Walltop}"through the residential streets and up onto the old wall"
{Wealthy District, Walltop, Open-Air}"out of the cocooning silence of the wealthy streets and back among the fair booths"
{Marina, Busy Streets}"[one of]through the heart of the city[or][--] only [i]almost[/i] dying at the roundabout when you didn't yield at the right moment [--][or]up the steep switchback of Deep Street[if the location is not the roundabout] and through the perilous traffic of the roundabout[end if][at random]"
{Marina, Busy Streets, Official Grounds}"away from the smugglers['] territory by the docks, into the shadow of officialdom"
{Marina, Busy Streets, Campus}"up through the shadowy corridor of Deep Street, around the roundabout, and then down the palm-lined avenue that is Long Street"
{Official Grounds, Busy Streets}"away from the Bureau and back into the streets"
{Official Grounds, Busy Streets, Campus}"out of the Bureau building, around the roundabout [--] always a menace to drivers and pedestrians alike [--] and down Long Street"
{Official Grounds, Busy Streets, Marina}"out of the Bureau and down into the shadows of Deep Street"
{Campus, Busy Streets}"out from under the sycamores in the Oval and up Long Street"
{Campus, Busy Streets, Marina}"from my native territory through yours"
{Campus, Busy Streets, Official Grounds}"[one of][--]the trip gets more uncomfortable as [you] go, leaving my own neighb[our]hood, fighting the inevitable snarl of traffic at the roundabout, and then heading down Tall Street, which always feels menacingly silent to me. But [you] do get[or]away from the familiar bustle of campus, up Long Street, around the roundabout, along Tall Street[stopping]"

A person has a list of regions called the intervening regions.

Carry out going while hurrying (this is the new creating a path history rule):

if the map region of the location is a region:

add the map region of the location to the intervening regions of the player, if absent.

To clear all/the/-- path-walked for (worker - yourself):

truncate the intervening regions of the worker to 0 entries;

truncate the described motion of the worker to 0 entries;

truncate the path so far of the worker to 0 entries.

[Rule for describing path of the player:

if the number of entries in the path so far of the player is greater than 0:

if the location is not the noun:

let N be the number of entries in the described motion of the player;

let last movement be entry N in the described motion of the player;

truncate the described motion of the player to (N - 1) entries;

if N is 1:

say "We [if the player is enclosed by a vehicle]drive[otherwise]go[end if]";

otherwise:

say "We [if the player is enclosed by a vehicle]drive[otherwise]go[end if] [described motion of the player]";

if N is greater than 2:

say ", before heading";

otherwise:

say ", then head";

say " [the last movement]. [run paragraph on]";

otherwise:

say "We go [described motion of the player]. [run paragraph on]";

clear path-walked for player. ]

[There are some places that are inappropriate to enter at certain times. We want to block both going and approaching these rooms; otherwise the parser will might let us walk halfway there before blocking progress, which is unclassy.]

Sanity-check going to a room (called target):

abide by the room-restriction rules for the target.

Sanity-check approaching a room (called target):

abide by the room-restriction rules for the target.

The room-restriction rules are an object-based rulebook.

Definition: a room is southern:

let way be the best route from the roundabout to it, using even locked doors;

if way is south:

yes;

if way is east:

yes;

no.

A room-restriction rule for a southern room:

if the Counterfeit Monkey is unvisited:

say "Don't [you] have an appointment at the Counterfeit Monkey? [You] should be heading northeast up Deep Street.";

rule fails;

if Slango is not seen and Counterfeit Monkey is visited:

say "That would take us more towards my part of the world, not help us find Slango.";

rule fails.

A room-restriction rule for Tall Street when Counterfeit Monkey is unvisited:

say "Don't [you] have an appointment at the Counterfeit Monkey? [You] should be heading northeast up Deep Street.";

rule fails;

A room-restriction rule for Wonderland when Brock-argument has not happened:

say "Best to start looking for Brock where we know he went: the equipment testing room.";

rule fails.

A room-restriction rule for Cold Storage when Brock-argument has not happened:

say "Best to start looking for Brock where we know he went: the equipment testing room.";

rule fails.

[A room-restriction rule for the Customs House:

say "Isn't our purpose exactly to avoid the attention of immigration officials, customs officers, and the like?";

rule fails. ]

After going a direction for the third turn:

if the location is visited:

say "[first custom style][bracket]If you're traveling far, you can always type GO TO (location name) to get there automatically.[close bracket][roman type][paragraph break]";

continue the action.