home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!news.tek.com!master!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v15i023: dinkum - australian text adventure game, Part03/06
- Message-ID: <3981@master.CNA.TEK.COM>
- Date: 29 Nov 92 20:31:27 GMT
- Sender: news@master.CNA.TEK.COM
- Lines: 1543
- Approved: billr@saab.CNA.TEK.COM
- Xref: uunet comp.sources.games:1522
-
- Submitted-by: Gary Allen <gary@sun.mech.uq.oz.au>
- Posting-number: Volume 15, Issue 23
- Archive-name: dinkum/Part03
- Environment: Unix, DOS
-
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 3 (of 6)."
- # Contents: describe.c taker.c
- # Wrapped by billr@saab on Sun Nov 29 12:25:49 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'describe.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'describe.c'\"
- else
- echo shar: Extracting \"'describe.c'\" \(23091 characters\)
- sed "s/^X//" >'describe.c' <<'END_OF_FILE'
- X#define DSCRB
- X#include "dink_sym.h"
- X#include "dink_glb.h"
- X
- Xvoid describe(n)
- X/*********************************************************/
- X/* */
- X/* --- Room Description and Path --- */
- X/* */
- X/* Program by Gary A. Allen, Jr. 6 June 1989 */
- X/* (c) Copywrite 1989 by Gary A. Allen, Jr. */
- X/* */
- X/*********************************************************/
- Xint n ;
- X{
- X#ifdef __TURBOC__
- Xvoid ender(int) ;
- Xchar getch(void) ;
- X#endif
- X
- Xstatic int old_n, dark_count, sw_hint = FALSE ;
- Xchar chr ;
- X
- X/* room description */
- Xstatic char *descript[] = {
- X"are in a grassy meadow that stretches out in all directions", /* 0 */
- X"are on a path next to the meadow. To the east is a road.", /* 1 */
- X"are approaching a thickly wooded forest full of gum trees.", /* 2 */
- X"have hiked a short distance and then climbed up onto a river dike.",
- X"are next to a wide murky river that looks dangerous.", /* 4 */
- X"--- marker for drowing in river", /* 5 */
- X"are next to a billabong with a stream feeding into it.", /* 6 */
- X"feel something slimey under the water wraping itself around your leg.",
- X"--- marker for the bunyip", /* 8 */
- X"are back on top of the dike next to a great meandering river.",
- X"are waist deep in the stream, the water is cool and refreshing.",
- X"are in a thickly wooded forest. There is a rich eucalyptus smell",
- X"are deeper into the gum tree forest and getting disoriented.",
- X"are deep in a gum tree forest and appear to be ***lost***.", /* 13 */
- X"are wading in the billabong. The water is stagnant and smelly.",
- X"approach an area with high grass. There are grey kangaroos nearby.",
- X"are deep in the grass, which is waist high.", /* 16 */
- X"see snakes slither by in the grass. Some are quite big.", /* 17 */
- X"--- marker for the Taipan", /* 18 */
- X"leave the grassy area and head towards the meadow.", /* 19 */
- X"are on a road. Far to the east are some deserted buildings.", /* 20 */
- X"are on a broad road that stretches out to the horizon.", /* 21 */
- X"are west from the head gear of the abandoned ACME Gold Mine.", /* 22 */
- X"are in an orange desert with bulldust swirling about you.", /* 23 */
- X"are in a desert full of high sand dunes.", /* 24 */
- X"are in between two sand dunes and can see only sand.", /* 25 */
- X"are in a sandy desert with large thorny spinifexes rolling by you.",
- X"are west of the mine shaft lift. The mine tower looms over head.",
- X"are walking away from a forest of sweet smelling gum trees. ", /* 28 */
- X"find yourself on a potholed bitumen road that seems to be endless.",
- X"are southwest of the mine lift. To the south is desert.", /* 30 */
- X"are southeast of the mine lift. To the south is desert.", /* 31 */
- X"are east of the mine tower between the lift and the office.", /* 32 */
- X"are east of the mine office building. There is no door here.",
- X"are at the north eastern corner of the office building.", /* 34 */
- X"are at the north western corner of the office building.", /* 35 */
- X"are west of the ACME Gold Mine office building entrance.", /* 36 */
- X"are in the entry hall. There are doors to the north, south and west.",
- X"are in the Site Manager's office. The only exit is to the south.",
- X"are in the western section of the Geologist's Office.", /* 39 */
- X"are in the store room. The only exit is to the south.", /* 40 */
- X"are in the eastern section of the Geologist's Office.", /* 41 */
- X"continue walking on the road, which seems to go nowhere.", /* 42 */
- X"are inside the mine lift. The doorway is to the west.",
- X"are in a dimly lit tunnel going west. To the east is the lift.",
- X"are in a poorly lit tunnel going east, west and south.", /* 45 */
- X"are in a dimly lit tunnel going north. To the east is the lift.",
- X"are in a pasture. To the east is a road and west is a billabong.",
- X"are in a T-section going north, south or east.", /* 48 */
- X"are in a T-section going north, south or west.", /* 49 */
- X"are in a T-section going north, west or east.", /* 50 */
- X"are in a T-section going east, west or south.", /* 51 */
- X"are in a T-section going northeast, northwest, or southwest.", /* 52 */
- X"are in a T-section going northeast, northwest, or southeast.", /* 53 */
- X"are in a T-section going northeast, southeast, or southwest.",
- X"are in a tunnel going north and south.", /* 55 */
- X"are in a tunnel going east and west.", /* 56 */
- X"are in a tunnel going northwest and southeast.", /* 57 */
- X"are in a tunnel going northeast and southwest.", /* 58 */
- X"are in a tunnel that has a hole in the ground and goes east/west.",
- X"are in an L-section going southeast or up through a hole in the roof.",
- X"are in an L-section that goes south or up through a hole in the roof.",
- X"are in an L-section that goes east or up through a hole in the roof.",
- X"are in an L-section that goes west or up through a hole in the roof.",
- X"are in a Y-section that goes north, southeast, or southwest.", /* 64 */
- X"are in a Y-section that goes south, northeast, or northwest.", /* 65 */
- X"are in a Y-section that goes west, northeast, or southeast.", /* 66 */
- X"are in a Y-section that goes east, northwest, or southwest.", /* 67 */
- X"are in a Y-section that goes north, south, or southwest.", /* 68 */
- X"are in a Y-section that goes south, north, or northwest.", /* 69 */
- X"are in a Y-section that goes west, east, or southeast.", /* 70 */
- X"are in a Y-section that goes east, west, or southwest.", /* 71 */
- X"are in a Y-section that goes north, south, or southeast.", /* 72 */
- X"are in a Y-section that goes south, north, or northeast.", /* 73 */
- X"are in a Y-section that goes west, east, or northeast.", /* 74 */
- X"are in a Y-section that goes east, west, or northwest.", /* 75 */
- X"are in a Y-section that goes down a manhole, northwest, or southwest.",
- X"are in a Y-section that goes down a manhole, northeast, or southeast.",
- X"are at a tunnel crossing. You can go north, east, south, or west.",
- X"are at a tunnel crossing going nw, ne, sw, and se.", /* 79 */
- X"are in a tunnel corner that goes south and west.", /* 80 */
- X"are in a tunnel corner that goes south and east.", /* 81 */
- X"are in a tunnel corner that goes north and west.", /* 82 */
- X"are in a tunnel corner that goes north and east.", /* 83 */
- X"are in a tunnel corner that goes southeast and southwest.", /* 84 */
- X"are in a tunnel corner that goes southeast and northeast.", /* 85 */
- X"are in a tunnel corner that goes northwest and southwest.", /* 86 */
- X"are in a tunnel corner that goes northwest and northeast.", /* 87 */
- X"are in a tunnel going southwest with a stairway going down.", /* 88 */
- X"are in a tunnel going northeast with a stairway going up.", /* 89 */
- X"are at a deadend.", /* 90 */
- X"are in the ventilation equipment room. The exit is to the west.",
- X"are in the worker's lunch room. The exit is to the north.",
- X"are at the stope face with the hydraulic jacks still in place.",
- X"are in an ore storage area with exits to the south and west.",
- X"are in a T-section going northwest, southeast, or southwest.",
- X"are in a tunnel going northeast/southwest, with a hole in the roof.",
- X"are in a corner going north and east, with a manhole going down.",
- X"are in a tunnel going west with a stairway going up.", /* 98 */
- X"are in a tunnel going east with a stairway going down.", /* 99 */
- X"can go north or climb down a man hole.", /*100 */
- X"are at a caved in section of tunnel which is now a dead end.", /*101 */
- X"are in a bleak and forbidding desert of bare flat stone.", /*102 */
- X"are on a two lane road with gum trees on either side.", /*103 */
- X"are in a flat and boring desert.", /*104 */
- X"are in front of Ned Kelly's desert hide out.", /*105 */
- X"are in a vast desert of dry salt lakes shimmering with mirages.",
- X"are inside Ned Kelly's hide out. The only way out is to the west.",
- X"are north of a grassy area and within the bend of a great river.",
- X"are south of a grassy area and on the edge of a gum tree forest.",
- X"can go east or climb down a man hole.", /*110 */
- X"can go east, west or climb up through a hole in the roof.", /*111 */
- X"are at the Level #67 Shift Foreman's office. You can go west.",
- X"are at the spacecraft's end. You can go north, south and west.",
- X"are near the spacecraft's fin. You can go south or north-east.",
- X"are next to the ship's wing. You can go south-west or south-east.",
- X"are beside the ship's window. You can go north-west or south.",
- X"are next to the spacecraft's Mach probe. You can north or south.",
- X"are facing the access hatch. You can go up, north, or south-west.",
- X"are beside the landing gear. You can go north-east or north-west.",
- X"are beside the wing's edge. You can go north or south-east.",
- X"are in the spacecraft's airlock. You can go down or north.",
- X"are in the central access way. You can east, west, or south.",
- X"are on the flight deck of an ancient spacecraft. You can go west.",
- X"are at a mysterious control panel. You can east or west.", /*124 */
- X"are in the chamber with glowing hexagons. The only exit is east.",
- X"are in a room with a tank full of dark blue liquid. You can go west.",
- X"are in a cavernous room with a huge silver gong in the middle.",
- X"are in a room with a warning on the wall going north, south and west.",
- X"are in a closet stinking of moth balls. The only exit is north.",
- X"are in the guard room. The closet is south, the main doorway is east.",
- X"are in the prayer room of the Iranian Parliament. To escape, go west.",
- X"are in a tunnel going east and west with a message on the wall."
- X} ;
- X
- X/* give the short description */
- Xif (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])||
- X (n < 186)||(n > 202)) {
- X/* Deal with the possibility of a hint for the safe */
- X if (n == R_office_mang) {
- X if ((!sw_active)&&(object[O_rifle][J_property] != 0)&&
- X(enemy[N_ned][E_location] == B_destroyed)&&(!sw_hint)) {
- X sw_hint = TRUE ;
- Xprintf("For half of the bullets in your M-16 rifle I will\n") ;
- Xprintf("give you a hint on how to get into the safe.\n") ;
- Xprintf(" Are you interested? \n") ;
- X
- X for (;;) {
- X
- X#ifndef __TURBOC__
- X do {
- Xprintf("(Answer: Yes or No) ") ;
- X } while ('\n' == (chr = getchar())) ;
- X
- X while ('\n' != getchar()) ;
- X#endif
- X
- X#ifdef __TURBOC__
- X printf("\n") ;
- X do {
- Xprintf("(Answer: Yes or No) ") ;
- X } while ('\n' == (chr = getch())) ;
- X printf("\n") ;
- X#endif
- X
- X if (('n' == chr)||
- X('N' == chr)||('y' == chr)||('Y' == chr)) {
- X if (('y' == chr)||
- X ('Y' == chr)) {
- X object[O_rifle][J_property] /= 2 ;
- Xprintf("\nTake the missing word in the sentence:\n") ;
- Xprintf(" \"The Chook **** an egg.\"\n");
- Xprintf("and spell it backwards. Then look very carefully at the\n") ;
- Xprintf("map which you found in the manager's office. Also, you\n") ;
- Xprintf("now have %d bullets in your rifle.\n",
- X object[O_rifle][J_property]) ;
- X }
- X break ;
- X }
- X }
- X printf("\n") ;
- X }
- X }
- Xprintf ("You %s \n",descript[room[n][M_descp]]);
- X old_n = n;
- X dark_count = 0 ;
- X
- X}
- X
- X/* deal with dark rooms */
- Xelse {
- X if (n == 186) {
- Xprintf("You have entered a north/south passage which does not have\n") ;
- Xprintf("electric lighting. There is some light coming in from the\n");
- Xprintf("north, but the tunnel to the south is completely dark.\n");
- X return;
- X }
- X if (n == 187) {
- Xprintf("The tunnel you are in is pitch black. There is a little\n");
- Xprintf("light coming in from the north. If you keep going you will\n");
- Xprintf("probably fall down a hole.\n") ;
- X return ;
- X }
- X if ((n >= 188)&&(n <= 202)) {
- X if ((dark_count==0)||(old_n == n)) {
- Xprintf("You are in a mine tunnel in total darkness, which is \n") ;
- Xprintf("extremely dangerous. I have no clue where we are going.\n") ;
- Xprintf("Let's go back to where there is some light!\n") ;
- X ++dark_count ;
- X old_n = n;
- X }
- X else {
- Xprintf("Twit!! You have fallen down a hole and broken your neck!\n");
- X ender(F_died) ;
- X }
- X return ;
- X }
- X}
- X} /* end of the "describe" subroutine */
- X
- Xvoid rdtxt(k)
- X/*********************************************************/
- X/* */
- X/* --- Text for the "Read"/"Describe" Command --- */
- X/* */
- X/* Program by Gary A. Allen, Jr. 21 February 1989 */
- X/* (c) Copywrite 1989 by Gary A. Allen, Jr. */
- X/* */
- X/*********************************************************/
- Xint k;
- X{
- Xswitch(k) {
- X
- X/* text for the map fragment in the manager's office */
- Xcase O_map_frag:
- Xprintf("______________________________________________________ \n");
- Xprintf("|..................................................... \n");
- Xprintf("|...._______________________.......................... \n");
- Xprintf("|...| Current Operational |........................ \n");
- Xprintf("|...| Levels are: |......D--W--W--W--W--W- \n");
- Xprintf("|...| 0, 49, 67, 82 |......|................ \n");
- Xprintf("|...| Level #67 is depicted |......S................ \n");
- Xprintf("|...._______________________.......|................ \n");
- Xprintf("|..................................S............... \n");
- Xprintf("|..................................|............... \n");
- Xprintf("|......................S--W--W--D--W.............. \n");
- Xprintf("|......................|........|................. \n");
- Xprintf("|......................S........E--E--E--E--E--E- \n");
- Xprintf("|......................|.......................... \n");
- Xprintf("|.......[dead end]--W--*--E--[dead end].......... \n");
- Xprintf("|......................|........................ \n");
- Xprintf("|......................S......................");
- Xprintf(" The rest of the map\n");
- Xprintf("|......................|.....................");
- Xprintf(" has turned into dust.\n");
- Xprintf("|.........[false dead end (partition)]......\n");
- Xprintf("|...........^..........|................. \n");
- Xprintf("|.{use an explosive}...S.............. \n");
- Xprintf("|......................|.... \n");
- Xprintf("|.............. \n");
- X break;
- X
- X/* Can of Fourex Beer */
- Xcase O_can:
- Xprintf("You see an aluminum beer can with a hole in the bottom. The\n");
- Xprintf("can is coloured yellow-orange. Written in red letters\n");
- Xprintf("across the can's front is the following:\n\n") ;
- Xprintf(" \"CASTLEMAINE\"\n") ;
- Xprintf(" XXXX\n") ;
- Xprintf(" BITTER ALE\n\n") ;
- Xprintf("There's a picture of Fourex's Milton brewery in the middle.\n");
- X break ;
- X
- X/* Atropine pills */
- Xcase O_pills:
- Xprintf("You're holding a packet which once contained ") ;
- Xprintf("30 pills but now\nholds only") ;
- Xprintf(" %d pills. On the back of the packet is written:\n\n",
- X pill_count) ;
- Xprintf(" ATROPINE PILLS\n");
- Xprintf("The pills in this packet will protect the user against ") ;
- Xprintf("poisoning\nby organo-phosphorous ") ;
- Xprintf("compounds, i.e. VX nerve gas.\n") ;
- Xprintf(" Dosage: Take ONE pill when poisoning symptons occur.\n");
- Xprintf(" Warning: Atropine is itself a poison. An overdose can\n");
- Xprintf(" be lethal!\n\n") ;
- X break ;
- X
- X
- X/* description of Qaddafi's letter bomb */
- Xcase O_letter:
- Xprintf("___________________________________________________________\n");
- Xprintf("| +-----+ |\n");
- Xprintf("| Col. M. Gaddafi |Libya| |\n");
- Xprintf("| Azizya Barracks Postage Due |5 zl.| |\n");
- Xprintf("| Tripoli, Libya $1.50 | -o- | |\n");
- Xprintf("| +-----+ |\n");
- Xprintf("| Sam Cohen |\n");
- Xprintf("| Level #67 Shift Boss |\n");
- Xprintf("| ACME Mine Ltd. |\n");
- Xprintf("| Birdsville, Queensland 4123 |\n");
- Xprintf("| AIR MAIL Australia |\n");
- Xprintf("| |\n");
- Xprintf("___________________________________________________________\n");
- Xprintf("\n\nThe envelope must be opened before the ");
- Xprintf("letter can be read.\n\n") ;
- X break;
- X
- X/* text for the paper found in the safe */
- Xcase O_paper:
- Xprintf(" Congratulations!!! \n");
- Xprintf("You got the safe open! Now you can start scoring points for ");
- Xprintf("treasure.\n") ;
- Xprintf("Credit is awarded **only** for treasure put into the safe. ");
- Xprintf("Beware of fell\nbush ") ;
- Xprintf("rangers who steal treasure (and sometimes kill adventurers).") ;
- Xprintf("\n\n --- Concerning Gleeps ---\n");
- Xprintf("Gleeps are potent adjuncts which are credited separately from");
- Xprintf(" treasure. Gleeps\n") ;
- Xprintf("will reproduce if left undisturbed in special locations ") ;
- Xprintf("underground. However\n") ;
- Xprintf("in most locations they will remain dormant. Credit ");
- Xprintf("for gleeps is awarded \n") ;
- Xprintf("only for those placed in a \"gleep tank\". While anyone ");
- Xprintf("can gather treasure, the\n") ;
- Xprintf("ability to cultivate and collect gleeps is the mark of a ");
- Xprintf("fair dinkum master.\n") ;
- Xprintf(" Have Fun !!\n");
- X break;
- X
- X/* description of the rifle */
- Xcase O_rifle:
- Xprintf("--- You are looking at a Colt M16 infantry rifle. --- \n");
- Xprintf("This fully automatic weapon is supplied bullets from a \n") ;
- Xprintf("detachable magazine which can hold up to 200 rounds. \n") ;
- Xprintf("The rifle has a selector knob that can place the weapon \n") ;
- Xprintf("into one of four possible firing modes: \n\n") ;
- Xprintf(" SAFE = Rifle can't fire, even if dropped \n") ;
- Xprintf(" I = Single fire mode. Shoots one bullet at a time \n");
- Xprintf(" III = Triple fire mode. Shoots three bullets rapidly \n");
- Xprintf(" every time the trigger is pulled. \n") ;
- Xprintf(" AUTO = Fully automatic, firing bullets at a rate of \n") ;
- Xprintf(" 660 rounds/min. when trigger is pulled. \n\n") ;
- Xif (rifle_flag == F_safety)
- Xprintf("The rifle is currently set in the SAFE mode. \n") ;
- Xif (rifle_flag == F_single)
- Xprintf
- X ("The rifle is currently set in the \"I\" or single fire mode.\n");
- Xif (rifle_flag == F_triple)
- Xprintf("The rifle is now set in the \"III\" or triple fire mode.\n");
- Xif (rifle_flag == F_auto)
- Xprintf("The rifle is currently set in the AUTO mode. \n") ;
- Xif (clip_flag == F_no_clip)
- Xprintf("The rifle does not have an ammunition clip attached to it.\n") ;
- Xif (clip_flag == F_normal_clip) {
- X printf("The rifle has a standard ammunition clip attached ") ;
- X printf("which contains %d rounds.\n",
- X object[O_rifle][J_property]) ;
- X}
- Xif (clip_flag == F_org_clip) {
- X printf("The rifle has an orange ammunition clip attached ") ;
- X printf("which contains %d rounds.\n",
- X object[O_rifle][J_property]) ;
- X}
- X break ;
- X
- X/* description of the safe */
- Xcase O_safe:
- Xprintf("You see a conventional combination dial type wall safe \n");
- Xprintf("fixed immovably into the wall. The dial is black with \n");
- Xprintf("white numbers written onto it. The numbers range from \n");
- Xprintf("one to one hundred. Attached to the upper right hand \n");
- Xprintf("corner of the safe is a manufacturer's label which reads:\n\n");
- Xprintf(" _____________________________ \n") ;
- Xprintf(" | Kryptonite Safe Co. | \n") ;
- Xprintf(" | Model Number: C-3283 | \n") ;
- Xprintf(" | Serial Number: 10149167182 | \n") ;
- Xprintf(" | Made in Australia | \n") ;
- Xprintf(" _____________________________ \n") ;
- X break ;
- X
- X/* description of the Semtex detector*/
- Xcase O_detector:
- Xprintf("You see an olive green box with a yellow button in its\n");
- Xprintf("center, a yellow light in its upper right hand corner and\n");
- Xprintf("Cryllic writing all over it. Below the Cryllic letters\n") ;
- Xprintf("is a translation in English which reads:\n\n") ;
- Xprintf(" Mk 5.12 Semtex Explosive Detector\n") ;
- Xprintf("This device is used in detecting explosive weapons such as\n");
- Xprintf("antipersonal mines which utilize the high velocity plastic\n") ;
- Xprintf("explosive Semtex. To operate this device merely press the\n") ;
- Xprintf("yellow button and an air sample will be taken. If trace\n");
- Xprintf("amounts of Semtex are detected then a warning beeper will\n");
- Xprintf("be activated. If there is no detectable Semtex then a\n") ;
- Xprintf("yellow light will flash.\n\n") ;
- Xprintf(" Made in the Czeckoslovak Socialist Republic\n") ;
- X break ;
- X
- X/* description of the normal ammunition clip */
- Xcase O_clip:
- Xprintf("You see a conventional M16 ammunition clip. It is olive ");
- Xprintf(" green\n") ;
- Xprintf("in colour and about 30 centimeters long.\n");
- Xbreak ;
- X
- X/* description of the orange clip */
- Xcase O_org_clip:
- Xprintf("You see an M16 ammunition clip which has been painted bright");
- Xprintf(" orange.\n") ;
- Xprintf("A strange blue glow seems to be radiating from the clip. ");
- Xprintf("There is\n") ;
- Xprintf("a placard attached to the side of the clip which reads:\n\n") ;
- Xprintf(" ____________________________________________________ \n");
- Xprintf(" | Hypertoxic 0.223 Caliber Ammunition Magazine |\n");
- Xprintf(" | |\n");
- Xprintf(" | The ammunition contained in this magazine is |\n");
- Xprintf(" | manufactured from spent nuclear fuel rods composed |\n");
- Xprintf(" | of uranium and plutonium metal. The bullets have |\n");
- Xprintf(" | been hollowed out and filled with mercury metal. |\n");
- Xprintf(" | The exterior of each bullet has been striated and |\n");
- Xprintf(" | impregnated with VX nerve gas and anthrax bacillus.|\n");
- Xprintf(" | The use of this ammunition violates the Geneva |\n");
- Xprintf(" | Convention on the Rules of War, the International |\n");
- Xprintf(" | Moratorium on Biological Weapons, and the United |\n");
- Xprintf(" | Nations Charter. Close proximity to this |\n");
- Xprintf(" | ammunition can be harmful to your health. |\n");
- Xprintf(" | |\n");
- Xprintf(" | Developed under DOE Contract: LLNL 89-5632/Z |\n");
- Xprintf(" | Patent Pending |\n");
- Xprintf(" ____________________________________________________ \n");
- X break ;
- X}
- X} /* --- end of "rdtxt" subroutine --- */
- END_OF_FILE
- if test 23091 -ne `wc -c <'describe.c'`; then
- echo shar: \"'describe.c'\" unpacked with wrong size!
- fi
- # end of 'describe.c'
- fi
- if test -f 'taker.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'taker.c'\"
- else
- echo shar: Extracting \"'taker.c'\" \(28165 characters\)
- sed "s/^X//" >'taker.c' <<'END_OF_FILE'
- X#define TAKER
- X#include "dink_sym.h"
- X#include "dink_glb.h"
- X
- Xvoid taker(n)
- X/*********************************************************/
- X/* */
- X/* --- Object Taking Subroutine --- */
- X/* */
- X/* Program by Gary A. Allen, Jr. 20 May 1990 */
- X/* (c) Copywrite 1990 by Gary A. Allen, Jr. */
- X/* */
- X/*********************************************************/
- Xint n ;
- X{
- X#ifdef __TURBOC__
- Xvoid clip_in(int), clip_out(int), ender(int), eater(int) ;
- X#endif
- X
- Xregister int i, j ;
- Xint sw_done, gleep_holder, ammo_flag ;
- X
- X/* Alias in the object for the single word "take" command */
- Xif (tag[V_VERB_ONLY]) {
- X j = 0 ;
- X /* See if there is only one object on the floor */
- X for (i = 0; i <= objcnt; i++) if (n == object[i][J_loc]) {
- X j++ ;
- X tag[object[i][J_parse_id]] = TRUE ;
- X }
- X
- X if (room[n][M_gleep] != 0) {
- X j++ ;
- X tag[V_gleep] = TRUE ;
- X if (room[n][M_gleep] > 1) tag[V_PLURAL] = TRUE ;
- X }
- X
- X /* Complain if there isn't a single object on the ground */
- X if (j > 1) {
- X printf ("What exactly do you want me to take? \n");
- X return ;
- X }
- X}
- X
- Xammo_flag = F_no_clip ;
- Xif (tag[V_clip]) ammo_flag = F_normal_clip ;
- Xif (tag[V_org_clip]) ammo_flag = F_org_clip ;
- X
- X/* deal with special case of "orange clip" implied by its being alone */
- Xif (tag[V_clip]&&(object[O_clip][J_loc] != n)&&
- X (object[O_org_clip][J_loc] == n)) {
- X tag[V_org_clip] = TRUE ;
- X tag[V_clip] = FALSE ;
- X if (V_clip == sent[1]) sent[1] = V_org_clip ;
- X}
- X
- X/* deal with the verb "attach" */
- Xif (verb == V_attach) {
- X if (tag[V_rifle]&&(ammo_flag != F_no_clip)) {
- X clip_in(ammo_flag) ;
- X return ;
- X }
- X if ((n != R_office_mang)&&(room[n][M_obj_cnt] <= 0)) {
- X printf ("There is nothing here that I can attach!\n");
- X return ;
- X }
- X}
- X
- X/* Check to see if player already has the item */
- Xfor (i = 0; i <= objcnt; i++) {
- X if (object[i][J_parse_id] == sent[1]) {
- X if (object[i][J_loc] == B_have) {
- Xprintf ("You already have a %s in your possession.\n",vocab[sent[1]-1]);
- X return ;
- X }
- X else break ;
- X }
- X}
- X
- Xsw_done = FALSE ;
- X
- Xif (tag[V_safe]) {
- X if (n != R_office_mang) {
- X printf("There is no safe here. \n") ;
- X return ;
- X }
- X if (room[R_office_mang][M_rm_status] != S_open) {
- X printf("I can't do it because the safe is closed. \n") ;
- X return ;
- X }
- X}
- X
- X/* Special case of "take pill" */
- Xif ((tag[V_pill])&&(object[O_pills][J_loc] == B_have)) {
- X eater(n) ;
- X return ;
- X}
- X
- X/* Reject "take" command when there is nothing to take */
- Xif ((n != R_office_mang)&&(verb != V_attach)&&(verb != V_remove)&&
- X (room[n][M_obj_cnt] <= 0)&&(room[n][M_gleep] == 0)&&
- X (!((n == R_gleep_tank)&&(gleep_score > 0)))&&
- X (room[n][M_rm_type] != T_unmovable_obj)) {
- X printf ("There is nothing here that you can take! \n");
- X return ;
- X}
- X
- X/* player takes something from the gleep tank */
- Xif (tag[V_tank]) {
- X if (n != R_gleep_tank) {
- Xprintf("I see no gleep tank to take anything from. \n") ;
- X return ;
- X }
- Xprintf("\nYou climb up onto the edge of the gleep tank and reach\n");
- Xprintf("into the dark blue fluid. Suddenly the fluid begins a\n");
- Xprintf("furious boiling that instantly reduces your hand into\n") ;
- Xprintf("bleached white bones. The shock and pain disturbs your\n");
- Xprintf("balance and you fall into the horrible stuff!! There is\n");
- Xprintf("once again a furious boiling. Eventually the fluid stills\n");
- Xprintf("and becomes clear again. On the bottom of the tank can\n") ;
- Xprintf("be seen a white, clean, \"medical school quality\" human\n");
- Xprintf("skeleton.\n") ;
- X ender(F_died) ;
- X}
- X
- X/* gleep taking routine */
- Xif (tag[V_gleep]) {
- Xif (!tag[V_safe]) {
- X
- X /* This block is for inaccessible or nonexistant gleeps */
- X if ((room[n][M_gleep] == 0)&&(!((n == R_office_mang)&&
- X(room[R_office_mang][M_rm_status] == S_open)&&(gleep_safe != 0)))) {
- X
- X if ((n != R_gleep_tank)||(gleep_score==0)) {
- Xprintf("There are no gleeps here to take!\n") ;
- X return ;
- X }
- X else {
- Xprintf("There are no gleeps on the floor but I see ") ;
- X if (gleep_score == 1)
- X printf("a gleep in the gleep tank.\n");
- X else
- Xprintf("%d gleeps in the gleep tank.\n",gleep_score) ;
- X return ;
- X }
- X }
- X
- X /* This block is for accessible gleeps */
- X if ((n == R_office_mang)&&
- X(room[R_office_mang][M_rm_status] == S_open)&&(gleep_safe != 0)) {
- X gleep_holder = gleep_safe ;
- X }
- X else gleep_holder = 0 ;
- X
- X if ((!tag[V_PLURAL])||
- X (room[n][M_gleep]+gleep_holder == 1)) {
- X printf("Gleep taken. \n") ;
- X ++gleep_count ;
- X if (gleep_holder == 0) --room[n][M_gleep] ;
- X else --gleep_holder ;
- X }
- X else {
- X printf("Gleeps taken. \n") ;
- X gleep_count += room[n][M_gleep]+gleep_holder ;
- X room[n][M_gleep] = 0 ;
- X gleep_holder = 0 ;
- X }
- X gleep_safe = gleep_holder ;
- X return ;
- X}
- Xelse {
- X if ((n == R_office_mang)&&
- X(room[R_office_mang][M_rm_status] == S_open)&&(gleep_safe != 0)) {
- X if (tag[V_PLURAL]) {
- X printf("Gleeps taken from safe. \n") ;
- X gleep_count += gleep_safe ;
- X gleep_safe = 0 ;
- X }
- X else {
- X printf("Gleep taken from safe. \n") ;
- X ++gleep_count ;
- X --gleep_safe ;
- X }
- X }
- X else printf("There are no gleeps in the safe!\n") ;
- X return ;
- X}
- X} /* end of the gleep taking block */
- X
- X/* deal with the special case of the platypus picture */
- Xif ((n == R_office_mang) && tag[V_picture]) {
- Xprintf("The picture can not be removed. It appears to be hinged ");
- Xprintf("to the wall. \n");
- X return ;
- X}
- X
- X/* treat the verb "remove" in the context of "remove clip from rifle" */
- Xif (verb == V_remove) {
- X if ((!tag[V_safe])&&(ammo_flag != F_no_clip)) {
- X clip_out(n) ;
- X return ;
- X }
- X}
- X
- Xif (carry_count > 5) {
- Xprintf("I can't do it!\n") ;
- Xprintf("I'm holding so many things that I can't take anymore!\n") ;
- X return ;
- X}
- X
- Xif (carry_weight >= 800) {
- Xprintf("I can't do it!\n") ;
- Xprintf("This junk I'm carrying is too heavy! I can't carry anymore!\n");
- X return ;
- X}
- X
- X
- X/* find the object(s) in this room */
- Xfor (i = 0; i <= objcnt; i++) {
- X
- X if ((carry_count > 5)||(carry_weight >= 800)) break ;
- X
- X /* See if the object is in the safe and was requested */
- X if ((n == R_office_mang)&&(object[i][J_loc] == B_in_safe)&&
- X (tag[object[i][J_parse_id]]||tag[V_all])&&
- X (room[R_office_mang][M_rm_status] == S_open)&&
- X ((!tag[V_treasure])||(object[i][J_value] > 0))) {
- X object[i][J_loc]= B_have;
- X carry_count++ ;
- X carry_weight += object[i][J_weight] ;
- X sw_done = TRUE ;
- X }
- X
- X /* See if the object is in the room and was requested */
- X if ((object[i][J_loc]==n)&&(tag[object[i][J_parse_id]]||
- X tag[V_all])&&
- X ((!tag[V_treasure])||(object[i][J_value] > 0))) {
- X /* see if the object can be taken */
- X if ((object[i][J_type] == Z_normal)||
- X (object[i][J_type] == Z_alias)) {
- X --room[n][M_obj_cnt] ;
- X carry_count++ ;
- X carry_weight += object[i][J_weight] ;
- X object[i][J_loc] = B_have;
- X sw_done = TRUE ;
- X }
- X
- X /* see if this is a nonmovable, nonacting object */
- X if ((object[i][J_type] == Z_unmovable) &&
- X (object[i][J_loc]==n) && (!tag[V_all])) {
- X
- X switch(object[i][J_parse_id]) {
- X case V_bulldust:
- Xprintf("The bulldust is so fine that it wafts away with a touch.\n") ;
- X return ;
- X
- X /* Cockroach(es) */
- X case V_cockroach:
- Xprintf("I will not touch the filthy things!\n") ;
- X return ;
- X
- X /* Kangaroo(s) */
- X case V_kangaroo:
- Xprintf("You make a grab for the kangaroo but it leaps away!\n") ;
- X return ;
- X
- X case V_poster:
- Xprintf("I think this sort of poster is best left on the wall.\n") ;
- X return ;
- X
- X /* Spinifex(es) */
- X case V_spinifex:
- Xprintf("The thorns on the spinifex are large and nasty.\n") ;
- Xprintf("I'll just leave them to roll about.\n") ;
- X return ;
- X } /* end of switch block */
- X } /* end of nonmovable object block */
- X
- X /* see if taking the object causes special action */
- X if (object[i][J_type] == Z_transform) {
- X switch(object[i][J_parse_id]) {
- X /* ACME doormat */
- X case V_mat:
- Xprintf("As you lift up the dirty old doormat, you find half \n") ;
- Xprintf("hidden in the dust.... a large brass key. \n") ;
- X object[O_mat][J_type] = Z_normal ;
- X carry_count++ ;
- X carry_weight += object[O_mat][J_weight];
- X object[O_mat][J_loc]= B_have;
- X object[O_key][J_loc]=R_office_entr ;
- X sw_done = TRUE ;
- X return ;
- X
- X /* Map of the ACME Mine */
- X case V_map:
- Xprintf("As you picked up the old map from the floor, most of it");
- Xprintf(" crumbled into \ndust leaving only one small piece. \n") ;
- X object[O_map][J_loc] = B_unmade ;
- X object[O_map_frag][J_loc] = B_have ;
- X carry_count++ ;
- X carry_weight += object[O_map_frag][J_weight] ;
- X --room[n][M_obj_cnt] ;
- X sw_done = TRUE ;
- X return ;
- X }
- X } /* end of the special action block */
- X }
- X} /* end of the object scan loop */
- X
- X/* take all gleeps if any */
- Xif (tag[V_all]&&(!tag[V_treasure])) {
- X if (room[n][M_gleep] > 0) {
- X gleep_count += room[n][M_gleep] ;
- X room[n][M_gleep] = 0 ;
- X sw_done = TRUE ;
- X }
- X if ((gleep_safe != 0)&&(n == R_office_mang)&&
- X (room[R_office_mang][M_rm_status] == S_open)) {
- X gleep_count += gleep_safe ;
- X gleep_safe = 0 ;
- X sw_done = TRUE ;
- X }
- X}
- X
- X/* Announce the "take" was successful */
- Xif (sw_done) {
- X if (((carry_count > 5)||(carry_weight >= 800))&&(tag[V_all]))
- X printf("You've taken as much as you can.\n") ;
- X else printf ("Done \n");
- X}
- X/* --or-- announce the "take" was unsuccessful */
- Xelse {
- X if (tag[V_all]) printf("I see nothing which I can take.\n") ;
- X else {
- X if (tag[V_VERB_ONLY])
- X printf("What exactly should I take?\n") ;
- X else {
- X printf ("I don't see a") ;
- X if (tag[V_PLURAL]) printf("ny") ;
- X printf (" %s around here. \n",vocab[sent[1]-1]);
- X }
- X }
- X}
- Xreturn ;
- X
- X} /* --- end of the "taker" subroutine --- */
- X
- Xvoid loader()
- X/*********************************************************/
- X/* */
- X/* --- Rifle Loading Subroutine --- */
- X/* */
- X/* Program by Gary A. Allen, Jr. 29 April 1990 */
- X/* (c) Copywrite 1990 by Gary A. Allen, Jr. */
- X/* */
- X/*********************************************************/
- X{
- X
- X#ifdef __TURBOC__
- Xvoid clip_in(int) ;
- X#endif
- X
- Xint ammo_flag ;
- X
- X/* Reject single verb load command */
- Xif (tag[V_VERB_ONLY]) {
- Xprintf("What exactly do you want me to load?\n") ;
- X return ;
- X}
- Xif (!tag[V_rifle]) {
- Xprintf("I don't know how I could load that.\n") ;
- X return ;
- X}
- X
- X/* Deal with implied clip type command */
- Xif (!tag[V_clip]) {
- Xif ((object[O_clip][J_loc] != B_have)&&
- X (object[O_org_clip][J_loc] == B_have)) ammo_flag = F_org_clip ;
- Xif ((object[O_clip][J_loc] == B_have)&&
- X (object[O_org_clip][J_loc] != B_have)) ammo_flag = F_normal_clip ;
- X /* the case were there is no clip is found in clip_in */
- X}
- X
- X/* Deal with specific "load [orange] clip" command */
- Xelse {
- X if (tag[V_orange]) {
- X if (object[O_org_clip][J_loc] == B_have)
- X ammo_flag = F_org_clip ;
- X else {
- Xprintf("You don't possess the orange ammunition clip.\n") ;
- X return ;
- X }
- X }
- X else {
- X if (object[O_clip][J_loc] == B_have)
- X ammo_flag = F_normal_clip ;
- X
- X/* assume "load clip" with no normal clip implies orange clip */
- X else {
- X if (object[O_org_clip][J_loc] == B_have)
- X ammo_flag = F_org_clip ;
- X else{
- Xprintf("You don't possess an ammunition clip to load.\n") ;
- X return ;
- X }
- X }
- X }
- X}
- X
- Xclip_in(ammo_flag) ;
- X} /* --- end of the "loader" subroutine --- */
- X
- Xvoid unloader(n)
- X/*********************************************************/
- X/* */
- X/* --- Rifle Unloading Subroutine --- */
- X/* */
- X/* Program by Gary A. Allen, Jr. 29 April 1990 */
- X/* (c) Copywrite 1990 by Gary A. Allen, Jr. */
- X/* */
- X/*********************************************************/
- Xint n ;
- X{
- X#ifdef __TURBOC__
- Xvoid clip_out(int) ;
- X#endif
- X
- X/* Reject single verb load command */
- Xif (tag[V_VERB_ONLY]) {
- Xprintf("What exactly do you want me to unload?\n") ;
- X return ;
- X}
- Xif (!tag[V_rifle]) {
- Xprintf("I don't know how I could unload that.\n") ;
- X return ;
- X}
- Xclip_out(n) ;
- X} /* --- end of the "unloader" subroutine --- */
- X
- Xvoid dropper(n)
- X/*********************************************************/
- X/* */
- X/* --- Object Dropping Subroutine --- */
- X/* */
- X/* Program by Gary A. Allen, Jr. 21 May 1990 */
- X/* (c) Copywrite 1990 by Gary A. Allen, Jr. */
- X/* */
- X/*********************************************************/
- Xint n ;
- X{
- X#ifdef __TURBOC__
- Xvoid clip_in(int), clip_out(int), boom(void) ;
- Xvoid objlooker(int), gleeper(int), unlocker(int) ;
- X#endif
- X
- Xregister int i, k ;
- Xint sw_possess, sw_done, ammo_flag, sw_object, i_10, i_fract, sw_shot ;
- X
- X/* respond to "verb only" command */
- Xif (tag[V_VERB_ONLY]) {
- X printf ("You'll have to be more specific. \n");
- X return ;
- X}
- X
- X/* deal with special case of "orange clip" implied by its being alone */
- Xif (tag[V_clip]&&(object[O_clip][J_loc] != B_have)&&
- X (clip_flag != F_normal_clip)&&
- X ((object[O_org_clip][J_loc] == B_have)||(clip_flag == F_org_clip))) {
- X tag[V_org_clip] = TRUE ;
- X tag[V_clip] = FALSE ;
- X if (V_clip == sent[1]) sent[1] = V_org_clip ;
- X}
- X
- Xammo_flag = F_no_clip ;
- Xif (tag[V_clip]) ammo_flag = F_normal_clip ;
- Xif (tag[V_org_clip]) ammo_flag = F_org_clip ;
- X
- X/* deal with special cases of the verbs */
- Xswitch(verb) {
- Xcase V_put:
- X /* special case of putting (destroying) an object in water */
- X if (tag[V_tank]||tag[V_gleep]||tag[V_safe]||
- X tag[V_river]||tag[V_billabong]||tag[V_stream]) break ;
- X
- X /* special case of "put key in door(lock)" */
- X if (tag[V_key] && tag[V_door]) {
- X unlocker(n) ;
- X return ;
- X }
- X
- X if (!tag[V_cap]) {
- X if ((!tag[V_rifle])&&(ammo_flag != F_no_clip)) {
- X printf("What am I to put the clip into? \n") ;
- X return ;
- X }
- X if (tag[V_rifle]&&(ammo_flag != F_no_clip))
- X clip_in(ammo_flag) ;
- X else
- Xprintf("I don't understand what this is to be put into. \n") ;
- X return ;
- X }
- X
- Xcase V_insert:
- X if (tag[V_safe]) break ;
- X if (ammo_flag != F_no_clip) {
- X if (!tag[V_rifle]) {
- Xprintf("What am I to insert the clip into? \n") ;
- X }
- X else {
- X clip_in(ammo_flag) ;
- X }
- X return ;
- X }
- X if (tag[V_cap]) {
- X if (!tag[V_dynamite]) {
- Xprintf("I see no reason why I should put a blasting cap into that.\n") ;
- X return ;
- X }
- X else goto cap_in ;
- X }
- Xprintf("I can think of some interesing places to insert this. \n") ;
- Xprintf("However I shall not reduce myself to such vulgarity.\n");
- X return ;
- X
- Xcase V_eject:
- X/* Command "eject clip" ejects clip from rifle no matter what type*/
- X if ((ammo_flag == F_normal_clip)&&(clip_flag == F_org_clip))
- X ammo_flag = F_org_clip ;
- Xcase V_drop:
- X if (((ammo_flag == F_org_clip)&&(clip_flag == F_org_clip))||
- X ((ammo_flag == F_normal_clip)&&(clip_flag == F_normal_clip))) {
- X clip_out(n) ;
- X return ;
- X }
- X break ;
- X
- X} /* end of switch */
- X
- X/* Deal with "drop" when user has no objects */
- Xif (tag[V_all]&&(carry_count == 0)&&(gleep_count == 0)) {
- X printf("You dill! You have nothing to drop!\n") ;
- X return ;
- X}
- X
- X/* deal with "drop in safe ..." errors */
- Xif (tag[V_safe]) {
- X/* see if this is the managers office */
- X if (n != R_office_mang) {
- X printf("There is no safe here! \n");
- X return ;
- X }
- X/* See if the safe is open */
- X if (room[R_office_mang][M_rm_status] != S_open) {
- X printf ("I can't do it! The safe is closed. \n");
- X return ;
- X }
- X}
- X
- X/* gleep droping routine */
- Xif (tag[V_gleep]||tag[V_tank]) {
- X /* drop gleeps in a normal way */
- X if (!tag[V_tank]) {
- X if (gleep_count == 0) {
- X printf("You have no gleeps to drop! \n") ;
- X return ;
- X }
- X if ((!tag[V_PLURAL])||(gleep_count == 1)) {
- X if (tag[V_safe]) {
- X printf("Gleep put into safe.\n") ;
- X ++gleep_safe ;
- X --gleep_count ;
- X }
- X else {
- X printf("Gleep dropped. \n") ;
- X --gleep_count ;
- X ++room[n][M_gleep] ;
- X }
- X }
- X else {
- X if (tag[V_safe]) {
- X printf("Gleeps put into safe.\n") ;
- X gleep_safe += gleep_count ;
- X gleep_count = 0 ;
- X }
- X else {
- X printf("Gleeps dropped. \n") ;
- X room[n][M_gleep] += gleep_count ;
- X gleep_count = 0 ;
- X }
- X }
- X gleep_drop = TRUE ;
- X return ;
- X }
- X /* drop objects(including gleeps) into a gleep tank */
- X else {
- X if (n != R_gleep_tank) {
- X printf("I don't see a gleep tank here. \n") ;
- X return ;
- X }
- X if (tag[V_gleep]) {
- X if (gleep_count <= 0) {
- Xprintf("You have no gleeps to put in the tank. \n") ;
- X return ;
- X }
- X if ((!tag[V_PLURAL])||(gleep_count == 1)) {
- Xprintf("Your gleep falls into the tank with a \"plonk\".\n") ;
- X ++gleep_score ;
- X --gleep_count ;
- X }
- X if (tag[V_PLURAL]&&(gleep_count > 1)) {
- Xprintf("Your gleeps fall into the tank causing a splash.\n") ;
- X gleep_score += gleep_count ;
- X gleep_count = 0 ;
- X }
- X }
- X /* drop non-gleeps into the tank */
- X
- X /* the "drop all" routine */
- X if (tag[V_all]) {
- X sw_possess = FALSE ;
- X for (i = 0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == B_have)&&
- X ((!tag[V_treasure])||
- X (object[i][J_value] > 0))) {
- X sw_possess = TRUE ;
- X object[i][J_loc] = B_destroyed;
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X }
- X }
- X if (gleep_count == 0) {
- X if (sw_possess) {
- Xprintf("You dump everything into the gleep tank. There is a furious\n");
- Xprintf("bubbling as the corrosive fluid of the tank turns the\n");
- Xprintf("objects into NOTHING.\n") ;
- X }
- X else
- Xprintf("You've got nothing to throw into the tank.\n") ;
- X }
- X else {
- X if (sw_possess) {
- Xprintf("You fling everything into the gleep tank. The gleep");
- X if (gleep_count > 1) {
- Xprintf("s\nsplash into the tank and settle to the bottom of the\n") ;
- X }
- X else {
- Xprintf("\nplonks into the tank and settles to the bottom of the\n") ;
- X }
- Xprintf("tank. However the other objects begin to dissolve the\n");
- Xprintf("moment the tank's fluid touches them. Time passes and\n");
- Xprintf("the objects dissolve into NOTHING.\n") ;
- X }
- X /* you possess no non-gleeps */
- X else {
- X if (gleep_count == 1)
- Xprintf("Your gleep falls into the tank with a \"plonk\".\n") ;
- X else
- Xprintf("Your gleeps fall into the tank causing a splash.\n") ;
- X }
- X gleep_score += gleep_count ;
- X gleep_count = 0 ;
- X return ;
- X }
- X } /* end of the "drop all" if block */
- X /* Individual non-gleeps are dropped into the tank */
- X
- X /* see if your are holding the object(s) */
- X for (i=0; i <= objcnt; i++) {
- X if (tag[object[i][J_parse_id]]) {
- X if (object[i][J_loc]== B_have) {
- Xprintf ("You fling the %s into the gleep tank. As soon as it\n",
- X vocab[object[i][J_parse_id]-1]);
- Xprintf ("touched the tank's fluid there was a furious effervescence\n");
- Xprintf ("as it began to dissolve. With the passage of time, the\n") ;
- Xprintf ("fluid stills and there is NOTHING left.\n") ;
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X object[i][J_loc] = B_destroyed;
- X return ;
- X }
- X else {
- Xprintf("You don't have a %s to toss into the gleep tank.\n",
- X vocab[object[i][J_parse_id]-1]);
- X return ;
- X }
- X }
- X } /* object scan "for" loop */
- X return ;
- X }
- X}
- X
- Xsw_done = FALSE ;
- X
- X/* the "drop all" routine */
- Xif (tag[V_all]) {
- X
- X /* Deal with throwing stuff into water */
- X if(tag[V_stream]) {
- X if (n == R_stream) {
- Xprintf("You fling everything into the stream.\n");
- X goto destroy_all ;
- X }
- X else
- Xprintf("I see no stream to toss stuff into.\n") ;
- X return ;
- X }
- X if(tag[V_billabong]) {
- X if ((n == R_stream)||(n == R_slime)||
- X (n == R_billabong)) {
- Xprintf("You fling everything into the billabong.\n");
- X goto destroy_all ;
- X }
- X else
- Xprintf("I see no billabong to toss stuff into.\n") ;
- X return ;
- X }
- X if(tag[V_river]) {
- X if ((n == R_dike)||(n == R_river_edge)||
- X (n == R_river_exit)) {
- Xprintf("You fling everything into the river.\n");
- X goto destroy_all ;
- X }
- X else
- Xprintf("I see no river to toss stuff into.\n") ;
- X return ;
- X }
- X
- X if (!tag[V_safe]) {
- X /* normal drop */
- X if (room[n][M_rm_type] != T_looping) {
- X /* normal room */
- X for (i = 0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == B_have)&&
- X ((!tag[V_treasure])||
- X (object[i][J_value] > 0))) {
- X
- X sw_done = TRUE ;
- X
- X/* see if the blasting cap was hard dropped */
- Xif ((i == O_cap)&&(verb != V_slow_drop)) {
- Xcap_drop:
- Xprintf("Bang!! The blasting cap you were carrying detonated when\n") ;
- Xprintf("it hit the ground. Fortunately no damage was caused.\n") ;
- X object[O_cap][J_loc] = B_destroyed;
- X carry_count-- ;
- X carry_weight -= object[O_cap][J_weight] ;
- X return ;
- X}
- X
- X/* see if the dynamite with blasting cap was hard dropped */
- Xif ((i == O_dynamite)&&(object[O_dynamite][J_type] == Z_alias)&&
- X (verb != V_slow_drop)) {
- Xdynamite_drop:
- X boom () ;
- Xprintf("Dropping a stick of dynamite with a blasting cap in it\n");
- Xprintf("ranks high as one of the dumbest things a person can do.\n") ;
- Xprintf("Needless to say you were blown to bits.\n") ;
- X ender(F_died) ;
- X}
- X ++room[n][M_obj_cnt] ;
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X object[i][J_loc] = n;
- X/* set valuable switch if valuable object dropped in Ned's area */
- X if (object[i][J_value] > 0) {
- X for (k = 22; k <= 41; k++)
- X if (k == n) sw_valuable = TRUE;
- X for (k = 144; k <= 146; k++)
- X if (k == n) sw_valuable = TRUE;
- X }
- X }
- X }
- X /* drop all gleeps */
- X if ((gleep_count > 0)&&
- X (!tag[V_treasure])) {
- X room[n][M_gleep] += gleep_count ;
- X gleep_count = 0 ;
- X sw_done = TRUE ;
- X gleep_drop = TRUE ;
- X }
- X
- X if (sw_done) {
- X printf ("Done\n");
- X objlooker(n) ;
- X gleeper(n) ;
- X }
- X else printf("Don't have it to drop.\n") ;
- X return ;
- X }
- X /* object destroyer room */
- X else {
- X /* Code assumes that user has something to drop */
- Xprintf ("You dropped everything you had in a heap, which \n");
- Xprintf ("promptly vaporized into a bright blue flash followed \n");
- Xprintf ("by a low \"BOOM\". \n") ;
- Xprintf (" --- You've blown it Bozo!! ---\n") ;
- Xdestroy_all:
- X gleep_count = 0 ;
- X carry_count = 0 ;
- X carry_weight = 0 ;
- X for (i = 0; i <= objcnt; i++) {
- X if (object[i][J_loc] == B_have)
- X object[i][J_loc] = B_destroyed;
- X }
- X return ;
- X }
- X }
- X /* "drop all into the safe" routine */
- X else {
- X for (i = 0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == B_have) &&
- X ((!tag[V_treasure])||
- X (object[i][J_value] > 0))) {
- X object[i][J_loc] = B_in_safe ;
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X sw_done = TRUE ;
- X }
- X }
- X if (!tag[V_treasure]) {
- X gleep_safe += gleep_count ;
- X gleep_count = 0 ;
- X sw_done = TRUE ;
- X }
- X if (sw_done) printf ("Done \n");
- X else printf("You don't have it to put in the safe!\n") ;
- X return ;
- X }
- X}
- X
- X/* see if your are holding the object(s) */
- Xfor (i=0; i <= objcnt; i++) {
- X sw_object = FALSE ;
- X if (tag[object[i][J_parse_id]]) {
- X sw_object = TRUE ;
- X if (object[i][J_loc] == B_have) {
- X /* Safe storage routine */
- X if (tag[V_safe]) {
- X object[i][J_loc] = B_in_safe ;
- Xprintf ("The %s is now inside the safe. \n",
- X vocab[object[i][J_parse_id]-1]);
- X sw_done = TRUE ;
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X continue ;
- X }
- X
- X /* Single 'drop' routine */
- X if (tag[V_river]||tag[V_billabong]||
- X tag[V_stream]) {
- X /* The object is to be dropped in water */
- X if(tag[V_stream]) {
- X if (n == R_stream) {
- Xprintf("You fling the %s into the stream.\n",
- X vocab[object[i][J_parse_id]-1]);
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X object[i][J_loc] = B_destroyed;
- X return ;
- X }
- X else
- Xprintf("I see no stream to toss it into.\n") ;
- X return ;
- X }
- X if(tag[V_billabong]) {
- X if ((n == R_stream)||
- X (n == R_slime)||(n == R_billabong)) {
- Xprintf("You fling the %s into the billabong.\n",
- X vocab[object[i][J_parse_id]-1]);
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X object[i][J_loc] = B_destroyed;
- X return ;
- X }
- X else
- Xprintf("I see no billabong to toss it into.\n") ;
- X return ;
- X }
- X if(tag[V_river]) {
- X if ((n == R_dike)||(n == R_river_edge)||
- X (n == R_river_exit)) {
- Xprintf("You fling the %s into the river.\n",
- X vocab[object[i][J_parse_id]-1]);
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X object[i][J_loc] = B_destroyed;
- X return ;
- X }
- X else
- Xprintf("I see no river to toss it into.\n") ;
- X return ;
- X }
- X }
- X /* Normal Drop */
- X else if (room[n][M_rm_type] != T_looping) {
- X if ((i == O_cap)&&(verb != V_slow_drop))
- X goto cap_drop ;
- X if ((i==O_dynamite)&&(verb != V_slow_drop)&&
- X (object[O_dynamite][J_type] == Z_alias))
- X goto dynamite_drop ;
- X
- X/* If the he rifle is dropped. See if it kills the player */
- Xif (i==O_rifle) {
- X sw_shot = FALSE ;
- X if ((clip_flag != F_no_clip) &&
- X(object[O_rifle][J_property] > 0)) switch(rifle_flag) {
- X case F_safety:
- X break ;
- X
- X case F_single:
- X printf("\nBam!\n\n") ;
- X sw_shot = TRUE ;
- X break ;
- X
- X case F_triple:
- X printf("\n") ;
- X if (object[O_rifle][J_property] >= 3) {
- X printf("Bam! Bam! Bam! \n\n") ;
- X }
- X else {
- X for (i = 1; i <= object[O_rifle][J_property]; i++)
- X printf("Bam! ") ;
- X }
- X printf("\n") ;
- X sw_shot = TRUE ;
- X break ;
- X
- X case F_auto:
- X printf("\n") ;
- X if (object[O_rifle][J_property] >= 30) {
- X for (i = 1; i <= 3; i++)
- Xprintf("Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! \n") ;
- X }
- X else {
- X i_10 = object[O_rifle][J_property]/10 ;
- X i_fract = object[O_rifle][J_property]-(i_10*10) ;
- X for (i = 1; i <= i_10; i++)
- Xprintf("Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! \n") ;
- X for (i = 1; i <= i_fract; i++)
- X printf("Bam! ") ;
- X }
- X printf("\n") ;
- X sw_shot = TRUE ;
- X break ;
- X } /* end of the switch block */
- X
- X if (sw_shot) {
- Xprintf("Dropping a loaded and armed automatic rifle is a stupid way\n");
- X if ((object[O_rifle][J_property] == 1) ||
- X (rifle_flag == F_single)) {
- Xprintf("to commit suicide. Needless to say you were hit by the\n") ;
- Xprintf("bullet after the rifle went off.\n") ;
- X }
- X else {
- Xprintf("to commit suicide. The bullets shot from the rifle fly\n") ;
- Xprintf("around. One of them bounces back and hits you!\n") ;
- X }
- X ender(F_died) ;
- X }
- X} /* end of "drop rifle" block */
- X
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X ++room[n][M_obj_cnt] ;
- X object[i][J_loc] = n;
- X sw_done = TRUE ;
- X/* set valuable switch if valuable object dropped in Ned's area */
- X if (object[i][J_value] > 0) {
- X for (k = 22; k <= 41; k++)
- X if (k == n) sw_valuable = TRUE ;
- X for (k = 144; k <= 146; k++)
- X if (k == n) sw_valuable = TRUE ;
- X }
- X continue ;
- X }
- X else {
- Xprintf ("As the %s left your possession there was a bright \n",
- X vocab[object[i][J_parse_id]-1]);
- Xprintf ("blue flash, followed by a low \"BOOM\" as it vaporized \n");
- Xprintf ("into nonexistence. \n");
- X carry_count-- ;
- X carry_weight -= object[i][J_weight] ;
- X object[i][J_loc] = B_destroyed;
- X return ;
- X }
- X }
- X if (object[i][J_loc] == B_unmade) continue ;
- X } /* end of the object requested block */
- X if ((!sw_done)&&sw_object) {
- Xprintf("You do not possess a %s.\n", vocab[object[i][J_parse_id]-1]);
- X return ;
- X }
- X} /* end of the object scan loop */
- Xif (sw_done) {
- X printf ("Done \n");
- X objlooker(n) ;
- X gleeper(n) ;
- X}
- Xelse
- Xprintf("I don't understand what it is I'm supposed to drop.\n") ;
- X
- Xreturn ;
- X
- X/* cap insertion routine */
- Xcap_in:
- X/* see if your are holding the dynamite or the cap */
- X if ((object[O_cap][J_loc] != B_have)&&
- X (object[O_dynamite][J_loc] != B_have)) {
- Xprintf("You bloody dill! You have neither the dynamite or a ");
- Xprintf("blasting cap.\n") ;
- X return ;
- X }
- X if (object[O_cap][J_loc] != B_have) {
- Xprintf("You've got the dynamite but you need a blasing cap.\n") ;
- X return ;
- X }
- X if (object[O_dynamite][J_loc] != B_have) {
- Xprintf("You've got the blasting cap but you need some dynamite.\n") ;
- X return ;
- X }
- X/* transform the two objects into one */
- Xprintf("With some trepidation, you slide the blasting cap into\n");
- Xprintf("the dynamite. What you are now holding is VERY dangerous.\n");
- X object[O_cap][J_loc] = B_unmade ;
- X object[O_dynamite][J_type] = Z_alias ;
- X carry_weight -= object[O_cap][J_weight] ;
- X carry_count-- ;
- X
- X} /* --- end of the "dropper" subroutine --- */
- END_OF_FILE
- if test 28165 -ne `wc -c <'taker.c'`; then
- echo shar: \"'taker.c'\" unpacked with wrong size!
- fi
- # end of 'taker.c'
- fi
- echo shar: End of archive 3 \(of 6\).
- cp /dev/null ark3isdone
- MISSING=""
- for I in 1 2 3 4 5 6 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 6 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-