projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ac65f3f
)
Unspk'd bivalve action, exposing more untested surface
199/head
author
NHOrus
<jy6x2b32pie9@yahoo.com>
Mon, 3 Jul 2017 03:46:24 +0000
(06:46 +0300)
committer
NHOrus
<jy6x2b32pie9@yahoo.com>
Mon, 3 Jul 2017 03:46:24 +0000
(06:46 +0300)
actions.c
patch
|
blob
|
history
diff --git
a/actions.c
b/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 */
{
static int bivalve(token_t verb, token_t obj)
/* Clam/oyster actions */
{
- int spk;
bool is_oyster = (obj == OYSTER);
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);
}
DESTROY(CLAM);
drop(OYSTER, game.loc);
drop(PEARL, LOC_CULDESAC);
}
- rspeak(
spk
);
+ rspeak(
is_oyster ? OYSTER_OPENS : PEARL_FALLS
);
return GO_CLEAROBJ;
}
return GO_CLEAROBJ;
}