home *** CD-ROM | disk | FTP | other *** search
/ CD PowerPlay 6 / TheCompleteAdventureCollection1995 / CDPP6.ISO / utility / agtsrc / declare.pa3 < prev    next >
Encoding:
Text File  |  1989-12-21  |  26.2 KB  |  513 lines

  1.  
  2.   {DECLARE.PA2}
  3.  
  4.   {****************************************************}
  5.   {                     Constants                      }
  6.   {****************************************************}
  7.  
  8.   {$IFDEF NormalVersion}
  9.  
  10. CONST                             {CONST for Normal Version}
  11.   {Locations: each noun and creature has a location at any given}
  12.   {time, stored as an integer. This should correspond to the}
  13.   {range from (Nowhere..last_creature), broken down as follows:}
  14.   {       0:  noun has been destroyed or}
  15.   {           noun never existed - undefined}
  16.   {       1:  noun is being carried by player}
  17.   {           (and moves with him/her/it)}
  18.   {    1000:  noun is being worn by player}
  19.   {           (and moves with him/her/it)}
  20.   {  2..199:  noun is located in a room within the}
  21.   {           adventure game map.}
  22.   {200..299:  noun is located inside another noun}
  23.   {300..399:  noun is being carried by a creature}
  24.  
  25.   {Creatures may only be located in the range  0..199, since}
  26.   {they cannot be inside a noun. They also cannot be carried}
  27.   {by the player, so the value 1 is also invalid.}
  28.   {The player's location must be a room number (2..199)}
  29.   Player = 1;
  30.   Wearing = 1000;
  31.   First_Room = 2;
  32.   Last_Room = 199;
  33.   First_noun = 200;
  34.   Last_noun = 299;
  35.   First_creature = 300;
  36.   Last_Creature = 399;
  37.   First_Message = 1;
  38.   Last_Message = 250;
  39.   Num_Verbs = 105;
  40.   {number of verbs understood by program}
  41.   Num_Dirs = 13;                  {13 directions: 10 dirs, plus}
  42.   {'ENTER' and 'EXIT' and 'special' direction}
  43.   MaxSizeCommand = 30;            {max. number of data items in SpecialCMD}
  44.   MaxCommand = 400;               {max. number of SpecialCMDs}
  45.   MaxCounter = 25;                {max. number of counters}
  46.   MaxVariable = 25;               {max. number of variables}
  47.   MaxQuestion = 25;               {max. number of questions and answers}
  48.   MaxFlag = 255;                  {max. number of flags}
  49.   MaxDupsInRoom = 5;              {max. number of duplicate nouns with same name in room}
  50.  
  51.   {$ELSE}
  52.  
  53. CONST {CONST for "BIG" Version}
  54.   {Locations: each noun and creature has a location at any given}
  55.   {time, stored as an integer. This should correspond to the}
  56.   {range from (Nowhere..last_creature), broken down as follows:}
  57.   {       0:  noun has been destroyed or}
  58.   {           noun never existed - undefined}
  59.   {       1:  noun is being carried by player}
  60.   {           (and moves with him/her/it)}
  61.   {    1000:  noun is being worn by player}
  62.   {           (and moves with him/her/it)}
  63.   {  2..299:  noun is located in a room within the}
  64.   {           adventure game map.}
  65.   {300..499:  noun is located inside another noun}
  66.   {500..699:  noun is being carried by a creature}
  67.  
  68.   {Creatures may only be located in the range  0..299, since}
  69.   {they cannot be inside a noun. They also cannot be carried}
  70.   {by the player, so the value 1 is also invalid.}
  71.   {The player's location must be a room number (2..299)}
  72.   Player = 1;
  73.   Wearing = 1000;
  74.   First_Room = 2;
  75.   Last_Room = 299;
  76.   First_noun = 300;
  77.   Last_noun = 499;
  78.   First_creature = 500;
  79.   Last_Creature = 699;
  80.   First_Message = 1;
  81.   Last_Message = 600;
  82.   Num_Verbs = 105;
  83.   {number of verbs understood by program}
  84.   Num_Dirs = 13;                  {13 directions: 10 dirs, plus}
  85.   {'ENTER' and 'EXIT' and 'special' direction}
  86.   MaxSizeCommand = 30;            {max. number of data items in SpecialCMD}
  87.   MaxCommand = 900;               {max. number of SpecialCMDs}
  88.   MaxCounter = 50;                {max. number of counters}
  89.   MaxVariable = 50;               {max. number of variables}
  90.   MaxQuestion = 25;               {max. number of questions and answers}
  91.   MaxFlag = 255;                  {max. number of flags}
  92.   MaxDupsInRoom = 5;              {max. number of duplicate nouns with same name in room}
  93. {$ENDIF}
  94.  
  95.   {****************************************************}
  96.   {                     Types                          }
  97.   {****************************************************}
  98.  
  99. TYPE
  100.   String30 = String[30];
  101.   String255 = String[255];
  102.   CreatureType = (Thing {default creature/animal/beast} ,
  103.                   Woman {changes pronouns to "SHE" and "HER"} ,
  104.                   Man {changes pronouns to "HE" and "HIM"} );
  105.   SingularOrPlural = (Singular, Plural);
  106.   {used to select "IS" or "ARE" and "IT" or "THEM" for nouns}
  107.   Direction = (NORTH, SOUTH, EAST, WEST, northeast, northwest, southeast,
  108.                southwest, up, down, enter, Exit);
  109.   {possible directions leading from each room}
  110.   s = String[80];                 {sentences, lines of text}
  111.   names = String[22];             {room, noun names}
  112.   words = names;                  {words in player input}
  113.   descr_files = FILE OF s;
  114.  
  115.   descr = RECORD
  116.             start : Integer;      {position in descr_file}
  117.             len : Integer;        {number of lines}
  118.           END;
  119.  
  120.   Dups = RECORD
  121.            num : Integer;         {number of duplicate noun/creature in room}
  122.            adj : words;           {adjective}
  123.            name : words;          {proper name -- NOT synonym}
  124.          END;
  125.  
  126.   {**************************************************}
  127.   {            Room Data Structure                   }
  128.   {**************************************************}
  129.  
  130.   RoomPointer = ^rooms;
  131.  
  132.   rooms = RECORD
  133.             name : String30;
  134.             Replaced_Word : words; {In this room only -- Replace this verb}
  135.             Replacing_Words : s;  {with these verbs}
  136.             Path : ARRAY[Direction] OF Integer; {exits from room -- changed by DRM}
  137.             special : Integer;
  138.             has_seen : Boolean;   {player has seen room}
  139.             key : Integer;        {noun that activates special}
  140.             locked_door : Boolean;
  141.             nouns_inside : Integer; {count of nouns in this room}
  142.             points : Integer;     {reward for getting here}
  143.             light : Integer;
  144.             {what noun lights this room?}
  145.             {0 means no light needed 1 means any light}
  146.             game_end : Boolean;
  147.             game_win : Boolean;
  148.             player_dead : Boolean; {does player die when entering room?}
  149.           END;                    {record}
  150.  
  151.   roomlists = ARRAY[First_Room..Last_Room] OF RoomPointer;
  152.  
  153.   {******************************************************}
  154.   {              Nouns data structure                    }
  155.   {******************************************************}
  156.  
  157.   NounPointer = ^nouns;
  158.  
  159.   nouns = RECORD
  160.             name : names;
  161.             short : s;            {short one-line description}
  162.             adj : names;          {adjective - 'NO_ADJ' if none}
  163.             SingOrPlur : SingularOrPlural; {used to select "IS" or "ARE"}
  164.             position : names;     {i.e., 'behind the door'-- Added by DRM}
  165.             SomethingPositionedNearThisNoun : Boolean;
  166.             {i.e.,something is 'behind' this noun'}
  167.             ThisNounPositionedNearNounNumber : Integer;
  168.             {i.e.,number of noun this noun is 'behind'}
  169.             Has_Synonyms : Boolean; {Are there Synonyms for this noun's name}
  170.             synonyms : s;         {List of Synonyms for this noun -- if any}
  171.             location : Integer;   {where is it? 1=player}
  172.             weight : Integer;     {how heavy?}
  173.             size : Integer;       {how bulky?}
  174.             key : Integer;        {item # that unlocks it}
  175.             pushable : Boolean;   {'specials' and 'PUSH_DESCR'}
  176.             pullable : Boolean;   {'specials' and 'PULL_DESCR'}
  177.             turnable : Boolean;   {'specials' and 'TURN_DESCR'}
  178.             playable : Boolean;   {'specials' and 'PLAY_DESCR'}
  179.             readable : Boolean;   {if true, there should be}
  180.             {TEXT to match in the data file}
  181.             on : Boolean;         {if not on, then off}
  182.             closable : Boolean;   {can player open/close it?}
  183.             open : Boolean;       {can things be put in it?}
  184.             lockable : Boolean;   {can it be locked and unlocked?}
  185.             locked : Boolean;     {if so, is it locked now?}
  186.             edible : Boolean;     {can it be eaten?}
  187.             wearable : Boolean;   {can it be worn?}
  188.             drinkable : Boolean;  {can it be drunk?}
  189.             poisonous : Boolean;  {if it's eaten or drunk}
  190.             movable : Boolean;    {can it be lifted at all?}
  191.             is_light : Boolean;   {does it work as a light?}
  192.             can_shoot : Boolean;  {can it shoot ?}
  193.             num_shots : Integer;  {number of bullets}
  194.             points : Integer;     {what's it worth?}
  195.             nouns_inside : Integer; {count of other nouns inside this noun}
  196.             game_win : Boolean;   {does player win when}
  197.             {s/he gets this noun?}
  198.           END;                    {record}
  199.  
  200.   nounlists = ARRAY[First_noun..Last_noun] OF NounPointer;
  201.  
  202.   {***************************************************}
  203.   {            Creatures data structure               }
  204.   {***************************************************}
  205.  
  206.   CreaturePointer = ^creatures;   {to save DATA segment space}
  207.  
  208.   creatures = RECORD
  209.                 name : names;
  210.                 short : s;        {short one-line description}
  211.                 adj : names;      {adjective - 'NO_ADJ' if none}
  212.                 Has_Synonyms : Boolean; {Are there Synonyms for this creature's name}
  213.                 synonyms : s;     {List of Synonyms for this creature -- if any}
  214.                 groupmember : Boolean; {is it a member of the group?}
  215.                 location : Integer;
  216.                 weapon : Integer; {item # that kills it}
  217.                 hostile : Boolean; {is s/he/it hostile?}
  218.                 points : Integer; {what's it worth?}
  219.                 nouns_inside : Integer; {count of nouns creature is carrying}
  220.                 counter : Integer; {how many times has the}
  221.                 {player been nasty to it?}
  222.                 threshhold : Integer; {how many will it take?}
  223.                 timethresh : Integer; {how long before it attacks?}
  224.                 timecounter : Integer; {how many turns has}
  225.                 {the player been here?}
  226.                 gender : CreatureType; {Thing(default), Woman, Man}
  227.               END;                {record}
  228.  
  229.   creaturelists = ARRAY[First_creature..Last_Creature] OF CreaturePointer;
  230.  
  231.   {***********************************************}
  232.   {        Custom Command Data Structure          }
  233.   {***********************************************}
  234.  
  235.   CommandPointer = ^Command;
  236.  
  237.   Command = RECORD
  238.               VerbNum : Integer;  {verb number}
  239.               VerbCMD : words;    {verb}
  240.               NounCMD : words;    {noun}
  241.               ObjectCMD : words;  {object}
  242.               Data : ARRAY[1..MaxSizeCommand] OF Integer;
  243.             END;                  {of record}
  244.  
  245.   CommandList = ARRAY[1..MaxCommand] OF CommandPointer;
  246.  
  247.   {***********************************************}
  248.   {   S P E C I A L  C O M M A N D  T O K E N S   }
  249.   {***********************************************}
  250.  
  251.   {*******  CONDITION TOKENS ********}
  252.   Token = (
  253.     AtLocation,                   {Player is located at room loc#}
  254.     AtLocationGT,                 {In room greater than loc#}
  255.     AtLocationLT,                 {In room less than loc#}
  256.     FirstVisitToRoom,             {Player is in current room for first time}
  257.     NewLife,                      {Player is just starting game or has just been resurrected}
  258.     IsCarryingSomething,          {Player is carrying something}
  259.     IsCarryingNothing,            {Player is carrying nothing}
  260.     IsWearingSomething,           {Player is wearing something}
  261.     IsCarryingTreasure,           {Player is carrying at least one treasure worth >= PTS}
  262.     IsWearingNothing,             {Player is wearing nothing}
  263.     LoadWeightEquals,             {Load weighs equals num#}
  264.     LoadWeightGT,                 {Load weighs more than num#}
  265.     LoadWeightLT,                 {Load weighs less than num#}
  266.     Present,                      {ITEM is in room, carried or worn}
  267.     IsWearing,                    {ITEM is being worn}
  268.     IsCarrying,                   {ITEM is being carried}
  269.     IsNowhere,                    {ITEM is located NOWHERE (room 0)}
  270.     IsSomewhere,                  {ITEM is located somewhere}
  271.     InRoom,                       {ITEM is located in current room}
  272.     IsLocated,                    {ITEM# is located in room loc#}
  273.     Together,                     {ITEM# and ITEM# are in same room}
  274.     IsON,                         {ITEM is ON}
  275.     IsOFF,                        {ITEM is OFF}
  276.     IsGroupMember,                {ITEM is member of the group}
  277.     IsOpen,                       {ITEM is Open}
  278.     IsClosed,                     {ITEM is Closed}
  279.     IsLocked,                     {ITEM is Locked}
  280.     IsUnLocked,                   {ITEM is UnLocked}
  281.     IsEdible,                     {ITEM is Edible}
  282.     IsDrinkable,                  {ITEM is Drinkable}
  283.     IsPoisonous,                  {ITEM is Poisonous}
  284.     IsMovable,                    {ITEM is Movable}
  285.     NOUNPresent,                  {NOUN is in room, carried or worn}
  286.     NOUNIsWearing,                {NOUN is being worn}
  287.     NOUNIsCarrying,               {NOUN is being carried}
  288.     NOUNIsNowhere,                {NOUN ITEM is located NOWHERE (room 0)}
  289.     NOUNIsSomewhere,              {NOUN ITEM is located somewhere}
  290.     NOUNInRoom,                   {NOUN ITEM is located in current room}
  291.     NOUNIsLocated,                {NOUN ITEM is located in room loc#}
  292.     NOUNIsON,                     {NOUN ITEM is ON}
  293.     NOUNIsOFF,                    {NOUN ITEM is OFF}
  294.     NOUNIsOpen,                   {NOUN ITEM is Open}
  295.     NOUNIsClosed,                 {NOUN ITEM is Closed}
  296.     NOUNIsLocked,                 {NOUN ITEM is Locked}
  297.     NOUNIsUnLocked,               {NOUN ITEM is UnLocked}
  298.     NOUNIsEdible,                 {NOUN ITEM is Edible}
  299.     NOUNIsDrinkable,              {NOUN ITEM is Drinkable}
  300.     NOUNIsPoisonous,              {NOUN ITEM is Poisonous}
  301.     NOUNIsMovable,                {NOUN ITEM is Movable}
  302.     NOUNpointsEquals,             {NOUN points equal num#}
  303.     NOUNpointsGT,                 {NOUN points are greater than num#}
  304.     NOUNpointsLT,                 {NOUN points are less than num#}
  305.     NOUNweightEquals,             {NOUN weight equals num#}
  306.     NOUNweightGT,                 {NOUN weight is greater than num#}
  307.     NOUNweightLT,                 {NOUN weight is less than num#}
  308.     LightPresent,                 {Room has necessary light}
  309.     RoomNeedsLight,               {Room needs a light}
  310.     FlagON,                       {Flag# is ON}
  311.     FlagOFF,                      {Flag# is OFF}
  312.     ScoreEquals,                  {current score is equal to num}
  313.     ScoreGT,                      {score is greater than num}
  314.     ScoreLT,                      {score is less than num}
  315.     NumberEquals,                 {current input number is equal to num}
  316.     NumberGT,                     {input number is greater than num}
  317.     NumberLT,                     {input number is less than num}
  318.     AnswerIsCorrect,              {last answer is correct}
  319.     AnswerIsWrong,                {last answer is wrong}
  320.     TurnsEquals,                  {current Turns is equal to num}
  321.     TurnsGT,                      {Turns is greater than num}
  322.     TurnsLT,                      {Turns is less than num}
  323.     CounterEquals,                {Counter # is equal to num}
  324.     CounterGT,                    {Counter # is greater than num}
  325.     CounterLT,                    {Counter # is less than num}
  326.     VariableEquals,               {Variable # is equal to num}
  327.     VariableGT,                   {Variable # is greater than num}
  328.     VariableLT,                   {Variable # is less than num}
  329.     CompareVariables,             {TRUE if V1 < V2 }
  330.     VariableChance,               {TRUE if V < Random(1..N)}
  331.     NamePresent,                  {TRUE if Name being addressed is at location}
  332.     NameIsNumber,                 {TRUE if Name being addressed is Noun or Creature Number num}
  333.     NOUNIsNumber,                 {TRUE if NOUN is Number num}
  334.     ObjectIsNumber,               {TRUE if Object is Number num}
  335.     SomethingInside,              {TRUE if there is something inside of object num}
  336.     Chance,                       {Odds are percent, i.e. 10 %}
  337.     PromptForYES,                 {Prompts for Y or N -- Ok if Yes}
  338.     PromptForNO,                  {Prompts for Y or N -- Ok if No}
  339.     VerbIsDirection,              {Verb is movement or direction}
  340.     NounIsCreature,               {TRUE if noun is a creature}
  341.     ObjectIsCreature,             {TRUE if object is a creature}
  342.     ObjectPresent,                {TRUE if object is present in room}
  343.     LogicalNOT,                   {Logical NOT of current condition}
  344.     LogicalOR,                    {Logical OR of conditions -- MUST be last condition}
  345.     {in CMD file token in indicated as "OR"}
  346.  
  347.     {******* ACTIONS TOKENS *********}
  348.  
  349.     GoToRoom,                     {Send player to loc#}
  350.     GoToRandomRoom,               {Randomly pick room >= num1 and <= num2 and move player}
  351.     MakeVarRoomNum,               {Var# -- will make Var# equal current room number}
  352.     MakeVarNounNum,               {Var# -- will make Var# equal current noun number}
  353.     MakeVarObjectNum,             {Var# -- will make Var# equal object room number}
  354.     GoToVariableRoom,             {Var# -- will send player to room number Var#}
  355.     SendToVariableRoom,           {Item# Var# -- will send Item# to room number Var#}
  356.     GetVariableIt,                {Var# -- will get Var# item for player}
  357.     PrintVariableMessage,         {Var# -- will print message number Var#}
  358.     GetIt,                        {ITEM# is now being carried}
  359.     WearIt,                       {ITEM# is now being worn}
  360.     DropIt,                       {Drops ITEM# into current room}
  361.     RemoveIt,                     {Removes ITEM and drops into room}
  362.     GetNOUN,                      {NOUN is now being carried}
  363.     WearNOUN,                     {NOUN is now being worn}
  364.     DropNOUN,                     {Drops NOUN into current room}
  365.     RemoveNOUN,                   {Removes NOUN and drops into room}
  366.     DropEverything,               {Drop all items being carried}
  367.     RemoveEverything,             {Remove all items being worn}
  368.     KillPlayer,                   {Makes player dead}
  369.     PutInCurrentRoom,             {Put ITEM# in current room}
  370.     SendToRoom,                   {Put ITEM# in room loc#}
  371.     PutNOUNInCurrentRoom,         {Put NOUN in current room}
  372.     SendNOUNToRoom,               {Put NOUN in room loc#}
  373.     SendAllToRoom,                {Send all carried ITEMs to loc#}
  374.     SendTreasuresToRoom,          {Send all carried ITEMs whose points > pts# to loc#}
  375.     RelocateAll,                  {Move all items at loc1 to loc2}
  376.     Destroy,                      {ITEM# is now NOWHERE (room 0)}
  377.     DestroyNOUN,                  {NOUN is now NOWHERE (room 0)}
  378.     SwapLocations,                {swap locations of ITEM1 & ITEM2}
  379.     SendToItem,                   {Put ITEM1 in location of ITEM2}
  380.     SendNOUNToItem,               {Put NOUN in location of ITEM}
  381.     AddToGroup,                   {Add ITEM# to group}
  382.     RemoveFromGroup,              {Remove ITEM# from group}
  383.     MoveTheGroup,                 {Move group to room ITEM#}
  384.     ReDirectTo,                   {Re-Direct command to different VERB-NOUN-OBJECT}
  385.     RandomMessage,                {Select message between Num1 and Num2 and print it}
  386.     ShowContents,                 {Display object inside of num -- if any}
  387.     OpenIt,                       {ITEM# is now open}
  388.     CloseIt,                      {ITEM# is now closed}
  389.     LockIt,                       {ITEM# is now locked}
  390.     UnlockIt,                     {ITEM# is now unlocked}
  391.     OpenNOUN,                     {NOUN is now open}
  392.     CloseNOUN,                    {NOUN is now closed}
  393.     LockNOUN,                     {NOUN is now locked}
  394.     UnlockNOUN,                   {NOUN is now unlocked}
  395.     ShowScore,                    {Show current SCORE}
  396.     PlusScore,                    {Add num to current SCORE}
  397.     MinusScore,                   {Subtract num from current SCORE}
  398.     ShowInventory,                {Show current INVENTORY}
  399.     WaitForReturn,                {Prints 'Hit RETURN' message}
  400.     TimePasses,                   {Show 'Time passes...' message}
  401.     xDelay,                       {Delay for num seconds}
  402.     CLEARSCREEN,                  {Clears screen}
  403.     DescribeThing,                {Describe thing num (whatever)}
  404.     LookAtRoom,                   {Cause a VERBOSE look at room}
  405.     PrintMessage,                 {Prints message num}
  406.     BlankLine,                    {Prints blank line}
  407.     Tone,                         {makes a sound at H hertz for M milliseconds}
  408.     GetNumberInput,               {Get number as input}
  409.     AskQuestion,                  {ask question and get answer}
  410.     ChangePassageway,             {opens or closes a passage between rooms}
  411.     TurnFlagON,                   {Turn Flag# ON}
  412.     TurnFlagOFF,                  {Turn Flag# OFF}
  413.     ToggleFlag,                   {Toggle Flag#}
  414.     TurnCounterON,                {Turn counter# ON -- sets to 1}
  415.     TurnCounterOFF,               {Turn counter# OFF -- sets to 0}
  416.     SetVariableTo,                {Set Variable var# to num#}
  417.     AddToVariable,                {Add num# to Variable var#}
  418.     SubtractFromVariable,         {Subtract num# from Variable #}
  419.     AddVariables,                 {Add V2 to V1 and store answer in V1}
  420.     SubtractVariables,            {Subtract V2 from V1 and store answer in V1}
  421.     RandomVariable,               {Set Var# to Random number [1..Num]}
  422.     NounToVariable,               {Convert Noun to Variable #}
  423.     ObjectToVariable,             {Convert Object to Variable #}
  424.     WinGame,                      {Player wins game at end of turn}
  425.     EndGame,                      {game ends at end of turn}
  426.     QuitThisCMD,                  {Quit evaluating this CMD}
  427.     QuitAllCMDs,                  {Finished with all special CMDs}
  428.     DoneWithTurn);                {All Done this turn -- get next turn's input next}
  429.   {last token}
  430.  
  431.   {***********************************************}
  432.   {        Verbs and Global synonym lists         }
  433.   {***********************************************}
  434.  
  435.   verblists = ARRAY[0..Num_Verbs] OF words; {0 is for 'ANY'}
  436.   Synlists = ARRAY[0..Num_Verbs] OF s; {whole line of several synonyms}
  437.  
  438.   {****************************************************}
  439.   {                 Global Variables                   }
  440.   {****************************************************}
  441.  
  442. VAR
  443.   SpecialCMD : CommandList;       {stores pointers to custom commands}
  444.   counter : ARRAY[0..MaxCounter] OF Integer;
  445.   Variable : ARRAY[0..MaxVariable] OF Integer;
  446.   Question, Answer : ARRAY[0..MaxQuestion] OF s;
  447.   Flag : ARRAY[0..MaxFlag] OF Boolean;
  448.   P : ARRAY[Token] OF Integer;
  449.   DuplicatesInRoom : ARRAY[1..MaxDupsInRoom] OF Dups;
  450.   Cap_Subject_IT, Subject_IT, Object_IT, Snarls, Screeches : ARRAY[CreatureType] OF words;
  451.   IsOrAre, ItOrThem : ARRAY[SingularOrPlural] OF words;
  452.   StartingIndex : ARRAY[0..Last_Creature] OF Integer; {used for index}
  453.   EndingIndex : ARRAY[0..Last_Creature] OF Integer; {sequential searches}
  454.   Skip_A_Line : Boolean;
  455.   ScoreAdjustment, Treasure_Room, Maximum_Score, NumberInRoom : Integer;
  456.   Room : roomlists;
  457.   Current_room : Integer;         {what room is player "now" in}
  458.   Starting_room : Integer;        {the room the player starts in}
  459.   Current_Life : Integer;         {what life is player now playing}
  460.   Num_turns : Integer;            {number of turns taken}
  461.   Num_saves, num_restores : Integer; {# of times game saved/restored}
  462.   N : nounlists;                  {array [first_noun..last_noun] of nouns}
  463.   M : creaturelists;              {array [first_creature..last_creature] of creatures}
  464.   V : verblists;                  {the array of verbs, used only to check input}
  465.   SYN : Synlists;                 {verb synonyms -- whole line full of synonyms}
  466.   Original_Verb, LastVerb : words; {verb (as entered) before any synonym substitition}
  467.   Last_CMD, MaxRoom, MaxNoun, MaxCreature, MaxVerb : Integer;
  468.   Any_Special_Cmds, CreatingFinalVersion, UsingFinalVersion : Boolean; {flag -- TRUE of appropriate}
  469.   datafile : Text;
  470.   descr_file : descr_files;
  471.   Command_File_Name, Instruction_File_Name, Adventure_Name,
  472.   data_file_name, message_file_name, title_file_name, descr_file_name : words;
  473.   player_dead : Boolean;          {useful so player knows when s/he dies}
  474.   game_won, game_end, QuestionStatus, DoingUpperCase,
  475.   PreviousCompoundCommands, DoingCompoundCommands : Boolean;
  476.   verbose : Boolean;              {does player want long descriptions when s/he}
  477.   {first enters a room, or only when requested?}
  478.   morecount : Integer;            {number of lines since last pause}
  479.   NormalConOutPtr : Integer;
  480.   {used to replicate the Ctrl PrtSc key in software}
  481.   {for SCRIPT and UNSCRIPT commands}
  482.   Items_Being_Carried : Integer;
  483.   Items_Being_Worn : Integer;
  484.   Resurrection_Room, Max_Lives : Integer;
  485.  
  486.   {Pointers to descriptions on disk}
  487.   Room_Ptr : ARRAY[First_Room..Last_Room] OF descr;
  488.   Special_Ptr : ARRAY[First_Room..Last_Room] OF descr;
  489.   Help_Ptr : ARRAY[First_Room..Last_Room] OF descr;
  490.   Noun_Ptr : ARRAY[First_noun..Last_noun] OF descr;
  491.   Play_Ptr : ARRAY[First_noun..Last_noun] OF descr;
  492.   Turn_Ptr : ARRAY[First_noun..Last_noun] OF descr;
  493.   Push_Ptr : ARRAY[First_noun..Last_noun] OF descr;
  494.   Pull_Ptr : ARRAY[First_noun..Last_noun] OF descr;
  495.   Text_Ptr : ARRAY[First_noun..Last_noun] OF descr;
  496.   Message_Ptr : ARRAY[First_Message..Last_Message] OF descr;
  497.   Creature_Ptr : ARRAY[First_creature..Last_Creature] OF descr;
  498.   Intro_Ptr : descr;
  499.   LastPart : s;                   {used for player's input string}
  500.   noun, object_word, noun_adj, object_adj, NameStr : words; {returned by parser}
  501.   last_noun_used, last_adj_used : words;
  502.   {used by parser to understand "IT" "THEM" "HIM" & "HER"}
  503.   NounNumber, ObjectNumber, NameNum : Integer;
  504.   {determined in parser}
  505.   Duplicate : Boolean;
  506.   Adjective : words;
  507.   NumberOfErrors, TopRoom, TopNoun, TopCreature, TopMessage, MaxMessage : Integer;
  508.   Word_Chars : SET OF Char;
  509.  
  510. TYPE
  511.   TestType = (RoomTest, NounTest, CreatureTest, ThingTest, LocationTest, TokenTest,
  512.               ZRoomTest, ZNounTest, MessageTest, CounterTest, VariableTest, QuestionTest, FlagTest);
  513.