Exit Descriptions

version 2 by Matthew Fletcher

  • Home page
  • Complete text



  • Version 2 of Exit Descriptions by Matthew Fletcher begins here.

    "Appends a list of exit directions and names any previously visited rooms at the end of a room description."

    The amount is a number variable.
    The amount is 0.

    The num is a number variable.
    The num is 0.

    After looking:
    Change the amount to the number of adjacent rooms;
    repeat with destination running through adjacent rooms begin;
    if the num is 0, say "Exits:";
    let the way be the best route from the location to the destination, using even locked doors;
    if the way is a direction, say " [way]";
    if the destination is visited, say " to [the destination]";
    Decrease the amount by 1;
    Increase the num by 1;
    if the amount is 0, say ".";
    if the amount is 1, say " and";
    if the amount is greater than 1, say ",";
    end repeat;
    Change the amount to 0;
    Change the num to 0.

    Exit Descriptions ends here.