Capture wonkyness of extinguishing urn
authorNHOrus <jy6x2b32pie9@yahoo.com>
Sun, 2 Jul 2017 07:50:07 +0000 (10:50 +0300)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 2 Jul 2017 14:16:13 +0000 (10:16 -0400)
actions.c
main.c
tests/urntest.chk
tests/urntest.log
tests/urntest2.chk
tests/urntest2.log

index b866007c00cc59ebcf447e6f81e729529c5c8a95..409e58e110eaaceb23718318dab19583f7dc7692 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -888,7 +888,7 @@ static int pour(token_t verb, token_t obj)
         game.prop[PLANT2] = game.prop[PLANT];
         return GO_MOVE;
     } else {
-       state_change(DOOR, (obj == OIL) ? DOOR_UNRUSTED: DOOR_RUSTED);
+        state_change(DOOR, (obj == OIL) ? DOOR_UNRUSTED : DOOR_RUSTED);
         return GO_CLEAROBJ;
     }
 }
diff --git a/main.c b/main.c
index 345a7b23343daa4d55b5ab96bdf43036498c612d..cf5d396c37e4af6ed2ba46ba391c6734973e552f 100644 (file)
--- a/main.c
+++ b/main.c
@@ -378,26 +378,26 @@ static bool dwarfmove(void)
                 game.newloc = travel[kk].dest;
                 /* Have we avoided a dwarf encounter? */
                 if (SPECIAL(game.newloc))
-                   continue;
+                    continue;
                 else if (!INDEEP(game.newloc))
-                   continue;
-               else if (game.newloc == game.odloc[i])
-                   continue;
+                    continue;
+                else if (game.newloc == game.odloc[i])
+                    continue;
                 else if (j > 1 && game.newloc == tk[j - 1])
-                   continue;
-               else if (j >= DIM(tk) - 1)
-                   continue;
-               else if (game.newloc == game.dloc[i])
-                   continue;
-               else if (FORCED(game.newloc))
-                   continue;
-               else if (i == PIRATE && CNDBIT(game.newloc, COND_NOARRR))
-                   continue;
-               else if (travel[kk].nodwarves)
-                   continue;
-               tk[j++] = game.newloc;
+                    continue;
+                else if (j >= DIM(tk) - 1)
+                    continue;
+                else if (game.newloc == game.dloc[i])
+                    continue;
+                else if (FORCED(game.newloc))
+                    continue;
+                else if (i == PIRATE && CNDBIT(game.newloc, COND_NOARRR))
+                    continue;
+                else if (travel[kk].nodwarves)
+                    continue;
+                tk[j++] = game.newloc;
             } while
-               (!travel[kk++].stop);
+            (!travel[kk++].stop);
         tk[j] = game.odloc[i];
         if (j >= 2)
             --j;
@@ -497,7 +497,7 @@ static bool traveleq(long a, long b)
 /* Are two travel entries equal for purposes of skip after failed condition? */
 {
     return (travel[a].cond == travel[b].cond)
-       && (travel[a].dest == travel[b].dest);
+           && (travel[a].dest == travel[b].dest);
 }
 
 /*  Given the current location in "game.loc", and a motion verb number in
@@ -637,7 +637,7 @@ static bool playermove( int motion)
                         BUG(CONDITIONAL_TRAVEL_ENTRY_WITH_NO_ALTERATION); // LCOV_EXCL_LINE
                     ++te_tmp;
                 } while
-                   (traveleq(travel_entry, te_tmp));
+                (traveleq(travel_entry, te_tmp));
                 travel_entry = te_tmp;
             }
 
@@ -679,7 +679,7 @@ static bool playermove( int motion)
                             BUG(CONDITIONAL_TRAVEL_ENTRY_WITH_NO_ALTERATION); // LCOV_EXCL_LINE
                         ++te_tmp;
                     } while
-                       (traveleq(travel_entry, te_tmp));
+                    (traveleq(travel_entry, te_tmp));
                     travel_entry = te_tmp;
                     continue; /* goto L12 */
                 case 3:
index 99c9071ba0064c5daa3dcc2d5e6aaec11496f5cb..328ab84a750272a42adeb0ed9372228933cbf398 100644 (file)
@@ -2009,13 +2009,17 @@ I'm afraid I don't understand.
 
 The urn is now dark.
 
+> extinguish urn
+
+The urn is now dark.
+
 > fly
 
 If you mean to use the persian rug, it does not appear inclined to
 cooperate.
 
 
-You scored 267 out of a possible 430, using 340 turns.
+You scored 267 out of a possible 430, using 341 turns.
 
 You have reached "Junior Master" status.
 
index 1966e864c5bd8c95da03ca2a3c6cb4a19d72d409..790ca483c2effa026d3d1918b7a654bd12bde854 100644 (file)
@@ -343,4 +343,5 @@ fill urn
 read urn
 extinguish
 extinguish urn
+extinguish urn
 fly
index 6edab41a23855ba1693527a0eb7f795ab33635f8..90bb4ffdaf5644f4590ff35e2a800aca8b0b881c 100644 (file)
@@ -1981,8 +1981,12 @@ A small urn is embedded in the rock.
 
 There is nothing here with which to fill it.
 
+> extinguish urn
 
-You scored 267 out of a possible 430, using 332 turns.
+The urn is now dark.
+
+
+You scored 267 out of a possible 430, using 333 turns.
 
 You have reached "Junior Master" status.
 
index 535aeb1142595771c6337a0af9e61d78d39ade44..af0dd874df67bc5de0b170d4720e1d07f91bcff9 100644 (file)
@@ -334,3 +334,4 @@ n
 drop bottle
 n
 fill urn
+extinguish urn