Unspk'd bivalve action, exposing more untested surface 199/head
authorNHOrus <jy6x2b32pie9@yahoo.com>
Mon, 3 Jul 2017 03:46:24 +0000 (06:46 +0300)
committerNHOrus <jy6x2b32pie9@yahoo.com>
Mon, 3 Jul 2017 03:46:24 +0000 (06:46 +0300)
actions.c

index 08a4a7cca527f5380066b50defd361c4f735dc22..062c3721aaaf9b90936794b8b02bc35dc9162b39 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -205,21 +205,26 @@ static int bigwords(token_t foo)
 static int bivalve(token_t verb, token_t obj)
 /* Clam/oyster actions */
 {
-    int spk;
     bool is_oyster = (obj == OYSTER);
-    spk = is_oyster ? OYSTER_OPENS : PEARL_FALLS;
-    if (TOTING(obj))
-        spk = is_oyster ? DROP_OYSTER : DROP_CLAM;
-    if (!TOTING(TRIDENT))
-        spk = is_oyster ? OYSTER_OPENER : CLAM_OPENER;
-    if (verb == LOCK)
-        spk = HUH_MAN;
-    if (spk == PEARL_FALLS) {
+    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(spk);
+    rspeak(is_oyster ? OYSTER_OPENS : PEARL_FALLS);
     return GO_CLEAROBJ;
 }