summaryrefslogtreecommitdiffstats
path: root/battlestar/com6.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/com6.c
parentac0e105a1cb81cab2f045dedc161f0b856985e6b (diff)
downloadbsdgames-darwin-e828812cad1edfdd4b4f01f93330a6421cd816ab.tar.gz
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/com6.c')
-rw-r--r--battlestar/com6.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/battlestar/com6.c b/battlestar/com6.c
index 5bd9ebdc..6e7e6d94 100644
--- a/battlestar/com6.c
+++ b/battlestar/com6.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com6.c,v 1.16 2000/09/10 10:51:17 jsm Exp $ */
+/* $NetBSD: com6.c,v 1.17 2000/09/17 23:03:43 jsm Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)com6.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: com6.c,v 1.16 2000/09/10 10:51:17 jsm Exp $");
+__RCSID("$NetBSD: com6.c,v 1.17 2000/09/17 23:03:43 jsm Exp $");
#endif
#endif /* not lint */
@@ -248,3 +248,37 @@ light()
} else
puts("You're out of matches.");
}
+
+void
+dooropen()
+{ /* synonyms = {open, unlock} */
+ while(wordtype[++wordnumber] == ADJS)
+ ;
+ if (wordnumber <= wordcount && wordtype[wordnumber] == NOUNS
+ && wordvalue[wordnumber] == DOOR) {
+ switch(position) {
+ case 189:
+ case 231:
+ if (location[189].north == 231)
+ puts("The door is already open.");
+ else
+ puts("The door does not budge.");
+ break;
+ case 30:
+ if (location[30].west == 25)
+ puts("The door is gone.");
+ else
+ puts("The door is locked tight.");
+ break;
+ case 31:
+ puts("That's one immovable door.");
+ break;
+ case 20:
+ puts("The door is already ajar.");
+ break;
+ default:
+ puts("What door?");
+ }
+ } else
+ puts("That doesn't open.");
+}