home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / games / volume15 / dinkum / part02 / longdsc.c next >
C/C++ Source or Header  |  1993-01-27  |  34KB  |  848 lines

  1. #define LONG_DESCP
  2. #include "dink_sym.h"
  3. #include "dink_glb.h"
  4.  
  5. void long_descp(n)
  6. /* long description routine */
  7. int n ;
  8. {
  9. #ifdef __TURBOC__
  10. void boom(void), describe(int), ender(int) ;
  11. #endif
  12.  
  13. if (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])|| 
  14.     (n < 186)||(n > 202)) { 
  15.  
  16. /* See if player entered the killing passage in the end game */
  17. if ((n >= 218)&&(n <= 227)) {
  18. printf("As you're walking down the passage you feel the slight\n") ;
  19. printf("tug of a trip wire on your leg.  Out the corner of your\n");
  20. printf("eye you see the trip wire is connected to an olive green\n") ;
  21. printf("cylinder attached to the wall of the tunnel....\n\n") ;
  22. boom() ;
  23. printf("\nIn case you're wondering that was a booby trap which you\n") ;
  24. printf("set off!\n") ;
  25. ender(F_died) ;
  26. }
  27.  
  28. /* Select individual rooms */
  29. switch (n) {
  30. case R_river:      /* drowing in the river description */
  31. printf ("As you approach the edge of the dike, there is a small\n");
  32. printf ("earth slide which pitches you into the river.  You\n");
  33. printf ("flounder around in the water for a short while.  Luckily\n");
  34. printf ("before you have the chance to drown, a crocodile pulls\n") ;
  35. printf ("you under, bringing you to a rather quick though painful\n");
  36. printf ("end. \n") ;
  37. return ;
  38.  
  39. case R_bunyip:      /* getting eaten by the bunyip */
  40. printf ("The slimey tentacle suddenly tightens around your leg, and\n");
  41. printf ("the water in the billabong starts to churn furiously. Then\n");
  42. printf ("surfaces the one thing that all Australians fear the most...");
  43. printf ("\n\nBefore you stands an enormous sickly green Queensland\n") ;
  44. printf ("Bunyip in all its awesome horror. It does not make a quick\n");
  45. printf ("end of you....  Such is not the way of Bunyips.  First it \n");
  46. printf ("peels off your skin as if you where a banana.  After much\n");
  47. printf ("fearful agony, comes release as you pass into death.\n");
  48. return ;
  49.  
  50. case R_taipan:      /* getting bitten by a taipan */
  51. printf ("As you wander aimlessly in the grass, you accidently step\n");
  52. printf ("upon a taipan which is perhaps the most poisonous of Oz's \n");
  53. printf ("snakes. The snake strikes upwards and bites you in the\n");
  54. printf ("worst possible place.  You thrash around for a short while\n");
  55. printf ("and then the venom takes hold. Your body begins to decompose");
  56. printf ("\nbefore your very eyes.  Death comes only after an hour \n");
  57. printf ("of the worst possible agony.  \n");
  58. return ;
  59.  
  60. case R_mine_head:  /* Front of ACME Mine */
  61. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  62. printf ("East of you is a large iron open truss tower, topped with \n");
  63. printf ("two rusting wheels holding a pair of thick steel cables.  \n");
  64. printf ("This is the head gear of the once highly successful ACME \n"); 
  65. printf ("Gold Mine, which now is completely mined out.  Where \n");
  66. printf ("there were once rich veins of gold is now a honeycomb of \n");
  67. printf ("tunnels and caverns.  There are stories about strange \n");
  68. printf ("events in the old tunnels of the ACME mine and only fools \n");
  69. printf ("or reckless adventurers would dare explore them. \n");
  70. printf ("To the north is the old office building.  Rumor has it \n");
  71. printf ("the safe in this building once had millions of dollars in \n");
  72. printf ("gold  processed from the rich ore of the ACME mine.  To \n");
  73. printf ("the south is the mine lift, which once transported up to \n");
  74. printf ("twenty miners at a time down the long mine shaft to the \n");
  75. printf ("working tunnels deep under the earth below \n");
  76. return ;
  77.  
  78. case R_office_mang:  /* Manager's office */
  79. room[n][M_rm_type] = T_action_obj ;
  80. printf("You are in the Manager's office of the ACME Mine.  In \n");
  81. printf("former times this room saw many lively meetings between \n"); 
  82. printf("the Site Manager and Shift Bosses.  Fixed to the wall are\n");
  83. printf("old production schedules and organizational charts. In\n");
  84. printf("the middle of the room is a beautiful silky oak desk.\n");
  85. printf("Unfortunately it is too heavy to move.  Attached to\n"); 
  86. printf("the far wall is a curious picture of a platypus wearing a \n");
  87. printf("hat with old wine corks dangling from the hat's brim. The\n");
  88. printf("only exit is to the south.\n\n") ;
  89. return ;
  90.  
  91. case R_geo_w:  /* Geologist's office */
  92. room[n][M_rm_type] = T_unmovable_obj ;
  93. printf("As you entered this room, huge cockroaches scuttled off ");
  94. printf("in every \n"); 
  95. printf("direction. On the far wall is a rather tasteless poster ");
  96. printf("depicting \n");
  97. printf("an extremely well endowed (unclad) young woman holding a ");
  98. printf("mining \n"); 
  99. printf("drill.  This office was once occupied by the mine ");
  100. printf("geologist.  One \n");
  101. printf("can still see traces of the office's former occupant.  ");
  102. printf("There are only \n");
  103. printf("two doors to this room.  Both go to the north. You entered ");
  104. printf("through \n");
  105. printf("the west door.  However there is another door in ");
  106. printf("the eastern section \nof the office. \n");
  107. return ;
  108.  
  109. /* lift compartment */
  110. case R_lift_inside:
  111. room[n][M_rm_type] = T_action_obj ;
  112. printf("You are inside the lift, which has only one ");   
  113. printf("entrance doorway to the west. \n");
  114. printf("To the left of the door is a panel of buttons.  Most of "); 
  115. printf("the buttons are \ninoperative with tape over them.  However ");
  116. printf("there are four buttons \nthat still work. Each of the four ");
  117. printf("buttons have a number stamped on them.  \nThe numbers are ");
  118. printf("zero, forty-nine, sixty-seven, and eighty-two. \n \n");
  119. return ;
  120.  
  121. case R_hideout_entr:  /* Ned Kelly's Hide Out */
  122. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  123.  
  124. if (monster_flag == F_no_monster) {
  125. printf ("Before you is a Queensland house with large verandas. ") ;
  126. printf ("The front of\nthe house is to the east. The house ") ;
  127. printf ("is painted fluorescent orange.\nOn the roof of the house is ");
  128. printf ("a large, bright flashing neon sign which reads: \n\n");
  129. printf("___________________________________________________________\n");
  130. printf("|                                                         |\n");
  131. printf("|            Ned Kelly's ---SECRET--- Hide Out            |\n");
  132. printf("| Policemen, troopers, law enforcement officers and all   |\n");
  133. printf("| other minions of the law and public decency are advised |\n");
  134. printf("| to look else where for bush rangers, thieves, and other |\n");
  135. printf("| larrikins, since ***only*** honest, law abiding         |\n");
  136. printf("| Australians (loyal to Queen and Country) live here.     |\n");
  137. printf("|                                                         |\n");
  138. printf("___________________________________________________________\n");
  139. }
  140. else describe(n) ;
  141. return ;
  142.  
  143. case R_foreman:
  144. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  145. printf("You have entered the office of the Level #67 Foreman. In ");
  146. printf("the middle of the\nroom is the Foreman's large and immovable ");
  147. printf("desk.  To one side can be seen an\nempty file cabinet and ");
  148. printf("a series of pidgeon holes for holding mine worker's\nmail. ");
  149. printf("The only exit is to the west.\n\n") ;
  150. return ;
  151.  
  152. case R_no_treasure:
  153. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  154. printf("You are in a tunnel going east and west. Crude letters have\n");
  155. printf("been scratched into the wall of the tunnel.  The following\n") ;
  156. printf("was written:\n\n") ;
  157. printf("Dear Treasure Hunter:\n") ;
  158. printf("There was lots of treasure on this level when I first\n") ;
  159. printf("discovered this mine.  However I have since carted it all\n") ;
  160. printf("away.  You might try looking on another level.") ;
  161. printf("\n\n                            Good Luck!\n") ;
  162. printf("                         Dr. I. Jones, Ph.D.\n\n") ;
  163. return ;
  164.  
  165. case R_gleep_tank:
  166. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  167. printf("You have walked into a room with a large plastic tank set "); 
  168. printf("in the middle.\nThe tank is about two meters deep and ");
  169. printf("full of dark blue liquid which\nsmells strongly of chlorine.");
  170. printf(" The words \"Gleep Tank\" have been crudely\n");
  171. printf("spray painted on the wall.\n") ;
  172. return ;
  173.  
  174. case R_ufo_e:
  175. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  176. printf("You crawl under a long thin sting that projects from the ");
  177. printf("front of the\nspacecraft.  It's made from a different metal ");
  178. printf("(stainless steel?), and appears\nto have been retractable. ");
  179. printf("This was probably a Mach probe for measuring flight\n") ;
  180. printf("speed. You can go north or south.\n") ;
  181. return ;
  182.  
  183. case R_ufo_w:
  184. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  185. printf("Before you is perhaps the real reason why the ACME Mine ");
  186. printf("was closed. You see\nthe bent and twisted remains of what ");
  187. printf("could only be an ancient spacecraft. It\nsits ") ;
  188. printf("embedded within a gold bearing");
  189. printf(" reef of conglomerate stone from the\nPrecambrain Period ");
  190. printf("(hundreds of millions of years old).  The old spacecraft\n") ;
  191. printf("was based on a delta wing design which the miners had ");
  192. printf("chiped free from\nthe rock. You can see clearly the interior ");
  193. printf("of the engine exhaust ducts.  The\nvehicle has air inlets ");
  194. printf("so it must have been air breathing when it flew in\nthe ");
  195. printf("atmosphere. ") ;
  196. printf("The edges of the ducts appear to be made of titanium ");
  197. printf("and are\nabout six centimeters thick. No wonder it could ");
  198. printf("survive millions of years\nunder tons of stone. ") ;
  199. printf("This spacecraft is literally built like a battleship!\nYou ") ;
  200. printf("can climb over the vehicle to the north or go south.\n\n");
  201. return ;
  202.  
  203. case R_ufo_n:
  204. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  205. printf("You're now doing a tight squeeze between the tunnel wall ");
  206. printf("and the leading\nedge of the wing.  You can see the titanium");
  207. printf(" surface is covered with many\nregularly placed little ");
  208. printf("holes, each about half a millimeter in diameter.\nThis ");
  209. printf("was probably part of the wing's cooling system for ") ;
  210. printf("atmospheric entry\nfrom orbit. You can go south-east or ");
  211. printf("south-west.\n\n");
  212. return ;
  213.  
  214. case R_ufo_s:
  215. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  216. printf("You're crawling under the wing and next to the spacecraft's ");
  217. printf("landing gear.\nThe landing gear strut is almost snapped ");
  218. printf("off.  The tyre has long ago turned\nto dust, but the tyre ");
  219. printf("rim is still in place.  The braking system used is\nquite ");
  220. printf("odd.  The brake rotor is basicly a ring being gripped by ");
  221. printf("a caliper with\nconcave brake pads.  You ") ;
  222. printf("can go north-west or north-east.\n") ;
  223. return ;
  224.  
  225. case R_ufo_ne:
  226. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  227. printf("You are now near the nose of the derelict spacecraft.  You ");
  228. printf("see a quartz\nwindow in the side of the vehicle.  It has been");
  229. printf(" so scratched by the\ncenturies that it is now opaque.  ");
  230. printf("You can go north-west or south.\n") ;
  231. return ;
  232.  
  233. case R_ufo_nw:
  234. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  235. printf("As you scrambled over the old derelict, you passed under ");
  236. printf("the vertical\nstabilizer which centuries of geological ") ;
  237. printf("forces had bent into what\nlooks like a sagging shark's ");
  238. printf("fin. You can go south or do a tight squeeze\nto the ");
  239. printf("north-east.\n\n");
  240. return ;
  241.  
  242. case R_ufo_se:
  243. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  244. printf("You are under the forward section of the spacecraft. ");
  245. printf("Above you is an\nopened access hatch which leads into the ");
  246. printf("dark interior of the derelict.\n");
  247. printf("You can go north, up or crawl under the wing to the ");
  248. printf("south-west\n") ;
  249. return ;
  250.  
  251. case R_ufo_sw:
  252. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  253. printf("You are hunching over as you scramble underneath the ");
  254. printf("spacecraft's wing.\nNear the trailing edge of the wing ");
  255. printf("you can see what is left of the\nwing flaps.  The flap ");
  256. printf("was actuated by a very conventional hydraulic system.\n");
  257. printf("Some of the metal tubing for the actuaters are still in ");
  258. printf("place, though\nthe hydraulic fluid has long since ") ;
  259. printf("fossilized into stone. You can\ngo north or south-east.\n") ;
  260. return ;
  261.  
  262. case R_air_lock:
  263. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  264. printf("You are inside what is obviously an airlock.  There are ");
  265. printf("two hatchways\ninto this airlock.  One leads to the exterior ");
  266. printf("while the other goes into\nthe spacecraft's interior.  Both ");
  267. printf("hatches appear to have originally been\nleft open and not ");
  268. printf("forced by the miners (the hinges are immovable). ");
  269. printf("It\nappears that the ship's crew left in a hurry. ") ;
  270. printf("You can go north or down.\n") ;
  271. return ;
  272.  
  273. case R_ship_passage:
  274. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  275. printf("You've entered the intercompartment access passage.  To the ") ;
  276. printf("south is an\nopen air tight door leading to the airlock. ");
  277. printf("The access door to the east\nis open and recessed into the ");
  278. printf("wall. The access door to the west has been\nforced open ");
  279. printf("with a cutting torch and folded back with a pneumatic\n") ;
  280. printf("hammer (obviously the work of the miners). ") ;
  281. printf("The passage itself has about\nten centimeters of silt on the") ;
  282. printf(" bottom and has the appearance of ancient\ndilapidation.\n") ;
  283. return ;
  284.  
  285. case R_flight_deck:
  286. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  287. printf("You have made it to the flight deck. Unfortunately ");
  288. printf("it's not much to\nwrite home about. Since the access door ");
  289. printf("was open, this area has been full\nof water and silt for ");
  290. printf("millennia.  The miners have shoveled out most of it.\nOnce ");
  291. printf("the wall panels were covered with some kind of plastic which");
  292. printf(" has long\nsince turned to dust.  There are three corroded ");
  293. printf("frames which were once crew\nseats. The beings that flew ") ;
  294. printf("this machine were taller and wider than humans\nbut they ");
  295. printf("had anthropoid form. The flight controls are still here");
  296. printf(" but they\nare so heavily corroded that they can no longer "); 
  297. printf("be moved.  The only way out\nis to the west.\n\n") ;
  298. return ;
  299.  
  300. case R_panel:
  301. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  302. printf("You are in a compartment that seems brand new, which is ");
  303. printf("unbelievable.  Perhaps\nthe machinery in this ship was once ");
  304. printf("self repairing.  Before you is a control\npanel with CRT type");
  305. printf(" displays and buttons that still work.  Beneath each button\n");
  306. printf("is a description written in a strange alien script ");
  307. printf("vaguely like Sanskrit.\nI wouldn't dare ") ;
  308. printf("press any button except one glowing pale green.  Beneath\n");
  309. printf("this button is some masking tape that was obviously placed ") ;
  310. printf("here by the miners.\nSomeone has written \"TEHR.\" on the ") ;
  311. printf("masking tape with a pencil.\n\n") ;
  312. return ;
  313.  
  314. case R_transport:
  315. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  316. printf("You have walked into an elevated chamber with strange ") ;
  317. printf("glowing hexagons on\nthe floor which are about half a ") ;
  318. printf("meter across.  The hexagon pattern on the\nfloor is ");
  319. printf("matched by one on the ceiling which is also glowing.\n\n") ;
  320. return ;
  321.  
  322. case R_prayer:
  323. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  324. printf("You are in a large and very grand room with walls made of\n");
  325. printf("polished mahogany, and crystal chandeliers hanging from an\n");
  326. printf("ornate ceiling.  There is a mihrab incongruously set in the\n");
  327. printf("western wall of the building.  Also there are quotations\n");
  328. printf("from the Quram written in golden letters along the top of\n") ;
  329. printf("the walls near the ceiling.  On the floor are sumptuous\n") ;
  330. printf("cushions made of silk and fine green velvet. Sitting on the\n");
  331. printf("cushions are old men wearing black pajamas with white\n");
  332. printf("towels wrapped around their heads. In the middle of the\n");
  333. printf("floor is a raised dais, upon which is sitting a rather\n");
  334. printf("stately old man wearing similar clothing. In the far corner\n");
  335. printf("of the room is standing a wax dummy of the Ayatolla\n") ;
  336. printf("Khomeini. His right arm is upright much like the Statue of\n") ;
  337. printf("Liberty and in his right hand is a glowing 100 watt light\n") ;
  338. printf("bulb.  I think this is the prayer room for the Iranian\n") ;
  339. printf("Parliament!  You'll have to go west if you wish to leave.\n") ;
  340. return ;
  341.  
  342. case R_guard:
  343. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  344. printf("You are in a rather small room with a table in the ");
  345. printf("middle that is covered\nwith half filled cups of tea, dirty ") ;
  346. printf("ash trays, and a newspaper written in\nwhat appears to be ") ;
  347. printf("Arabic.  There is ") ;
  348. printf("a brightly coloured poster on the\nwall depicting the Kaba ") ;
  349. printf("Stone of Mecca with a calendar below it.  The only\n") ;
  350. printf("exits are through an open doorway to the east and through");
  351. printf(" a curtain covered\ndoorway to the south.\n\n") ;
  352. return ;
  353.  
  354. case R_closet:
  355. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  356. printf("You are in a closet full of grubby, nondescript things not\n") ;
  357. printf("worth taking. The closet stinks of moth balls. The only way\n");
  358. printf("out is through a curtain covered doorway to the north.\n\n");
  359. return ;
  360.  
  361. case R_gong:
  362. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  363. printf("You have entered an enormous room which is walled with\n");
  364. printf("polished black granite supported by vast curving arches\n");
  365. printf("much like a gothic cathedral.  The cavernous room is\n");
  366. printf("octogonal in layout with huge flaming torches set in brass\n");
  367. printf("holders in every corner of the room.  In the flickering\n");
  368. printf("light of the torches you see an enormous silver gong\n");
  369. printf("weighing at least a ton.  The huge gong is suspended from\n");
  370. printf("a finely polished red cedar frame, the top of which is\n");
  371. printf("about four meters above the floor.  The room is deathly\n");
  372. printf("quiet like an ancient tomb. The only sound you can hear is\n");
  373. printf("your own heart beating.\n") ;
  374. return ;
  375.  
  376. case R_warning:
  377. room[n][M_rm_type] = T_was_long;   /* turn off long description  */
  378. printf("You have entered a passage with exits to the north, south,\n");
  379. printf("and west.  There is a poster glued to the wall which reads:\n");
  380. printf("+---------------------------------------------------------+\n");
  381. printf("|                                                         |\n");
  382. printf("|              ACME MINE IS UNFAIR TO WORKERS!!           |\n");
  383. printf("|                                                         |\n");
  384. printf("|                       ON STRIKE!!                       |\n");
  385. printf("|                                                         |\n");
  386. printf("| The Loyal Brotherhood of Australian Miners and Under-   |\n");
  387. printf("| ground Workers is on strike against Acme Mines Ltd. due |\n");
  388. printf("| to unfair treatment of its workers.  Our Union demands  |\n");
  389. printf("| the following:  Worker's wages be increased by 30%%, the |");
  390. printf("\n") ;
  391. printf("| week shall have only 4 working days, the working day    |\n");
  392. printf("| shall be reduced to 5 hours, triple wages for overtime  |\n");
  393. printf("| work and immunity from sacking for all Union members.   |\n");
  394. printf("| To discourage scabs and other strike breakers from      |\n");
  395. printf("| working during the strike, we have planted booby traps  |\n");
  396. printf("| through out the tunnels on this level.  We do hope you  |\n");
  397. printf("| don't mind the mine being mined so it won't be mined.   |\n");
  398. printf("+---------------------------------------------------------+\n");
  399.     return ;
  400.  
  401.     } 
  402. }
  403. else describe(n) ;
  404.  
  405. } /* end of long_descp subroutine */
  406.  
  407. void pusher(n_arg) 
  408. /********************************************************************/
  409. /*                                                                  */
  410. /*                  --- The Pusher Subroutine ---                   */
  411. /*                                                                  */
  412. /*  Software by Gary A. Allen, Jr. 14 June 1989,    Version: Mk 1.2 */
  413. /*           (c) Copyright 1988 by Gary A. Allen, Jr.               */
  414. /*                                                                  */
  415. /********************************************************************/
  416. int *n_arg ;
  417. {
  418. register int i ;
  419. int n ;
  420.  
  421. /* pass the room pointer */
  422. n = *n_arg ;
  423.  
  424. /* reject an isolated "push" command */
  425. if (tag[V_VERB_ONLY]) {
  426.     printf ("What exactly do you want me to push? \n");
  427.     return; 
  428. }
  429.  
  430. switch (n) {
  431.  
  432.     /* Lift entrance at the ground level */
  433.     case R_lift_entr:
  434.         if (tag[V_green_button]) goto no_green ;
  435.         if (!tag[V_button]) {
  436.             if (!tag[V_blue_button]) {
  437. printf ("I don't see why I should push that! \n");
  438.                 return ; 
  439.             }
  440.             else goto nothing ;
  441.         }
  442.         if (room[R_lift_entr][M_rm_status] == S_flashing ) {
  443. printf ("You push the call button and there is a loud \"whirr\" from ");
  444. printf ("an electric motor. \nThe massive steel doors slide open ");
  445. printf ("revealing a huge lift that could hold \ntwenty men at once. ");
  446. printf ("The way is now open for you to enter. \n");
  447.             room[R_lift_entr][M_rm_status] = S_open ;
  448.             room[R_lift_entr][2] = R_lift_inside ;
  449.             break ; }
  450.         else {
  451. printf("You pushed the lift call button, but nothing happened.\n");
  452. printf("I think the electrical power has been turned off at the\n") ;
  453. printf("circuit breaker.\n") ;
  454.             break ; }
  455.  
  456.     /* Lift Compartment */
  457.     case R_lift_inside:
  458.         if (tag[V_green_button]) goto no_green ;
  459.  
  460.     /* scan push sentence */
  461.         /* zero level */
  462.         if (tag[V_0]) {
  463.         if (room[R_lift_inside][M_rm_status]== S_L0) {
  464. printf ("You pushed the flashing button, but nothing happened.\n");
  465.         break ; }
  466. printf ("The steel doors slam shut and you feel heavy as the lift ");
  467. printf ("accelerates \nupwards.  Finally the lift jerks to a halt ");
  468. printf ("and the doors whirr open.  \nSunlight is streaming in. ");
  469. printf ("Once again you are breathing the fresh air.\n");
  470.         room[R_lift_inside][M_rm_status] = S_L0;
  471.         room[R_lift_inside][3] = R_lift_entr;
  472.         room[R_lift_inside][7] = R_lift_entr;
  473.         return ;
  474.         }
  475.  
  476.         /* forty-ninth level */
  477.         if (tag[V_49]) {
  478.         if (room[R_lift_inside][M_rm_status]== S_L49) {
  479. printf ("You pushed the forty-nine button, but nothing happened.\n");
  480.             return ;
  481.         }    
  482.         room[R_lift_inside][M_rm_status] = S_L49 ;
  483.         room[R_lift_inside][3] = R_L49_entr;
  484.         room[R_lift_inside][7] = R_L49_entr;
  485. decp2:
  486. printf ("The steel doors slam shut and you feel the vibration of ");
  487. printf ("the lift \nmoving in its shaft. Finally the lift jerks ");
  488. printf ("to a halt and the doors whirr open. \n");
  489.         return ;
  490.         }
  491.  
  492.         /* sixty-seventh level */
  493.         if (tag[V_67]) {
  494.         if (room[R_lift_inside][M_rm_status]== S_L67) {
  495. printf ("You pushed the sixty-seven button, but nothing happened.\n");
  496.             return ;
  497.         }    
  498.         room[R_lift_inside][M_rm_status] = S_L67;
  499.         room[R_lift_inside][3] = R_L67_entr;
  500.         room[R_lift_inside][7] = R_L67_entr;
  501.         goto decp2 ;
  502.         }
  503.  
  504.         /* eighty-second level */
  505.         if (tag[V_82]) {
  506.         if (room[R_lift_inside][M_rm_status]== S_L82) {
  507. printf ("You pushed the eighty-two button, but nothing happened.\n");
  508.             return ;
  509.         }    
  510.         room[R_lift_inside][M_rm_status] = S_L82;
  511.         room[R_lift_inside][3] = R_L82_entr;
  512.         room[R_lift_inside][7] = R_L82_entr;
  513. printf ("The steel doors slam shut and you feel a sense of ");
  514. printf ("weightlessness as \nthe lift plummets down the mine shaft. ");
  515. printf ("Finally the lift comes to a halt \n");
  516. printf ("and the doors whirr open. \n");
  517.         return ;
  518.         }
  519.         if (tag[V_blue_button]) goto nothing ;
  520. printf ("This lift can go only to levels 0, 49, 67, or 82 \n");
  521.         return ;
  522.  
  523.     /* inside the closet at the Iranian Parliament */
  524.     case R_closet:
  525.         if (tag[V_green_button]) goto no_green ;
  526.         if (tag[V_blue_button]||tag[V_button]) {
  527.             /* Is the command for the black cube */
  528.             if (object[O_cube][J_loc] != B_have) 
  529.                 goto no_switch ;
  530. printf("There is a bright flash of light! Then suddenly you are\n");
  531. printf("back in the hexagon chamber of the ancient spaceship.\n\n");
  532.             *n_arg = R_transport ;
  533.             return ;
  534.         }
  535.         else goto no_switch ;
  536.  
  537.  
  538.     /* the transporter control panel room */
  539.     case R_panel:
  540.         if (tag[V_button]) {
  541. which_button:
  542. printf("Which button do you want me to push? \n") ;
  543.             return;
  544.         }
  545.         if (tag[V_blue_button]) {
  546.             if (object[O_cube][J_loc]==B_have) goto cubic ;
  547.             else goto no_cube ;
  548.         }
  549.         if (tag[V_green_button]) {
  550.             if (sw_transport != TRUE) {
  551. printf("Lots of the \"Sanskrit\" text is flashing by on the display\n");
  552. printf("panel's CRTs.  There is a whirring noise coming out of the\n");
  553. printf("equipment around you which is increasing in both loudness\n");
  554. printf("and pitch. You've turned something on, that's for sure!\n") ;
  555.                 sw_transport = TRUE ;
  556.                 return ;
  557.             }
  558.             else goto nothing ;
  559.         }
  560.     default:
  561.         /* Semtex explosive detector */
  562.         if (tag[V_detector] || tag[V_yellow_button] ||
  563.             ((object[O_cube][J_loc] != B_have) &&
  564.             (object[O_detector][J_loc] == B_have))) { 
  565.             if (object[O_detector][J_loc] == B_have) 
  566.                 goto semtex ;
  567.             else {
  568. printf("You don't have the detector in your possession.\n") ;
  569.                 return ;
  570.             }
  571.         }
  572.         /* Transporter return device */
  573.         if (object[O_cube][J_loc] == B_have) {
  574.             if ((object[O_detector][J_loc] == B_have) && 
  575.                 (!tag[V_blue_button])) 
  576.                     goto which_button ;
  577.             goto cubic ;
  578.         }
  579.         if (tag[V_blue_button]) goto no_cube ;
  580.         if (tag[V_green_button]) goto no_green ;
  581.  
  582. printf ("You can push as much as you like, but nothing will happen.\n");
  583. } /* end of the switch block */
  584. return; 
  585.  
  586. /* press Semtex detector button */
  587. semtex:
  588. printf("You press the button on the Semtex explosive detector and\n");
  589. for (i = 0; i <= 9; i++) if ((n == i+207)||(n == i+228)) {
  590.     if (room[227-i][M_rm_type] == T_lethal) {
  591.         printf("hear a \"beep, beep, beep\".\n") ;
  592.         return ;
  593.     }
  594. }
  595. printf("the yellow light flashed.\n") ;
  596. return; 
  597.  
  598. /* press cube button in wrong place */
  599. cubic:
  600. printf("You press the button on the cube but nothing happens.\n");
  601. return; 
  602.  
  603. /*  no switch */
  604. no_switch:
  605. printf("There is nothing here with a push button switch.\n");
  606. return; 
  607.  
  608. /*  no cube */
  609. no_cube:
  610. printf("You don't have the cube with the blue button in your") ;
  611. printf(" possession!\n") ;
  612. return; 
  613.  
  614. /*  no green button */
  615. no_green:
  616. printf("I see no green button to push!\n");
  617. return; 
  618.  
  619. /* black cube in wrong room routine or green button pushed twice */
  620. nothing:
  621. printf("Nothing happens!\n");
  622. } /* --- end of the "pusher" subroutine --- */
  623.  
  624.  
  625. void switcher(n) 
  626. /********************************************************************/
  627. /*                                                                  */
  628. /*                --- The Switcher Subroutine ---                   */
  629. /*                                                                  */
  630. /*                                                                  */
  631. /*  Software by Gary A. Allen, Jr. 29 October 1989  Version: Mk 1.4 */
  632. /*           (c) Copyright 1988 by Gary A. Allen, Jr.               */
  633. /*                                                                  */
  634. /********************************************************************/
  635. int n ;
  636. {
  637. int flag_switch, flag_rifle_md ;
  638.  
  639. #ifdef __TURBOC__
  640. void dialer(int) ;
  641. #endif
  642.  
  643. /* deal with single verb commands */
  644. if (tag[V_VERB_ONLY]) {
  645.     if (tag[V_turn]) printf("Turn what?\n") ;
  646.     if (tag[V_set]) printf("Set what?\n") ;
  647.     if (tag[V_select]) printf("Select what?\n") ;
  648.     if (tag[V_switch]) printf("Switch what?\n") ;
  649.     return ;
  650. }
  651.  
  652. /* Deal with changing the safety on the rifle */
  653. if (tag[V_safety]) {
  654.     if (object[O_rifle][J_loc] == B_have) {
  655.         if (tag[V_off]) {
  656.             rifle_flag = F_single ;
  657. printf("The M16 rifle is set to single shot mode ") ;
  658. printf("with the safey off.\n") ;
  659.             return ;
  660.         }
  661.         if (tag[V_on]) {
  662.             rifle_flag = F_safety ;
  663. printf("The M16 rifle's safety has been turned on.\n") ;
  664.             return ;
  665.         }
  666.     printf("How do you want the safety set?\n") ;
  667.     }
  668.     else printf("You're not holding the rifle!\n") ;
  669.     return ;
  670. }
  671.  
  672. /* deal with special case "turn (safe) dial 0 49 67 82" */
  673. if (tag[V_turn] && tag[V_dial] && (!tag[V_rifle])) {
  674.     dialer(n) ;
  675.     return ;
  676. }
  677.  
  678. /* deal with special case "turn safe ..." */
  679. if (tag[V_turn] && (!tag[V_dial]) && tag[V_safe]) {
  680.     if (n != R_office_mang) {
  681. printf("There is no safe here to turn!\n") ;
  682.         return  ;
  683.     }
  684. printf("Since the safe is set in a concrete wall, turning it would\n");
  685. printf("be rather difficult!  Perhaps I should turn the safe's\n") ;
  686. printf("dial instead?\n") ;
  687.     return ;
  688. }
  689.  
  690. /* initialize the local switches */
  691. flag_switch = F_no_argument ; 
  692. if (tag[V_on]) flag_switch = TRUE ;
  693. if (tag[V_off]) flag_switch = FALSE ;
  694. if (verb == V_light) flag_switch = TRUE ;
  695.  
  696. flag_rifle_md = F_no_argument ;
  697. if (tag[V_safe]) flag_rifle_md = F_safety ;
  698. if (tag[V_triple]) flag_rifle_md = F_triple ;
  699. if (tag[V_single]) flag_rifle_md = F_single ;
  700. if (tag[V_auto]) flag_rifle_md = F_auto ;
  701.  
  702. if ((flag_switch == F_no_argument)&&(flag_rifle_md == F_no_argument)) {
  703. printf("You will have to be a little more specific than that. \n") ;
  704.     return ;
  705. }
  706.  
  707. /* see if it is a simple "on/off" power equipment switch command */
  708. if ((!tag[V_torch])&&(!tag[V_rifle])&&
  709.     (flag_rifle_md == F_no_argument)) {
  710. if (n == R_store_room) {
  711.     /* The circuit breaker is switched off */
  712.     if (flag_switch == FALSE) {
  713.     if (room[R_store_room][M_rm_status] == S_off) {
  714.     printf ("The circuit breaker is already turned off! \n");
  715.     return ; }
  716.     else {
  717. printf ("As you pull the switch lever, there is a bright blue \n");
  718. printf ("arc and then all of the lights go out. \n");
  719.         room[R_store_room][M_rm_status] = S_off ;
  720.         room[R_lift_entr][M_rm_status] = S_closed ;
  721.         return; }
  722.     }
  723.     /* The circuit breaker is switched on */
  724.     if (flag_switch == TRUE) {
  725.     if (room[R_store_room][M_rm_status] == S_on) {
  726.     printf ("The circuit breaker is already turned on! \n");
  727.     return; }
  728.     else {
  729. printf ("As you pull the switch lever, there is a loud \"CLUNK\" \n");
  730. printf ("and you see a POWER ON light glowing. \n");
  731.         room[R_store_room][M_rm_status] = S_on ;
  732.         room[R_lift_entr][M_rm_status] = S_flashing ;
  733.         return; }
  734.     }
  735. }          
  736. goto garbage_cmd ;
  737. } /* end of the simple "on/off" switch group */
  738.  
  739. /* the switch command is to select an M16 rifle firing mode */
  740. if (tag[V_rifle]) {
  741.     if (object[O_rifle][J_loc] == B_have) {
  742.  
  743.         /* turn the rifle on naively */
  744.         if ((flag_switch==TRUE)||
  745.                ((flag_rifle_md==F_safety)&&(flag_switch==FALSE))) {
  746.             if (rifle_flag != F_safety) {
  747. printf("The rifle's safety is already off! \n") ; 
  748.                 return;
  749.             }
  750.             rifle_flag = F_single ;
  751. printf("The M16 rifle has been set to single shot mode. \n") ;
  752.             return ;
  753.         } 
  754. /* turn on the safety */
  755.     if ((flag_switch==FALSE)||
  756.       ((flag_rifle_md==F_safety)&&((flag_switch==TRUE)||
  757.       (flag_switch==F_no_argument)))) {
  758.                 if (rifle_flag == F_safety) {
  759. printf("The rifle's safety is already on! \n") ; 
  760.                 return;
  761.                 }
  762.             rifle_flag = F_safety ;
  763. printf("The M16 rifle's safety has now been turned on. \n") ;
  764.             return ;
  765.     } 
  766.         /* select single shot mode */  
  767.         if (flag_rifle_md == F_single) {
  768.             if (rifle_flag == F_single) {
  769. printf("The rifle has already been set to single shot mode.\n");
  770.                 return;
  771.             }
  772.             rifle_flag = F_single ;
  773. printf("The M16 rifle has been set to single shot mode. \n") ;
  774.             return ;
  775.         } 
  776.         /* select triple fire mode */  
  777.         if (flag_rifle_md == F_triple) {
  778.             if (rifle_flag == F_triple) {
  779. printf("The rifle has already been set to triple fire mode.\n");
  780.                 return;
  781.             }
  782.             rifle_flag = F_triple ;
  783. printf("The M16 rifle has been set to triple fire mode. \n") ;
  784.             return ;
  785.         } 
  786.         /* select to fully automatice mode */
  787.         if (flag_rifle_md == F_auto) {
  788.             if (rifle_flag == F_auto) {
  789. printf("The rifle has already been set to fully automatic.\n");
  790.                 return;
  791.             }
  792.             rifle_flag = F_auto ;
  793. printf("The M16 rifle has been set to fully automatic. \n") ;
  794.             return ;
  795.         } 
  796.     }
  797.     /* This is the rifle nonpossession error handler */
  798.     else {
  799. printf("You don't have a rifle in your possession! \n") ;
  800.         return ;
  801.     }
  802. } /* end of the rifle mode switching block */
  803.  
  804. /* the switch command is to turn the torch off or on. */
  805. if (tag[V_torch]) {
  806.     if (object[O_torch][J_loc] == B_have) {
  807.         /* "switch torch on" command */
  808.         if (flag_switch==TRUE) {
  809.             if (object[O_torch][J_property]) {
  810. printf("The torch is already turned on.\n") ;
  811.                 return ;
  812.             }
  813. printf("An intense beam of light is projected from the torch.\n") ;
  814.             object[O_torch][J_property] = TRUE ;
  815.             return ;
  816.         }
  817.         /* "switch torch off" command */
  818.         if (flag_switch==FALSE) {
  819.             if (!object[O_torch][J_property]) {
  820. printf("The torch isn't switched on.\n") ;
  821.                 return ;
  822.             }
  823. printf("The torch switches off with a \"click\".\n") ;
  824.             object[O_torch][J_property] = FALSE ;
  825.             return ;
  826.         }
  827.     }
  828. printf("You don't have a torch in your possession to switch! \n") ;
  829.     return ;
  830. }
  831.  
  832. /* Deal with a garbage command */
  833. garbage_cmd :
  834. printf("I don't understand what you want me to switch. \n") ;
  835. return ;
  836.  
  837. } /* --- end of the "switcher" subroutine --- */
  838.  
  839. void new_score() 
  840. /* This subroutine calculates the score based on treasure in the safe */
  841. {
  842. int i ;
  843.     score = 0 ;
  844.  for (i = 0; i <= objcnt; i++) if (object[i][J_loc] == B_in_safe)  {
  845.         score += object[i][J_value] ;
  846.     } ;
  847. } /* --- end of the "new_score" subroutine --- */
  848.