-/* $NetBSD: com4.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
+/* $NetBSD: com4.c,v 1.10 2000/09/17 23:04:17 jsm Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)com4.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: com4.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
+__RCSID("$NetBSD: com4.c,v 1.10 2000/09/17 23:04:17 jsm Exp $");
#endif
#endif /* not lint */
clearbit(from, value);
if (value == MEDALION)
win--;
- } else
- if (testbit(inven, value))
- printf("You're already holding%s%s.\n", (objsht[value][n - 1] == 's' ? " " : " a "), 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]);
+ } else if (testbit(inven, value))
+ printf("You're already holding%s%s.\n", (objsht[value][n - 1] == 's' ? " " : " a "), 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]);
if (wordnumber < wordcount - 1 && wordvalue[++wordnumber] == AND)
wordnumber++;
else
wordvalue[wordnumber] = MAID;
wordtype[wordnumber--] = OBJECT;
return (take(from));
- } else
- if (testbit(from, DEADWOOD)) {
- wordvalue[wordnumber] = DEADWOOD;
+ } else if (testbit(from, DEADWOOD)) {
+ wordvalue[wordnumber] = DEADWOOD;
+ wordtype[wordnumber--] = OBJECT;
+ return (take(from));
+ } else if (testbit(from, DEADNATIVE)) {
+ wordvalue[wordnumber] = DEADNATIVE;
+ wordtype[wordnumber--] = OBJECT;
+ return (take(from));
+ } else {
+ if (testbit(from, DEADGOD)) {
+ wordvalue[wordnumber] = DEADGOD;
wordtype[wordnumber--] = OBJECT;
return (take(from));
- } else
- if (testbit(from, DEADNATIVE)) {
- wordvalue[wordnumber] = DEADNATIVE;
- wordtype[wordnumber--] = OBJECT;
- return (take(from));
- } else
- if (testbit(from, DEADGOD)) {
- wordvalue[wordnumber] = DEADGOD;
- wordtype[wordnumber--] = OBJECT;
- return (take(from));
- } else {
- wordvalue[wordnumber] = DEADTIME;
- wordtype[wordnumber--] = OBJECT;
- return (take(from));
- }
+ } else {
+ wordvalue[wordnumber] = DEADTIME;
+ wordtype[wordnumber--] = OBJECT;
+ return (take(from));
+ }
+ }
break;
case AMULET:
if (testbit(location[position].objects, AMULET)) {
puts("The amulet is warm to the touch, and its beauty catches your breath.");
puts("A mist falls over your eyes, but then it is gone. Sounds seem clearer");
- puts("and sharper but far away as if in a dream. The sound of purling water reaches");
- puts("you from afar. The mist falls again, and your heart leaps in horror. The gold");
- puts("freezes your hands and fathomless darkness engulfs your soul.");
+ puts("and sharper but far away as if in a dream. The sound of purling water");
+ puts("reaches you from afar. The mist falls again, and your heart leaps in horror.");
+ puts("The gold freezes your hands and fathomless darkness engulfs your soul.");
}
wordtype[wordnumber--] = OBJECT;
return (take(from));
puts("Water droplets like liquid silver bedew her golden skin, but when they part");
puts("from her, they fall as teardrops. She wraps a single cloth around her and");
puts("ties it at the waist. Around her neck hangs a golden amulet.");
- puts("She bids you to follow her.");
+ puts("She bids you to follow her, and walks away.");
pleasure++;
followgod = ourtime;
clearbit(location[position].objects, BATHGOD);
throw(name)
const char *name;
{
- int n;
+ unsigned int n;
int deposit = 0;
int first, value;
if (testbit(location[position].objects, value)) {
if (*name == 'T')
puts("Kicked instead.");
- else
- if (*name == 'G')
- puts("Given anyway.");
+ else if (*name == 'G')
+ puts("Given anyway.");
}
} else
puts("Kicked.");
snooze += CYCLE / 10;
ourtime++;
puts("Eaten. You can explore a little longer now.");
- } else
- if (ourtime < ate - CYCLE)
- puts("You're stuffed.");
- else
- if (!testbit(inven, KNIFE))
- puts("You need a knife.");
- else
- printf("You aren't holding the %s.\n", objsht[value]);
+ } else if (ourtime < ate - CYCLE)
+ puts("You're stuffed.");
+ else if (!testbit(inven, KNIFE))
+ puts("You need a knife.");
+ else
+ printf("You aren't holding the %s.\n", objsht[value]);
if (wordnumber < wordcount - 1 && wordvalue[++wordnumber] == AND)
wordnumber++;
else