summaryrefslogtreecommitdiff
path: root/games/battlestar/cypher.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>2000-09-23 03:02:39 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>2000-09-23 03:02:39 +0000
commitf6309a870e25a5f3bdffac70b081140ced9881c8 (patch)
treef32005b4b51cc4f5cda9705ab238dd5feb29cff4 /games/battlestar/cypher.c
parent72ac17839d819818408469ecafad2cae36fbb3e8 (diff)
drop adjectives in parse(), since they're never used.
tidy a little. fix love() a bit. From conversations with jsm@netbsd.org: Add objflags[] to deal with plurals and a/an usage. Commas don't mean AND if followed by a verb. Check for object presence before trying to lift or eat it.
Diffstat (limited to 'games/battlestar/cypher.c')
-rw-r--r--games/battlestar/cypher.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/games/battlestar/cypher.c b/games/battlestar/cypher.c
index e4e6fa6799c..a8ed667c5d9 100644
--- a/games/battlestar/cypher.c
+++ b/games/battlestar/cypher.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cypher.c,v 1.9 2000/07/24 01:02:43 pjanzen Exp $ */
+/* $OpenBSD: cypher.c,v 1.10 2000/09/23 03:02:36 pjanzen Exp $ */
/* $NetBSD: cypher.c,v 1.3 1995/03/21 15:07:15 cgd Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)cypher.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: cypher.c,v 1.9 2000/07/24 01:02:43 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: cypher.c,v 1.10 2000/09/23 03:02:36 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -55,9 +55,12 @@ cypher()
char *filename, *rfilename;
size_t filename_len;
- while (wordtype[wordnumber] == ADJS)
- wordnumber++;
while (wordnumber <= wordcount) {
+ if (wordtype[wordnumber] != VERB) {
+ printf("%s: How's that?\n", words[wordnumber]);
+ return (-1);
+ }
+
switch (wordvalue[wordnumber]) {
case UP: