From: Eric S. Raymond Date: Tue, 4 Jul 2017 13:17:20 +0000 (-0400) Subject: State-arithmetic elimination. X-Git-Tag: takebird~38 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=e1cca3b28a9fa2ba38d25f8a5b4f8b4ddb6417b4;p=open-adventure.git State-arithmetic elimination. --- diff --git a/actions.c b/actions.c index 275a607..cfbb186 100644 --- 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 { diff --git a/adventure.yaml b/adventure.yaml index 00e82c9..d9876b7 100644 --- a/adventure.yaml +++ b/adventure.yaml @@ -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' diff --git a/notes.adoc b/notes.adoc index 96eae07..c993f91 100644 --- a/notes.adoc +++ b/notes.adoc @@ -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.