From 66fba512a7c3bb8db96e46911fabb53a1042f2a2 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 14 Jul 2017 11:33:22 -0400 Subject: [PATCH] Partially address GitLab issue #27: arbitrary_messages unreachable --- actions.c | 8 ++++++-- adventure.yaml | 4 ++-- tests/breakmirror.chk | 2 +- tests/defeat.chk | 19 +++++++++++++++---- tests/defeat.log | 5 ++++- tests/notrident.chk | 2 +- 6 files changed, 29 insertions(+), 11 deletions(-) diff --git a/actions.c b/actions.c index be822c8..46d09e1 100644 --- a/actions.c +++ b/actions.c @@ -995,7 +995,7 @@ static int lock(verb_t verb, obj_t obj) if (verb == LOCK) rspeak(HUH_MAN); else if (!TOTING(TRIDENT)) - rspeak(OYSTER_OPENER); + rspeak(CLAM_OPENER); else { DESTROY(CLAM); drop(OYSTER, game.loc); @@ -1006,8 +1006,12 @@ static int lock(verb_t verb, obj_t obj) case OYSTER: if (verb == LOCK) rspeak(HUH_MAN); - else + else if (TOTING(OYSTER)) + rspeak(DROP_OYSTER); + else if (!TOTING(TRIDENT)) rspeak(OYSTER_OPENER); + else + rspeak(OYSTER_OPENS); break; case DOOR: rspeak((game.prop[DOOR] == DOOR_UNRUSTED) ? OK_MAN : RUSTY_DOOR); diff --git a/adventure.yaml b/adventure.yaml index 742a4c3..d67535e 100644 --- a/adventure.yaml +++ b/adventure.yaml @@ -2666,7 +2666,7 @@ arbitrary_messages: !!omap - DWARF_SINGLE: 'There is a threatening little dwarf in the room with you!' - KNIFE_THROWN: 'One sharp nasty knife is thrown at you!' - SAYS_PLUGH: 'A hollow voice says "PLUGH".' -- GETS_YOU: 'It gets you!' +#- GETS_YOU: 'It gets you!' - MISSES_YOU: 'It misses!' - UNSURE_FACING: 'I am unsure how you are facing. Use compass points or nearby objects.' - NO_INOUT_HERE: |- @@ -2761,7 +2761,7 @@ arbitrary_messages: !!omap You'd best take inventory and drop something. - CLAM_BLOCKER: 'You can''t fit this five-foot clam through that little passage!' - OYSTER_BLOCKER: 'You can''t fit this five-foot oyster through that little passage!' -- DROP_CLAM: 'I advise you to put down the clam before opening it. >STRAIN!<' +#- DROP_CLAM: 'I advise you to put down the clam before opening it. >STRAIN!<' - DROP_OYSTER: 'I advise you to put down the oyster before opening it. >WRENCH!<' - CLAM_OPENER: 'You don''t have anything strong enough to open the clam.' - OYSTER_OPENER: 'You don''t have anything strong enough to open the oyster.' diff --git a/tests/breakmirror.chk b/tests/breakmirror.chk index a875555..709c352 100644 --- a/tests/breakmirror.chk +++ b/tests/breakmirror.chk @@ -2935,7 +2935,7 @@ Huh? > unlock oyster -You don't have anything strong enough to open the oyster. +I advise you to put down the oyster before opening it. >WRENCH!< > drop oyster diff --git a/tests/defeat.chk b/tests/defeat.chk index acbfc1f..dca937a 100644 --- a/tests/defeat.chk +++ b/tests/defeat.chk @@ -2914,11 +2914,20 @@ not disturb the dwarves!" An immense mirror is hanging against one wall, and stretches to the other end of the room, where various other sundry objects can be glimpsed dimly in the distance. -> e +> take oyster -There is no way to go that direction. +OK -You're at ne end. +Interesting. There seems to be something written on the underside of +the oyster. + +> drop oyster + +OK + +> open oyster + +You don't have anything strong enough to open the oyster. > sw @@ -2969,6 +2978,8 @@ OK You're at ne end. +There is an enormous oyster here with its shell tightly closed. + > listen You can hear the murmuring of the beanstalks and the snoring of the @@ -2980,7 +2991,7 @@ There is a loud explosion, and a twenty-foot hole appears in the far wall, burying the snakes in the rubble. A river of molten lava pours in through the hole, destroying everything in its path, including you! -You scored 399 out of a possible 430, using 474 turns. +You scored 399 out of a possible 430, using 476 turns. Your score puts you in Master Adventurer Class B. diff --git a/tests/defeat.log b/tests/defeat.log index a429667..c1e1ab9 100644 --- a/tests/defeat.log +++ b/tests/defeat.log @@ -468,7 +468,10 @@ e e e e -e +# Expecting failure here +take oyster +drop oyster +open oyster sw # We want the xyzzy and plugh words to fail here xyzzy diff --git a/tests/notrident.chk b/tests/notrident.chk index 2882617..3a87662 100644 --- a/tests/notrident.chk +++ b/tests/notrident.chk @@ -1271,7 +1271,7 @@ There is an enormous clam here with its shell tightly closed. > open clam -You don't have anything strong enough to open the oyster. +You don't have anything strong enough to open the clam. You scored 179 out of a possible 430, using 216 turns. -- 2.31.1