home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume15 / dinkum2 / part03 < prev    next >
Encoding:
Internet Message Format  |  1993-01-26  |  52.2 KB

  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: v15i038:  dinkum2 - australian text adventure game, Part03/07
  5. Message-ID: <4194@master.CNA.TEK.COM>
  6. Date: 14 Jan 93 03:25:50 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1788
  9. Approved: billr@saab.CNA.TEK.COM
  10. Xref: uunet comp.sources.games:1537
  11.  
  12. Submitted-by: Gary Allen <gary@sun.mech.uq.oz.au>
  13. Posting-number: Volume 15, Issue 38
  14. Archive-name: dinkum2/Part03
  15. Supersedes: dinkum: Volume 15, Issue 21-26
  16. Environment: Unix, DOS
  17.  
  18.  
  19.  
  20. #! /bin/sh
  21. # This is a shell archive.  Remove anything before this line, then unpack
  22. # it by saving it into a file and typing "sh file".  To overwrite existing
  23. # files, type "sh file -c".  You can also feed this as standard input via
  24. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  25. # will see the following message at the end:
  26. #        "End of archive 3 (of 7)."
  27. # Contents:  actor.c taker.c
  28. # Wrapped by billr@saab on Wed Jan 13 19:20:18 1993
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'actor.c' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'actor.c'\"
  32. else
  33. echo shar: Extracting \"'actor.c'\" \(18535 characters\)
  34. sed "s/^X//" >'actor.c' <<'END_OF_FILE'
  35. X#define ACTOR
  36. X#include "dink_sym.h"
  37. X#include "dink_glb.h"
  38. Xvoid actor(n)
  39. X/********************************************************************/
  40. X/*                                                                  */
  41. X/* Software by Gary A. Allen, Jr. 12 December 1992, Version: Mk 1.3 */
  42. X/*           (c) Copyright 1992 by Gary A. Allen, Jr.               */
  43. X/*                                                                  */
  44. X/********************************************************************/
  45. Xint n ;
  46. X{
  47. X#if (PROTOTYPE)
  48. Xvoid objector(int) ;
  49. X#endif
  50. X
  51. Xregister int i, j ;
  52. Xint sw_found ;
  53. Xstatic int sw_door_kick = FALSE ;
  54. X
  55. Xswitch(n) {
  56. X
  57. X    /* mine elevator */
  58. X    case R_lift_entr:
  59. X        if (room[R_lift_entr][M_rm_status] == S_closed) {
  60. Xprintf("The lift doors are closed and the lift call button ");
  61. Xprintf("is not glowing. It \nseems the electrical power has ");
  62. Xprintf("been turned off at the main switch. \n");
  63. X        }
  64. X        if (room[R_lift_entr][M_rm_status] == S_flashing) {
  65. Xprintf("The lift doors are closed.  However the call button");
  66. Xprintf(" is flashing. There \nis the sound of electrical equipment ");
  67. Xprintf("humming within the mine lift. \n");
  68. X        }
  69. X        if (room[R_lift_entr][M_rm_status] == S_open) {
  70. Xprintf("The lift doors are standing open. \n");
  71. X        }
  72. X        break;
  73. X    /* office building door */
  74. X    case R_office_entr:
  75. X        switch(room[R_office_entr][M_rm_status]) {
  76. X            case S_open:
  77. Xprintf("      --- The office front door is open. --- \n");
  78. X                break;
  79. X            case S_kicked:
  80. X                if (!sw_door_kick) {
  81. Xprintf("The lock of the front door has been shot at several times.\n"); 
  82. Xprintf("The door itself has been kicked in and is broken off at\n") ;
  83. Xprintf("the hinges.  The passage way is free to enter.\n");
  84. X                sw_door_kick = TRUE ;
  85. X                }
  86. X                else {
  87. Xprintf("The front door of the office has been kicked in. \n") ;
  88. X                }
  89. X                break ;
  90. X            default:
  91. Xprintf("The office has a front door with a sun faded sign \n"); 
  92. Xprintf("upon which is written:  \"Sorry, We are CLOSED\". \n");
  93. Xprintf("      --- The office door is shut. --- \n");
  94. X                break ;
  95. X        }
  96. X        break ;
  97. X    /* Site Managers Office */
  98. X    case R_office_mang:
  99. X        if (room[R_office_mang][M_rm_status] == S_closed) {
  100. Xprintf("On the wall is a picture of a platypus wearing a hat with");
  101. X        printf(" corks \ndangling from the hat's rim.\n");
  102. X            break;
  103. X        }
  104. Xif ((room[R_office_mang][M_rm_status] == S_revealed)||
  105. X    (room[n][M_rm_status] ==S_dialed)) {
  106. Xprintf("Before you is a picture hinged to the wall that has been ");
  107. Xprintf("swung \nopen revealing a closed combination dial wall safe.\n");
  108. X            break;
  109. X}
  110. X        if (room[n][M_rm_status] == S_open) {
  111. Xprintf("Before you is a picture hinged to the wall that has been");
  112. Xprintf(" swung \nout revealing a wall safe with an open door.\n");
  113. X        sw_found = FALSE ;
  114. X        for (i = 0; i <= objcnt; i++) {
  115. X            if (object[i][J_loc] == B_in_safe) {
  116. X                sw_found = TRUE ;
  117. Xprintf ("You see the following inside the safe: \n");
  118. X                for (j = 0; j <= objcnt; j++) {
  119. X                    if (object[j][J_loc] == B_in_safe) {
  120. X                        printf ("        ");
  121. X                        objector(j) ;
  122. X                        printf("\n") ;
  123. X                    }
  124. X                }                
  125. X                if (gleep_safe != 0) {
  126. X                    printf ("        ");
  127. X                    if (gleep_safe == 1) 
  128. X                        printf("one gleep\n") ;
  129. X                    else
  130. X                        printf("%d gleeps\n",gleep_safe) ;
  131. X                }
  132. X                break;
  133. X            }
  134. X        }
  135. X        if (sw_found) break ;
  136. X        if (gleep_safe != 0) {
  137. Xprintf("There is nothing in the safe except ") ;
  138. X            if (gleep_safe == 1) 
  139. X                printf("a single gleep.\n") ;
  140. X            else
  141. X                printf("%d gleeps.\n",gleep_safe) ;
  142. X            break ;
  143. X        }
  144. X        printf("---The safe is empty.--- \n");
  145. X        break ;
  146. X        } /* end of the "safe open" block */
  147. X
  148. X    /* store room */
  149. X    case R_store_room:
  150. Xprintf("There is a 1500 Volt circuit breaker box on the wall");
  151. X        if (room[n][M_rm_status] == S_off) 
  152. Xprintf(" which has \na switch set in the \"off\" position. \n"); 
  153. X        else
  154. Xprintf(" which has \na switch set in the \"on\" position. \n"); 
  155. X        break;
  156. X
  157. X    /* lift compartment */
  158. X    case R_lift_inside:
  159. X        if (room[n][M_rm_status] == S_L0) 
  160. Xprintf("The level button with the number zero is flashing. \n"); 
  161. X        if (room[n][M_rm_status] == S_L49) 
  162. Xprintf("The level button with the number forty-nine is flashing. \n"); 
  163. X        if (room[n][M_rm_status] == S_L67) 
  164. Xprintf("The level button with the number sixty-seven is flashing. \n");
  165. X        if (room[n][M_rm_status] == S_L82) 
  166. Xprintf("The level button with the number eighty-two is flashing. \n"); 
  167. X        break;
  168. X
  169. X} 
  170. X} /* --- end of subroutine "actor"--- */
  171. X
  172. Xvoid objector(i)
  173. Xint i ;
  174. X{
  175. Xstatic char *obj[] = {
  176. X"an empty can of Fourex beer",
  177. X"a cigarette butt",
  178. X"an empty bottle of Black Swan Lager",
  179. X"an old doormat with \"ACME Gold Mines Ltd.\" written on it",
  180. X"a large brass key",
  181. X"a ripped and bent up umbrella",
  182. X"a two metre length of fishing tackle without a hook",
  183. X"a broken drill bit",
  184. X"a very old but detailed map of the ACME Mine",       /*  5  */
  185. X"a fragment of a map showing the ACME Mine",
  186. X"a sheet of paper with some writing on it",
  187. X"a gold bar weighing ten kilograms",
  188. X"a hydraulic jack which is rusted solid",
  189. X"a large stick of dynamite",
  190. X"an M16 ammo clip designed to hold up to 200 rounds",
  191. X"a fountain pen which is dried up and useless",
  192. X"an orange M16 ammo clip which is glowing a faint pale blue",
  193. X"a mechanical pencil without any leads",
  194. X"an unloaded, fully automatic M16 infantry rifle",    /*  10 */
  195. X"a piece of copper wire",
  196. X"a short length of galvanized iron pipe",
  197. X"a blasting cap with 20 cm. of fuse attached",
  198. X"a box of \"Red Head\" matches",
  199. X"a diamond ring with a three carat flawless blue diamond",
  200. X"a can opener",
  201. X"a bright red ruby the size of an egg",               /*  15 */
  202. X"an antique sterling silver teapot with \"N.K.\" engraved on it",
  203. X"a silver Syracusian Dekadrachma coin",
  204. X"an electrical extension cord",
  205. X"a $100 dollar bill",
  206. X"an autographed photo of Sir Joh",
  207. X"an old folding chair",
  208. X"a burned out light bulb",
  209. X"a packet containing atropine pills",
  210. X"a high quality artificial saphire",
  211. X"a huge uncut emerald",
  212. X"an oily rag",
  213. X"a burned out fluorescent tube",
  214. X"a filthy worn out carpet",
  215. X"a branch from a gum tree",
  216. X"a thick airmail letter, marked \"Postage Due\"",
  217. X"a cork from a wine bottle",
  218. X"a high intensity battery powered torch",
  219. X"an old cockroach trap",
  220. X"an empty butane cigarette lighter",
  221. X"a small black cube with a blue push button on one side", 
  222. X"an ancient and priceless gong clapper made of ivory and gold",
  223. X"a Semtex explosive detector with a push button switch",
  224. X"a broken shoe lace",
  225. X"a dirty old comb",
  226. X"a Cornetto ice cream cone wrapper",
  227. X"a bald automobile tyre",
  228. X"an empty broken egg shell",
  229. X"a broken piece of brick",
  230. X"a one metre length of rope",
  231. X"an empty package of Stradbroke cigarettes",
  232. X"a broken automobile fan belt",
  233. X"a used automobile oil filter",
  234. X"a short piece of string",
  235. X"a data recorder having three coloured buttons"
  236. X} ;  /* end of the "obj" character string matrix */
  237. X
  238. X/* Deal with transformed objects */
  239. Xif (object[i][J_type] == Z_alias) {
  240. X    if (i == O_rifle) {
  241. Xprintf("an M16 infantry rifle with an ammunition clip inserted") ;
  242. X        return ;
  243. X    }
  244. X    if (i == O_dynamite) {
  245. Xprintf("a large stick of dynamite with a fuse type blasting cap") ;
  246. X        return ;
  247. X    }
  248. X}
  249. Xelse printf("%s",obj[i]) ;
  250. X} /* --- end of subroutine "objector"--- */
  251. Xvoid killer(n)
  252. X/********************************************************************/
  253. X/*                                                                  */
  254. X/*  Software by Gary A. Allen, Jr. 22 January 1989  Version: Mk 1.3 */
  255. X/*           (c) Copyright 1989 by Gary A. Allen, Jr.               */
  256. X/*                                                                  */
  257. X/********************************************************************/
  258. Xint n ;
  259. X{
  260. Xregister int i, j ;
  261. X
  262. Xint hits, j_point, i_10, i_fract ;
  263. Xint sw_kill, target_k_flag, sw_see, sw_other_object ;
  264. Xstatic int sw_hurt = FALSE ;
  265. X
  266. Xstruct monster_struct *mnstr ; 
  267. X
  268. X#if (PROTOTYPE)
  269. Xvoid ender(int) ;
  270. X#endif
  271. X
  272. Xif (tag[V_VERB_ONLY]&&(verb == V_kill)) {
  273. Xprintf("It may be obvious to you, but you are going to have to tell\n");
  274. Xprintf("me exactly what it is you want to have killed, and \n") ;
  275. Xprintf("with what sort of weapon. \n") ;
  276. X    return;
  277. X}
  278. X
  279. X/* set the subroutine local flags */
  280. Xif (verb == V_kill) sw_kill = FALSE ;
  281. Xif (verb == V_shoot) sw_kill = TRUE;
  282. Xtarget_k_flag = V_NULL ;
  283. Xsw_see =  FALSE ;
  284. Xsw_other_object = FALSE ;
  285. Xif (tag[V_ned]) {
  286. X    if (Ned->Location == B_destroyed) {
  287. Xprintf("Forget it, you drongo!! Ned Kelly is already dead!\n") ;
  288. X        return ;
  289. X    }
  290. X    if (Ned->Status == F_asleep) {
  291. Xprintf("There is no Ned Kelly here for me to kill! \n") ;
  292. X        return ;
  293. X    }
  294. X    j_point = 0 ; 
  295. X    sw_see =  TRUE ;
  296. X    target_k_flag = V_ned ;
  297. X}
  298. X
  299. Xif (tag[V_bear]) {
  300. X    for (j = 2; j <= 5; j++) {
  301. X        mnstr = (monster_start + j) ;  /* point to the monster */
  302. X        if (mnstr->Status != F_asleep) {
  303. X            j_point = j ; 
  304. X            sw_see =  TRUE ;
  305. X            target_k_flag = V_bear ;
  306. X            break ;
  307. X        }
  308. X    }
  309. X    if (j > 5) {
  310. X        printf("I see no drop bear for me to kill! \n") ;
  311. X        return ;
  312. X    }
  313. X}
  314. X
  315. Xif (tag[V_wombat]) {
  316. X    if (Wombat->Status == F_asleep) {
  317. X        printf("I see no wombat for me to kill!\n");
  318. X        return ;
  319. X    }
  320. X    j_point = N_wombat ; 
  321. X    sw_see =  TRUE ;
  322. X    target_k_flag = V_wombat ;
  323. X}
  324. X
  325. Xif (tag[V_snake]) {
  326. X    for (j = 6; j <= 13; j++) {
  327. X        mnstr = (monster_start + j) ;  /* point to the monster */
  328. X        if (mnstr->Status != F_asleep) {
  329. X            j_point = j ; 
  330. X            sw_see =  TRUE ;
  331. X            target_k_flag = V_snake ;
  332. X            break ;
  333. X        }
  334. X    }
  335. X    if (j > 13) {
  336. X        printf("I see no hoop snake for me to kill! \n") ;
  337. X        return ;
  338. X    }
  339. X}
  340. X
  341. Xif (tag[V_rifle]) sw_kill = TRUE ;
  342. X
  343. X/* see if the safe is being shot at */
  344. Xif (tag[V_safe]&&(n == R_office_mang)) {
  345. Xprintf("The safe is made out of harden steel.  You'll only waste ") ;
  346. Xprintf("ammunition \nshooting at it.  Try to open it instead. \n") ;
  347. Xreturn ;
  348. X}
  349. X
  350. X/* see if the target is in the room or holding it */
  351. Xfor (j=0; j <= objcnt; j++) {
  352. X    if (tag[object[j][J_parse_id]]){
  353. X         if (object[j][J_parse_id] == V_rifle) continue ;
  354. X        sw_other_object = TRUE ;
  355. X        if (object[j][J_loc] == n) {
  356. X            sw_see =  TRUE ;
  357. X            target_k_flag = object[j][J_parse_id] ;
  358. X            break ;
  359. X        }
  360. X        if (object[j][J_loc] == B_have) {
  361. Xprintf("I will ***NOT*** shoot at something that I'm holding!!\n");
  362. X            return ;
  363. X        }
  364. X    }
  365. X}
  366. X
  367. Xif (tag[V_rifle] && (!sw_other_object)) tag[V_VERB_ONLY] = TRUE ;
  368. X
  369. Xif ((!tag[V_VERB_ONLY]) && (!tag[V_DIRECTION])) {
  370. X    if (!sw_see) {
  371. X        printf("I don't see it here to shoot at it. \n") ;
  372. X        return; 
  373. X    }
  374. X
  375. X    if (target_k_flag == V_NULL) {
  376. Xprintf("It may be obvious to you, but you are going to have to tell\n");
  377. Xprintf("me exactly what it is you want to have killed.\n");
  378. X        return ;
  379. X    }
  380. X}
  381. X
  382. X/* resolve killing errors */
  383. Xif (!sw_kill) {
  384. X    printf("What weapon am I suppose to use? \n") ;
  385. X    return ;
  386. X}
  387. X
  388. Xif (object[O_rifle][J_loc] != B_have) {
  389. Xprintf("I would do that.  Only there is one small problem.... \n") ;
  390. X    printf("You don't have a rifle in your possesion! \n") ;
  391. X    return ;
  392. X}
  393. X/* Shoot the gun (or at least try to) */
  394. Xprintf("You pull the trigger... \n\n") ;
  395. Xif (clip_flag == F_no_clip) {
  396. Xprintf("Nothing happens!  \n") ;
  397. Xprintf("Your rifle doesn't have an ammunition clip in it.\n") ;
  398. X    return ;
  399. X}
  400. Xif (object[O_rifle][J_property] <= 0) {
  401. X    printf("Nothing happens!  The ammo clip is out of bullets.\n") ;
  402. X    return ;
  403. X}
  404. Xswitch(rifle_flag) {
  405. Xcase F_safety:
  406. X    printf("Nothing happens!  The rifle's safety is still on.\n");
  407. X    return ;
  408. X            
  409. Xcase F_single:
  410. X    printf("Bam! \n\n") ;
  411. X    --object[O_rifle][J_property] ;
  412. X    if (clip_flag == F_normal_clip) hits = 1;
  413. X        else hits = 100 ;
  414. X    break ;
  415. X
  416. Xcase F_triple:
  417. X    if (object[O_rifle][J_property] >= 3) {
  418. X        printf("Bam! Bam! Bam! \n\n") ;
  419. X        object[O_rifle][J_property] -= 3 ;
  420. X        if (clip_flag == F_normal_clip) hits = 3;
  421. X            else hits = 300 ;
  422. X    }
  423. X    else {
  424. X        for (i = 1; i <= object[O_rifle][J_property]; i++) 
  425. X            printf("Bam! ") ;
  426. X            printf("\n\nYou've run out of bullets. \n\n") ;
  427. X        if (clip_flag == F_normal_clip) 
  428. X            hits = object[O_rifle][J_property];
  429. X            else hits = object[O_rifle][J_property]*100 ;
  430. X        object[O_rifle][J_property] = 0 ;
  431. X    }
  432. X    break ;
  433. X
  434. Xcase F_auto:
  435. X    if (object[O_rifle][J_property] >= 30) {
  436. X        for (i = 1; i <= 3; i++) 
  437. Xprintf("Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! \n") ;
  438. X        object[O_rifle][J_property] -= 30 ;
  439. X        hits = 30;
  440. X    }
  441. X    else {
  442. X        i_10 = object[O_rifle][J_property]/10 ;
  443. X        i_fract = object[O_rifle][J_property]-(i_10*10) ;
  444. X        for (i = 1; i <= i_10; i++) 
  445. Xprintf("Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! \n") ;
  446. X        for (i = 1; i <= i_fract; i++) 
  447. X            printf("Bam! ") ;
  448. X            printf("\n\nYou've run out of bullets. \n") ;
  449. X        if (clip_flag == F_normal_clip) 
  450. X            hits = object[O_rifle][J_property];
  451. X            else hits = object[O_rifle][J_property]*100 ;
  452. X        object[O_rifle][J_property] = 0 ;
  453. X    }
  454. X    printf("\n") ;
  455. X    break ;
  456. X}
  457. X
  458. X/* Target Seen block */
  459. Xif (sw_see) {
  460. X    /* Toggle the hurt switch if this is the first hit */
  461. X    mnstr = (monster_start + j_point) ;  /* point to the monster */
  462. X    if (mnstr->Hits == 0)  sw_hurt = FALSE ;
  463. X    mnstr->Hits += hits ;
  464. X
  465. X    switch(target_k_flag) {
  466. X    case V_ned:
  467. Xprintf("Ned Kelly keels over dead.  His body suddenly glows a bright ");
  468. Xprintf("orange like it\nis being consummed by a heatless flame ");
  469. Xprintf("and then the late Ned Kelly disappears\ninto a puff of ") ;
  470. Xprintf("blue smoke. \n\n") ;
  471. Xprintf("By the way, the recently deceased bushranger ***was*** ");
  472. Xprintf("wearing iron body\narmour.  However thin sheets of iron ");
  473. Xprintf("would just barely work against nineteenth\ncentury firearms ");
  474. Xprintf("at long range.  Against a modern infantry rifle, Ned's\n");
  475. Xprintf("armour offered about as much protection as a dunny paper ");
  476. Xprintf("bandage. \n") ;
  477. X        Ned->Location = B_destroyed ;
  478. X        Ned->Status = F_asleep ;
  479. X        monster_flag = F_no_monster ;
  480. X        room[R_hideout][M_monster] = 0 ;
  481. X    
  482. X        /* create Ned Kelly's silver teapot */
  483. X        ++room[R_hideout][M_obj_cnt] ;
  484. X        object[O_teapot][J_loc] = R_hideout ;
  485. X        return ;
  486. X
  487. X    /* shoot the drop bear */
  488. X    case V_bear:
  489. X        if (mnstr->Hits < 30) {
  490. X            /* Bear freaks out from being shot too much */
  491. X            if (sw_hurt && (mnstr->Hits >= 10)) {
  492. Xprintf("The drop bear has been shot at so many times, that it ");
  493. Xprintf("has gone mad\n") ;
  494. Xprintf("with rage.  It leaps three metres and rips out your ") ;
  495. Xprintf("throat with a\n");
  496. Xprintf("single swish of its claws.  You die instantly. \n") ;
  497. X                ender(F_died) ;
  498. X            }
  499. X
  500. X            if (mnstr->Hits == 1) {
  501. Xprintf("Your bullet hit the drop bear causing it to howl in ");
  502. Xprintf("anguish.  However drop\n");
  503. Xprintf("bears are pretty tough and just one bullet isn't ");
  504. Xprintf("going to kill it.\n") ;
  505. X            }
  506. X            else {
  507. X                if (!sw_hurt) {
  508. Xprintf("You've hit the drop bear and it is bleeding fairly ");
  509. Xprintf("heavily.\n");
  510. Xprintf("Unfortunately it is still alive and kicking and wants ") ;
  511. Xprintf("your blood \n");
  512. Xprintf("in payment for its.\n") ;
  513. X                    sw_hurt = TRUE ;
  514. X                }
  515. X                else {
  516. Xprintf("You've hit the drop bear again.  It is weakening but still ");
  517. Xprintf("alive.\n");
  518. X                }
  519. X            }
  520. X            monster_flag = F_wounded ;
  521. X            return ;
  522. X        }
  523. X
  524. X        if (rifle_flag == F_single) {
  525. Xprintf("That last bullet was the straw which broke the drop ") ;
  526. Xprintf("bear's back.\n") ;
  527. Xprintf("The blasted thing is finally dead! \n") ;
  528. X        }
  529. X        else {
  530. Xprintf("The bullets riddled the drop bear with holes, killing it ") ;
  531. Xprintf("instantly. \n") ; 
  532. X        }
  533. Xprintf("Suddenly the drop bear's corpse turns into a cloud of greasy ");
  534. Xprintf("blue smoke,\n") ;
  535. Xprintf("which floats away without a trace.\n") ;
  536. X        sw_hurt = FALSE ;
  537. X        mnstr->Location = B_destroyed ;
  538. X        mnstr->Status = F_asleep ;
  539. X        monster_flag = F_no_monster ;
  540. X        room[n][M_monster] = 0 ;
  541. X        return ;
  542. X        /* shoot the mutant wombat */
  543. X    case V_wombat:
  544. X        if (Wombat->Hits < 300) {
  545. X            if (Wombat->Hits == 1) {
  546. Xprintf("Your bullet hit the wombat causing it some minor discomfort.");
  547. Xprintf("  Judging from its \n");
  548. Xprintf("behavior, killing this beast is going to be tough! \n") ;
  549. X            }
  550. X            else {
  551. X                if (!sw_hurt) {
  552. Xprintf("You've hit the wombat and got its attention ") ;
  553. Xprintf("but you've not\n");
  554. Xprintf("seriously wounded it.  In fact, you've made it more fierce ");
  555. Xprintf("than before.\n");
  556. X                    sw_hurt = TRUE ;
  557. X                }
  558. X                else {
  559. Xprintf("You've hit the wombat again, but it is still going ");
  560. Xprintf("strong.\n");
  561. X                }
  562. X            }
  563. X            monster_flag = F_wounded ;
  564. X            return ;
  565. X        }
  566. X
  567. X        if (rifle_flag == F_single) {
  568. Xprintf("That last bullet was the straw which broke the ") ;
  569. Xprintf("wombat's back.\n") ;
  570. Xprintf("The blasted thing is finally dead!\n\n") ;
  571. X        }
  572. X        else {
  573. Xprintf("The bullets did the trick on the wretched thing.  It's ") ;
  574. Xprintf("dead as a doornail.\n\n") ;
  575. X        }
  576. Xprintf("Suddenly the wombat's corpse starts to glow with an intense");
  577. Xprintf(" white light.\n") ;
  578. Xprintf("There is then a crackling sound as its body starts to burn.");
  579. Xprintf("  You can\n");
  580. Xprintf("smell the stench of burning hair.  Then the white light");
  581. Xprintf(" begins to dim,\n");
  582. Xprintf("leaving no trace left of the once formidable monster.\n");
  583. X        sw_hurt = FALSE ;
  584. X        Wombat->Location = B_destroyed ;
  585. X        Wombat->Status = F_asleep ;
  586. X        monster_flag = F_no_monster ;
  587. X        room[n][M_monster] = 0 ;
  588. X        return ;
  589. X    /* shoot the hoop snake */
  590. X    case V_snake:
  591. X        if ((rifle_flag == F_single)&&
  592. X            (mnstr->Hits < 3)) {
  593. X            if (mnstr->Hits == 1) {
  594. Xprintf("Your bullet hit the hoop snake.  However the hoop snake's ");
  595. Xprintf("thick scales \n");
  596. Xprintf("slowed the bullet down.  The hoop snake is now hissing ");
  597. Xprintf("furiously. \n") ;
  598. X            }
  599. X            else {
  600. Xprintf("You've hit the hoop snake again, and it's hurting.  However ");
  601. Xprintf("it is still \n");
  602. Xprintf("alive and full of venom. \n") ;
  603. X            }
  604. X            monster_flag = F_wounded ;
  605. X            return ;
  606. X        }
  607. X
  608. X        if (rifle_flag == F_single) {
  609. Xprintf("The bullet hit the hoop snake finishing the horrible ") ;
  610. Xprintf("creature off. \n") ;
  611. X        }
  612. X        else {
  613. Xprintf("The bullets hit the hoop snake splatting it into a mass of ") ;
  614. Xprintf("mince meat. \n") ; 
  615. X        }
  616. Xprintf("Suddenly the bullet holed snake glows red and whooshes ");
  617. Xprintf("into a cloud \n") ;
  618. Xprintf("steam, leaving no traces behind.\n\n") ;
  619. X        mnstr->Location = B_destroyed ;
  620. X        mnstr->Status = F_asleep ;
  621. X        monster_flag = F_no_monster ;
  622. X        room[n][M_monster] = 0 ;
  623. X        return ;
  624. X
  625. X    case V_can:
  626. X    case V_beer:
  627. X    case V_fourex:
  628. X    case V_Fourex:
  629. Xprintf("The can is hit by a bullet and flies off out of sight.\n");
  630. X        object[O_can][J_loc] = B_destroyed ;
  631. X        return;
  632. X
  633. X
  634. X    case V_bottle:
  635. X    case V_lager:
  636. Xprintf("It is hit by a bullet and shatters into a million pieces.\n");
  637. X        object[O_bottle][J_loc] = B_destroyed ;
  638. X        return;
  639. X
  640. X    } /* end of target switch group */
  641. X} /* end of the "target seen" block */
  642. X/* There was no target specified so the shot was wasted */
  643. Xif (tag[V_VERB_ONLY]) { 
  644. Xprintf("You didn't specify a target. So the rifle was pointed\n") ;
  645. Xprintf("in a random direction and the ammunition wasted.\n") ;
  646. X}
  647. Xelse 
  648. Xprintf("Except for wasting ammunition, nothing much happened.\n") ;
  649. Xreturn ;
  650. X
  651. X} /* --- end of the 'killer' subroutine --- */
  652. X
  653. END_OF_FILE
  654. if test 18535 -ne `wc -c <'actor.c'`; then
  655.     echo shar: \"'actor.c'\" unpacked with wrong size!
  656. fi
  657. # end of 'actor.c'
  658. fi
  659. if test -f 'taker.c' -a "${1}" != "-c" ; then 
  660.   echo shar: Will not clobber existing file \"'taker.c'\"
  661. else
  662. echo shar: Extracting \"'taker.c'\" \(31011 characters\)
  663. sed "s/^X//" >'taker.c' <<'END_OF_FILE'
  664. X#define TAKER
  665. X#include "dink_sym.h"
  666. X#include "dink_glb.h"
  667. Xvoid taker(n)
  668. X/*********************************************************/
  669. X/*                                                       */
  670. X/*           --- Object Taking Subroutine ---            */
  671. X/*                                                       */
  672. X/*      Program by Gary A. Allen, Jr.   20 May 1990      */
  673. X/*        (c) Copyright 1992 by Gary A. Allen, Jr.       */
  674. X/*                                                       */
  675. X/*********************************************************/
  676. Xint n ;
  677. X{
  678. Xregister int i, j ;
  679. Xint  sw_done, gleep_holder, ammo_flag ;
  680. X
  681. X#if (PROTOTYPE)
  682. Xvoid clip_in(int), clip_out(int), ender(int), eater(void) ;
  683. X#endif
  684. X
  685. X/* Alias in the object for the single word "take" command */
  686. Xif (tag[V_VERB_ONLY]) {
  687. X    j = 0 ;
  688. X    /* See if there is only one object on the floor */
  689. X    for (i = 0; i <= objcnt; i++) if (n == object[i][J_loc]) {
  690. X        j++ ;
  691. X        tag[object[i][J_parse_id]] = TRUE ;
  692. X    }
  693. X
  694. X    if (room[n][M_gleep] != 0) {
  695. X        j++ ;
  696. X        tag[V_gleep] = TRUE ;
  697. X        if (room[n][M_gleep] > 1) tag[V_PLURAL] = TRUE ;
  698. X    }
  699. X
  700. X    /* Complain if there isn't a single object on the ground */
  701. X    if (j > 1) {
  702. X        printf ("What exactly do you want me to take? \n");
  703. X        return ;
  704. X    }
  705. X}
  706. X
  707. Xammo_flag = F_no_clip ;
  708. Xif (tag[V_clip]) ammo_flag = F_normal_clip ;
  709. Xif (tag[V_org_clip]) ammo_flag = F_org_clip ;
  710. X
  711. X/* deal with special case of "orange clip" implied by its being alone */
  712. Xif (tag[V_clip]&&(object[O_clip][J_loc] != n)&&
  713. X   (object[O_org_clip][J_loc] == n)) {
  714. X    tag[V_org_clip] = TRUE ;
  715. X    tag[V_clip] = FALSE ;
  716. X    if (V_clip == sent[1]) sent[1] = V_org_clip ;
  717. X}
  718. X
  719. X/* deal with the verb "attach" */
  720. Xif (verb == V_attach) {
  721. X    if (tag[V_rifle]&&(ammo_flag != F_no_clip)) {
  722. X        clip_in(ammo_flag) ;
  723. X        return ;
  724. X    }
  725. X    if ((n != R_office_mang)&&(room[n][M_obj_cnt] <= 0)) {
  726. X        printf ("There is nothing here that I can attach!\n");
  727. X        return ;
  728. X    }
  729. X}
  730. X
  731. X/* Check to see if player already has the item */
  732. Xfor (i = 0; i <= objcnt; i++) { 
  733. X    if (object[i][J_parse_id] == sent[1]) {
  734. X        if (object[i][J_loc] == B_have) {
  735. Xprintf ("You already have a %s in your possession.\n",vocab[sent[1]-1]);
  736. X            return ;
  737. X        }
  738. X        else break ;
  739. X    }
  740. X}
  741. X
  742. Xsw_done = FALSE ;
  743. X
  744. Xif (tag[V_safe]) {
  745. X    if (n != R_office_mang) {
  746. X        printf("There is no safe here. \n") ;
  747. X        return ;
  748. X    }
  749. X    if (room[R_office_mang][M_rm_status] != S_open) {
  750. X        printf("I can't do it because the safe is closed. \n") ;
  751. X        return ;
  752. X    }
  753. X}
  754. X
  755. X/* Special case of "take pill" */
  756. Xif ((tag[V_pill])&&(object[O_pills][J_loc] == B_have)) {
  757. X    eater() ;
  758. X    return ;
  759. X}
  760. X
  761. X/* Reject "take" command when there is nothing to take */
  762. Xif ((n != R_office_mang)&&(verb != V_attach)&&(verb != V_remove)&&
  763. X    (room[n][M_obj_cnt] <= 0)&&(room[n][M_gleep] == 0)&&
  764. X    (!((n == R_gleep_tank)&&(gleep_score > 0)))&&
  765. X    (room[n][M_rm_type] != T_unmovable_obj)) {
  766. X    printf ("There is nothing here that you can take! \n");
  767. X    return ;
  768. X}
  769. X
  770. X/* player takes something from the gleep tank */
  771. Xif (tag[V_tank]) {
  772. X    if (n != R_gleep_tank) {
  773. Xprintf("I see no gleep tank to take anything from. \n") ;
  774. X        return ;
  775. X    }
  776. Xprintf("\nYou climb up onto the edge of the gleep tank and reach\n");
  777. Xprintf("into the dark blue fluid.  Suddenly the fluid begins a\n");
  778. Xprintf("furious boiling that instantly reduces your hand into\n") ;
  779. Xprintf("bleached white bones.  The shock and pain disturbs your\n");
  780. Xprintf("balance and you fall into the horrible stuff!!  There is\n");
  781. Xprintf("once again a furious boiling.  Eventually the fluid stills\n");
  782. Xprintf("and becomes clear again.  On the bottom of the tank can\n") ;
  783. Xprintf("be seen a white, clean, \"medical school quality\" human\n");
  784. Xprintf("skeleton.\n") ;
  785. X    ender(F_died) ;
  786. X}
  787. X/* gleep taking routine */
  788. Xif (tag[V_gleep]) {
  789. Xif (!tag[V_safe]) {
  790. X
  791. X    /* This block is for inaccessible or nonexistant gleeps */
  792. X    if ((room[n][M_gleep] == 0)&&(!((n == R_office_mang)&&
  793. X(room[R_office_mang][M_rm_status] == S_open)&&(gleep_safe != 0)))) {
  794. X
  795. X        if ((n != R_gleep_tank)||(gleep_score == 0)) {
  796. Xprintf("There are no gleeps here to take!\n") ;
  797. X            return ;
  798. X        }
  799. X        else {
  800. Xprintf("There are no gleeps on the floor but I see ") ;
  801. X            if (gleep_score == 1) 
  802. X                printf("a gleep in the gleep tank.\n");
  803. X            else
  804. Xprintf("%d gleeps in the gleep tank.\n",gleep_score) ;
  805. X            return ;
  806. X        }
  807. X    }
  808. X
  809. X    /* This block is for accessible gleeps */
  810. X    if ((n == R_office_mang)&&
  811. X(room[R_office_mang][M_rm_status] == S_open)&&(gleep_safe != 0)) {
  812. X        gleep_holder = gleep_safe ;
  813. X    }
  814. X    else gleep_holder = 0 ;
  815. X
  816. X    if ((!tag[V_PLURAL])||
  817. X        (room[n][M_gleep]+gleep_holder == 1)) {
  818. X        printf("Gleep taken. \n") ; 
  819. X        ++gleep_count ;
  820. X        if (gleep_holder == 0) --room[n][M_gleep] ;
  821. X        else --gleep_holder ;
  822. X    }
  823. X    else {
  824. X        printf("Gleeps taken. \n") ; 
  825. X        gleep_count += room[n][M_gleep] + gleep_holder ;
  826. X        room[n][M_gleep] = 0 ;
  827. X        gleep_holder = 0 ;
  828. X    }
  829. X    gleep_safe = gleep_holder ;
  830. X    return ;
  831. X}
  832. Xelse {
  833. X    if ((n == R_office_mang)&&
  834. X(room[R_office_mang][M_rm_status] == S_open)&&(gleep_safe != 0)) { 
  835. X        if (tag[V_PLURAL]) {
  836. X            printf("Gleeps taken from safe. \n") ; 
  837. X            gleep_count += gleep_safe ;
  838. X            gleep_safe = 0 ;
  839. X        }
  840. X        else {
  841. X            printf("Gleep taken from safe. \n") ; 
  842. X            ++gleep_count ;
  843. X            --gleep_safe ;
  844. X        }
  845. X    }
  846. X    else printf("There are no gleeps in the safe!\n") ;
  847. X    return ;
  848. X}
  849. X} /* end of the gleep taking block */
  850. X
  851. X/* deal with the special case of the platypus picture */
  852. Xif ((n == R_office_mang) && tag[V_picture]) {
  853. Xprintf("The picture can not be removed.  It appears to be hinged ");
  854. Xprintf("to the wall. \n");
  855. X    return ;
  856. X}
  857. X
  858. X/* treat the verb "remove" in the context of "remove clip from rifle" */
  859. Xif (verb == V_remove) {
  860. X    if ((!tag[V_safe])&&(ammo_flag != F_no_clip)) {
  861. X        clip_out(n) ;
  862. X        return ;
  863. X    }
  864. X}
  865. X
  866. Xif (carry_count > 5) {
  867. Xprintf("I can't do it!\n") ;
  868. Xprintf("I'm holding so many things that I can't take anymore!\n") ;
  869. X    return ;
  870. X}
  871. X
  872. Xif (carry_weight >= 800) {
  873. Xprintf("I can't do it!\n") ;
  874. Xprintf("This junk I'm carrying is too heavy! I can't carry anymore!\n");
  875. X    return ;
  876. X}
  877. X
  878. X
  879. X/* find the object(s) in this room */
  880. Xfor (i = 0; i <= objcnt; i++) {
  881. X
  882. X    if ((carry_count > 5)||(carry_weight >= 800)) break ;
  883. X
  884. X    /* See if the object is in the safe and was requested */
  885. X    if ((n == R_office_mang)&&(object[i][J_loc] == B_in_safe)&&
  886. X        (tag[object[i][J_parse_id]]||tag[V_all])&&
  887. X    (room[R_office_mang][M_rm_status] == S_open)&&
  888. X    ((!tag[V_treasure])||(object[i][J_value] > 0))) {
  889. X        object[i][J_loc] = B_have; 
  890. X        carry_count++ ;
  891. X        carry_weight += object[i][J_weight] ; 
  892. X        sw_done = TRUE ;
  893. X    } 
  894. X    
  895. X    /* See if the object is in the room and was requested */
  896. X    if ((object[i][J_loc] == n)&&(tag[object[i][J_parse_id]]||
  897. X        tag[V_all])&&
  898. X        ((!tag[V_treasure])||(object[i][J_value] > 0))) {
  899. X        /* see if the object can be taken */
  900. X        if ((object[i][J_type] == Z_normal)||
  901. X            (object[i][J_type] == Z_alias)) {
  902. X            --room[n][M_obj_cnt] ;
  903. X            carry_count++ ;
  904. X            carry_weight += object[i][J_weight] ; 
  905. X            object[i][J_loc] = B_have; 
  906. X            sw_done = TRUE ;
  907. X        } 
  908. X
  909. X        /* see if this is a nonmovable, nonacting object */
  910. X        if ((object[i][J_type] == Z_unmovable) &&
  911. X            (object[i][J_loc] == n) && (!tag[V_all])) {
  912. X
  913. X            switch(object[i][J_parse_id]) {
  914. X            case V_bulldust:
  915. Xprintf("The bulldust is so fine that it wafts away with a touch.\n") ;
  916. X                return ;
  917. X
  918. X            /* Silver gong */
  919. X            case V_gong:
  920. Xprintf("The siver gong is about three metres in diameter and weighs at\n") ;
  921. Xprintf("least a ton!  There is no way I could move it, let alone get\n") ;
  922. Xprintf("it through the tunnel!\n") ;
  923. X                return ;
  924. X
  925. X            /* Cockroach(es) */
  926. X            case V_cockroach:
  927. Xprintf("I will not touch the filthy things!\n") ;
  928. X                return ;
  929. X
  930. X            /* Kangaroo(s) */
  931. X            case V_kangaroo:
  932. Xprintf("I will not touch a dead maggoty kangaroo!  ") ;
  933. Xprintf("The smell is bad enough!\n") ;
  934. X                return ;
  935. X
  936. X            case V_poster:
  937. Xprintf("I think this sort of poster is best left on the wall.\n") ;
  938. X                return ;
  939. X
  940. X            /* Spinifex(es) */
  941. X            case V_spinifex:
  942. Xprintf("The thorns on the spinifex are large and nasty.\n") ;
  943. Xprintf("I'll just leave them to roll about.\n") ;
  944. X                return ;
  945. X            } /* end of switch block */
  946. X        } /* end of nonmovable object block */ 
  947. X
  948. X        /* see if taking the object causes special action */
  949. X        if (object[i][J_type] == Z_transform) {
  950. X            switch(object[i][J_parse_id]) {
  951. X            /* ACME doormat */
  952. X            case V_mat:
  953. Xprintf("As you lift up the dirty old doormat, you find half \n") ;
  954. Xprintf("hidden in the dust....  a large brass key. \n") ;
  955. X                object[O_mat][J_type] = Z_normal ;
  956. X                carry_count++ ;
  957. X                carry_weight += object[O_mat][J_weight];
  958. X                object[O_mat][J_loc] = B_have;
  959. X                object[O_key][J_loc] =R_office_entr ;
  960. X                sw_done = TRUE ;
  961. X                return ;
  962. X
  963. X            /* Map of the ACME Mine */
  964. X            case V_map:
  965. Xprintf("As you picked up the old map from the floor, most of it");
  966. Xprintf(" crumbled into \ndust leaving only one small piece. \n") ;
  967. X                object[O_map][J_loc] = B_unmade ;
  968. X                object[O_map_frag][J_loc] = B_have ;
  969. X                carry_count++ ;
  970. X            carry_weight += object[O_map_frag][J_weight] ;
  971. X                --room[n][M_obj_cnt] ;
  972. X                sw_done = TRUE ;
  973. X                return ;
  974. X            }
  975. X        } /* end of the special action block */ 
  976. X    } 
  977. X} /* end of the object scan loop */
  978. X
  979. X/* take all gleeps if any */
  980. Xif (tag[V_all]&&(!tag[V_treasure])) {
  981. X    if (room[n][M_gleep] > 0) { 
  982. X        gleep_count += room[n][M_gleep] ;
  983. X        room[n][M_gleep] = 0 ;
  984. X        sw_done = TRUE ;
  985. X    }
  986. X    if ((gleep_safe != 0)&&(n == R_office_mang)&&
  987. X        (room[R_office_mang][M_rm_status] == S_open)) {
  988. X        gleep_count +=  gleep_safe ;
  989. X        gleep_safe = 0 ;
  990. X        sw_done = TRUE ;
  991. X    }
  992. X}
  993. X
  994. X/* Announce the "take" was successful */
  995. Xif (sw_done) {
  996. X    if (((carry_count > 5)||(carry_weight >= 800))&&(tag[V_all])) 
  997. X        printf("You've taken as much as you can.\n") ;
  998. X    else printf ("Done \n");
  999. X}
  1000. X/* --or-- announce the "take" was unsuccessful */
  1001. Xelse  {
  1002. X    if (tag[V_all]) printf("I see nothing which I can take.\n") ;
  1003. X    else { 
  1004. X        if (tag[V_VERB_ONLY]) 
  1005. X            printf("What exactly should I take?\n") ;
  1006. X        else {
  1007. X            printf ("I don't see a") ;
  1008. X            if (tag[V_PLURAL]) printf("ny") ;
  1009. X            printf (" %s around here. \n",vocab[sent[1]-1]);
  1010. X        }
  1011. X    }
  1012. X}
  1013. Xreturn ;
  1014. X
  1015. X} /* --- end of the "taker" subroutine --- */
  1016. X
  1017. Xvoid loader()
  1018. X/*********************************************************/
  1019. X/*                                                       */
  1020. X/*           --- Rifle Loading Subroutine ---            */
  1021. X/*                                                       */
  1022. X/*      Program by Gary A. Allen, Jr.  29 April 1990     */
  1023. X/*        (c) Copyright 1992 by Gary A. Allen, Jr.       */
  1024. X/*                                                       */
  1025. X/*********************************************************/
  1026. X{
  1027. X
  1028. Xint ammo_flag ;
  1029. X
  1030. X#if (PROTOTYPE)
  1031. Xvoid clip_in(int) ;
  1032. X#endif
  1033. X
  1034. X/* Reject single verb load command */
  1035. Xif (tag[V_VERB_ONLY]) {
  1036. Xprintf("What exactly do you want me to load?\n") ;
  1037. X    return ;
  1038. X}
  1039. Xif (!tag[V_rifle]) {
  1040. Xprintf("I don't know how I could load that.\n") ;
  1041. X    return ;
  1042. X}
  1043. X
  1044. X/* Deal with implied clip type command */
  1045. Xif (!tag[V_clip]) {
  1046. Xif ((object[O_clip][J_loc] != B_have)&&
  1047. X    (object[O_org_clip][J_loc] == B_have)) ammo_flag = F_org_clip ;
  1048. Xif ((object[O_clip][J_loc] == B_have)&&
  1049. X     (object[O_org_clip][J_loc] != B_have)) ammo_flag = F_normal_clip ;
  1050. X    /* the case were there is no clip is found in clip_in */
  1051. X}
  1052. X
  1053. X/* Deal with specific "load [orange] clip" command */
  1054. Xelse {
  1055. X    if (tag[V_orange]) {
  1056. X        if (object[O_org_clip][J_loc] == B_have) 
  1057. X            ammo_flag = F_org_clip ;
  1058. X        else {
  1059. Xprintf("You don't possess the orange ammunition clip.\n") ;
  1060. X            return ;
  1061. X        }
  1062. X    }
  1063. X    else {
  1064. X        if (object[O_clip][J_loc] == B_have)
  1065. X            ammo_flag = F_normal_clip ;
  1066. X
  1067. X/* assume "load clip" with no normal clip implies orange clip */
  1068. X        else {
  1069. X            if (object[O_org_clip][J_loc] == B_have) 
  1070. X                ammo_flag = F_org_clip ;
  1071. X            else{
  1072. Xprintf("You don't possess an ammunition clip to load.\n") ;
  1073. X                return ;
  1074. X            }
  1075. X        }
  1076. X    }
  1077. X}
  1078. X
  1079. Xclip_in(ammo_flag) ;
  1080. X} /* --- end of the "loader" subroutine --- */
  1081. X
  1082. Xvoid unloader(n)
  1083. X/*********************************************************/
  1084. X/*                                                       */
  1085. X/*          --- Rifle Unloading Subroutine ---           */
  1086. X/*                                                       */
  1087. X/*      Program by Gary A. Allen, Jr.  29 April 1990     */
  1088. X/*        (c) Copyright 1992 by Gary A. Allen, Jr.       */
  1089. X/*                                                       */
  1090. X/*********************************************************/
  1091. Xint n ;
  1092. X{
  1093. X#if (PROTOTYPE)
  1094. Xvoid clip_out(int) ;
  1095. X#endif
  1096. X
  1097. X/* Reject single verb load command */
  1098. Xif (tag[V_VERB_ONLY]) {
  1099. Xprintf("What exactly do you want me to unload?\n") ;
  1100. X    return ;
  1101. X}
  1102. Xif (!tag[V_rifle]) {
  1103. Xprintf("I don't know how I could unload that.\n") ;
  1104. X    return ;
  1105. X}
  1106. Xclip_out(n) ;
  1107. X} /* --- end of the "unloader" subroutine --- */
  1108. X
  1109. Xvoid dropper(n)
  1110. X/*********************************************************/
  1111. X/*                                                       */
  1112. X/*          --- Object Dropping Subroutine ---           */
  1113. X/*                                                       */
  1114. X/*      Program by Gary A. Allen, Jr.  21 May 1990       */
  1115. X/*        (c) Copyright 1992 by Gary A. Allen, Jr.       */
  1116. X/*                                                       */
  1117. X/*********************************************************/
  1118. Xint n ;
  1119. X{
  1120. Xregister int i, k ;
  1121. X
  1122. Xint sw_possess, sw_done, ammo_flag, sw_object, i_10, i_fract ;
  1123. Xint sw_found ;
  1124. X
  1125. X#if (PROTOTYPE)
  1126. Xvoid clip_in(int), clip_out(int), boom(void) ;
  1127. Xvoid objlooker(int), gleeper(int), unlocker(int) ;
  1128. Xvoid cap_drop(void), dynamite_drop(void), destroy_all(void) ;
  1129. Xvoid dropped_gun(void) ;
  1130. X#endif
  1131. X
  1132. X/* respond to "verb only" command */
  1133. Xif (tag[V_VERB_ONLY]) {
  1134. X    printf ("You'll have to be more specific. \n");
  1135. X    return ;
  1136. X}
  1137. X
  1138. X/* deal with special case of "orange clip" implied by its being alone */
  1139. Xif (tag[V_clip]&&(object[O_clip][J_loc] != B_have)&&
  1140. X    (clip_flag != F_normal_clip)&&
  1141. X   ((object[O_org_clip][J_loc] == B_have)||(clip_flag == F_org_clip))) {
  1142. X    tag[V_org_clip] = TRUE ;
  1143. X    tag[V_clip] = FALSE ;
  1144. X    if (V_clip == sent[1]) sent[1] = V_org_clip ;
  1145. X}
  1146. X
  1147. Xammo_flag = F_no_clip ;
  1148. Xif (tag[V_clip])  ammo_flag = F_normal_clip ;
  1149. Xif (tag[V_org_clip])  ammo_flag = F_org_clip ;
  1150. X
  1151. X/* deal with special cases of the verbs */
  1152. Xswitch(verb) {
  1153. Xcase V_put:
  1154. X    /* special case of putting (destroying) an object in water */
  1155. X    if (tag[V_tank]||tag[V_gleep]||tag[V_safe]||
  1156. X        tag[V_river]||tag[V_billabong]||tag[V_stream]) break ;
  1157. X
  1158. X    /* special case of "put key in door(lock)" */
  1159. X    if (tag[V_key] && tag[V_door]) {
  1160. X        unlocker(n) ;
  1161. X        return ;
  1162. X    }
  1163. X
  1164. X    if (!tag[V_cap]) {
  1165. X        if ((!tag[V_rifle])&&(ammo_flag != F_no_clip)) {
  1166. X            printf("What am I to put the clip into? \n") ;
  1167. X            return ;
  1168. X        }
  1169. X        if (tag[V_rifle]&&(ammo_flag != F_no_clip))  
  1170. X                clip_in(ammo_flag) ;
  1171. X        else 
  1172. Xprintf("I don't understand what this is to be put into. \n") ;
  1173. X        return ;
  1174. X    }
  1175. X
  1176. Xcase V_insert:
  1177. X    if (tag[V_safe]) break ;
  1178. X    if (ammo_flag != F_no_clip) {
  1179. X        if (!tag[V_rifle]) {
  1180. Xprintf("What am I to insert the clip into? \n") ;
  1181. X        }
  1182. X        else {
  1183. X            clip_in(ammo_flag) ;
  1184. X        }
  1185. X        return ;
  1186. X    }
  1187. X    if (tag[V_cap]) {
  1188. X        if (!tag[V_dynamite]) {
  1189. Xprintf("I see no reason why I should put a blasting cap into that.\n") ;
  1190. X            return ;
  1191. X        }
  1192. X        /* Cap insertion routine */
  1193. X        else {
  1194. X            /* see if your are holding the dynamite or the cap */
  1195. X            if ((object[O_cap][J_loc] != B_have)&&
  1196. X                (object[O_dynamite][J_loc] != B_have)) {
  1197. Xprintf("You bloody dill!  You have neither the dynamite or a ");
  1198. Xprintf("blasting cap.\n") ;
  1199. X                return ;
  1200. X            }
  1201. X            if (object[O_cap][J_loc] != B_have) {
  1202. Xprintf("You've got the dynamite but you need a blasing cap.\n") ;
  1203. X                return ;
  1204. X            }
  1205. X                if (object[O_dynamite][J_loc] != B_have) {
  1206. Xprintf("You've got the blasting cap but you need some dynamite.\n") ;
  1207. X                return ;
  1208. X            }
  1209. X/* transform the two objects into one */
  1210. Xprintf("With some trepidation, you slide the blasting cap into\n");
  1211. Xprintf("the dynamite.  What you are now holding is VERY dangerous.\n");
  1212. X            object[O_cap][J_loc] = B_unmade ; 
  1213. X            object[O_dynamite][J_type] = Z_alias ;
  1214. X            carry_weight -= object[O_cap][J_weight] ;
  1215. X            carry_count-- ;
  1216. X            return ;
  1217. X        } /* end of the cap insertion block */
  1218. X    }
  1219. Xprintf("I can think of some interesing places to insert this. \n") ;
  1220. Xprintf("However I shall not reduce myself to such vulgarity.\n");
  1221. X    return ;
  1222. X    
  1223. Xcase V_eject:
  1224. X/* Command "eject clip" ejects clip from rifle no matter what type*/
  1225. X    if ((ammo_flag == F_normal_clip)&&(clip_flag == F_org_clip)) 
  1226. X        ammo_flag = F_org_clip ; 
  1227. Xcase V_drop:
  1228. X    if (((ammo_flag == F_org_clip)&&(clip_flag == F_org_clip))|| 
  1229. X    ((ammo_flag == F_normal_clip)&&(clip_flag == F_normal_clip))) { 
  1230. X        clip_out(n) ;
  1231. X        return ;
  1232. X    }
  1233. X    break ;
  1234. X
  1235. X} /* end of switch */
  1236. X
  1237. X/* Deal with "drop" when player has no objects */
  1238. Xif (tag[V_all]&&(carry_count == 0)&&(gleep_count == 0)) {
  1239. X    printf("You dill!  You have nothing to drop!\n") ;
  1240. X    return ;
  1241. X}
  1242. X
  1243. X/* deal with "drop in safe ..." errors */
  1244. Xif (tag[V_safe]) {
  1245. X/* see if this is the managers office */
  1246. X    if (n != R_office_mang) {        
  1247. X        printf("There is no safe here! \n");
  1248. X        return ;
  1249. X    }
  1250. X/* See if the safe is open */
  1251. X    if (room[R_office_mang][M_rm_status] != S_open) {
  1252. X        printf ("I can't do it!  The safe is closed. \n");
  1253. X        return ;
  1254. X    }
  1255. X}
  1256. X/* gleep droping routine */
  1257. Xif (tag[V_gleep]||tag[V_tank]) {
  1258. X    /* drop gleeps in a normal way */
  1259. X    if (!tag[V_tank]) {
  1260. X        if (gleep_count == 0) { 
  1261. X            printf("You have no gleeps to drop! \n") ;
  1262. X            return ;
  1263. X        }
  1264. X        if ((!tag[V_PLURAL])||(gleep_count == 1)) {
  1265. X            if (tag[V_safe]) {
  1266. X                printf("Gleep put into safe.\n") ;
  1267. X                ++gleep_safe ;
  1268. X                --gleep_count ;
  1269. X            }
  1270. X            else {
  1271. X                printf("Gleep dropped. \n") ; 
  1272. X                --gleep_count ;
  1273. X                ++room[n][M_gleep] ;
  1274. X            }
  1275. X        }
  1276. X        else {
  1277. X            if (tag[V_safe]) {
  1278. X                printf("Gleeps put into safe.\n") ;
  1279. X                gleep_safe += gleep_count ;
  1280. X                gleep_count = 0 ;
  1281. X            }
  1282. X            else {
  1283. X                printf("Gleeps dropped. \n") ; 
  1284. X                room[n][M_gleep] += gleep_count ;
  1285. X                gleep_count = 0 ;
  1286. X            }
  1287. X        }
  1288. X        gleep_drop = TRUE ;
  1289. X        return ;
  1290. X    }
  1291. X    /* drop objects(including gleeps) into a gleep tank */
  1292. X    else {
  1293. X        sw_found = FALSE ;
  1294. X        if (n != R_gleep_tank) {
  1295. X            printf("I don't see a gleep tank here. \n") ;
  1296. X            return ;
  1297. X        }
  1298. X        if (tag[V_gleep]) {
  1299. X            if (gleep_count <= 0) {
  1300. Xprintf("You have no gleeps to put in the tank. \n") ; 
  1301. X                return ;
  1302. X            }
  1303. X            sw_found = TRUE ;
  1304. X            if ((!tag[V_PLURAL])||(gleep_count == 1)) {
  1305. Xprintf("Your gleep falls into the tank with a \"plonk\".\n") ;
  1306. X                ++gleep_score ;
  1307. X                --gleep_count ;
  1308. X            }
  1309. X            if (tag[V_PLURAL]&&(gleep_count > 1)) {
  1310. Xprintf("Your gleeps fall into the tank causing a splash.\n") ;
  1311. X                gleep_score += gleep_count ;
  1312. X                gleep_count = 0 ;
  1313. X            }
  1314. X        }
  1315. X
  1316. X        /* drop non-gleeps into the tank */
  1317. X
  1318. X        /* the "drop all" routine */
  1319. X        if (tag[V_all]) {
  1320. X            sw_possess = FALSE ;
  1321. X            for (i = 0; i <= objcnt; i++) {
  1322. X                if ((object[i][J_loc] == B_have)&&
  1323. X                    ((!tag[V_treasure])||
  1324. X                    (object[i][J_value] > 0))) {
  1325. X                    sw_possess = TRUE ;
  1326. X                    object[i][J_loc] = B_destroyed; 
  1327. X                    carry_count-- ;
  1328. X                carry_weight -= object[i][J_weight] ;
  1329. X                }
  1330. X            }
  1331. X            if (gleep_count == 0) {
  1332. X                if (sw_possess) {
  1333. Xprintf("You dump everything into the gleep tank. There is a furious\n");
  1334. Xprintf("bubbling as the corrosive fluid of the tank turns the\n");
  1335. Xprintf("objects into NOTHING.\n") ;
  1336. X                }
  1337. X                else 
  1338. Xprintf("You've got nothing to throw into the tank.\n") ;
  1339. X            }
  1340. X            else {
  1341. X                if (sw_possess) {
  1342. Xprintf("You fling everything into the gleep tank.  The gleep");
  1343. X                if (gleep_count > 1) {
  1344. Xprintf("s\nsplash into the tank and settle to the bottom of the\n") ;
  1345. X                }
  1346. X                else {
  1347. Xprintf("\nplonks into the tank and settles to the bottom of the\n") ;
  1348. X                }
  1349. Xprintf("tank.  However the other objects begin to dissolve the\n");
  1350. Xprintf("moment the tank's fluid touches them.  Time passes and\n");
  1351. Xprintf("the objects dissolve into NOTHING.\n") ;
  1352. X                }
  1353. X                /* you possess no non-gleeps */
  1354. X                else {
  1355. X                if (gleep_count == 1) 
  1356. Xprintf("Your gleep falls into the tank with a \"plonk\".\n") ;
  1357. X                else
  1358. Xprintf("Your gleeps fall into the tank causing a splash.\n") ;
  1359. X                }
  1360. X            gleep_score += gleep_count ;
  1361. X            gleep_count = 0 ;
  1362. X            }
  1363. X            return ;
  1364. X        } /* end of the "drop all" if block */
  1365. X
  1366. X        /* Individual non-gleeps are dropped into the tank */
  1367. X
  1368. X        /* see if your are holding the object(s) */
  1369. X        for (i=0; i <= objcnt; i++) {
  1370. X             if (tag[object[i][J_parse_id]]) {
  1371. X                if (object[i][J_loc] == B_have) {
  1372. Xprintf ("You fling the %s into the gleep tank.  As soon as it\n",
  1373. X    vocab[object[i][J_parse_id]-1]);
  1374. Xprintf ("touched the tank's fluid there was a furious effervescence\n");
  1375. Xprintf ("as it began to dissolve.  With the passage of time, the\n") ;
  1376. Xprintf ("fluid stills and there is NOTHING left.\n") ;
  1377. X                    carry_count-- ;
  1378. X                carry_weight -= object[i][J_weight] ;
  1379. X                    object[i][J_loc] = B_destroyed; 
  1380. X                }
  1381. X                else {
  1382. Xprintf("You don't have a %s to toss into the gleep tank.\n",
  1383. X    vocab[object[i][J_parse_id]-1]);
  1384. X                }
  1385. X                return ;
  1386. X            }
  1387. X        } /* object scan "for" loop */
  1388. X
  1389. X        /* deal with garbage object to drop */
  1390. Xif (!sw_found) printf("I don't understand what you want me to drop.\n") ;
  1391. X        return ;
  1392. X    }
  1393. X}
  1394. X
  1395. Xsw_done = FALSE ;
  1396. X
  1397. X/* the "drop all" routine */
  1398. Xif (tag[V_all]) {
  1399. X
  1400. X    /* Deal with throwing stuff into water */
  1401. X    if(tag[V_stream]) {
  1402. X        if (n == R_stream) {
  1403. Xprintf("You fling everything into the stream.\n");
  1404. X            destroy_all() ;
  1405. X            return ;
  1406. X        }
  1407. X        else
  1408. Xprintf("I see no stream to toss stuff into.\n") ;
  1409. X        return ;
  1410. X    }
  1411. X    if(tag[V_billabong]) {
  1412. X        if ((n == R_stream)||(n == R_slime)||
  1413. X            (n == R_billabong)) { 
  1414. Xprintf("You fling everything into the billabong.\n");
  1415. X            destroy_all() ;
  1416. X            return ;
  1417. X        }
  1418. X        else
  1419. Xprintf("I see no billabong to toss stuff into.\n") ;
  1420. X        return ;
  1421. X    }
  1422. X    if(tag[V_river]) {
  1423. X        if ((n == R_dike)||(n == R_river_edge)||
  1424. X            (n == R_river_exit)) {
  1425. Xprintf("You fling everything into the river.\n");
  1426. X            destroy_all() ;
  1427. X            return ;
  1428. X        }
  1429. X        else
  1430. Xprintf("I see no river to toss stuff into.\n") ;
  1431. X        return ;
  1432. X    }
  1433. X
  1434. X    if (!tag[V_safe]) {
  1435. X/* normal drop */
  1436. Xif (room[n][M_rm_type] != T_looping) {
  1437. X    /* normal room */
  1438. X    for (i = 0; i <= objcnt; i++) {
  1439. X        if ((object[i][J_loc] == B_have)&&
  1440. X            ((!tag[V_treasure]) || (object[i][J_value] > 0))) {
  1441. X
  1442. X        sw_done = TRUE ;
  1443. X
  1444. X        /* see if the blasting cap was hard dropped */
  1445. X        if ((i == O_cap)&&(verb != V_slow_drop)) {
  1446. X            cap_drop() ;
  1447. X            return ;
  1448. X        }
  1449. X
  1450. X/* see if the dynamite with blasting cap was hard dropped */
  1451. X        if ((i == O_dynamite)&&(object[O_dynamite][J_type] == Z_alias)
  1452. X            &&(verb != V_slow_drop)) dynamite_drop() ;
  1453. X        ++room[n][M_obj_cnt] ;
  1454. X        carry_count-- ;
  1455. X        carry_weight -= object[i][J_weight] ;
  1456. X        object[i][J_loc] = n; 
  1457. X/* set valuable switch if valuable object dropped in Ned's area */
  1458. X        if (object[i][J_value] > 0) {
  1459. X            for (k = 22; k <= 41; k++) 
  1460. X                if (k == n) sw_valuable = TRUE;
  1461. X            for (k = 144; k <= 146; k++) 
  1462. X                 if (k == n) sw_valuable = TRUE;
  1463. X        }
  1464. X    }
  1465. X}
  1466. X            /* drop all gleeps */
  1467. X            if ((gleep_count > 0) &&
  1468. X                    (!tag[V_treasure])) {
  1469. X                room[n][M_gleep] += gleep_count ;
  1470. X                gleep_count = 0 ;
  1471. X                sw_done = TRUE ;
  1472. X                gleep_drop = TRUE ;
  1473. X            }
  1474. X
  1475. X            if (sw_done) {
  1476. X                printf ("Done\n");
  1477. X                objlooker(n) ;
  1478. X                gleeper(n) ; 
  1479. X            } 
  1480. X            else printf("Don't have it to drop.\n") ;
  1481. X            return ;
  1482. X        }
  1483. X        /* object destroyer room */
  1484. X        else {
  1485. X        /* Code assumes that player has something to drop */
  1486. Xprintf ("You dropped everything you had in a heap, which \n");
  1487. Xprintf ("promptly vaporized into a bright blue flash followed \n");
  1488. Xprintf ("by a low \"BOOM\". \n") ; 
  1489. Xprintf ("       --- You've blown it Bozo!! ---\n") ;
  1490. X            destroy_all() ;
  1491. X            return ;
  1492. X        }
  1493. X    }
  1494. X    /* "drop all into the safe" routine */
  1495. X    else {
  1496. X        for (i = 0; i <= objcnt; i++) {
  1497. X            if ((object[i][J_loc] == B_have) &&
  1498. X                ((!tag[V_treasure])||
  1499. X                (object[i][J_value] > 0))) {
  1500. X                object[i][J_loc] = B_in_safe ;    
  1501. X                carry_count-- ;
  1502. X                carry_weight -= object[i][J_weight] ;
  1503. X                sw_done = TRUE ;
  1504. X            }
  1505. X        }
  1506. X        if (!tag[V_treasure]) {
  1507. X            gleep_safe += gleep_count ;
  1508. X            gleep_count = 0 ;
  1509. X            sw_done = TRUE ;
  1510. X        }
  1511. X        if (sw_done) printf ("Done \n");
  1512. X        else printf("You don't have it to put in the safe!\n") ;
  1513. X        return ;
  1514. X    }
  1515. X}
  1516. X
  1517. X/* see if your are holding the object(s) */
  1518. Xfor (i=0; i <= objcnt; i++) {
  1519. X    sw_object = FALSE ;
  1520. X    if (tag[object[i][J_parse_id]]) {
  1521. X        sw_object = TRUE ;
  1522. X         if (object[i][J_loc] == B_have) {
  1523. X            /* Safe storage routine */
  1524. X            if (tag[V_safe]) {
  1525. X                object[i][J_loc] = B_in_safe ;    
  1526. Xprintf ("The %s is now inside the safe. \n", 
  1527. X    vocab[object[i][J_parse_id]-1]);
  1528. X                sw_done = TRUE ;
  1529. X                carry_count-- ;
  1530. X                carry_weight -= object[i][J_weight] ;
  1531. X                continue ;
  1532. X            }
  1533. X            /* Single 'drop' routine */
  1534. X            if (tag[V_river]||tag[V_billabong]||
  1535. X                tag[V_stream]) {
  1536. X        /* The object is to be dropped in water */
  1537. X                if(tag[V_stream]) {
  1538. X                    if (n == R_stream) {
  1539. Xprintf("You fling the %s into the stream.\n", 
  1540. X    vocab[object[i][J_parse_id]-1]);
  1541. X                    carry_count-- ;
  1542. X                carry_weight -= object[i][J_weight] ;
  1543. X                    object[i][J_loc] = B_destroyed; 
  1544. X                    return ;
  1545. X                    }
  1546. X                    else
  1547. Xprintf("I see no stream to toss it into.\n") ;
  1548. X                    return ;
  1549. X                }
  1550. X            if(tag[V_billabong]) {
  1551. X                if ((n == R_stream)||
  1552. X                (n == R_slime)||(n == R_billabong)) { 
  1553. Xprintf("You fling the %s into the billabong.\n",
  1554. X    vocab[object[i][J_parse_id]-1]);
  1555. X                    carry_count-- ;
  1556. X                carry_weight -= object[i][J_weight] ;
  1557. X                    object[i][J_loc] = B_destroyed; 
  1558. X                    return ;
  1559. X                }
  1560. X                else
  1561. Xprintf("I see no billabong to toss it into.\n") ;
  1562. X                return ;
  1563. X            }
  1564. X            if(tag[V_river]) {
  1565. X                if ((n == R_dike)||(n == R_river_edge)||
  1566. X                    (n == R_river_exit)) {
  1567. Xprintf("You fling the %s into the river.\n", 
  1568. X    vocab[object[i][J_parse_id]-1]);
  1569. X                    carry_count-- ;
  1570. X                carry_weight -= object[i][J_weight] ;
  1571. X                    object[i][J_loc] = B_destroyed; 
  1572. X                    return ;
  1573. X                }
  1574. X                else
  1575. Xprintf("I see no river to toss it into.\n") ;
  1576. X                return ;
  1577. X            }
  1578. X        }
  1579. X        /* Normal Drop */
  1580. X        else if (room[n][M_rm_type] != T_looping) {
  1581. X            if ((i == O_cap)&&(verb != V_slow_drop)) {
  1582. X                cap_drop() ;
  1583. X                return ;
  1584. X            }
  1585. X            if ((i==O_dynamite)&&(verb != V_slow_drop)&&
  1586. X        (object[O_dynamite][J_type] == Z_alias)) dynamite_drop();
  1587. X
  1588. X/* If the he rifle is dropped.  See if it kills the player */
  1589. Xif (i==O_rifle) {
  1590. X    if ((clip_flag != F_no_clip) && 
  1591. X(object[O_rifle][J_property] > 0)) switch(rifle_flag) {
  1592. X    case F_safety:
  1593. X        break ;
  1594. X            
  1595. X    case F_single:
  1596. X        printf("\nBam!\n") ;
  1597. X        dropped_gun() ;
  1598. X
  1599. X    case F_triple:
  1600. X        printf("\n") ;
  1601. X        if (object[O_rifle][J_property] >= 3) {
  1602. X            printf("Bam! Bam! Bam! \n\n") ;
  1603. X        }
  1604. X        else {
  1605. X        for (i = 1; i <= object[O_rifle][J_property]; i++) 
  1606. X            printf("Bam! ") ;
  1607. X        }
  1608. X        dropped_gun() ;
  1609. X
  1610. X    case F_auto:
  1611. X        printf("\n") ;
  1612. X        if (object[O_rifle][J_property] >= 30) {
  1613. X            for (i = 1; i <= 3; i++) 
  1614. Xprintf("Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! \n") ;
  1615. X        }
  1616. X        else {
  1617. X            i_10 = object[O_rifle][J_property]/10 ;
  1618. X        i_fract = object[O_rifle][J_property]-(i_10*10) ;
  1619. X            for (i = 1; i <= i_10; i++) 
  1620. Xprintf("Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! \n") ;
  1621. X            for (i = 1; i <= i_fract; i++) 
  1622. X                printf("Bam! ") ;
  1623. X        }
  1624. X        dropped_gun() ;
  1625. X    } /* end of the switch block */
  1626. X} /* end of "drop rifle" block */
  1627. X
  1628. X            carry_count-- ;
  1629. X            carry_weight -= object[i][J_weight] ;
  1630. X            ++room[n][M_obj_cnt] ;
  1631. X            object[i][J_loc] = n; 
  1632. X            sw_done = TRUE ;
  1633. X/* set valuable switch if valuable object dropped in Ned's area */
  1634. X            if (object[i][J_value] > 0) {
  1635. X                for (k = 22; k <= 41; k++) 
  1636. X                    if (k == n) sw_valuable = TRUE ;
  1637. X                for (k = 144; k <= 146; k++) 
  1638. X                    if (k == n) sw_valuable = TRUE ;
  1639. X            }
  1640. X            continue ;
  1641. X        }
  1642. X        else {
  1643. Xprintf ("As the %s left your possession there was a bright \n",
  1644. X    vocab[object[i][J_parse_id]-1]);
  1645. Xprintf ("blue flash, followed by a low \"BOOM\" as it vaporized \n");
  1646. Xprintf ("into nonexistence. \n");
  1647. X            carry_count-- ;
  1648. X            carry_weight -= object[i][J_weight] ;
  1649. X            object[i][J_loc] = B_destroyed; 
  1650. X            return ;
  1651. X        }
  1652. X        }
  1653. X         if (object[i][J_loc] == B_unmade) continue ;
  1654. X    } /* end of the object requested block */
  1655. X    if ((!sw_done)&&sw_object) {
  1656. Xprintf("You do not possess a %s.\n", vocab[object[i][J_parse_id]-1]);
  1657. X        return ;
  1658. X    }
  1659. X} /* end of the object scan loop */
  1660. Xif (sw_done) {
  1661. X    printf ("Done \n");
  1662. X    objlooker(n) ;
  1663. X    gleeper(n) ; 
  1664. X} 
  1665. Xelse 
  1666. Xprintf("I don't understand what it is I'm supposed to drop.\n") ;
  1667. X
  1668. Xreturn ;
  1669. X
  1670. X
  1671. X} /* --- end of the "dropper" subroutine --- */
  1672. X
  1673. Xvoid cap_drop()
  1674. X/*********************************************************/
  1675. X/*                                                       */
  1676. X/*         --- Blasing Cap Dropping Subroutine ---       */
  1677. X/*                                                       */
  1678. X/*      Program by Gary A. Allen, Jr.  6 December 1992   */
  1679. X/*        (c) Copyright 1992 by Gary A. Allen, Jr.       */
  1680. X/*                                                       */
  1681. X/*********************************************************/
  1682. X{
  1683. Xprintf("Bang!! The blasting cap you were carrying detonated when\n") ;
  1684. Xprintf("it hit the ground.  Fortunately no damage was caused.\n") ;  
  1685. Xobject[O_cap][J_loc] = B_destroyed; 
  1686. Xcarry_count-- ;
  1687. Xcarry_weight -= object[O_cap][J_weight] ;
  1688. X
  1689. X} /* --- end of the "cap_drop" subroutine --- */
  1690. X
  1691. Xvoid dynamite_drop()
  1692. X/*********************************************************/
  1693. X/*                                                       */
  1694. X/*           --- Dynamite Dropping Subroutine ---        */
  1695. X/*                                                       */
  1696. X/*      Program by Gary A. Allen, Jr.  6 December 1992   */
  1697. X/*        (c) Copyright 1992 by Gary A. Allen, Jr.       */
  1698. X/*                                                       */
  1699. X/*********************************************************/
  1700. X{
  1701. X#if (PROTOTYPE)
  1702. Xvoid ender(int), boom(void) ;
  1703. X#endif
  1704. X
  1705. Xboom() ;
  1706. Xprintf("Dropping a stick of dynamite with a blasting cap in it\n");
  1707. Xprintf("ranks high as one of the dumbest things a person can do.\n") ;
  1708. Xprintf("Needless to say you were blown to bits. Next time drop\n") ;
  1709. Xprintf("the dynamite slowly or gently.\n") ;
  1710. Xender(F_died) ;
  1711. X
  1712. X} /* --- end of the "dynamite_drop" subroutine --- */
  1713. X
  1714. Xvoid destroy_all()
  1715. X/*********************************************************/
  1716. X/*                                                       */
  1717. X/*        --- Destroy Everything Held Subroutine ---     */
  1718. X/*                                                       */
  1719. X/*      Program by Gary A. Allen, Jr.  6 December 1992   */
  1720. X/*        (c) Copyright 1992 by Gary A. Allen, Jr.       */
  1721. X/*                                                       */
  1722. X/*********************************************************/
  1723. X{
  1724. Xregister int i ;
  1725. X
  1726. Xgleep_count = 0 ;
  1727. Xcarry_count = 0 ;
  1728. Xcarry_weight = 0 ;
  1729. Xfor (i = 0; i <= objcnt; i++) {
  1730. X    if (object[i][J_loc] == B_have)  object[i][J_loc] = B_destroyed; 
  1731. X}
  1732. X} /* --- end of the "destroy_all" subroutine --- */
  1733. X
  1734. Xvoid dropped_gun()
  1735. X/*********************************************************/
  1736. X/*                                                       */
  1737. X/*     --- Player Suicides by Dropping Armed Rifle ---   */
  1738. X/*                                                       */
  1739. X/*      Program by Gary A. Allen, Jr.  31 December 1992  */
  1740. X/*        (c) Copyright 1992 by Gary A. Allen, Jr.       */
  1741. X/*                                                       */
  1742. X/*********************************************************/
  1743. X{
  1744. X#if (PROTOTYPE)
  1745. Xvoid ender(int) ;
  1746. X#endif
  1747. X
  1748. Xprintf("\n") ;
  1749. Xprintf("Dropping a loaded and armed automatic rifle is a stupid way\n");
  1750. Xif ((object[O_rifle][J_property] == 1) || (rifle_flag == F_single)) {
  1751. Xprintf("to commit suicide.  Needless to say you were hit by the\n") ;
  1752. Xprintf("bullet after the rifle went off.\n") ;
  1753. X}
  1754. Xelse {
  1755. Xprintf("to commit suicide.  The bullets shot from the rifle fly\n") ;
  1756. Xprintf("around.  One of them bounces back and hits you!\n") ;
  1757. X}
  1758. Xender(F_died) ;
  1759. X} /* --- end of the "dropped_gun" subroutine --- */
  1760. END_OF_FILE
  1761. if test 31011 -ne `wc -c <'taker.c'`; then
  1762.     echo shar: \"'taker.c'\" unpacked with wrong size!
  1763. fi
  1764. # end of 'taker.c'
  1765. fi
  1766. echo shar: End of archive 3 \(of 7\).
  1767. cp /dev/null ark3isdone
  1768. MISSING=""
  1769. for I in 1 2 3 4 5 6 7 ; do
  1770.     if test ! -f ark${I}isdone ; then
  1771.     MISSING="${MISSING} ${I}"
  1772.     fi
  1773. done
  1774. if test "${MISSING}" = "" ; then
  1775.     echo You have unpacked all 7 archives.
  1776.     rm -f ark[1-9]isdone
  1777. else
  1778.     echo You still need to unpack the following archives:
  1779.     echo "        " ${MISSING}
  1780. fi
  1781. ##  End of shell archive.
  1782. exit 0
  1783.