No need to tease with excluded options
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index e341d8f4d2bbcd707c8226baf6399f7d3adedc06..0100cd40d85a515e11c0df7bc9bbf991b9ff569b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -91,6 +91,7 @@ int main(int argc, char *argv[])
             oldstyle = true;
             editline = prompt = false;
             break;
+#ifndef ADVENT_NOSAVE
         case 'r':
             rfp = fopen(optarg, "r");
             if (rfp == NULL)
@@ -99,6 +100,7 @@ int main(int argc, char *argv[])
                         optarg);
             signal(SIGINT, sig_handler);
             break;
+#endif
         case 's':
             editline = false;
             break;
@@ -109,8 +111,10 @@ int main(int argc, char *argv[])
                     "  where -l creates a log file of your game named as specified'\n");
             fprintf(stderr,
                     "        -o 'oldstyle' (no prompt, no command editing, displays 'Initialising...')\n");
+#ifndef ADVENT_NOSAVE
             fprintf(stderr,
                     "        -r indicates restoring from specified saved game file\n");
+#endif
             fprintf(stderr,
                     "        -s indicates playing with command editing suppressed\n");
             exit(-1);
@@ -451,7 +455,7 @@ static bool dwarfmove(void)
     if (game.dtotal == 0)
         return true;
     SETPRM(1, game.dtotal, 0);
-    RSPEAK(DWARF_PACK + 1 / game.dtotal);      /* FIXME: Arithmetic on message number */
+    RSPEAK(game.dtotal == 1 ? DWARF_SINGLE : DWARF_PACK);
     if (attack == 0)
         return true;
     if (game.dflag == 2)game.dflag = 3;
@@ -606,7 +610,7 @@ static bool playermove(token_t verb, int motion)
             if (motion == 29 || motion == 30)spk = BAD_DIRECTION;
             if (motion == 7 || motion == 36 || motion == 37)spk = UNSURE_FACING;
             if (motion == 11 || motion == 19)spk = NO_INOUT_HERE;
-            if (verb == FIND || verb == INVENT)spk = NEreplace;
+            if (verb == FIND || verb == INVENT)spk = NEARBY;
             if (motion == 62 || motion == 65)spk = NOTHING_HAPPENS;
             if (motion == 17)spk = WHICH_WAY;
             RSPEAK(spk);
@@ -619,7 +623,7 @@ static bool playermove(token_t verb, int motion)
     do {
         /*
          * (ESR) This special-travel loop may have to be repeated if it includes
-         * the plover passage.  Same deal for any future cases wgerw we beed to
+         * the plover passage.  Same deal for any future cases where we need to
          * block travel and then redo it once the blocking condition has been
          * removed.
          */
@@ -652,7 +656,7 @@ static bool playermove(token_t verb, int motion)
             if (!SPECIAL(game.newloc))
                 return true;
             if (game.newloc <= 500) {
-                game.newloc = game.newloc - SPECIALBASE;
+                game.newloc -= SPECIALBASE;
                 switch (game.newloc) {
                 case 1:
                     /*  Travel 301.  Plover-alcove passage.  Can carry only
@@ -711,6 +715,7 @@ static bool playermove(token_t verb, int motion)
                         game.prop[BEAR] = 3;
                         game.oldlc2 = game.newloc;
                         croak();
+                       return true;
                     }
                 }
                 BUG(SPECIAL_TRAVEL_500_GT_L_GT_300_EXCEEDS_GOTO_LIST);
@@ -856,7 +861,7 @@ static void lampcheck(void)
         game.prop[BATTERY] = 1;
         if (TOTING(BATTERY))
             DROP(BATTERY, game.loc);
-        game.limit = game.limit + 2500;
+        game.limit += BATTERYLIFE;
         game.lmwarn = false;
     } else if (game.limit == 0) {
         game.limit = -1;
@@ -982,7 +987,8 @@ static bool do_command(FILE *cmdin)
             else
                 continue;      /* back to top of main interpreter loop */
         }
-        if (game.loc == 33 && PCT(25) && !game.closng)RSPEAK(SAYS_PLUGH);
+        if (game.loc == LOC_Y2 && PCT(25) && !game.closng)
+           RSPEAK(SAYS_PLUGH);
 
         listobjects();