From: NHOrus Date: Mon, 3 Jul 2017 03:46:24 +0000 (+0300) Subject: Unspk'd bivalve action, exposing more untested surface X-Git-Tag: takebird~76 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=fc5267fe8b856de9480f2b5400fbe3a22519f0a3;p=open-adventure.git Unspk'd bivalve action, exposing more untested surface --- diff --git a/actions.c b/actions.c index 08a4a7c..062c372 100644 --- 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; }