summaryrefslogtreecommitdiffstats
path: root/battlestar/cypher.c
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>2000-09-17 23:03:43 +0000
committerjsm <jsm@NetBSD.org>2000-09-17 23:03:43 +0000
commite828812cad1edfdd4b4f01f93330a6421cd816ab (patch)
tree068273b7573052a26c55c3b1e4cdc0ae75dc4392 /battlestar/cypher.c
parentac0e105a1cb81cab2f045dedc161f0b856985e6b (diff)
downloadbsdgames-darwin-e828812cad1edfdd4b4f01f93330a6421cd816ab.tar.gz
bsdgames-darwin-e828812cad1edfdd4b4f01f93330a6421cd816ab.tar.zst
bsdgames-darwin-e828812cad1edfdd4b4f01f93330a6421cd816ab.zip
Patches from OpenBSD: add verbs "open"/"unlock" (essentially a no-op),
and "verbose"/"brief" (in verbose mode, always show long room descriptions), and synonyms "papaya" for "papayas" and "coconut" for "coconuts".
Diffstat (limited to 'battlestar/cypher.c')
-rw-r--r--battlestar/cypher.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/battlestar/cypher.c b/battlestar/cypher.c
index 51330f18..ea39fd39 100644
--- a/battlestar/cypher.c
+++ b/battlestar/cypher.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cypher.c,v 1.13 2000/09/10 10:51:17 jsm Exp $ */
+/* $NetBSD: cypher.c,v 1.14 2000/09/17 23:03:43 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.13 2000/09/10 10:51:17 jsm Exp $");
+__RCSID("$NetBSD: cypher.c,v 1.14 2000/09/17 23:03:43 jsm Exp $");
#endif
#endif /* not lint */
@@ -293,6 +293,23 @@ cypher()
lflag = use();
break;
+ case OPEN:
+ if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
+ int things;
+ things = 0;
+ for (n = 0; n < NUMOFOBJECTS; n++)
+ if (testbit(inven, n)) {
+ things++;
+ wordvalue[wordnumber + 1] = n;
+ dooropen();
+ }
+ wordnumber += 2;
+ if (!things)
+ puts("Nothing to open!");
+ } else
+ dooropen();
+ break;
+
case LOOK:
if (!notes[CANTSEE] || testbit(inven, LAMPON) ||
testbit(location[position].objects, LAMPON)
@@ -387,6 +404,16 @@ cypher()
free(rfilename);
break;
+ case VERBOSE:
+ verbose = 1;
+ printf("[Maximum verbosity]\n");
+ break;
+
+ case BRIEF:
+ verbose = 0;
+ printf("[Standard verbosity]\n");
+ break;
+
case FOLLOW:
lflag = follow();
break;