diff options
Diffstat (limited to 'battlestar/cypher.c')
-rw-r--r-- | battlestar/cypher.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/battlestar/cypher.c b/battlestar/cypher.c index a0642aec..caf4139d 100644 --- a/battlestar/cypher.c +++ b/battlestar/cypher.c @@ -1,4 +1,4 @@ -/* $NetBSD: cypher.c,v 1.20 2000/09/25 14:06:20 jsm Exp $ */ +/* $NetBSD: cypher.c,v 1.21 2000/09/25 19:37:58 jsm Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)cypher.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: cypher.c,v 1.20 2000/09/25 14:06:20 jsm Exp $"); +__RCSID("$NetBSD: cypher.c,v 1.21 2000/09/25 19:37:58 jsm Exp $"); #endif #endif /* not lint */ @@ -55,8 +55,23 @@ cypher() size_t filename_len; while (wordnumber <= wordcount) { + if (wordtype[wordnumber] != VERB && + !(wordtype[wordnumber] == OBJECT && wordvalue[wordnumber] == KNIFE)) { + printf("%s: How's that?\n", + (wordnumber == wordcount) ? words[0] : words[wordnumber]); + return (-1); + } + switch (wordvalue[wordnumber]) { + case AUXVERB: + /* + * Take the following word as the verb (e.g. + * "make love", "climb up"). + */ + wordnumber++; + continue; + case UP: if (location[position].access || wiz || tempwiz) { if (!location[position].access) |