Import v6.12.6 of the Inform 6 standard library
[informlib.git] / english.h
index 13dfca818ff250c1c6b38a84a8c5eb4b9dd5b067..24bc0fda9e7251f4421f6f131d5755d42f8f4f02 100644 (file)
--- a/english.h
+++ b/english.h
@@ -1,9 +1,9 @@
 ! ==============================================================================
 !   ENGLISH:  Language Definition File
 !
-!   Supplied for use with Inform 6 -- Release 6.12.1 -- Serial number 160605
+!   Supplied for use with Inform 6 -- Release 6.12.6 -- Serial number 220219
 !
-!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2016
+!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2022
 !
 !   This file is free software: you can redistribute it and/or modify
 !   it under the terms of the GNU Affero General Public License as
@@ -73,7 +73,7 @@ CompassDirection -> u_obj  with short_name "up above",  door_dir u_to,
                                 name 'u//' 'up' 'ceiling' 'above' 'sky';
 CompassDirection -> d_obj  with short_name "ground",    door_dir d_to,
                                 name 'd//' 'down' 'floor' 'below' 'ground';
-#endif; ! WITHOUT_DIRECTIONS
+#Endif; ! WITHOUT_DIRECTIONS
 
 CompassDirection -> in_obj  with short_name "inside",  door_dir in_to;
 CompassDirection -> out_obj with short_name "outside", door_dir out_to;
@@ -295,6 +295,15 @@ Array LanguageGNAsToArticles --> 0 0 0 1 1 1 0 0 0 1 1 1;
       'l//':   print "look";
       'x//':   print "examine";
       'z//':   print "wait";
+! CompassDirection
+      'n//':   print "north";
+      's//':   print "south";
+      'e//':   print "east";
+      'w//':   print "west";
+      'ne//':   print "northeast";
+      'nw//':   print "northwest";
+      'se//':   print "southeast";
+      'sw//':   print "southwest";
       default: rfalse;
     }
     rtrue;
@@ -323,7 +332,7 @@ Array LanguageGNAsToArticles --> 0 0 0 1 1 1 0 0 0 1 1 1;
 ! ----------------------------------------------------------------------------
 
 [ LanguageVerbLikesAdverb w;
-    if (w == 'look' or 'go' or 'push' or 'walk')
+    if (w == 'look' or 'go' or 'run' or 'leave' or 'l//' or 'push' or 'walk')
         rtrue;
     rfalse;
 ];
@@ -360,6 +369,9 @@ Constant QKEY2__KY      = 'q';
 Constant SCORE__TX      = "Score: ";
 Constant MOVES__TX      = "Moves: ";
 Constant TIME__TX       = "Time: ";
+Constant SCORE_S__TX    = "S: ";
+Constant MOVES_S__TX    = "M: ";
+Constant TIME_S__TX     = "T: ";
 Constant CANTGO__TX     = "You can't go that way.";
 Constant FORMER__TX     = "your former self";
 Constant MYFORMER__TX   = "my former self";
@@ -370,6 +382,7 @@ Constant DARKNESS__TX   = "Darkness";
 
 Constant THOSET__TX     = "those things";
 Constant THAT__TX       = "that";
+Constant THE__TX        = "the";
 Constant OR__TX         = " or ";
 Constant NOTHING__TX    = "nothing";
 Constant IS__TX         = " is";
@@ -384,7 +397,24 @@ Constant AND__TX        = " and ";
 Constant WHOM__TX       = "whom ";
 Constant WHICH__TX      = "which ";
 Constant COMMA__TX      = ", ";
-Constant COLON__TX      = ": ";
+Constant COLON__TX      = ":";
+
+! For EnterSub()
+Constant STAND__TX     = 'stand';
+Constant SIT__TX       = 'sit';
+Constant LIE__TX       = 'lie';
+
+Constant LIBERROR__TX   = "Library error ";
+Constant TERP__TX       = "Interpreter ";
+Constant VER__TX        = "Version ";
+Constant STDTERP__TX    = "Standard interpreter ";
+Constant TERPVER__TX   = "Interpreter version ";
+Constant LIBSER__TX    = "Library Serial Number ";
+Constant VM__TX                = "VM ";
+Constant RELEASE__TX    = "Release ";
+Constant SERNUM__TX     = "Serial number ";
+Constant INFORMV__TX    = "Inform v";
+Constant LIBRARYV__TX   = " Library v";
 
 ! ----------------------------------------------------------------------------
 ! FYI on nominative pronouns versus accusative pronouns...
@@ -446,21 +476,21 @@ Constant COLON__TX      = ": ";
 ];
 
 ! Nominative
-[ CTheyreorThats obj;
+[ CTheyreOrThats obj;
     if (obj == player) {
        if (player provides narrative_voice) {
-           if (player.narrative_voice == 1) { print "I'm"; return; }
-           if (player.narrative_voice == 3) { CDefart(player); print "'s"; return; }
+           if (player.narrative_voice == 1) { Tense("I'm", "I was"); return; }
+           if (player.narrative_voice == 3) { CDefart(player); Tense("'s", " was"); return; }
        }
-       print "You're";
+       Tense("You're", "You were");
        return;
     }
-    if (obj has pluralname)            { print "They're"; return; }
-    if (obj has female)                        { print "She's"; return; }
+    if (obj has pluralname)            { Tense("They're", "They were"); return; }
+    if (obj has female)                        { Tense("She's", "She was"); return; }
     if (obj has male or animate) {
-        if (obj hasnt neuter)          { print "He's"; return; }
+        if (obj hasnt neuter)          { Tense("He's", "He was"); return; }
     }
-    print "That's";
+    Tense("That's", "That was");
 ];
 
 [ IsOrAre obj;
@@ -474,7 +504,7 @@ Constant COLON__TX      = ": ";
 
 [ nop x; x = x; ];      ! print rule to absorb unwanted return value
 
-[ SubjectNotPlayer obj reportage v2 v3 past;
+[ SubjectNotPlayer obj reportage nocaps v2 v3 past;
     if (past && player provides narrative_tense && player.narrative_tense == PAST_TENSE) {
         v2 = past;
         v3 = past;
@@ -493,8 +523,21 @@ Constant COLON__TX      = ": ";
             else {print (the) obj, " ", (string) v3; return;}
     }
    else
-        if (obj has pluralname) { print (The) obj, " ", (string) v2; return;}
-        else                    { print (The) obj, " ", (string) v3; return;}
+        if (obj has pluralname) {
+           if (nocaps)
+               print (the) obj;
+           else
+               print (The) obj;
+           print " ", (string) v2;
+           return;
+       }
+        else {
+           if (nocaps)
+               print (the) obj;
+           else
+               print (The) obj;
+           print " ", (string) v3; return;
+       }
 ];
 
 [ CSubjectVoice obj v1 v2 v3 past;
@@ -538,7 +581,7 @@ Constant COLON__TX      = ": ";
         if (nocaps) { print "you ", (string) v2; return; }
        print "You ", (string) v2; return;
     }
-    SubjectNotPlayer(obj, reportage, v2, v3);
+    SubjectNotPlayer(obj, reportage, nocaps, v2, v3);
 ];
 
 [ CSubjectIs obj reportage nocaps;
@@ -554,7 +597,7 @@ Constant COLON__TX      = ": ";
         else Tense("You're", "You were");
         return;
     }
-    SubjectNotPlayer(obj, reportage, "are", "is", "was");
+    SubjectNotPlayer(obj, reportage, nocaps, "are", "is", "was");
 ];
 
 [ CSubjectIsnt obj reportage nocaps;
@@ -570,7 +613,7 @@ Constant COLON__TX      = ": ";
         else Tense("You aren't", "You weren't");
        return;
     }
-    SubjectNotPlayer(obj, reportage, "aren't", "isn't", "wasn't");
+    SubjectNotPlayer(obj, reportage, nocaps, "aren't", "isn't", "wasn't");
 ];
 
 [ CSubjectHas obj reportage nocaps;
@@ -586,23 +629,23 @@ Constant COLON__TX      = ": ";
         else Tense("You've", "You'd");
         return;
     }
-    SubjectNotPlayer(obj, reportage, "have", "has", "had");
+    SubjectNotPlayer(obj, reportage, nocaps, "have", "has", "had");
 ];
 
 [ CSubjectWill obj reportage nocaps;
     if (obj == player) {
         if (player provides narrative_voice) switch (player.narrative_voice) {
-          1:  Tense("I'll", "I would've"); return;
+          1:  Tense("I'll", "I would"); return;
           2:  ! Do nothing.
           3:  CDefart(player);
-              Tense(" will", " would've"); return;
+              Tense(" will", " would"); return;
           default: RunTimeError(16, player.narrative_voice);
         }
         if (nocaps) Tense("you'll", "you'd");
         else Tense("You'll", "You'd");
         return;
     }
-    SubjectNotPlayer(obj, reportage, "will", "will", "would");
+    SubjectNotPlayer(obj, reportage, nocaps, "will", "will", "would");
 ];
 
 [ CSubjectCan obj reportage nocaps;
@@ -647,10 +690,22 @@ Constant COLON__TX      = ": ";
         if (caps) print "Y"; else print "y";
         print "our"; return;
     }
-    if (caps) print "H"; else print "h";
-    if (obj has male) { print "is"; return; }
-    if (obj has female) { print "er"; return; }
-    if (caps) print "I"; else { print "i"; print "ts"; return; }
+    if (obj has pluralname) {
+      if (caps) print "T"; else print "t";
+      print "heir"; return;
+    }
+    if (obj has female) {
+      if (caps) print "H"; else print "h";
+      print "er"; return;
+    }
+    if (obj has male or animate) {
+      if (obj hasnt neuter) {
+        if (caps) print "H"; else print "h";
+        print "is"; return;
+      }
+    }
+    if (caps) print "I"; else { print "i"; }
+    print "ts"; return;
 ];
 
 [ PossessiveCaps obj;
@@ -825,6 +880,9 @@ Constant COLON__TX      = ": ";
         1:  CSubjectIsnt(actor,true); " wearing ", (ThatOrThose) x1, ".";
         2:  CSubjectVerb(actor,false,false,"take off",0,"takes off", "took off");
             " ", (the) x1, ".";
+        3:  "(first taking ", (the) x1, " off)";
+        4: CSubjectVerb(actor,false,false, "will need to", 0, 0, "had to");
+           " remove ", (the) noun, " first.";
     }
   Drink:    print "There";
             Tense("'s", " was");
@@ -834,8 +892,14 @@ Constant COLON__TX      = ": ";
         2:  CSubjectVerb(actor, false, false, "haven't got", 0, "hasn't got",
                          "didn't have");
             " ", (the) x1, ".";
-        3:  "(first taking ", (the) x1, " off)";
-        4:  "Dropped.";
+        3:  "Dropped.";
+        4: CSubjectVerb(actor, false, false, "need to take", 0, 0, "had to take");
+           print " ", (the) x1, " ";
+           if (x2 has container)
+               print "out";
+           else
+               print "off";
+           " of ", (the) x2, " before dropping ", (ItOrThem) x1, ".";
     }
   Eat: switch (n) {
         1:  CSubjectIs(x1,true); " plainly inedible.";
@@ -902,9 +966,9 @@ Constant COLON__TX      = ": ";
         1:  print "There ";
             Tense("isn't", "wasn't");
             " anything obvious with which to fill ", (the) x1, ".";
-        2:  print "Filling ", (the) x1, " from ", (the) x2;
-            Tense(" doesn't", " didn't");
-            " make sense.";
+        2:  print "Filling ", (the) x1, " from ", (the) x2, " wouldn't ";
+            Tense("make", "have made");
+            " sense.";
     }
   FullScore: switch (n) {
         1:  if (deadflag) print "The score was "; else print "The score is ";
@@ -927,7 +991,7 @@ Constant COLON__TX      = ": ";
     }
   Go: switch (n) {
         1:  CSubjectWill(actor,true);
-            Tense(" have", " had");
+            Tense(" have", " have had");
                 " to get ", (nop) SupportObj(x1,"off","out of"), " ", (the) x1, " first.";
         2:  CSubjectCant(actor,true); " go that way.";
         3:  CSubjectIs  (actor,true); " unable to climb ", (the) x1, ".";
@@ -944,11 +1008,11 @@ Constant COLON__TX      = ": ";
         2:  CSubjectCant(x1,true); " contain things.";
         3:  CSubjectIs  (x1,true); " closed.";
         4:  CSubjectWill(actor,true);
-            Tense(" need", " needed");
+            Tense(" need", " have needed");
             " to take ", (ItOrThem) x1, " off first.";
         5:  CSubjectCant(actor,true); " put something inside itself.";
         6:  "(first taking ", (ItOrThem) x1, " off)";
-        7:  print "There ";
+        7:  print "There";
             Tense(" is", " was");
             " no more room in ", (the) x1, ".";
         8:  "Done.";
@@ -961,16 +1025,22 @@ Constant COLON__TX      = ": ";
         4:  ".";
     }
   Jump: CSubjectVerb(actor,false,false,"jump",0,"jumps","jumped"); " on the spot, fruitlessly.";
-  JumpIn:
-        print "Jumping in ", (the) x1, " ";
-        Tense("would achieve", "would have achieved");
-        " nothing here.";
-  JumpOn:
-        print "Jumping upon ", (the) x1, " ";
-        Tense("would achieve", "would have achieved");
-        " nothing here.";
+  JumpIn: switch (n) {
+        1: print "Jumping in ", (the) x1, " ";
+           Tense("would achieve", "would have achieved");
+           " nothing here.";
+        2: DecideAgainst();
+    }
+  JumpOn: switch (n) {
+        1: print "Jumping upon ", (the) x1, " ";
+           Tense("would achieve", "would have achieved");
+           " nothing here.";
+        2: DecideAgainst();
+    }
   JumpOver: switch (n) {
-        1:  CSubjectVerb(actor,true,false,"achieve",0,"achieve","achieved"); " nothing by this.";
+        1: print "Jumping over ", (the) x1, " ";
+           Tense("would achieve", "would have achieved");
+           " nothing here.";
         2:  DecideAgainst();
     }
   Kiss:     "Keep your mind on the game.";
@@ -999,15 +1069,15 @@ Constant COLON__TX      = ": ";
         21: print " (in ";
         22: print ", inside ";
     }
-  LMode1:   print " is now in its ";
+  LMode1:   print (string) Story, " is now in its ";
             if (initial_lookmode == 1) print "normal ";
             "~brief~ printing mode, which gives long descriptions
              of places never before visited and short descriptions otherwise.";
-  LMode2:   print " is now in its ";
+  LMode2:   print (string) Story, " is now in its ";
             if (initial_lookmode ~= 1 or 3) print "normal ";
             "~verbose~ mode, which always gives long descriptions
              of locations (even if you've been there before).";
-  LMode3:   print " is now in its ";
+  LMode3:   print (string) Story, " is now in its ";
             if (initial_lookmode == 3) print "normal ";
             "~superbrief~ mode, which always gives short descriptions
              of locations (even if you haven't been there before).";
@@ -1052,14 +1122,15 @@ Constant COLON__TX      = ": ";
   Mild:     "Quite.";
   Miscellany: switch (n) {
         1:  "(considering the first sixteen objects only)^";
-        2:  "Nothing to do!";
+        2:  "Nothing to do.";
         3:  print " "; CSubjectVerb(player, false, false, "died", "have died", "has died");
            print " ";
         4:  print " "; CSubjectVerb(player, false, false, "won", "have won", "has won");
             print " ";
         5:  print "^Would you like to RESTART, RESTORE a saved game";
             #Ifdef DEATH_MENTION_UNDO;
-            print ", UNDO your last move";
+           if (undo_flag ~= 0)
+               print ", UNDO your last move";
             #Endif;
             if (TASKS_PROVIDED == 0) print ", give the FULL score for that game";
             if (deadflag == 2 && AMUSING_PROVIDED == 0)
@@ -1076,7 +1147,7 @@ Constant COLON__TX      = ": ";
             Tense("is now", "was");
             print " pitch dark in ";
             Tense("here", "there");
-            "!";
+            ".";
         10: "I beg your pardon?";
         11: "[You can't ~undo~ what hasn't been done!]";
         12: "[Can't ~undo~ twice in succession. Sorry!]";
@@ -1105,12 +1176,12 @@ Constant COLON__TX      = ": ";
         29: "I didn't understand that number.";
         30: CSubjectCant(actor,true); " see any such thing.";
         31: CSubjectVerb(actor, true, false, "seem", "seem", "seems", "seemed");
-            " to have said too little!";
-        32: CSubjectIsnt(actor); " holding that!";
+            " to have said too little.";
+        32: CSubjectIsnt(actor); " holding that.";
         33: "You can't use multiple objects with that verb.";
         34: "You can only use multiple objects once on a line.";
         35: "I'm not sure what ~", (address) x1, "~ refers to.";
-        36: "You excepted something not included anyway!";
+        36: "You excepted something not included anyway.";
         37: CSubjectCan(actor,true); " only do that to something animate.";
             #Ifdef DIALECT_US;
         38: "That's not a verb I recognize.";
@@ -1124,7 +1195,7 @@ Constant COLON__TX      = ": ";
             print " of those ";
             if (x1 == 1) print "is"; else print "are";
             " available.";
-        43: "Nothing to do!";
+        43: "Nothing to do.";
         44: print "There ";
             Tense("is", "was");
             " nothing to ", (address) x1, ".";
@@ -1163,16 +1234,16 @@ Constant COLON__TX      = ": ";
             "Score notification off.";
   NotifyOn: "Score notification on.";
   Objects: switch (n) {
-        1:  "Objects ", (nop) CSubjectVerb(actor, false, true, "have", "have", "has"), " handled:^";
-        2:  "None.";
-        3:  print "   (worn)";
-        4:  print "   (held)";
-        5:  print "   (given away)";
-        6:  print "   (in ", (name) x1, ")";
-        7:  print "   (in ", (the) x1, ")";
-        8:  print "   (inside ", (the) x1, ")";
-        9:  print "   (on ", (the) x1, ")";
-        10: print "   (lost)";
+        1:  print (nop) CSubjectVerb(actor, false, false, "have", "have", "has"), " handled";
+        2:  CSubjectVerb(actor, false, false, "have", "have", "has"); " handled nothing.";
+        3:  print " (worn)";
+        4:  print " (held)";
+        5:  print " (given away)";
+        6:  print " (in ", (name) x1, ")";
+        7:  print " (in ", (the) x1, ")";
+        8:  print " (inside ", (the) x1, ")";
+        9:  print " (on ", (the) x1, ")";
+        10: print " (lost)";
     }
   Open: switch (n) {
         1:  CSubjectIs  (x1,true);
@@ -1190,8 +1261,9 @@ Constant COLON__TX      = ": ";
     }
   Order:    CSubjectHas(x1,false); " better things to do.";
   Places: switch (n) {
-        1:  print "You have visited: ";
+        1:  print (nop) CSubjectVerb(actor, false, false, "have", "have", "has"), " visited";
         2:  ".";
+        3:  CSubjectVerb(actor, false, false, "have", "have", "has"); " visited nothing.";
     }
   Pray:     print "Nothing practical ";
             Tense("results", "resulted");
@@ -1225,9 +1297,9 @@ Constant COLON__TX      = ": ";
     }
 ! Push: see Pull
   PushDir: switch (n) {
-        1:  print "That really ";
-            Tense("wouldn't", "didn't");
-            " serve any purpose.";
+        1:  print "That really wouldn't ";
+            Tense("serve", "have served");
+            " any purpose.";
         2:  print "That's ";
             Tense("not", "wasn't");
             " a direction.";
@@ -1259,8 +1331,10 @@ Constant COLON__TX      = ": ";
   Remove: switch (n) {
         1:  CSubjectIs  (x1,true); " unfortunately closed.";
         2:  print "But ";
-            CSubjectIsnt(x1,true); " there now.";
+            CSubjectIsnt(x1,true,true); " there now.";
         3:  "Removed.";
+        4:  print "But ";
+            CSubjectIsnt(x1,true,true); " in or on anything.";
     }
   Restart: switch (n) {
         1:  print "Are you sure you want to restart? ";
@@ -1275,6 +1349,36 @@ Constant COLON__TX      = ": ";
             " nothing by this.";
         2:  DecideAgainst();
     }
+  RunTimeError: print "** ";
+       switch (n) {
+       1:  print "Preposition not found (this should not occur)";
+       2:  print "Property value not routine or string: ~", (property) x2,
+               "~ of ~", (name) x1, "~ (", x1, ")";
+       3:  print "Entry in property list not routine or string: ~",
+               (property) x2, "~ list of ~", (name) x1, "~ (", x1, ")";
+       4:  print "Too many timers/daemons are active simultaneously.
+               The limit is the library constant MAX_TIMERS
+               (currently ", MAX_TIMERS, ") and should be increased";
+       5:  print "Object ~", (name) x1, "~ has no ~", (property) x2,
+               "~ property";
+       7:  print "The object ~", (name) x1, "~ can only be used as a player
+               object if it has the ~number~ property";
+       8:  print "Attempt to take random entry from an empty table array";
+       9:  print x1, " is not a valid direction property number";
+       10: print "The player-object is outside the object tree";
+       11: print "The room ~", (name) x1, "~ has no ~", (property) x2,
+               "~ property";
+       12: print "Tried to set a non-existent pronoun using SetPronoun";
+       13: print "A 'topic' token can only be followed by a preposition";
+       14: print "Overflowed buffer limit of ", x1,
+               " using '@@64output_stream 3' ", (string) x2;
+       15: print "LoopWithinObject broken because the object ",
+               (name) x1, " was moved while the loop passed through it.";
+       16: print "Attempt to use illegal narrative_voice of ", x1, ".";
+       default:
+           print "(unexplained)";
+    }
+    print " **";
   Save: switch (n) {
         1:  "Save failed.";
         2:  "Ok.";
@@ -1293,7 +1397,7 @@ Constant COLON__TX      = ": ";
     }
   ScriptOn: switch (n) {
         1:  "Transcripting is already on.";
-        2:  "Start of a transcript of";
+        2:  print "Start of a transcript of"; VersionSub();
         3:  "Attempt to begin transcript failed.";
     }
   Search: switch (n) {
@@ -1412,9 +1516,9 @@ Constant COLON__TX      = ": ";
   Touch: switch (n) {
         1:  DecideAgainst();
         2:  CSubjectVerb(actor,true,false,"feel",0,"feels","felt"); " nothing unexpected.";
-        3:  print "That really ";
-            Tense("wouldn't", "didn't");
-            " serve any purpose.";
+        3:  print "That really wouldn't ";
+            Tense("serve", "have served");
+            " any purpose.";
     }
 ! Turn: see Pull.
   Unlock:  switch (n) {
@@ -1462,10 +1566,17 @@ Constant COLON__TX      = ": ";
         }
         ", feeling foolish.";
   Wear: switch (n) {
-        1:  CSubjectCant(actor,true); " wear ", (ThatOrThose) x1, "!";
-        2:  CSubjectIs  (actor,true); " not holding ", (ThatOrThose) x1, "!";
-        3:  CSubjectIs  (actor,true); " already wearing ", (ThatOrThose) x1, "!";
+        1:  CSubjectCant(actor,true); " wear ", (ThatOrThose) x1, ".";
+        2:  CSubjectIs  (actor,true); " not holding ", (ThatOrThose) x1, ".";
+        3:  CSubjectIs  (actor,true); " already wearing ", (ThatOrThose) x1, ".";
         4:  CSubjectVerb(actor,false,false,"put on",0,"puts on","put on"); " ", (the) x1, ".";
+        5:  CSubjectVerb(actor, false, false, "need to take", 0, 0, "had to take");
+            print " ", (the) x1, " ";
+            if (x2 has container)
+                print "out";
+            else
+                print "off";
+            " of ", (the) x2, " before wearing ", (ItOrThem) x1, ".";
     }
 ! Yes:  see No.
 ];