diff options
author | jsm <jsm@NetBSD.org> | 2000-09-22 12:37:32 +0000 |
---|---|---|
committer | jsm <jsm@NetBSD.org> | 2000-09-22 12:37:32 +0000 |
commit | 050ea43e165e4eb6cde52cd008b61052cd38019c (patch) | |
tree | 2ec14e7ebdab43d0c95e89dbe0d4645e1f2de05f /battlestar | |
parent | 71f29bcfafb9f4eb138aae227bc0a7be8b7d888e (diff) | |
download | bsdgames-darwin-050ea43e165e4eb6cde52cd008b61052cd38019c.tar.gz bsdgames-darwin-050ea43e165e4eb6cde52cd008b61052cd38019c.tar.zst bsdgames-darwin-050ea43e165e4eb6cde52cd008b61052cd38019c.zip |
Check for an object being taken not being there before checking for
whether it is too heavy or too bulky; gives a better message for "take
viper" with the viper not present.
Diffstat (limited to 'battlestar')
-rw-r--r-- | battlestar/com4.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/battlestar/com4.c b/battlestar/com4.c index 1f37eae3..31c04b97 100644 --- a/battlestar/com4.c +++ b/battlestar/com4.c @@ -1,4 +1,4 @@ -/* $NetBSD: com4.c,v 1.11 2000/09/22 08:19:21 jsm Exp $ */ +/* $NetBSD: com4.c,v 1.12 2000/09/22 12:37:32 jsm Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)com4.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: com4.c,v 1.11 2000/09/22 08:19:21 jsm Exp $"); +__RCSID("$NetBSD: com4.c,v 1.12 2000/09/22 12:37:32 jsm Exp $"); #endif #endif /* not lint */ @@ -78,12 +78,12 @@ take(from) win--; } else if (testbit(inven, value)) printf("You're already holding%s%s.\n", (objsht[value][n - 1] == 's' ? " " : " a "), objsht[value]); + else if (!testbit(from, value)) + printf("I dont see any %s around here.\n", objsht[value]); else if (!heavy) printf("The %s %s too heavy.\n", objsht[value], (objsht[value][n - 1] == 's' ? "are" : "is")); - else if (!bulky) - printf("The %s %s too cumbersome to hold.\n", objsht[value], (objsht[value][n - 1] == 's' ? "are" : "is")); else - printf("I dont see any %s around here.\n", objsht[value]); + printf("The %s %s too cumbersome to hold.\n", objsht[value], (objsht[value][n - 1] == 's' ? "are" : "is")); if (wordnumber < wordcount - 1 && wordvalue[++wordnumber] == AND) wordnumber++; else |