State-arithmetic elimination.

This commit is contained in:
Eric S. Raymond 2017-07-04 09:17:20 -04:00
parent e31e69b172
commit e1cca3b28a
3 changed files with 6 additions and 5 deletions

View file

@ -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 {

View 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'

View 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.