Reason: only called in lock(), you can't be TOTING a clam, you can't
have the trident at a carryable oyster, and the code IMHO is more
readable this way.
-static int bivalve(token_t verb, token_t obj)
-/* Clam/oyster actions */
-{
- bool is_oyster = (obj == OYSTER);
- if (verb == LOCK) {
- rspeak(HUH_MAN);
- return GO_CLEAROBJ;
- }
- if (!TOTING(TRIDENT)) {
- rspeak(is_oyster ?
- OYSTER_OPENER :
- CLAM_OPENER);
- return GO_CLEAROBJ;
- }
- if (TOTING(obj)) {
- rspeak( is_oyster ?
- DROP_OYSTER :
- DROP_CLAM);
- return GO_CLEAROBJ;
- }
-
- if (!is_oyster) {
- DESTROY(CLAM);
- drop(OYSTER, game.loc);
- drop(PEARL, LOC_CULDESAC);
- }
- rspeak(is_oyster ?
- OYSTER_OPENS :
- PEARL_FALLS);
- return GO_CLEAROBJ;
-}
-
static void blast(void)
/* Blast. No effect unless you've got dynamite, which is a neat trick! */
{
static void blast(void)
/* Blast. No effect unless you've got dynamite, which is a neat trick! */
{
switch (obj) {
case CLAM:
switch (obj) {
case CLAM:
+ if (verb == LOCK)
+ rspeak(HUH_MAN);
+ else if (!TOTING(TRIDENT))
+ rspeak(OYSTER_OPENER);
+ else {
+ DESTROY(CLAM);
+ drop(OYSTER, game.loc);
+ drop(PEARL, LOC_CULDESAC);
+ rspeak(PEARL_FALLS);
+ }
+ return GO_CLEAROBJ;
- return bivalve(verb, obj);
+ if (verb == LOCK)
+ rspeak(HUH_MAN);
+ else
+ rspeak(OYSTER_OPENER);
+
+ return GO_CLEAROBJ;
case DOOR:
rspeak((game.prop[DOOR] == DOOR_UNRUSTED) ? OK_MAN : RUSTY_DOOR);
break;
case DOOR:
rspeak((game.prop[DOOR] == DOOR_UNRUSTED) ? OK_MAN : RUSTY_DOOR);
break;
+> unlock oyster
+
+You don't have anything strong enough to open the oyster.
+
threatening little dwarves in the room with you! Most of them throw
knives at you! All of them get you!
threatening little dwarves in the room with you! Most of them throw
knives at you! All of them get you!
-You scored 383 out of a possible 430, using 475 turns.
+You scored 383 out of a possible 430, using 476 turns.
Your score puts you in Master Adventurer Class B.
Your score puts you in Master Adventurer Class B.
find oyster
lock
lock oyster
find oyster
lock
lock oyster
drop oyster
take oyster
read oyster
drop oyster
take oyster
read oyster