* Copyright (c) 1983 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)com3.c 5.2 (Berkeley) 6/19/88";
if (testbit(inven
,SHOVEL
)){
case 144: /* copse near beach */
setbit(location
[position
].objects
,DEADWOOD
);
setbit(location
[position
].objects
,COMPASS
);
setbit(location
[position
].objects
,KNIFE
);
setbit(location
[position
].objects
,MACE
);
puts("Nothing happens.");
puts("You don't have a shovel.");
puts("Nothing happens.");
injuries
[12] = injuries
[8] = injuries
[7] = injuries
[6] = 1;
for (n
=0; n
< NUMOFOBJECTS
; n
++)
setbit(location
[position
].objects
,n
);
if (testbit(inven
,SHOVEL
)){
while(wordtype
[++wordnumber
] != OBJECT
&& wordtype
[wordnumber
] != NOUNS
&& wordnumber
< wordcount
);
value
= wordvalue
[wordnumber
];
if (wordtype
[wordnumber
] == NOUNS
&& (testbit(location
[position
].objects
,value
) || value
== BODY
))
wordtype
[wordnumber
] = OBJECT
;
if (testbit(inven
,MAID
) || testbit(location
[position
].objects
,MAID
))
if (testbit(inven
,DEADWOOD
) || testbit(location
[position
].objects
,DEADWOOD
))
if (testbit(inven
,DEADGOD
) || testbit(location
[position
].objects
,DEADGOD
))
if (testbit(inven
,DEADTIME
) || testbit(location
[position
].objects
,DEADTIME
))
if (testbit(inven
,DEADNATIVE
) || testbit(location
[position
].objects
,DEADNATIVE
))
puts("She screams as you wrestle her into the hole.");
wordtype
[wordnumber
] = OBJECT
;
if (wordtype
[wordnumber
] == OBJECT
&& position
> 88 && (testbit(inven
,value
) || testbit(location
[position
].objects
,value
))){
if (testbit(inven
,value
)){
carrying
-= objwt
[value
];
encumber
-= objcumber
[value
];
clearbit(location
[position
].objects
,value
);
printf("The %s should rest easier now.\n",objsht
[value
]);
puts("It doesn't seem to work.");
puts("You aren't holding a shovel.");
if (testbit(inven
,POTION
)){
puts("The cool liquid runs down your throat but turns to fire and you choke.");
puts("The heat reaches your limbs and tingles your spirit. You feel like falling");
for (n
=0; n
< NUMOFINJURIES
; n
++)
puts("I'm not thirsty.");
if (!testbit(inven
,LASER
))
puts("You aren't holding a blaster.");
firstnumber
= wordnumber
;
while(wordtype
[++wordnumber
] == ADJS
);
while(wordnumber
<=wordcount
&& wordtype
[wordnumber
] == OBJECT
){
value
= wordvalue
[wordnumber
];
printf("%s:\n", objsht
[value
]);
for (n
=0; objsht
[value
][n
]; n
++);
if (testbit(location
[position
].objects
,value
)){
clearbit(location
[position
].objects
,value
);
printf("The %s explode%s\n",objsht
[value
],(objsht
[value
][n
-1]=='s' ? (objsht
[value
][n
-2]=='s' ? "s." : ".") : "s."));
printf("I dont see any %s around here.\n", objsht
[value
]);
if (wordnumber
< wordcount
- 1 && wordvalue
[++wordnumber
] == AND
)
/* special cases with their own return()'s */
if (wordnumber
<= wordcount
&& wordtype
[wordnumber
] == NOUNS
){
switch(wordvalue
[wordnumber
]){
puts("The door is unhinged.");
location
[189].north
= 231;
location
[231].south
= 189;
whichway(location
[position
]);
puts("The wooden door splinters.");
whichway(location
[position
]);
puts("The laser blast has no effect on the door.");
puts("The blast hits the door and it explodes into flame. The magnesium burns");
puts("so rapidly that we have no chance to escape.");
puts("Nothing happens.");
if (testbit(location
[position
].objects
,BATHGOD
)){
puts("The goddess is hit in the chest and splashes back against the rocks.");
puts("Dark blood oozes from the charred blast hole. Her naked body floats in the");
puts("pools and then off downstream.");
clearbit(location
[position
].objects
,BATHGOD
);
setbit(location
[180].objects
,DEADGOD
);
} else if (testbit(location
[position
].objects
,NORMGOD
)){
puts("The blast catches the goddess in the stomach, knocking her to the ground.");
puts("She writhes in the dirt as the agony of death taunts her.");
puts("She has stopped moving.");
clearbit(location
[position
].objects
,NORMGOD
);
setbit(location
[position
].objects
,DEADGOD
);
puts("I don't see any goddess around here.");
if (testbit(location
[position
].objects
,TIMER
)){
puts("The old man slumps over the bar.");
clearbit(location
[position
].objects
,TIMER
);
setbit(location
[position
].objects
,DEADTIME
);
else puts("What old timer?");
if (testbit(location
[position
].objects
,MAN
)){
puts("The man falls to the ground with blood pouring all over his white suit.");
puts("Your fantasy is over.");
if (testbit(location
[position
].objects
,NATIVE
)){
puts("The girl is blown backwards several feet and lies in a pool of blood.");
clearbit(location
[position
].objects
,NATIVE
);
setbit(location
[position
].objects
,DEADNATIVE
);
} else puts("There is no girl here.");
printf("You can't shoot the %s.\n",objsht
[wordvalue
[wordnumber
]]);
else puts("You must be a looney.");