Improved behavior when magic words are said before they're seen.
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index ab23ad99ed223646471fb1dcc021d4ac9f8a5da5..124ba44105ead1eff413e4cef8ddd29e71972d84 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1977, 2005 by Will Crowther and Don Woods
- * Copyright (c) 2017 by Eric S. Raymond
- * SPDX-License-Identifier: BSD-2-clause
+ * SPDX-FileCopyrightText: 1977, 2005 by Will Crowther and Don Woods
+ * SPDX-FileCopyrightText: 2017 by Eric S. Raymond
+ * SPDX-License-Identifier: BSD-2-Clause
  */
 
 #include <stdlib.h>
@@ -935,6 +935,8 @@ static void listobjects(void)
                     game.prop[RUG] = RUG_DRAGON;
                 if (obj == CHAIN)
                     game.prop[CHAIN] = CHAINING_BEAR;
+               if (obj == EGGS)
+                   game.seenbigwords = true;
                 --game.tally;
                 /*  Note: There used to be a test here to see whether the
                  *  player had blown it so badly that he could never ever see
@@ -1069,7 +1071,7 @@ static bool do_move(void)
 
     /* The easiest way to get killed is to fall into a pit in
      * pitch darkness. */
-    if (!FORCED(game.loc) && DARK(game.loc) && game.wzdark && PCT(35)) { // FIXME: magic number
+    if (!FORCED(game.loc) && DARK(game.loc) && game.wzdark && PCT(PIT_KILL_PROB)) {
         rspeak(PIT_FALL);
         game.oldlc2 = game.loc;
         croak();
@@ -1275,9 +1277,9 @@ int main(int argc, char *argv[])
 #endif
     while ((ch = getopt(argc, argv, opts)) != EOF) {
         switch (ch) {
-       case 'd':
-           settings.debug +=1;
-           break;
+       case 'd': // LCOV_EXCL_LINE
+           settings.debug +=1; // LCOV_EXCL_LINE
+           break; // LCOV_EXCL_LINE
         case 'l':
             settings.logfp = fopen(optarg, "w");
             if (settings.logfp == NULL)