home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume15 / dinkum / part04 < prev    next >
Encoding:
Text File  |  1993-01-26  |  52.4 KB  |  1,718 lines

  1. Path: uunet!news.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v15i024:  dinkum - australian text adventure game, Part04/06
  5. Message-ID: <3982@master.CNA.TEK.COM>
  6. Date: 29 Nov 92 20:31:50 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1706
  9. Approved: billr@saab.CNA.TEK.COM
  10. Xref: uunet comp.sources.games:1523
  11.  
  12. Submitted-by: Gary Allen <gary@sun.mech.uq.oz.au>
  13. Posting-number: Volume 15, Issue 24
  14. Archive-name: dinkum/Part04
  15. Environment: Unix, DOS
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 4 (of 6)."
  26. # Contents:  dinkum.c monster.c
  27. # Wrapped by billr@saab on Sun Nov 29 12:25:49 1992
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'dinkum.c' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'dinkum.c'\"
  31. else
  32. echo shar: Extracting \"'dinkum.c'\" \(26298 characters\)
  33. sed "s/^X//" >'dinkum.c' <<'END_OF_FILE'
  34. X#define DINKUM.C
  35. X#include "dink_sym.h"
  36. X#include "dink_glb.h"
  37. X#include <stdlib.h>
  38. X#define Failed        0
  39. X#define Request        1
  40. X
  41. X/* ---------------- Version Date --------------- */
  42. Xchar *lb_date = "24 August 1992" ;
  43. X/* --------------------------------------------- */
  44. X
  45. X/*  ---- Version Number  ---- */
  46. Xchar *lb_version = "1.27" ;
  47. X/*  ------------------------- */
  48. X
  49. X/* ---------------- Version Type --------------- */
  50. Xchar *lb_share = "[Shareware Version]" ;
  51. X/* --------------------------------------------- */
  52. X
  53. X/*  ---- Serial Number  ---- */
  54. X#define S_number     1
  55. Xint serial = S_number ;
  56. X/*  ------------------------ */
  57. X/* Global variables local to this file only */
  58. Xint sw_help = FALSE, sw_null = FALSE, sw_number = FALSE, sw_standard = FALSE ;
  59. X
  60. X/* MAIN PROGRAM --- MAIN PROGRAM --- MAIN PROGRAM --- MAIN PROGRAM */
  61. Xvoid main(argc,argv)
  62. X/********************************************************************/
  63. X/*                                                                  */
  64. X/*                  --- The Dinkum Program ---                      */
  65. X/*                                                                  */
  66. X/* Software by Gary A. Allen, Jr.  24 August 1992  Version: Mk 1.27 */
  67. X/*           (c) Copyright 1990 by Gary A. Allen, Jr.               */
  68. X/*                                                                  */
  69. X/********************************************************************/
  70. X
  71. Xint argc ;
  72. Xchar *argv[] ;
  73. X{
  74. Xregister int i, j ;
  75. X
  76. Xint dig_1, dig_2 ;
  77. Xint pnt, n, i_rand1, i_rand2, i_rand3, old_n = 0, n_back ;
  78. Xlong l_pass, l_time, l_base, start_time, *time_arg = 0 ;
  79. Xchar chr, cmd[8] ;
  80. X
  81. X#ifdef __TURBOC__
  82. X/* Function prototypes */
  83. Xvoid switch_list(void) ; 
  84. Xvoid cmd_switch(char[8], int, int, char *[]) ;
  85. Xvoid bugs(int), help(void) ;
  86. Xvoid kelly(int), long_descp(int), objlooker(int), killer(int) ;
  87. Xvoid gleeper(int), actor(int), ender(int), closer(int), opener(int) ;
  88. Xvoid dialer(int), taker(int), dropper(int), describe(int), rdtxt(int) ;
  89. Xvoid igniter(int), switcher(int), unlocker(int), sounder(int) ;
  90. Xvoid loader(void), eater(void), filler(void), looker(int), exit(int) ;
  91. Xvoid monster(int*,int*), new_score(void), boom(void), parse(void) ;
  92. Xvoid inventer(void), drinker(void), reader(void), pusher(int*);
  93. Xvoid pass(void), unloader(int) ;
  94. Xlong time(long*) ;
  95. Xchar getch(void), getche(void) ;
  96. X#endif
  97. X
  98. X/* Software security */
  99. Xif (serial != S_number) exit(0) ;  /* abort if serial number changed */
  100. X
  101. X/* Scan the after the DOS/Unix command for switches or file name */
  102. Xif (argc > 1) {
  103. Xfor (i = 1; i <= argc-1; i++) {
  104. X    /* Flush command vector */
  105. X    for (j = 0; j <= 7; j++) cmd[j] = '\0' ;
  106. X    /* Get command vector */
  107. X    sscanf(argv[i],"%c%c%c%c%c%c%c%c%c", &chr, &cmd[0], &cmd[1],
  108. X        &cmd[2], &cmd[3], &cmd[4], &cmd[5], &cmd[6], &cmd[7]) ;
  109. X    sw_null = FALSE ;
  110. X    if (chr == '?') help() ;
  111. X    if (chr == '-') {
  112. X        for (j = 0; j <= 7; j++) {
  113. X            cmd_switch(cmd, j, i, argv) ;
  114. X            if (sw_number) {
  115. X                i++ ;
  116. X                sw_number = FALSE ;
  117. X                break ;
  118. X            }
  119. X            if (sw_null) break ;
  120. X        } /* end of command "for" loop */
  121. X
  122. X        if (j >= 7) {
  123. Xprintf("\n!!!! Too many commands on one \"-\" switch group.\n") ;
  124. Xprintf("!!!! Break up the commands into several \"-\" switch groups.\n") ;
  125. X            bugs(Failed) ;
  126. X        }
  127. X    } /* end of the "-" marker block */
  128. X
  129. X    /* Deal with garbage on the command line */
  130. X    else {
  131. Xprintf ("\n!!!! The following on the command line was not understood:  %s \n",
  132. X    argv[i]);
  133. X        bugs(Failed) ;
  134. X    } /* Nondefault scratch file opening block */
  135. X
  136. X} /* end of argument token "for" loop */
  137. X
  138. Xif (sw_help) help() ;
  139. X} /* end of the command switch block */
  140. X
  141. X/* Deal with someone cheating with switch "-s" */
  142. Xif (sw_standard && (!sw_wizard)) {
  143. X    printf("!!!! Command line switch -s is unknown.\n") ;
  144. X    bugs(Failed) ;
  145. X}
  146. X/* Software security */
  147. Xif (serial != S_number) exit(0) ;  /* abort if serial number changed */
  148. X
  149. X/* Initialize the program */
  150. Xsw_warned = FALSE ;
  151. Xl_time = time(time_arg) ;
  152. Xl_base = l_time/10 ;
  153. Xl_base *= 10 ;
  154. Xl_pass = l_time - l_base ;
  155. Xdig_1 = (int)l_pass ;
  156. X
  157. Xprintf("                    ") ;
  158. Xprintf("                   --- Dinkum --- \n");
  159. Xprintf("                    ") ;
  160. Xprintf("     (c) Copyright 1990 by Gary A. Allen, Jr.\n") ;
  161. Xprintf("                    ") ;
  162. Xprintf("  All Rights Reserved. Version %s, %s\n\n",
  163. X    lb_version, lb_date);
  164. X
  165. Xprintf("Would like some initial help with Dinkum?\n") ;
  166. X
  167. Xfor (;;) {
  168. X
  169. X#ifndef __TURBOC__
  170. X    do {
  171. X        printf("(Answer:  Yes or No) ") ; 
  172. X    } while ('\n' == (chr = getchar())) ;
  173. X
  174. X    while ('\n' != getchar()) ;
  175. X#endif
  176. X
  177. X#ifdef __TURBOC__
  178. X    printf("\n") ;
  179. X    do {
  180. X        printf("(Answer:  Yes or No) ") ; 
  181. X    } while ('\n' == (chr = getch())) ;
  182. X    printf("\n") ;
  183. X#endif
  184. X
  185. X    if (('n' == chr)||('N' == chr)||('y' == chr)||('Y' == chr)) {
  186. X        if (('y' == chr)||('Y' == chr)) {
  187. Xprintf("\nG'day Mate!  Welcome to \"Dinkum\" the Australian adventure");
  188. Xprintf("\ngame.  In Dinkum you'll search for treasure in the\n") ;
  189. Xprintf("Australian Outback.  You give the commands and I'll do the\n");
  190. Xprintf("dangerous work. I understand most plain English sentences.\n");
  191. Xprintf("If you want me to go east then type \"Will you please go\n");
  192. Xprintf("east?\" and press the RETURN or ENTER key.  If you don't\n") ;
  193. Xprintf("enjoy typing then just type \"e\" and press RETURN.  I'll\n");
  194. Xprintf("still go east.  After you have gathered up some things\n") ;
  195. Xprintf("you can see what you have by typing \"inventory\".\n") ;
  196. Xprintf("Sometimes you can learn more about an object by typing\n");
  197. Xprintf("\"examine NAME-OF-OBJECT\".  I understand many other\n") ;
  198. Xprintf("commands and words.  However I'll let you have the fun of\n") ;
  199. Xprintf("finding out what I can and can not understand. Good luck!\n\n");
  200. X        }
  201. X        break ;
  202. X    }
  203. X}
  204. X
  205. X/* produce two random numbers ranging from 0-9 based on system clock*/
  206. Xl_time = time(time_arg) ;
  207. Xstart_time = l_time ;
  208. Xl_base = l_time/10 ;
  209. Xl_base *= 10 ;
  210. Xl_pass = l_time - l_base ;
  211. Xdig_2 = (int)l_pass ;
  212. X
  213. X/* generate the actual random array pointers */
  214. Xif (sw_standard) {
  215. X    i_rand1 = 1 ; 
  216. X    i_rand2 = 0 ;
  217. X    i_rand3 = 7 ;
  218. X}
  219. Xelse {
  220. X    i_rand3 = (dig_1 + dig_2)/2 ;
  221. X    i_rand2 = dig_2/3 ;
  222. X    i_rand1 = (dig_1/3) + 1 ;
  223. X}
  224. X
  225. Xprintf("\nIt's a hot summer day (in January) in ") ;
  226. Xprintf("Queensland, Australia.\n") ;
  227. Xn_back = R_meadow ;
  228. Xn = R_meadow ;
  229. X
  230. X/* Software security */
  231. Xif (serial != S_number) exit(0) ;  /* abort if serial number changed */
  232. X
  233. X/* load objects into the rooms */
  234. Xfor (i = 0; i <= obj_init_max; i++) 
  235. X    object[obj_init[i][0]][J_loc] = obj_init[i][i_rand1] ;
  236. X
  237. Xcarry_count = 0 ;
  238. Xcarry_weight = 0 ;
  239. X
  240. Xfor (i = 0; i <= objcnt; i++) {
  241. X    j = object[i][J_loc] ;
  242. X    if ((j >= 0) && (object[i][J_type] != Z_unmovable))
  243. X         ++room[j][M_obj_cnt] ;
  244. X}
  245. X
  246. X/* load monsters into the rooms */
  247. Xfor (i = 0; i <= mon_init_max; i++) 
  248. X    enemy[i+1][E_location] = mon_init[i][i_rand2] ;
  249. X
  250. Xfor (i = 0; i <= enemy_max; i++) { 
  251. X    j = enemy[i][E_location] ;
  252. X    if (j != B_unmade) ++room[j][M_monster] ;
  253. X}
  254. X/* load the gleep reproductive locations and seed gleep */
  255. Xfor (i = 0; i <= 9; i++)  
  256. X    gleep_spot[i] = gleep_init[i][i_rand2] ;
  257. Xroom[gleep_spot[0]-1][M_gleep] = 1 ; /* seed a nonreproductive spot */ 
  258. X
  259. X/* load safe passage for end-game killing passages  */
  260. Xroom[218 + i_rand3][M_rm_type] = T_short_descp ;
  261. X
  262. X/* Beginning of main loop */
  263. Xloop:
  264. X/* special action routine */
  265. Xnew_score() ;  /* update the score */
  266. X
  267. X/* See if the game has timed out */
  268. Xl_time = time(time_arg) ;
  269. Xif ((!sw_warned) && (l_time > start_time + 3300)) {
  270. X    sw_warned = TRUE ;
  271. X    start_time = l_time ;
  272. Xprintf("There's suddenly a puff of blue smoke which fills the room\n") ;
  273. Xprintf("with a hazy cloud.  Slowly this cloud coalesces into a\n") ;
  274. Xprintf("ghostly human form.  This ethereal being is wearing a grey\n") ;
  275. Xprintf("flannel suit, a bowler hat, and glancing at a gold pocket\n") ;
  276. Xprintf("watch which is attached to a long golden chain.  You can\n");
  277. Xprintf("hear \"Waltzing Matilda\" being played softly in the\n") ;
  278. Xprintf("background.  You know what?  I think this ethereal being\n") ;
  279. Xprintf("is none other than the ghost of Banjo Patterson!  With\n") ;
  280. Xprintf("this realization Banjo looks up in your direction and\n") ;
  281. Xprintf("begins to speak:\n\n") ;
  282. Xprintf("\"Sorry mate, you've been at this for too long!  You've\n") ;
  283. Xprintf("got five more minutes to go and then you're history!\"\n\n") ;
  284. Xprintf("Then just as suddenly Banjo Patterson dissolves back into\n") ;
  285. Xprintf("smoke and disappears from view.\n\n") ;
  286. X}
  287. Xif (sw_warned && (l_time > start_time + 300)) {
  288. Xprintf("You hear someone clearing his throat behind you.  You turn\n") ;
  289. Xprintf("around and see Banjo Patterson has appeared once again.  An\n");
  290. Xprintf("old brass chain is hanging from mid air next to Banjo.  On\n") ;
  291. Xprintf("the end of the chain is a white porcelain tear drop shaped\n");
  292. Xprintf("nob with the word \"PULL\" written on it in black letters.\n") ;
  293. Xprintf("Banjo reaches for the nob and says the following:\n\n\"Sorry") ;
  294. Xprintf(" mate, your time has come!  Better luck next time!\"\n\n");
  295. Xprintf("He gives the chain a quick jerk and everything around you\n") ;
  296. Xprintf("slowly fades from view.\n\n") ;
  297. X    ender(F_quit) ;
  298. X}
  299. X
  300. Xkelly(n) ; /* check if Ned Kelly can do something */
  301. X/* Check if there is a long description */
  302. Xif ((room[R_hideout][M_monster] > 0)&&(n == R_hideout)) goto command ;
  303. Xif ((monster_flag == F_monster_active)&&(old_n == n)) goto command ;
  304. X    else old_n = 0 ;
  305. Xif (room[n][M_rm_type] == T_long_descp) {
  306. X    long_descp(n) ; /* do the long description of the room */
  307. X    goto objlook ;  
  308. X}
  309. Xelse describe(n) ;  /* short description */
  310. X
  311. X/* describe unmovable action objects and status */
  312. Xif (room[n][M_rm_type] == T_action_obj) actor(n) ;
  313. X
  314. Xobjlook:
  315. Xobjlooker(n) ; /* Check if there are objects in the room */
  316. Xgleeper(n) ;   /* check for gleeps and update the gleep count */
  317. X
  318. X/* see if the spaceship's transporter is active */
  319. Xif (sw_transport) {
  320. X    if (n == R_ship_passage) sw_transport = FALSE ;
  321. X    else if (n == R_transport) {
  322. X        n = R_closet ;
  323. X        sw_transport = FALSE ;
  324. Xprintf("\nSuddenly radiant energy seems to surge from the hexagons\n");
  325. Xprintf("around you.  Then there is a bright flash and you find\n");
  326. Xprintf("yourself in.....\n\n") ;
  327. Xprintf("A closet stinking of moth balls full of nondescript junk.\n") ;
  328. Xprintf("The only exit is to the north through a curtain hanging\n");
  329. Xprintf("over the entrance.\n\n") ; 
  330. X    }
  331. X}
  332. X
  333. X/* monster check */
  334. Xcommand:
  335. Xif ((room[n][M_monster] > 0)||(monster_flag != F_no_monster)) {
  336. X    if (monster_flag == F_wounded) {
  337. X        monster_flag = F_monster_active ;
  338. X    }
  339. X    else monster(&n,&old_n) ;
  340. X}
  341. X
  342. X/* parse in the command */
  343. Xparse();
  344. X
  345. X/* poison check */
  346. X/* remove atropine drug with each game cycle */
  347. Xif (i_poison > 0) {
  348. X    --i_poison ;
  349. X}
  350. Xelse {
  351. X    /* accumulate poison if holding the orange clip */
  352. X    if (object[O_org_clip][J_loc] == B_have) {
  353. X        --i_poison ;
  354. X        switch (i_poison) {
  355. X        case -20:
  356. X    printf("You've developed a nervous tick near your eye.\n") ;
  357. X            break ;
  358. X        case -30:
  359. X    printf("You're hands are starting to shake ") ;
  360. X    printf("and you're sweating like a pig.\n") ;    
  361. X            break ;
  362. X        case -35:
  363. X    printf("You're shaking so bad you can barely stand and you ");
  364. X    printf("could lose your lunch\nat any moment.\n") ;
  365. X            break ;
  366. X        case -40:
  367. Xprintf("The toxic fumes coming off of the orange ammo clip you were ") ;
  368. Xprintf("carrying finally\ncaught up with you.  You fall over DEAD!\n") ;
  369. X            ender(F_died) ;
  370. X        }
  371. X    }
  372. X    /* remove poison after release of orange clip */
  373. X    else if (i_poison < 0) ++i_poison ;
  374. X}
  375. X
  376. X/* clock check */
  377. Xif (sw_clock) {
  378. X    switch (flag_clock) {
  379. X    /* see if the blasting cap is to explode */
  380. X    case V_cap:
  381. X        if (time(time_arg) > clock_explode) {
  382. X            if (object[O_cap][J_loc] == B_have) {
  383. Xprintf("                           POP!!\n") ;
  384. Xprintf("The blasting cap which you were stupidly holding in your\n") ;
  385. Xprintf("hand just blew up and took two of your fingers with it!\n") ;
  386. Xprintf("Good thing you've got another eight fingers to spare!\n\n") ;
  387. X                carry_count-- ;
  388. X                carry_weight -= object[O_cap][J_weight];
  389. X            }
  390. X            else {
  391. Xprintf("Far down the tunnel you hear a POP!\n") ;
  392. Xprintf("The blasting cap has finally exploded, not that it\n");
  393. Xprintf("achieved much except make a loud noise.\n\n") ;
  394. X            }
  395. X            object[O_cap][J_loc] = B_destroyed ;
  396. X            sw_clock = FALSE ;
  397. X        }
  398. X        break ;
  399. X    
  400. X    /* see if the dynamite is to explode */
  401. X    case V_dynamite:
  402. X        if (time(time_arg) > clock_explode) {
  403. X            /* player dies if he is holding the dynamite */
  404. X            if (object[O_dynamite][J_loc] == B_have) {
  405. X            boom () ;
  406. X
  407. Xprintf("The dynamite which you were holding and had earlier ignited\n");
  408. Xprintf("the fuse has finally exploded.  That was a rather noisy\n");
  409. Xprintf("and messy way to commit suicide!  Needless to say there is\n");
  410. Xprintf("nothing left of you but a greasy spot.\n") ;
  411. X            ender(F_died) ;
  412. X            }
  413. X            /* player dies if too close during explosion */
  414. X            else {
  415. X    if (((n <= 185)&&(n >= 178))||((n <= 170)&&(n >= 166))) {
  416. X            boom () ;
  417. X
  418. Xprintf("You weren't far enough away from the dynamite when it\n");
  419. Xprintf("exploded!  The shock wave was still strong enough to blow\n");
  420. Xprintf("your brains out your ears.  Good try anyway!\n");
  421. X            ender(F_died) ;
  422. X                }
  423. X            /* dynamite explodes and player survives */
  424. X                else {
  425. Xprintf("Far down the tunnel you hear a low BOOM!\n") ;
  426. Xprintf("That dynamite you set burning has finally exploded.\n\n");
  427. X
  428. X/* open up the passage to the UFO */
  429. Xif (object[O_dynamite][J_loc] == R_blast_point) {
  430. X    room[R_blast_point][1] = 186 ;
  431. X    room[R_blast_point][M_descp] = 55 ;
  432. X                    }
  433. X                }
  434. X            }
  435. X            object[O_dynamite][J_loc] = B_destroyed ;
  436. X            sw_clock = FALSE ;
  437. X        }
  438. X        break ;
  439. X    }
  440. X}
  441. X
  442. X/* the command is a simple move command */
  443. Xif (tag[V_MOVE]) {
  444. X    pnt = verb ;
  445. Xmove:
  446. X    /* see if this movement prohibits blasting caps */
  447. X    if (((pnt == V_u)||(pnt == V_up))&&
  448. X        ((n == R_manhole_1)||(n == R_manhole_2))) {
  449. X        if (object[O_cap][J_loc] == B_have) {
  450. Xprintf("As you were climbing up through the hole in the ceiling,\n");
  451. Xprintf("the blasting cap slipped from your grasp and fell to the\n") ;
  452. Xprintf("floor below where it detonated on impact.  The explosion\n") ;
  453. Xprintf("was deafening, but caused no damage.\n") ;
  454. X            carry_count-- ;
  455. X            carry_weight -= object[O_cap][J_weight] ;
  456. X            object[O_cap][J_loc] = B_destroyed; 
  457. X        }
  458. X        else if ((object[O_dynamite][J_loc] == B_have)&&
  459. X            (object[O_dynamite][J_type] == Z_alias)) {
  460. X            boom () ;
  461. X
  462. Xprintf("As you were climbing up through the hole in the ceiling,\n");
  463. Xprintf("the dynamite with the blasting cap inside slipped from\n") ;
  464. Xprintf("your grasp and fell to the floor below where it detonated\n") ;
  465. Xprintf("on impact.  At that point you literally became a human\n");
  466. Xprintf("cannon ball as the shock wave carried you up the vertical\n");
  467. Xprintf("passage and splattered you into protoplasmic jelly on the\n");
  468. Xprintf("ceiling above.\n") ; 
  469. X            ender(F_died) ;
  470. X        }
  471. X    }
  472. X
  473. X    pnt-- ;
  474. X    if (room[n][pnt] == -1) {
  475. X        printf ("You can't go that way. \n");
  476. X        goto command ; 
  477. X    }
  478. X
  479. X    n_back = n ;        /* save previous "n" for "back" */
  480. X    n = room[n][pnt] ;
  481. X    if (room[n][M_rm_type] != T_lethal) goto loop ;
  482. X
  483. X/* player walked into a lethal room */
  484. X    long_descp(n) ;
  485. X    ender(F_died) ;
  486. X}
  487. X
  488. X/* complicated command decoder */
  489. Xswitch (verb) {
  490. X/* "help" command */
  491. Xcase V_help:
  492. Xcase V_info:
  493. Xprintf("There is no help available.  You're on your own!\n") ;
  494. X    break ;
  495. X/* "quit" command */
  496. Xcase V_quit:
  497. X    ender(F_quit) ;
  498. X
  499. X/* "question" command */
  500. Xcase V_QUESTION:
  501. X    if (tag[V_VERB_ONLY]) {
  502. X        if (tag[V_how]) {
  503. Xprintf("That's for you to figure out.\n") ;
  504. X            break ;
  505. X        }
  506. Xprintf("I don't have a clue!\n") ;
  507. X        break ;
  508. X    }
  509. X
  510. X    /* Question "Where am I?" */
  511. X    if (tag[V_where] && tag[V_am]) {
  512. X        tag[V_VERB_ONLY] = TRUE ; /* This is for "looker" */
  513. X        looker(n) ;
  514. X        break ;
  515. X    }
  516. X
  517. X    /* Question "What have I got?" */
  518. X    if (tag[V_what] && tag[V_have]) {
  519. X        inventer() ;
  520. X        break ;
  521. X    }
  522. X
  523. X    /* Question which can't be processed */
  524. Xprintf("You asked a question.  Unfortunately I have no answers.\n") ;
  525. X    break ;
  526. X
  527. X/* "inventory" command */
  528. Xcase V_inventory: 
  529. Xcase V_invent:
  530. X    inventer() ;
  531. X    break;
  532. X
  533. X/* "close" command  */
  534. Xcase V_close:
  535. Xcase V_shut:
  536. X    closer(n) ;
  537. X    break;
  538. X
  539. X/* "open" command  */
  540. Xcase V_open:
  541. Xcase V_swing:
  542. X    opener(n) ;
  543. X    break;
  544. X
  545. X/* "dial" command  */
  546. Xcase V_dial:
  547. Xcase V_combination:
  548. X    dialer(n) ;
  549. X    break ;
  550. X/* "drink" command */
  551. Xcase V_drink: 
  552. X    drinker() ;
  553. X    break ;
  554. X
  555. X/* "ignite" command */
  556. Xcase V_ignite: 
  557. Xcase V_light: 
  558. X    igniter(n) ;
  559. X    break ;
  560. X
  561. X/* "read" command  */
  562. Xcase V_read:
  563. X    reader() ;
  564. X    break;
  565. X/* "push" command  */
  566. Xcase V_push:
  567. Xcase V_press:
  568. X    pusher(&n) ;
  569. X    break ;
  570. X/* "turn", "switch" command */
  571. Xcase V_switch:
  572. Xcase V_turn:
  573. Xcase V_select:
  574. Xcase V_set:
  575. X    switcher(n) ;
  576. X    break ;
  577. X/* "shoot" command  */
  578. Xcase V_shoot:
  579. Xcase V_fire:
  580. Xcase V_kill:
  581. X    killer(n) ;
  582. X    break;
  583. X/* "unlock" command  */
  584. Xcase V_unlock:
  585. X    unlocker(n) ;
  586. X    break;
  587. X/* "eat" command  */
  588. Xcase V_eat:
  589. Xcase V_swallow:
  590. X    eater() ;
  591. X    break;
  592. X/* "fill" command  */
  593. Xcase V_fill:
  594. X    filler() ;
  595. X    break;
  596. X/* "sound" command  */
  597. Xcase V_sound:
  598. Xcase V_bang:
  599. Xcase V_hit:
  600. Xcase V_strike:
  601. X    sounder(n) ;
  602. X    break;
  603. X
  604. X/* "SVC" wizard move command */
  605. Xcase V_svc:
  606. X    if (sw_wizard) {
  607. X        printf ("Enter room coordinate number:  ");
  608. X        scanf ("%d",&n);
  609. X        goto loop ;
  610. X    }
  611. X    else {
  612. Xcheater:
  613. Xprintf("Rather than cheat at this game by using a disassembler, you\n");
  614. Xprintf("should send the author $150 and he'll gladly send you\n") ;
  615. Xprintf("the source code.  If you just want a clue, then send $20\n") ;
  616. Xprintf("registration fee with your question and he'll provide\n") ;
  617. Xprintf("the answer.  You can find the author's address by\n") ;
  618. Xprintf("typing:  dinkum -h\n") ;
  619. X        exit(0) ;
  620. X    } 
  621. X
  622. X/* "STATS" game statistics */
  623. Xcase V_stats :
  624. X        printf("      --- Dinkum --- \n");
  625. X        printf("Version: %s, %s\n\n", lb_version, lb_date);
  626. X        printf("i_rand1 = %d, i_rand2 = %d, i_rand3 = %d\n",
  627. X            i_rand1, i_rand2, i_rand3) ;
  628. X        printf("Room Number = %d\n", n) ;
  629. X        printf("Room object count = %d \n",
  630. X            room[n][M_obj_cnt]) ;
  631. X        printf("Room monster count = %d\n",
  632. X            room[n][M_monster]) ; 
  633. X        printf("Gleeps on room's floor count = %d\n",
  634. X            room[n][M_gleep]) ;
  635. X        printf("Poison level = %d\n",i_poison) ;
  636. X        printf("Gleep count = %d\n", gleep_count) ;
  637. X        printf("carry_count = %d, carry_weight = %d\n",
  638. X            carry_count, carry_weight) ;
  639. X        break ;
  640. X
  641. X/* "SU" wizard initiation command */
  642. Xcase V_su:
  643. X    pass() ;
  644. X    break ;
  645. X
  646. X/* "JSYS" wizard command which deactivates a monster */
  647. Xcase V_jsys:
  648. X    if (sw_wizard) monster_flag = F_no_monster ;
  649. X    else goto cheater ;
  650. X    break ;
  651. X
  652. X/* "score" command */
  653. Xcase V_score: 
  654. X    new_score () ;
  655. X    if ((gleep_score == 0)&&(score == 0)) {
  656. Xprintf("You haven't scored anything at all, Bozo! Try putting\n");
  657. Xprintf("a valuable into the safe or find some gleeps.\n") ;
  658. X        break ;
  659. X    }
  660. X    if (score == 0) { 
  661. X        if (gleep_score > 1) {
  662. Xprintf("You haven't scored any points but you splashed ") ;
  663. Xprintf ("%d gleeps into the gleep tank.\n",gleep_score) ;
  664. X        }
  665. X        else {
  666. Xprintf("You haven't scored any points at all but you did put a\n");
  667. Xprintf ("gleep in the gleep tank (big deal!).\n") ;
  668. X        }
  669. X    }
  670. X    else {
  671. Xprintf ("You scored %d points ",score) ;
  672. X        if (gleep_score == 0) 
  673. Xprintf ("but have yet to put any gleeps in the gleep tank.\n") ;
  674. X        else {
  675. X            if (gleep_score > 1) 
  676. Xprintf ("and put %d gleeps into the gleep tank.\n",gleep_score) ;
  677. X    
  678. X            else 
  679. Xprintf ("and put a gleep in the gleep tank.\n") ;
  680. X        }
  681. X    }
  682. X    break ;
  683. X/* "enter" command  */
  684. Xcase V_enter:
  685. Xswitch (n) {
  686. X    /* Lift entrance at the ground level */
  687. X    case R_lift_entr:
  688. X        if (room[R_lift_entr][2] == -1) goto door_shut ;
  689. X        pnt = 3 ;
  690. X        break ;
  691. X    /* office door */
  692. X    case R_office_entr:
  693. X        if (room[R_office_entr][2] == -1) goto door_shut ;
  694. X        pnt = 3 ;
  695. X        break ;
  696. X    /* Lift entrance at level #49 */
  697. X    case R_L49_entr:
  698. X        pnt = 3 ;
  699. X        break ;
  700. X    /* Entrance to Ned Kelly's hideout */
  701. X    case R_hideout_entr:
  702. X        pnt = 3 ;
  703. X        break ;
  704. X    default:
  705. X    printf("I don't understand exactly how to enter. \n");
  706. X        goto command ;
  707. X}
  708. Xgoto move ;
  709. Xdoor_shut:
  710. Xprintf("I can't do it!  The door needs to be opened.\n") ;
  711. Xgoto command ;
  712. X
  713. X/* "exit" command  */
  714. Xcase V_exit:
  715. Xcase V_leave:
  716. Xcase V_depart:
  717. Xswitch (n) {
  718. X    /* Lift entrance at the ground level */
  719. X    case R_lift_inside:
  720. X        pnt = 4 ;
  721. X        break ;
  722. X    /* office door */
  723. X    case R_office_hall:
  724. X        pnt = 4 ;
  725. X        break ;
  726. X    /* Ned Kelly's hideout */
  727. X    case R_hideout :
  728. X        pnt = 4 ;
  729. X        break ;
  730. X    default:
  731. Xprintf("I don't understand exactly how you want to exit.\n");
  732. X        goto command ;
  733. X}
  734. Xgoto move ;
  735. X
  736. X/* "dig" command */
  737. Xcase V_dig:
  738. Xprintf("You get on your knees and scrape away at the ground for\n") ;
  739. Xprintf("awhile. Except for getting your hands dirty you didn't\n") ;
  740. Xprintf("achieve much.\n") ;
  741. X    break ;
  742. X
  743. X/* "stand" command */
  744. Xcase V_stand:
  745. Xprintf("You're standing there very nicely.  However you're not\n");
  746. Xprintf("achieving much by doing so.\n") ;
  747. X    break ;
  748. X
  749. X/* "load" rifle command */
  750. Xcase V_load:
  751. X    loader() ;
  752. X    break ;
  753. X
  754. X/* "unload" rifle command */
  755. Xcase V_unload:
  756. X    unloader(n) ;
  757. X    break ;
  758. X
  759. X/* "pull" command */
  760. Xcase V_pull:
  761. X    if (tag[V_trigger]) {
  762. X        /* alias in the "shoot" command */
  763. X        verb = V_shoot ;
  764. X        tag[V_VERB_ONLY] = TRUE ;
  765. X        killer(n) ;   /* "pull trigger" */
  766. X    }
  767. X    else  printf("I don't see how I could pull that.\n") ;
  768. X    break ;
  769. X
  770. X/* "climb" command */
  771. Xcase V_climb:
  772. Xprintf("I'm not climbing anything!  (I'm afraid of heights.)\n") ;
  773. X    break ;
  774. X
  775. X/* "swim" command */
  776. Xcase V_swim:
  777. Xprintf("I'm not going for a swim!  (I'm afraid of the water.)\n") ;
  778. X    break ;
  779. X
  780. X/* Go backwards to previous location */
  781. Xcase V_back:
  782. X    n = n_back ;
  783. X    goto loop ;
  784. X/* "take", "get", "lift" command */
  785. Xcase V_take:
  786. Xcase V_get:
  787. Xcase V_lift:
  788. Xcase V_pick:
  789. Xcase V_grab:
  790. Xcase V_remove:
  791. Xcase V_attach:
  792. Xcase V_hold:
  793. X    taker(n) ;
  794. X    break ;
  795. X/* "drop", "throw", "put" command */
  796. Xcase V_drop:
  797. Xcase V_throw:
  798. Xcase V_put:
  799. Xcase V_fling:
  800. Xcase V_insert:
  801. Xcase V_give:
  802. Xcase V_eject:
  803. Xcase V_slow_drop:
  804. X    dropper(n) ;
  805. X    break ;
  806. X
  807. X/* "look" command */
  808. Xcase V_look:
  809. Xcase V_l:
  810. Xcase V_examine:
  811. Xcase V_describe:
  812. X    looker(n) ;
  813. X    break;
  814. X
  815. X/* gibberish command */
  816. Xdefault:
  817. Xprintf("Huh?  You will have to make yourself clearer! \n");
  818. X
  819. X} /* end of "decoder" switch */
  820. Xgoto command;
  821. X
  822. X} /* --- end of Main routine --- */
  823. X
  824. Xvoid cmd_switch(cmd, cmd_arg, i_point, argv)
  825. X/*****************************************************/
  826. X/*                                                   */
  827. X/*         --- Command line Switch Parser ---        */
  828. X/*                                                   */
  829. X/*  (c) Copyright 1992,   University of Queensland   */
  830. X/*        Program written by Gary A. Allen, Jr.      */
  831. X/*           Version:  Mk 1.1   24 February 1992     */
  832. X/*                                                   */
  833. X/*****************************************************/
  834. X
  835. Xchar cmd[8], *argv[] ;
  836. Xint cmd_arg, i_point ;
  837. X{
  838. Xvoid switch_list(), description() ; 
  839. X
  840. Xswitch (cmd[cmd_arg]) {
  841. Xcase '\0':
  842. Xcase -1:
  843. X    sw_null = TRUE ;
  844. X    return ;
  845. X
  846. X/* Version verification command switch */
  847. Xcase 'v':
  848. X    if ((cmd[cmd_arg+1] == 'e')&&(cmd[cmd_arg+2] == 'r')) {
  849. X        printf("Version: %s, Serial Number: %06d %s \n", 
  850. X            lb_version, serial, lb_share) ;
  851. X        bugs(Request) ;
  852. X    }
  853. X    else {
  854. X        printf("!!!! Command line switch -v is unknown.\n") ;
  855. X        bugs(Failed) ;
  856. X    }
  857. X
  858. X/* Wizard mode command switch */
  859. Xcase 'w':
  860. Xcase 'W':
  861. X    pass() ;
  862. X    break ;
  863. X
  864. X/* Standard matrix load command switch */
  865. Xcase 's':
  866. Xcase 'S':
  867. X    sw_standard = TRUE ;
  868. X    break ;
  869. X
  870. X
  871. X/* Rubbish option to supress a warning */
  872. Xcase 'y':
  873. Xcase 'Y':
  874. X    sw_number = TRUE ;
  875. X    printf("y = %d\n", atoi(argv[i_point+1])) ;
  876. X    return ;
  877. X
  878. X/* Help option */
  879. Xcase '?':
  880. Xcase 'h':
  881. Xcase 'H':
  882. X    sw_help = TRUE ;
  883. X    return ;
  884. X
  885. Xcase ' ':
  886. Xcase '-':
  887. Xcase '1':
  888. Xcase '2':
  889. Xcase '3':
  890. Xcase '4':
  891. Xcase '5':
  892. Xcase '6':
  893. Xcase '7':
  894. Xcase '8':
  895. Xcase '9':
  896. X    return ;
  897. X
  898. Xdefault:
  899. Xprintf("!!!! Command line switch -%c is unknown.\n", cmd[cmd_arg]) ;
  900. X    bugs(Failed) ;
  901. X}
  902. X} /* --- end of the cmd_switch subroutine --- */
  903. X
  904. Xvoid bugs(i_type)
  905. X/***************************************************************/
  906. X/*                                                             */
  907. X/*       (c) Copyright 1992,   University of Queensland        */
  908. X/*            Program written by Gary A. Allen, Jr.            */
  909. X/*             Version:  Mk 1.0        24 April 1992           */
  910. X/*                                                             */
  911. X/***************************************************************/
  912. Xint i_type ;
  913. X{
  914. Xswitch(i_type) {
  915. Xcase Failed:
  916. X    printf("!!!! If confused, type:  dinkum -h \n");
  917. X    printf("!!!! --- Program ABORTED --- \n");
  918. X    break ;
  919. X
  920. Xcase Request:
  921. X    printf("Program terminated by user request.\n") ;
  922. X    break ;
  923. X}
  924. Xexit (0) ; 
  925. X} /* --- end of the "bugs" subroutine --- */
  926. X
  927. Xvoid help() 
  928. X/*****************************************************/
  929. X/*                                                   */
  930. X/*                    Help Routine                   */
  931. X/*                                                   */
  932. X/*  (c) Copyright 1992,   University of Queensland   */
  933. X/*        Program written by Gary A. Allen, Jr.      */
  934. X/*           Version:  Mk 1.0    24 April 1992       */
  935. X/*                                                   */
  936. X/*****************************************************/
  937. X{
  938. Xchar chr ;
  939. X
  940. Xprintf("                    --- Dinkum --- \n");
  941. Xprintf("       (c) Copyright 1990 by Gary A. Allen, Jr.\n") ;
  942. Xprintf("   All Rights Reserved. Version: %s, %s\n\n", 
  943. X        lb_version, lb_date);
  944. X
  945. Xprintf("      Dinkum is a text style \"adventure\" game.\n\n") ;
  946. X
  947. Xprintf("You are free to use, copy and distribute Dinkum provided:\n") ;
  948. Xprintf("       NO FEE IS CHARGED FOR USE, COPYING OR DISTRIBUTION.\n") ;
  949. Xprintf("       THIS PROGRAM IS FOR PRIVATE, NONCOMMERICAL USE ONLY.\n");
  950. Xprintf("       THE PROGRAM MAY NOT BE MODIFIED IN ANY WAY.\n\n") ;
  951. X
  952. Xprintf("This program is provided AS IS without any warranty,\n") ;
  953. Xprintf("expressed or implied, including but not limited to fitness\n") ;
  954. Xprintf("for any particular purpose.\n\n") ;
  955. X
  956. X/* keep the screen from scrolling */
  957. X#ifndef __TURBOC__
  958. Xprintf("         [Press RETURN or ENTER to continue]") ;
  959. Xchr = getchar() ;
  960. X#endif
  961. X
  962. X#ifdef __TURBOC__
  963. Xprintf("  [Press \"q\" to quit or any other key to continue]") ;
  964. Xchr = getche() ;
  965. Xprintf("\r                                                        \r") ;
  966. X#endif
  967. X
  968. Xif ((chr == 'q')||(chr == 'Q')) exit (0) ;
  969. X
  970. Xprintf("When corresponding please state the current version of\n") ;
  971. Xprintf("Dinkum which you are using.  Contributions and questions\n") ;
  972. Xprintf("about this program should be sent to the following address:\n\n") ;
  973. Xprintf("          E-mail address:     gary@sun.mech.uq.oz.au\n\n") ;
  974. Xprintf("          Postal address:     Gary A. Allen, Jr. \n");
  975. Xprintf("                              P.O. Box 13\n") ;       
  976. Xprintf("                              St. Lucia, Queensland  4067\n");
  977. Xprintf("                              Australia\n") ;
  978. X
  979. Xexit(0);
  980. X} /* ---- end of the "help" subroutine ---- */
  981. X
  982. END_OF_FILE
  983. if test 26298 -ne `wc -c <'dinkum.c'`; then
  984.     echo shar: \"'dinkum.c'\" unpacked with wrong size!
  985. fi
  986. # end of 'dinkum.c'
  987. fi
  988. if test -f 'monster.c' -a "${1}" != "-c" ; then 
  989.   echo shar: Will not clobber existing file \"'monster.c'\"
  990. else
  991. echo shar: Extracting \"'monster.c'\" \(23544 characters\)
  992. sed "s/^X//" >'monster.c' <<'END_OF_FILE'
  993. X#define MNSTR
  994. X#include "dink_sym.h"
  995. X#include "dink_glb.h"
  996. Xvoid monster(i_n, old_n)
  997. X/********************************************************************/
  998. X/*                                                                  */
  999. X/*                  --- The Monster Subroutine ---                  */
  1000. X/*                                                                  */
  1001. X/*  monster_flag is a global variable input parameters              */
  1002. X/*                                                                  */
  1003. X/*  Software by Gary A. Allen, Jr.    7 Sept. 1989, Version: Mk 1.5 */
  1004. X/*           (c) Copyright 1989 by Gary A. Allen, Jr.               */
  1005. X/*                                                                  */
  1006. X/********************************************************************/
  1007. Xint *i_n, *old_n ;
  1008. X{
  1009. X#ifdef __TURBOC__
  1010. Xvoid ender(int), long_descp(int), hold_it(void), boom(void) ;
  1011. X#endif
  1012. X
  1013. Xregister int i, j ;
  1014. Xint n, sw_chasing, sw_local, j_chase, j_local ;
  1015. Xstatic int sw_snaked = FALSE, sw_hoop = FALSE, bear_flag = 0 ;
  1016. Xstatic int old_n_1, old_n_2, sw_replaced = FALSE, sw_wombat = FALSE ;
  1017. Xstatic int sw_nogo = FALSE, sw_guarded = TRUE, sw_letter = FALSE ;
  1018. Xstatic int count_down = 0 ;
  1019. X/* set up some of the input variables */
  1020. Xn = *i_n ;
  1021. Xsw_chasing = FALSE ; /* turn off the chasing monster switch */
  1022. Xsw_local = FALSE ;   /* turn off the local monster switch */
  1023. X
  1024. X/* There can be no active monsters while in the closet */
  1025. Xif (n == R_closet) {
  1026. X    monster_flag = F_no_monster ;
  1027. X    if (sw_letter == TRUE) {
  1028. X        sw_letter = FALSE ;
  1029. X        sw_nogo = TRUE ;
  1030. Xprintf("\nYou hear a loud \"BOOM!\" from the Prayer Room followed\n");
  1031. Xprintf("by the sounds of people shouting and cursing in Farsi. I\n");
  1032. Xprintf("think it is definitely time that we leave.\n") ;
  1033. X    }
  1034. X    return ;
  1035. X}
  1036. X
  1037. X/* scan the enemy table for the local and/or chasing monsters */
  1038. Xfor (j = 0; j <= enemy_max; j++) {
  1039. X    if (enemy[j][E_location] == n) {
  1040. X        sw_local = TRUE;
  1041. X        j_local = j ;
  1042. X    }
  1043. X    else if (enemy[j][E_status] != F_asleep){
  1044. X        if ((N_mullah == j)||(N_guards == j)||((N_ned == j)&&
  1045. X        (enemy[j][E_status] == F_stealing))) continue ;
  1046. X        sw_chasing = TRUE;
  1047. X        j_chase = j ;
  1048. X    }
  1049. X} 
  1050. X
  1051. X/* see if the monster is local */
  1052. Xif (sw_local) {
  1053. X/* deal with case of being chased by monster to another monster */
  1054. Xif (sw_chasing) {
  1055. X    switch(j_chase) {
  1056. X/* Mutant wombat scares off the local monser */
  1057. X    case N_wombat:
  1058. X/* put the local monster to sleep and swap location with wombat  */
  1059. X    enemy[j_local][E_status] = F_asleep ;
  1060. X    enemy[j_local][E_location] = enemy[N_wombat][E_location] ;
  1061. X    goto chaser ;
  1062. X/* Hoop Snake breaks off the chase */
  1063. X    case 6:
  1064. X    case 7:
  1065. X    case 8:
  1066. X    case 9:
  1067. X    case 10:
  1068. X    case 11:
  1069. X    case 12:
  1070. X    case 13:
  1071. Xprintf("                     ---- What a relief!! ---- \n") ;
  1072. Xprintf("           The dreaded hoop snake has broken off pursuit.\n");
  1073. Xprintf("                         But what is this!!\n\n") ;
  1074. Xprintf("You see yet another terrible creature!\n");
  1075. X    sw_replaced = TRUE  ;
  1076. X    break ;
  1077. X    }
  1078. X    /* put the chasing monster to sleep */
  1079. X    monster_flag = F_no_monster ;
  1080. X    enemy[j_chase][E_status] = F_asleep ;
  1081. X    sw_chasing = FALSE;
  1082. X}
  1083. X
  1084. X/* local monster routines */
  1085. Xj = j_local ;
  1086. Xswitch(j) {
  1087. X
  1088. X/* Revolutionary Guard local (only) behavior */
  1089. Xcase N_guards:
  1090. Xmonster_flag = F_monster_active ;
  1091. X
  1092. X/* guards always kill after the letter bomb has exploded */
  1093. Xif (sw_nogo) {
  1094. Xprintf("\nWith you are three men dressed in ripped and shredded ");
  1095. Xprintf("clothes which have\nbeen blackened by an explosion.  They ") ;
  1096. Xprintf("are armed to the teeth and insane\nwith rage.  They take ");
  1097. Xprintf("one look at you and proceed to cut you to pieces with\n");
  1098. Xprintf("their automatic weapons!\n\n");
  1099. X    ender(F_died) ;
  1100. X}
  1101. X
  1102. X/* guards always kill if they see a rifle */
  1103. Xif (object[O_rifle][J_loc] == B_have) {
  1104. Xprintf("With you are four men dressed in rather shabby clothes. ");
  1105. Xprintf("Three of them\nare clutching AK-47 assault rifles while ");
  1106. Xprintf("the fourth one is holding an Uzi\nmachine gun. They ") ;
  1107. Xprintf("take one look at the M-16 rifle which you are clutching,\n");
  1108. Xprintf("point their own weapons at you and proceed to hose you ");
  1109. Xprintf("with a hail of\nlead!  Ten seconds later you look like ");
  1110. Xprintf("a piece of Swiss cheese.\n\n") ;
  1111. X    ender(F_died) ;
  1112. X}
  1113. X
  1114. Xswitch (enemy[N_guards][E_status]) {
  1115. X    case F_asleep:
  1116. X        enemy[N_guards][E_status] = F_passive ;
  1117. Xprintf("With you are four men dressed in rather shabby clothes. ");
  1118. Xprintf("Three of them\nare clutching AK-47 assault rifles while ");
  1119. Xprintf("the fourth one is holding an Uzi\nmachine gun. They ") ;
  1120. Xprintf("search you but find nothing that is obviously a\n") ;
  1121. Xprintf("weapon.  They are in a quandary on what to do with ") ;
  1122. Xprintf("you, since you\nliterally appeared out of thin air.\n");
  1123. X        return ;
  1124. X    
  1125. X    case F_passive:
  1126. X        if (enemy[N_mullah][E_status] == F_asleep) {
  1127. Xprintf("\nThe four men have concluded that the best thing to do\n");
  1128. Xprintf("with you is to take you to their superiors.  Two of the men\n");
  1129. Xprintf("roughly grab hold of you and fling you bodily through the\n");
  1130. Xprintf("doorway to the east.\n\n") ;
  1131. X        *i_n = R_prayer;
  1132. X        long_descp(R_prayer) ;
  1133. X        goto tossed ;
  1134. X        }
  1135. X        if (sw_guarded) {
  1136. Xprintf("\nAll of the guards are currently in the prayer room.\n") ;
  1137. X            sw_guarded = FALSE ;
  1138. X        }
  1139. X        return ;
  1140. X
  1141. X    case F_aggressive:
  1142. X        enemy[N_guards][E_status] = F_killing ;
  1143. Xprintf("\nThe four guards grab you by the arms and legs, and frog\n");
  1144. Xprintf("march you back into the prayer room.\n");
  1145. X        *i_n = R_prayer;
  1146. X        return ;
  1147. X
  1148. X    case F_killing:
  1149. Xprintf("\nThe guards are tired of fooling with you.  One of them\n") ;
  1150. Xprintf("hits you on the head with the butt of his rifle.  Then the\n");
  1151. Xprintf("other two guards drag you outside where you are executed\n");
  1152. Xprintf("before a jeering mob of 30,000 people!\n\n") ;
  1153. X        ender(F_died) ;
  1154. X
  1155. X} /* end of the Guards local routine and switch block */
  1156. X
  1157. X
  1158. X/* Chief Mullah local (only) behaivor */
  1159. Xcase N_mullah:
  1160. Xswitch (enemy[N_mullah][E_status]) {
  1161. X    case F_asleep:
  1162. Xtossed:
  1163. X        printf("\n") ;
  1164. X        hold_it() ;
  1165. X        enemy[N_mullah][E_status] = F_aggressive ;
  1166. X        enemy[N_guards][E_status] = F_aggressive ;
  1167. X
  1168. Xprintf("The chief Mullah (or whatever he is) who is sitting on the\n");
  1169. Xprintf("dias glares in your direction and begins expounding in a\n");
  1170. Xprintf("long monologue in Farsi. One of his Revolutionary Guards\n") ;
  1171. Xprintf("starts translating the Mullah's words into fairly good\n");
  1172. Xprintf("English (with an American accent!). Here is what he said:\n") ;
  1173. Xprintf("\n\"I can see by your slouch hat, singlet and short pants\n");
  1174. Xprintf("that you are a good-for-nothing satanic Australian. I am\n");
  1175. Xprintf("compelled to point out that your sort is most unwelcomed in\n");
  1176. X
  1177. X/* see if the user has any valuables or the letter */
  1178. X        for (i = 0; i <= objcnt; i++) { 
  1179. X            if ((object[i][J_loc] == B_have)&& 
  1180. X    ((O_letter == i)||(object[i][J_value] > 0))) {
  1181. X
  1182. X/* Player has something the Mullah wants, so he lives */
  1183. Xprintf("this holy precinct.  Unless you can provide some good\n");
  1184. Xprintf("reasons (preferably financial ones) to the contrary, I\n");
  1185. Xprintf("shall order you to be executed immediately for the\n");
  1186. Xprintf("amusement and edification of the local populace!\"\n") ;
  1187. X                count_down = 0 ;
  1188. X                return ;    
  1189. X            }
  1190. X        }
  1191. X/* Player has no valuables and doesn't have the letter so he dies */
  1192. Xprintf("this holy precinct.  Since you have nothing of value, our\n");
  1193. Xprintf("usual practice would be to take you hostage and extract a\n");
  1194. Xprintf("ransom from your government.  However the Ozzie Dollar\n") ;
  1195. Xprintf("doesn't buy all that much anymore, so we'll just execute\n");
  1196. Xprintf("you and leave it at that.\"\n") ;
  1197. X        goto mullah_kills ;
  1198. X
  1199. X    case F_aggressive:
  1200. X        if (object[O_letter][J_loc]==R_prayer) goto see_letter;
  1201. X        count_down++ ;
  1202. X        switch(count_down) {
  1203. X        case 1:
  1204. Xprintf("\nThe mullah is waiting for you to give him something.\n") ;
  1205. X            return ;
  1206. X        case 2:
  1207. Xprintf("\nThe mullah is becoming quite impaitent.  You had better\n") ;
  1208. Xprintf("do something soon!\n") ;
  1209. X        enemy[N_mullah][E_status] = F_killing ;
  1210. X        }
  1211. X        return ;
  1212. X
  1213. X    case F_passive:
  1214. X        count_down++ ;
  1215. X        switch(count_down) {
  1216. X
  1217. X        case 1:
  1218. Xprintf("\nThe mullah is examining the envelope of Muammar's letter.\n");
  1219. X            return ;
  1220. X
  1221. X        case 2:
  1222. Xprintf("\nThe mullah has turned the envelope over and is just\n") ;
  1223. Xprintf("about to open it.\n") ;
  1224. X            return ;
  1225. X
  1226. X        case 3:
  1227. X            boom() ;
  1228. Xprintf("The mullah opened the letter.  Needless to say, the letter\n") ;
  1229. Xprintf("was a bomb.  The good news is the nasty old mullah died.\n");
  1230. Xprintf("The bad news is you died in the explosion as well!\n\n") ;
  1231. X            ender(F_died) ;
  1232. X        }
  1233. X
  1234. X    case F_killing:
  1235. X        if (object[O_letter][J_loc]==R_prayer) goto see_letter;
  1236. Xprintf("\"You are a brainless idiot!\" screams the Mullah!\n") ;
  1237. X        goto mullah_kills ;
  1238. X} /* end of mullah status switch block */
  1239. X
  1240. X/* The mullah sees Gaddafi's letter */
  1241. Xsee_letter:
  1242. Xprintf("\nThe Mullah gives the letter a casual glance, then\n");
  1243. Xprintf("suddenly his face lights up and he claps his hands with\n") ;
  1244. Xprintf("glee.\n\n") ;
  1245. Xprintf("\"It's a letter from my old friend Muammar!\", he exclaims!\n");
  1246. Xprintf("\"This is an occasion for much jubulation.  As a token of\n");
  1247. Xprintf("my esteem take this ancient gong clapper made of gold and\n");
  1248. Xprintf("ivory.  It was recovered from the personal collection of\n") ;
  1249. Xprintf("the deposed Shah. It once belonged to the ancient Persian\n") ;
  1250. Xprintf("King Cyrus and is priceless!\"\n\n") ;
  1251. Xprintf("With this glad tiding the Mullah hands you the ancient\n") ;
  1252. Xprintf("clapper and then reaches down to pick up the letter from\n") ;
  1253. Xprintf("his old friend.\n") ;
  1254. X
  1255. Xenemy[N_mullah][E_status] = F_passive ;
  1256. Xenemy[N_guards][E_status] = F_passive ;
  1257. Xobject[O_letter][J_loc] = B_destroyed ;
  1258. X--room[R_prayer][M_obj_cnt] ;
  1259. Xobject[O_clapper][J_loc] = B_have ;
  1260. Xobject[O_detector][J_loc] = R_guard ;
  1261. X++room[R_guard][M_obj_cnt] ;
  1262. Xsw_letter = TRUE ;
  1263. Xcount_down = 0 ;
  1264. Xreturn ;
  1265. X/* end of the mullah local behavior routine */
  1266. X
  1267. X/* Ned Kelly local behavior */
  1268. Xcase N_ned:
  1269. Xif (monster_flag == F_no_monster) {
  1270. Xprintf("\nAs you approached the entrance of Ned Kelly's hide out, a ") ;
  1271. Xprintf("man walked out\n") ;
  1272. Xprintf("the front door and prevented you from entering.  He is ");
  1273. Xprintf("wearing an iron\n") ;
  1274. Xprintf("helmet with thin eye slits which completely covers ");
  1275. Xprintf("his head.  He has\n") ;
  1276. Xprintf("body armour made of thin sheets of iron that covers ");
  1277. Xprintf("his chest and abdomen.\n") ;
  1278. Xprintf("He is holding a 12 guage double barrel shotgun ");
  1279. Xprintf("and has a pistol on\nhis hip.  ") ;
  1280. Xprintf("I could be wrong but I think this is Ned Kelly!\n\n");
  1281. X    *i_n = R_hideout_entr ;
  1282. X    monster_flag = F_monster_active ;
  1283. X    enemy[N_ned][E_status] = F_passive ;
  1284. X    return ;
  1285. X}
  1286. Xelse {
  1287. X    if (enemy[N_ned][E_status] == F_killing) goto ned_kills ;
  1288. Xprintf("\nNed is not about to allow you to enter his hide out.  He ");
  1289. Xprintf("is now expressing\n") ;
  1290. Xprintf("his displeasure with your continued presence by cocking both ");
  1291. Xprintf("of the hammers on\n") ;
  1292. Xprintf("his shotgun and pointing it at your head.  I believe it is ");
  1293. Xprintf("time to go!!\n\n") ;
  1294. X    *i_n = R_hideout_entr ;
  1295. X    enemy[N_ned][E_status] = F_killing ;
  1296. X    return ;
  1297. X}
  1298. X
  1299. X/* Mutant Wombat monster behavior */
  1300. Xcase N_wombat:
  1301. Xsw_replaced = FALSE ; 
  1302. Xif (monster_flag == F_no_monster) {
  1303. Xprintf("\n                        ----- OH NO!! -----\n") ;
  1304. Xprintf("                  You are in ***SERIOUS TROUBLE*** !!!\n") ;
  1305. Xprintf("Forget about hoop snakes, and forget about drop bears.  This ");
  1306. Xprintf("is the WORST\n") ;
  1307. Xprintf("thing that can be found in the ACME Mine.  You see before ");
  1308. Xprintf("you the awful\n") ;
  1309. Xprintf("spawn of the Pommy nuclear weapon's tests. Its ancestors ");
  1310. Xprintf("were inoffensive\n") ;
  1311. Xprintf("creatures, but gamma radiation has transformed this into...\n");
  1312. Xprintf("                      The Dreadful Mutant Wombat!! \n") ;
  1313. Xprintf("Normally I would advise you to run for your life.  However ");
  1314. Xprintf("there's really\n");
  1315. Xprintf("no point.  You can not out run this thing, and it's almost ");
  1316. Xprintf("impossible to\n");
  1317. Xprintf("kill.  You might as well just stand here and let it finish ");
  1318. Xprintf("you off as\n") ;
  1319. Xprintf("quickly and painlessly as possible.\n\n") ;
  1320. X    monster_flag = F_monster_active ;
  1321. X    enemy[N_wombat][E_status] = F_aggressive ;
  1322. X    old_n_1 = n ; 
  1323. X    old_n_2 = 0 ; /* zero out the previous location */
  1324. X    *old_n = old_n_2 ;
  1325. X    return ;
  1326. X}
  1327. Xelse {
  1328. X    if (enemy[N_wombat][E_status] == F_aggressive) {
  1329. Xprintf("\nThe wombat is approaching you.  Its mouth is wide open ") ;
  1330. Xprintf("showing its\n") ;
  1331. Xprintf("enormous canines.  Its claws are fully extended.  The ") ;
  1332. Xprintf("wombat sees\n") ;
  1333. Xprintf("you as an easy meal and is preparing to feast.\n") ;
  1334. X        enemy[N_wombat][E_status] = F_killing ;
  1335. X        return ;
  1336. X    }
  1337. X    if (enemy[N_wombat][E_status] == F_killing) goto wombat_kills ;
  1338. X}
  1339. X
  1340. X/* Drop Bear monster behavior */
  1341. Xcase 2:
  1342. Xcase 3:
  1343. Xcase 4:
  1344. Xcase 5:
  1345. Xsw_replaced = FALSE ; 
  1346. Xif (monster_flag == F_no_monster) {
  1347. X    switch(bear_flag) {
  1348. Xcase 0:
  1349. Xprintf("\nAs you walk in, you see something that looks vaguely like") ;
  1350. Xprintf(" a koala bear\n") ;
  1351. Xprintf("sitting in the middle of the floor.  However this \"koala\"") ;
  1352. Xprintf(" has vampire\n") ;
  1353. Xprintf("teeth and blood drooling down the sides of its mouth. The") ;
  1354. Xprintf(" bear takes\n") ;
  1355. Xprintf("one look at you and climbs up the wall onto the ceiling.") ;
  1356. Xprintf(" It \n") ;
  1357. Xprintf("clings to the ceiling much like a fly and seems to be") ;
  1358. Xprintf(" positioning\n") ;
  1359. Xprintf("itself to be directly over you.  I could be wrong but I") ;
  1360. Xprintf(" think this is\n") ;
  1361. Xprintf("the deadly DROP BEAR! \n\n") ;
  1362. X    bear_flag = 1 ;
  1363. X    break ;
  1364. X
  1365. Xcase 1:
  1366. Xprintf("\nJust as you walk in, a drop bear flashes by and hits") ;
  1367. Xprintf(" the ground with\n");
  1368. Xprintf("a THUNK.  That was close!  Had it hit you, and caught ") ;
  1369. Xprintf("hold with its\n");
  1370. Xprintf("claws, you would have been finished.  The dreaded ");
  1371. Xprintf("beast is now\n") ;
  1372. Xprintf("running up the wall towards the ceiling to give it ") ;
  1373. Xprintf("another go. I\n");
  1374. Xprintf("think we had better leave and soon!\n\n") ;;
  1375. X    bear_flag = 2 ;
  1376. X    break ;
  1377. X
  1378. Xcase 2:
  1379. Xprintf("\nAs you walk in, you see a drop bear lounging lazily in") ;
  1380. Xprintf(" the middle of\n");
  1381. Xprintf("the floor. It rolls over and takes one look at you, ") ;
  1382. Xprintf("runs towards\n");
  1383. Xprintf("the wall and scampers up to the ceiling.  It is now ");
  1384. Xprintf("positioning\n") ;
  1385. Xprintf("itself to be directly over you.\n\n") ;
  1386. X    bear_flag = 1 ;
  1387. X    }
  1388. X
  1389. Xmonster_flag = F_monster_active ;
  1390. Xenemy[j][E_status] = F_aggressive ;
  1391. Xreturn ;
  1392. X}
  1393. Xelse {
  1394. X    if (enemy[j][E_status] == F_aggressive) {
  1395. Xprintf("\nThe drop bear is now positioned directly above you.  It is") ;
  1396. Xprintf(" hanging batlike\n") ;
  1397. Xprintf("by its rear paws, with its front arms reaching out with");
  1398. Xprintf(" claws fully \n") ;
  1399. Xprintf("extended.  Its mouth is wide open with its vampire teeth ");
  1400. Xprintf("clearly visible.\n") ;
  1401. Xprintf("I think this thing means business!  Let's make a hasty ");
  1402. Xprintf("departure!!\n") ;
  1403. X        enemy[j][E_status] = F_killing ;
  1404. X        return ;
  1405. X    }
  1406. X    if (enemy[j][E_status] == F_killing) goto bear_kills ;
  1407. X}
  1408. X/* Hoop Snake monster behavior */
  1409. Xcase 6:
  1410. Xcase 7:
  1411. Xcase 8:
  1412. Xcase 9:
  1413. Xcase 10:
  1414. Xcase 11:
  1415. Xcase 12:
  1416. Xcase 13:
  1417. Xif (monster_flag == F_no_monster) {
  1418. X    if (sw_replaced) { 
  1419. X        sw_replaced = FALSE  ;
  1420. Xprintf("\nA new and rested hoop snake rolls into view.  The ");
  1421. Xprintf("snake sees you, lets go of\n") ;
  1422. Xprintf("its tail and starts slithering towards you with fangs ");
  1423. Xprintf("at the ready. \n\n");
  1424. X    }
  1425. X    else {
  1426. X        if (!sw_hoop) {
  1427. Xprintf("\nSomething that looks vaguely like a barrel hoop rolls into ");
  1428. Xprintf("the passage. You \n") ;
  1429. Xprintf("suddenly realize to your horror that this is no hoop but a ");
  1430. Xprintf("snake biting its \n") ;
  1431. Xprintf("own tail.  The snake lets go of its tail and starts to ");
  1432. Xprintf("slither towards you \n") ;
  1433. Xprintf("like a regular, highly aggressive snake. \n\n");
  1434. X            sw_hoop = TRUE ;
  1435. X        }
  1436. X        else {
  1437. Xprintf("\nA hoop snake rolls towards you.  It lets go of its ");
  1438. Xprintf("tail and starts slithering\n") ;
  1439. Xprintf("in your direction. \n\n");
  1440. X        }
  1441. X    }
  1442. X    monster_flag = F_monster_active ;
  1443. X    enemy[j][E_status] = F_aggressive ;
  1444. X    old_n_1 = n ; 
  1445. X    old_n_2 = 0 ; /* zero out the previous location */
  1446. X    *old_n = old_n_2 ;
  1447. X    return ;
  1448. X}
  1449. Xelse {
  1450. X    if (enemy[j][E_status] == F_aggressive) {
  1451. Xprintf("\nThe hoop snake is coiling up in front of you and ") ;
  1452. Xprintf("hissing very aggressively. \n") ;
  1453. Xprintf("Venom is dripping from its sharp fangs and seems ") ;
  1454. Xprintf("to be burning holes into\n") ;
  1455. Xprintf("the stone floor.\n\n") ;
  1456. Xprintf("I think it would be wise for us to leave....  Quickly!!\n") ;
  1457. X        enemy[j][E_status] = F_killing ;
  1458. X        return ;
  1459. X    }
  1460. X    if (enemy[j][E_status] == F_killing) goto snake_kills ;
  1461. X}
  1462. X} /* end of the local monster switch group */
  1463. X}
  1464. X
  1465. X/* chasing monster routines */
  1466. Xchaser: 
  1467. Xj = j_chase ;
  1468. Xswitch(j) {
  1469. X/* Ned Kelly */
  1470. Xcase N_ned:
  1471. X    if (n == R_hideout_entr) {
  1472. X    if (enemy[N_ned][E_status] == F_passive) {
  1473. Xprintf("\nNed Kelly is standing in front of you and is holding a ");
  1474. Xprintf("12 guage shotgun\n") ;
  1475. Xprintf("in a rather menacing manner.  This guy is really game!\n\n") ;
  1476. Xprintf("I suggest we leave.....   and quickly!!\n\n") ;
  1477. X        enemy[N_ned][E_status] = F_aggressive ;
  1478. X        return ;
  1479. X    }
  1480. X    if (enemy[N_ned][E_status] == F_aggressive) {
  1481. Xprintf("\nNed seems to be getting impaitent with you.  He is now ");
  1482. Xprintf("expressing his\n") ;
  1483. Xprintf("displeasure with your continued presence by cocking both ");
  1484. Xprintf("of the hammers on\n") ;
  1485. Xprintf("his shotgun and pointing it at your head.  I really think ");
  1486. Xprintf("we should be\n") ;
  1487. Xprintf("making a hasty departure!!\n\n") ;
  1488. X        enemy[N_ned][E_status] = F_killing ;
  1489. X        return ;
  1490. X    }
  1491. X    if (enemy[N_ned][E_status] != F_killing) break ;
  1492. X        else goto ned_kills ;
  1493. X    }
  1494. X    else break ;
  1495. X/* Mutant wombat chases */
  1496. Xcase N_wombat:
  1497. X    if (n == R_lift_inside) {
  1498. Xprintf("\nYou run as fast as you can into the lift.  You've made it,") ;
  1499. Xprintf(" you're in the\n") ;
  1500. Xprintf("lift! However as you turn around, you realize to your horror") ;
  1501. Xprintf(" that the\n") ;
  1502. Xprintf("wombat has also made it inside the lift, and the door ");
  1503. Xprintf("is closing!!\n\n") ;
  1504. Xprintf("                     Ah, Stuff of Nightmares!!!\n") ;
  1505. Xprintf("          ---Trapped in a Lift with a Mutant Wombat!!!---\n\n");
  1506. Xprintf("This is just too horrible.  Let it suffice... You died. \n");
  1507. X    ender(F_died) ;
  1508. X    }
  1509. X    if (n == old_n_2) {
  1510. Xprintf("The wombat is in that direction.  You can't go that way!\n");
  1511. X        *i_n = old_n_1 ;
  1512. X        return ;
  1513. X    }
  1514. X    if (!sw_wombat) {
  1515. Xprintf("\nAs you flee down the passage, you hear the ");
  1516. Xprintf("\"THUD, THUD, THUD\" of the wombat\n") ;
  1517. Xprintf("trudging down the passage.  The horrible thing is after") ;
  1518. Xprintf(" you!  Give up\n") ;
  1519. Xprintf("all hope!  The wombat is driven by nuclear energy and") ;
  1520. Xprintf(" will never stop.\n\n") ;
  1521. X    sw_wombat = TRUE ;
  1522. X    }
  1523. X    else { 
  1524. Xprintf("\nThe wombat is still chasing you and not tiring. \n") ;
  1525. X    }
  1526. X    monster_flag = F_monster_active ;
  1527. X    enemy[j][E_status] = F_aggressive ;
  1528. X    --room[enemy[j][E_location]][M_monster] ;
  1529. X    ++room[n][M_monster] ;
  1530. X    enemy[j][E_location] = n ;
  1531. X    old_n_2 = old_n_1 ;
  1532. X    old_n_1 = n ;
  1533. X    *old_n = old_n_2 ;
  1534. X    return ;
  1535. X/* Hoop Snake chases */
  1536. Xcase 6:
  1537. Xcase 7:
  1538. Xcase 8:
  1539. Xcase 9:
  1540. Xcase 10:
  1541. Xcase 11:
  1542. Xcase 12:
  1543. Xcase 13:
  1544. X    if (n == R_lift_inside) {
  1545. Xprintf("\nYou seek refuge from the hoop snake by fleeing into the ") ;
  1546. Xprintf("lift.  Just as you\n") ;
  1547. Xprintf("enter the lift, its door begins to close.  Unfortunately the") ;
  1548. Xprintf(" hoop snake\n") ;
  1549. Xprintf("rolls in the instant before the door is fully closed.\n\n") ;
  1550. Xprintf("We will not describe the unpleasant events that occur behind");
  1551. Xprintf(" the closed door\n");
  1552. Xprintf("of the lift. However one can hear screams, curses, futile ");
  1553. Xprintf("banging on the\n");
  1554. Xprintf("lift door and loud snake hissing.  After a few minutes ");
  1555. Xprintf("there is again silence.\n");
  1556. Xprintf("The lift door opens and the hoop snake rolls out and away. ");
  1557. Xprintf("A peek inside the\n");
  1558. Xprintf("lift reveals your corpse which is in the early phases of ");
  1559. Xprintf("rigor mortis.\n") ;
  1560. X    ender(F_died) ;
  1561. X    }
  1562. X    if (n == old_n_2) {
  1563. X        if (enemy[j][E_status] == F_killing) {
  1564. Xprintf("The hoop snake is in that direction.  ") ;
  1565. Xprintf("You can't go that way!\n");
  1566. X        *i_n = old_n_1 ;
  1567. X        return ;
  1568. X        }
  1569. X        else {
  1570. Xprintf("You have run back the way you came and passed the hoop ");
  1571. Xprintf("snake, which\n") ;
  1572. Xprintf("is still biting its tail and rolling like a hoop. The ") ;
  1573. Xprintf("vile creature\n") ;
  1574. Xprintf("hisses in frustration and does a U-turn to continue ") ;
  1575. Xprintf("the chase.\n\n") ;
  1576. X        }
  1577. X    }
  1578. X    else {
  1579. X        if (!sw_snaked) {
  1580. Xprintf("\nAs you flee down the passage, you hear the characteristic ") ;
  1581. Xprintf("sound of reptilian\n") ;
  1582. Xprintf("scales rubbing the stone floor.  You look over your shoulder") ;
  1583. Xprintf(" and see the\n") ;
  1584. Xprintf("hoop snake is rolling along right behind you! The dreaded") ;
  1585. Xprintf(" thing is chasing you!!\n\n") ;
  1586. X            sw_snaked = TRUE ;
  1587. X        }
  1588. X        else {
  1589. Xprintf("\nThe hoop snake is rolling along behind you, and still") ;
  1590. Xprintf(" in hot pursuit!\n\n") ;
  1591. X        }
  1592. X    }
  1593. X    monster_flag = F_monster_active ;
  1594. X    enemy[j][E_status] = F_aggressive ;
  1595. X    --room[enemy[j][E_location]][M_monster] ;
  1596. X    ++room[n][M_monster] ;
  1597. X    enemy[j][E_location] = n ;
  1598. X    old_n_2 = old_n_1 ;
  1599. X    old_n_1 = n ;
  1600. X    *old_n = old_n_2 ;
  1601. X    return ;
  1602. X} /* end of the chasing monster switch group */
  1603. X
  1604. X/* player has fled the monster, so turn it off */
  1605. Xmonster_flag = F_no_monster ;
  1606. Xenemy[j][E_status] = F_asleep ;
  1607. Xreturn ;
  1608. X
  1609. X/* Ned Kelly kills the player */
  1610. Xned_kills:
  1611. Xprintf("\nWith an air of professional detachment, Ned Kelly pulls ");
  1612. Xprintf("both triggers\n") ;
  1613. Xprintf("on his shotgun and blows your head clean off your ") ;
  1614. Xprintf("shoulders. \n\n") ;
  1615. Xender(F_died) ;
  1616. X
  1617. X/* The Mutant Wombat kills the player */
  1618. Xwombat_kills:
  1619. Xprintf("\nThe obscene creature has grasped you with its terrible ");
  1620. Xprintf("claws!  First the\n");
  1621. Xprintf("wombat rips off your right arm with a single jerk and ");
  1622. Xprintf("tosses it down its\n");
  1623. Xprintf("throat like it was an appetizer (which it was!).  Next ");
  1624. Xprintf("the monster studies\n");
  1625. Xprintf("you for a moment and then twists off your left leg and ") ; 
  1626. Xprintf("chews on it like\n") ;
  1627. Xprintf("a turkey drumstick.  After savoring your left leg, it ");
  1628. Xprintf("opens its mouth wide\n");
  1629. Xprintf("and stuffs you in head first!  Your last memory was ") ;
  1630. Xprintf("hearing the crunching\n");
  1631. Xprintf("of your own bones as the wombat's jaws clamped down!\n") ;
  1632. Xender(F_died) ;
  1633. X
  1634. X/* The Hoop Snake kills the player */
  1635. Xsnake_kills:
  1636. Xprintf("\nThe hoop snake strikes and bites you right on the nose!") ;
  1637. Xprintf("\n\nYou begin to thrash around ") ;
  1638. Xprintf("like a Baygon sprayed cocky.  The nerve poison \n") ;
  1639. Xprintf("makes you jerk around onto your back with your arms and ") ;
  1640. Xprintf("legs flailing about\n") ;
  1641. Xprintf("in the air.  With time your spasmodic twitching reduces") ;
  1642. Xprintf(" in frequency.  You\n") ;
  1643. Xprintf("slowly grind down to a halt with the coming of death. \n") ;
  1644. Xender(F_died) ;
  1645. X
  1646. X/* The drop bear kills the player */
  1647. Xbear_kills:
  1648. Xprintf("\nThe drop bear drops on top of you.  First it grabs hold ") ;
  1649. Xprintf("of you with its \n") ;
  1650. Xprintf("sharp claws that sink deep into your flesh.  Then it bites ");
  1651. Xprintf("into your neck \n") ; 
  1652. Xprintf("at the jugular vein and begins sucking your blood.  You ");
  1653. Xprintf("try desperately \n") ;
  1654. Xprintf("to pull the horrible monster off, but it only clamps on ");
  1655. Xprintf("harder and sucks \n") ; 
  1656. Xprintf("more vigorously.  Soon you grow weak from lack of blood, ");
  1657. Xprintf("and lapse into death. \n") ;
  1658. Xender(F_died) ;
  1659. X
  1660. X/* The Mullah kills the player */
  1661. Xmullah_kills:
  1662. Xprintf("\nWith that pronouncement, the chief Mullah claps his hands\n");
  1663. Xprintf("twice.  Two Revolutionary Guards drag you outside where you\n");
  1664. Xprintf("are executed before a jeering mob of 30,000 people!\n") ;
  1665. Xender(F_died) ;
  1666. X
  1667. X} /* --- end of the "monster" subroutine --- */
  1668. END_OF_FILE
  1669. if test 23544 -ne `wc -c <'monster.c'`; then
  1670.     echo shar: \"'monster.c'\" unpacked with wrong size!
  1671. fi
  1672. # end of 'monster.c'
  1673. fi
  1674. echo shar: End of archive 4 \(of 6\).
  1675. cp /dev/null ark4isdone
  1676. MISSING=""
  1677. for I in 1 2 3 4 5 6 ; do
  1678.     if test ! -f ark${I}isdone ; then
  1679.     MISSING="${MISSING} ${I}"
  1680.     fi
  1681. done
  1682. if test "${MISSING}" = "" ; then
  1683.     echo You have unpacked all 6 archives.
  1684.     rm -f ark[1-9]isdone
  1685. else
  1686.     echo You still need to unpack the following archives:
  1687.     echo "        " ${MISSING}
  1688. fi
  1689. ##  End of shell archive.
  1690. exit 0
  1691.