State-arithmetic elimination.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 4 Jul 2017 13:17:20 +0000 (09:17 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 4 Jul 2017 13:17:20 +0000 (09:17 -0400)
actions.c
adventure.yaml
notes.adoc

index 275a607faa2ad210e84c4089552169fd835b42d5..cfbb186e66963579528402d2e74fbad18b135ec9 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -1052,9 +1052,8 @@ static int reservoir(void)
         rspeak(NOTHING_HAPPENS);
         return GO_CLEAROBJ;
     } else {
-        /* FIXME: Arithmetic on state numbers */
-        pspeak(RESER, look, game.prop[RESER] + 1, true);
-        game.prop[RESER] = 1 - game.prop[RESER];
+       state_change(RESER,
+                    game.prop[RESER] == WATERS_PARTED ? WATERS_UNPARTED : WATERS_PARTED);
         if (AT(RESER))
             return GO_CLEAROBJ;
         else {
index 00e82c99906a13e348360c8240270990ba907190..d9876b7f66f2ef008f63e49c472b629535cbcfc5 100644 (file)
@@ -3627,11 +3627,13 @@ objects: !!omap
     inventory: '*reservoir'
     locations: [LOC_RESERVOIR, LOC_RESNORTH]
     immovable: true
-    states: [WATERS_UNPARTED, WATERS_PARTED, WATERS_CRASH]
+    states: [WATERS_UNPARTED, WATERS_PARTED]
     descriptions:
     - ''
     - 'The waters have parted to form a narrow path across the reservoir.'
+    changes:
     - 'The waters crash together again.'
+    - 'The waters have parted to form a narrow path across the reservoir.'
 - OBJ_46:
     words: ['appen', 'lepor']
     inventory: 'Leporine appendage'
index 96eae077ca04f4cd73ad5952c4fbd45d4b75a1eb..c993f91a5459a5a60dff7dbb818a1ce33ef01f0e 100644 (file)
@@ -47,7 +47,7 @@ Bug fixes:
 * Reading the relocated Witt's End sign in the endgame didn't work right.
 
 * Behavior when saying the giant's magic words outside his room wasn't
-  quite corrected - the game responded as though the player were in
+  quite correct - the game responded as though the player were in
   the room.
  
 * Attempting to extinguish an unlit urn caused it to lose its oil.