home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / rozrywka / rpg / amigamud / src / proving / deepsewer.m < prev    next >
Text File  |  1997-06-22  |  55KB  |  1,393 lines

  1. /*
  2.  * Amiga MUD
  3.  *
  4.  * Copyright (c) 1997 by Chris Gray
  5.  */
  6.  
  7. /*
  8.  * deepSewer.m - deep sewer level of the proving grounds.
  9.  */
  10.  
  11. define tp_proving tp_deepSewer CreateTable()$
  12. use tp_deepSewer
  13.  
  14. define tp_deepSewer r_sewerShaft2 CreateThing(r_provingTunnelD)$
  15. SetupRoom(r_sewerShaft2, "in a vertical shaft",
  16.     "Rusty metal wrungs in the wall allow you to climb up here, and a "
  17.     "small opening heads south.")$
  18. Connect(r_sewerShaft1, r_sewerShaft2, D_DOWN)$
  19. Scenery(r_sewerShaft2, "wrung;rusty,metal.opening;small")$
  20.  
  21. define tp_deepSewer r_sewerShaft4 CreateThing(r_provingTunnelD)$
  22. SetupRoom(r_sewerShaft4, "in a vertical shaft",
  23.     "Rusty metal wrungs in the wall allow you to climb up here, and a "
  24.     "small opening heads north.")$
  25. Connect(r_sewerShaft3, r_sewerShaft4, D_DOWN)$
  26. Scenery(r_sewerShaft4, "wrung;rusty,metal.opening;small")$
  27.  
  28. define tp_deepSewer r_sewerChamber1 CreateThing(r_provingTunnelD)$
  29. SetupRoom(r_sewerChamber1, "in a large chamber",
  30.     "This chamber is quite large, but fairly low, and the ceiling is held "
  31.     "up by numerous stone pillars. You can see small openings in the "
  32.     "north, south, east and west walls.")$
  33. Connect(r_sewerShaft2, r_sewerChamber1, D_SOUTH)$
  34. Connect(r_sewerShaft4, r_sewerChamber1, D_NORTH)$
  35. AutoGraphics(r_sewerChamber1, AutoTunnelChamber)$
  36. Scenery(r_sewerChamber1, "ceiling.pillar;numerous,stone.opening;small.wall")$
  37. r_sewerChamber1@p_Image := "Proving/sewerChamber1"$
  38.  
  39. define tp_deepSewer r_sewerTunnel1 CreateThing(r_provingTunnelD)$
  40. SetupRoomP(r_sewerTunnel1, "in a low east-west tunnel", "")$
  41. Connect(r_sewerChamber1, r_sewerTunnel1, D_WEST)$
  42.  
  43. define tp_deepSewer r_sewerTunnel2 CreateThing(r_provingTunnelD)$
  44. SetupRoomP(r_sewerTunnel2, "in a low east-west tunnel", "")$
  45. Connect(r_sewerTunnel1, r_sewerTunnel2, D_WEST)$
  46.  
  47. define tp_deepSewer r_sewerTunnel3 CreateThing(r_provingTunnelD)$
  48. SetupRoomP(r_sewerTunnel3, "in a low east-west tunnel", "")$
  49. Connect(r_sewerTunnel2, r_sewerTunnel3, D_WEST)$
  50.  
  51. define tp_deepSewer r_sewerTunnel4 CreateThing(r_provingTunnelD)$
  52. SetupRoomP(r_sewerTunnel4, "in a low north-south-east tunnel Tee", "")$
  53. Connect(r_sewerTunnel3, r_sewerTunnel4, D_WEST)$
  54.  
  55. define tp_deepSewer r_sewerTunnel5 CreateThing(r_provingTunnelD)$
  56. SetupRoomP(r_sewerTunnel5, "in a low north-south tunnel", "")$
  57. Connect(r_sewerTunnel4, r_sewerTunnel5, D_NORTH)$
  58.  
  59. define tp_deepSewer r_sewerTunnel6 CreateThing(r_provingTunnelD)$
  60. SetupRoomP(r_sewerTunnel6, "at a south and east corner in the low tunnel","")$
  61. Connect(r_sewerTunnel5, r_sewerTunnel6, D_NORTH)$
  62.  
  63. define tp_deepSewer r_sewerTunnel7 CreateThing(r_provingTunnelD)$
  64. SetupRoomP(r_sewerTunnel7, "at a south-east-west Tee in the low tunnel", "")$
  65. Connect(r_sewerTunnel6, r_sewerTunnel7, D_EAST)$
  66.  
  67. define tp_deepSewer r_sewerTunnel8 CreateThing(r_provingTunnelD)$
  68. SetupRoomP(r_sewerTunnel8, "at a south-east-west Tee in the low tunnel","")$
  69. Connect(r_sewerTunnel7, r_sewerTunnel8, D_EAST)$
  70.  
  71. define tp_deepSewer r_sewerTunnel8_5 CreateThing(r_provingTunnelD)$
  72. SetupRoomP(r_sewerTunnel8_5, "at a dead-end in the low tunnel",
  73.     "The tunnel ends here in a blank wall. You can only go to the north.")$
  74. Connect(r_sewerTunnel8, r_sewerTunnel8_5, D_SOUTH)$
  75. Scenery(r_sewerTunnel8_5, "wall;blank")$
  76.  
  77. define tp_proving r_sewerChamber2 CreateThing(r_provingTunnelD)$
  78. SetupRoomP(r_sewerChamber2, "in a large chamber",
  79.     "The ceiling of this chamber is of medium height, and is held up by "
  80.     "numerous stone columns. There is a small opening in the north wall, and "
  81.     "a dark hole in the floor near a back corner.")$
  82. Connect(r_sewerTunnel7, r_sewerChamber2, D_SOUTH)$
  83. AutoGraphics(r_sewerChamber2, AutoTunnelChamber)$
  84. r_sewerChamber2@p_rDownMessage := "You drop through the small hole."$
  85. r_sewerChamber2@p_rDownOMessage := "drops through the small hole."$
  86. Scenery(r_sewerChamber2,
  87.     "ceiling,floor."
  88.     "column;numerous,stone."
  89.     "opening;small."
  90.     "wall;back,north."
  91.     "hole;dark."
  92.     "corner;back")$
  93. define tp_deepSewer o_goblinDagger CreateThing(nil)$
  94. o_goblinDagger@p_oName := "dagger;goblin"$
  95. o_goblinDagger@p_oDesc :=
  96.     "The goblin dagger has some unreadable runes scratched into the hilt, "
  97.     "and is of pretty shoddy workmanship. It is quite serviceable, however."$
  98. o_goblinDagger@p_oHome := r_lostAndFound$
  99. o_goblinDagger@p_Image := "Proving/goblinDagger"$
  100. SetupWeapon(o_goblinDagger, 0, 0, 0, 0, 0, 5, 9)$
  101. SetThingStatus(o_goblinDagger, ts_readonly)$
  102. define tp_deepSewer proc daggerQuestDesc()string:
  103.     "Bring me a goblin dagger."
  104. corp;
  105. define tp_deepSewer proc daggerQuestGive()status:
  106.     thing dagger;
  107.  
  108.     dagger := It();
  109.     if Parent(dagger) = o_goblinDagger then
  110.     GiveToQuestor("goblin dagger");
  111.     succeed
  112.     elif dagger@p_oName = "dagger;goblin" then
  113.     GiveToQuestor("goblin dagger");
  114.     SPrint(TrueMe(), "Questor is not impressed.\n");
  115.     fail
  116.     else
  117.     continue
  118.     fi
  119. corp;
  120. define tp_deepSewer proc daggerQuestHint()string:
  121.     "Don't be afraid of the dark. Look beneath the dirty places."
  122. corp;
  123. QuestGive("Dagger", daggerQuestDesc, daggerQuestGive, daggerQuestHint)$
  124. r_sewerChamber2@p_rLastVisit := 0$
  125. define tp_deepSewer proc chamber2Enter(thing room)void:
  126.     thing me, monster, dagger;
  127.     int now;
  128.  
  129.     now := Time();
  130.     me := Me();
  131.     if me@p_pStandard and now - r_sewerChamber2@p_rLastVisit >= 300 then
  132.     r_sewerChamber2@p_rLastVisit := now;
  133.     monster := CreateMonster(me, m_goblin, r_sewerChamber2);
  134.     /* This, unfortunately, is not really an adequate test. It is possible
  135.        to get more than one dagger if the goblin with the dagger is killed
  136.        outside this chamber, and the dagger is dropped there, but not
  137.        picked up by the player. I saw it happen. */
  138.     if not DoneQuest(daggerQuestGive) and
  139.         CarryingChild(me, o_goblinDagger) = nil and
  140.         ChildHere(r_sewerChamber2, o_goblinDagger) = nil
  141.     then
  142.         dagger := CreateThing(o_goblinDagger);
  143.         SetThingStatus(dagger, ts_public);
  144.         GiveThing(dagger, SysAdmin);
  145.         dagger@p_oCreator := me;
  146.         dagger@p_oCarryer := monster;
  147.         AddTail(monster@p_pCarrying, dagger);
  148.         monster@p_pWeapon := dagger;
  149.     fi;
  150.     ignore CreateMonster(me, m_goblin, r_sewerChamber2);
  151.     fi;
  152. corp;
  153. AddAnyEnterAction(r_sewerChamber2, chamber2Enter, false)$
  154. r_sewerChamber2@p_Image := "Proving/sewerChamber2"$
  155.  
  156. define tp_deepSewer r_sewerTunnel9 CreateThing(r_provingTunnelD)$
  157. SetupRoomP(r_sewerTunnel9, "at a north and west corner in the low tunnel","")$
  158. Connect(r_sewerTunnel4, r_sewerTunnel9, D_SOUTH)$
  159.  
  160. define tp_deepSewer r_sewerTunnel10 CreateThing(r_provingTunnelD)$
  161. SetupRoomP(r_sewerTunnel10,"at a south and east corner in the low tunnel","")$
  162. Connect(r_sewerTunnel9, r_sewerTunnel10, D_WEST)$
  163.  
  164. define tp_deepSewer r_sewerTunnel10_5 CreateThing(r_provingTunnelD)$
  165. SetupRoomP(r_sewerTunnel10_5, "in a low north-south tunnel", "")$
  166. Connect(r_sewerTunnel10, r_sewerTunnel10_5, D_SOUTH)$
  167.  
  168. define tp_deepSewer r_sewerTunnel11 CreateThing(r_provingTunnelD)$
  169. SetupRoomP(r_sewerTunnel11, "in a low north-south tunnel", "")$
  170. Connect(r_sewerTunnel10_5, r_sewerTunnel11, D_SOUTH)$
  171.  
  172. define tp_deepSewer r_sewerTunnel12 CreateThing(r_provingTunnelD)$
  173. SetupRoomP(r_sewerTunnel12,"at a north and east corner in the low tunnel","")$
  174. Connect(r_sewerTunnel11, r_sewerTunnel12, D_SOUTH)$
  175.  
  176. define tp_deepSewer r_sewerTunnel13 CreateThing(r_provingTunnelD)$
  177. SetupRoomP(r_sewerTunnel13, "in a low east-west tunnel", "")$
  178. Connect(r_sewerTunnel12, r_sewerTunnel13, D_EAST)$
  179.  
  180. define tp_deepSewer r_sewerTunnel14 CreateThing(r_provingTunnelD)$
  181. SetupRoomP(r_sewerTunnel14,"at a north and west corner in the low tunnel","")$
  182. Connect(r_sewerTunnel13, r_sewerTunnel14, D_EAST)$
  183.  
  184. define tp_deepSewer r_sewerTunnel15 CreateThing(r_provingTunnelD)$
  185. SetupRoomP(r_sewerTunnel15, "at a south-east-west Tee in the low tunnel", "")$
  186. Connect(r_sewerTunnel14, r_sewerTunnel15, D_NORTH)$
  187.  
  188. define tp_deepSewer r_sewerChamber3 CreateThing(r_provingTunnelD)$
  189. SetupRoomP(r_sewerChamber3, "in a large chamber",
  190.     "This high-ceilinged chamber shows signs of animal habitation. The floor "
  191.     "is littered with twigs, grass, bones, and other less pleasant things. "
  192.     "The stone pillars supporting the dimly visible ceiling are rank with "
  193.     "oozing slime. A small passage leads out of the east wall.")$
  194. Connect(r_sewerTunnel15, r_sewerChamber3, D_WEST)$
  195. AutoGraphics(r_sewerChamber3, AutoTunnelChamber)$
  196. Scenery(r_sewerChamber3,
  197.     "ceiling."
  198.     "pillar;numerous,stone."
  199.     "passage;small."
  200.     "wall."
  201.     "sign."
  202.     "floor."
  203.     "slime;oozing,rotting."
  204.     "litter."
  205.     "twig,grass,bone,thing;less,pleasant,dead")$
  206. r_sewerChamber3@p_rLastVisit := 0$
  207. define tp_deepSewer proc chamber3Enter(thing room)void:
  208.     thing me;
  209.     int i, now;
  210.  
  211.     now := Time();
  212.     me := Me();
  213.     if me@p_pStandard and now - r_sewerChamber3@p_rLastVisit >= 300 then
  214.     r_sewerChamber3@p_rLastVisit := now;
  215.     for i from 0 upto Random(5) + 4 do
  216.         ignore CreateMonster(me, m_largeRat, r_sewerChamber3);
  217.     od;
  218.     fi;
  219. corp;
  220. AddAnyEnterAction(r_sewerChamber3, chamber3Enter, false)$
  221. r_sewerChamber3@p_Image := "Proving/sewerChamber3"$
  222. r_sewerChamber3@p_oSmellString :=
  223.     "It doesn't smell very nice in here - you smell a combination of "
  224.     "rank bodies, dead things and rotting slime."$
  225.  
  226. define tp_deepSewer r_sewerTunnel16 CreateThing(r_provingTunnelD)$
  227. SetupRoomP(r_sewerTunnel16, "in a low east-west tunnel", "")$
  228. Connect(r_sewerTunnel15, r_sewerTunnel16, D_EAST)$
  229.  
  230. define tp_deepSewer r_sewerTunnel17 CreateThing(r_provingTunnelD)$
  231. SetupRoomP(r_sewerTunnel17, "in a low east-west tunnel", "")$
  232. Connect(r_sewerTunnel16, r_sewerTunnel17, D_EAST)$
  233.  
  234. define tp_deepSewer r_sewerTunnel18 CreateThing(r_provingTunnelD)$
  235. SetupRoomP(r_sewerTunnel18, "in a low east-west tunnel", "")$
  236. Connect(r_sewerTunnel17, r_sewerTunnel18, D_EAST)$
  237.  
  238. define tp_deepSewer r_sewerTunnel19 CreateThing(r_provingTunnelD)$
  239. SetupRoomP(r_sewerTunnel19, "in a low east-west tunnel", "")$
  240. Connect(r_sewerTunnel18, r_sewerTunnel19, D_EAST)$
  241.  
  242. define tp_deepSewer r_sewerTunnel20 CreateThing(r_provingTunnelD)$
  243. SetupRoomP(r_sewerTunnel20,"at a north and west corner in the low tunnel","")$
  244. Connect(r_sewerTunnel19, r_sewerTunnel20, D_EAST)$
  245.  
  246. define tp_deepSewer r_sewerTunnel21 CreateThing(r_provingTunnelD)$
  247. SetupRoomP(r_sewerTunnel21,"at a south and west corner in the low tunnel","")$
  248. Connect(r_sewerTunnel20, r_sewerTunnel21, D_NORTH)$
  249.  
  250. define tp_deepSewer r_sewerTunnel22 CreateThing(r_provingTunnelD)$
  251. SetupRoomP(r_sewerTunnel22, "at a north-east-west Tee in the low tunnel", "")$
  252. Connect(r_sewerTunnel21, r_sewerTunnel22, D_WEST)$
  253.  
  254. define tp_deepSewer r_sewerTunnel23 CreateThing(r_provingTunnelD)$
  255. SetupRoomP(r_sewerTunnel23, "at an end in the low tunnel",
  256.     "You can go to the east or down a ladder.")$
  257. Connect(r_sewerTunnel22, r_sewerTunnel23, D_WEST)$
  258. Scenery(r_sewerTunnel23, "ladder")$
  259.  
  260. define tp_deepSewer r_sewerTunnel24 CreateThing(r_provingTunnelD)$
  261. SetupRoomP(r_sewerTunnel24, "in a low north-south tunnel", "")$
  262. Connect(r_sewerTunnel22, r_sewerTunnel24, D_NORTH)$
  263.  
  264. define tp_deepSewer r_sewerTunnel25 CreateThing(r_provingTunnelD)$
  265. SetupRoomP(r_sewerTunnel25, "at a south and west corner in a low tunnel", "")$
  266. Connect(r_sewerTunnel24, r_sewerTunnel25, D_NORTH)$
  267. Connect(r_sewerTunnel25, r_sewerChamber1, D_WEST)$
  268.  
  269. define tp_deepSewer r_sewerTunnel26 CreateThing(r_provingTunnelD)$
  270. SetupRoomP(r_sewerTunnel26, "at an end in a very low tunnel",
  271.     "You can go to the north or up a ladder.")$
  272. Connect(r_sewerTunnel23, r_sewerTunnel26, D_DOWN)$
  273. Scenery(r_sewerTunnel26, "ladder")$
  274.  
  275. define tp_deepSewer r_sewerTunnel27 CreateThing(r_provingTunnelD)$
  276. SetupRoomP(r_sewerTunnel27, "in a very low north-south tunnel",
  277.     "There is a crack in the west wall. You can hear noises coming from it.")$
  278. Connect(r_sewerTunnel26, r_sewerTunnel27, D_NORTH)$
  279. Scenery(r_sewerTunnel27, "crack")$
  280. r_sewerTunnel27@p_oListenString :=
  281.     "You can't really identify the noises, but there seems to be two parts "
  282.     "to them - one soft and fairly continuous, and the other slightly louder "
  283.     "and sporadic."$
  284. r_sewerTunnel27@p_rWestEMessage := "comes out of the crack."$
  285. r_sewerTunnel27@p_rEnterMessage := "comes out of the crack."$
  286. r_sewerTunnel27@p_Image := "Proving/sewerTunnel27"$
  287. r_sewerTunnel27@p_rWestImage := "Proving/sewerTunnel27-W"$
  288. define tp_deepSewer o_snakeCrack CreateThing(nil)$
  289. FakeObject(o_snakeCrack, r_sewerTunnel27, "crack.wall;west",
  290.     "The crack is narrow, but it looks like you could squeeze into it.")$
  291. o_snakeCrack@p_oListenString :=
  292.     "The noises are definitely coming from the crack."$
  293. o_snakeCrack@p_oSmellString :=
  294.     "You smell a faint combination of must and death."$
  295. o_snakeCrack@p_Image := "Proving/crack"$
  296.  
  297. define tp_deepSewer r_sewerTunnel28 CreateThing(r_provingTunnelD)$
  298. SetupRoomP(r_sewerTunnel28, "in a very low north-south tunnel", "")$
  299. Connect(r_sewerTunnel27, r_sewerTunnel28, D_NORTH)$
  300.  
  301. define tp_deepSewer r_sewerTunnel29 CreateThing(r_provingTunnelD)$
  302. SetupRoomP(r_sewerTunnel29, "in a very low north-south tunnel", "")$
  303. Connect(r_sewerTunnel28, r_sewerTunnel29, D_NORTH)$
  304.  
  305. define tp_deepSewer r_sewerTunnel30 CreateThing(r_provingTunnelD)$
  306. SetupRoomP(r_sewerTunnel30, "in a very low north-south tunnel", "")$
  307. Connect(r_sewerTunnel29, r_sewerTunnel30, D_NORTH)$
  308.  
  309. define tp_deepSewer r_sewerTunnel31 CreateThing(r_provingTunnelD)$
  310. SetupRoomP(r_sewerTunnel31, "at an end in the very low tunnel",
  311.     "You can go to the south or up a ladder.")$
  312. Connect(r_sewerTunnel30, r_sewerTunnel31, D_NORTH)$
  313. Scenery(r_sewerTunnel31, "ladder")$
  314.  
  315. define tp_deepSewer r_sewerTunnel32 CreateThing(r_provingTunnelD)$
  316. SetupRoomP(r_sewerTunnel32, "at an end in the low tunnel",
  317.     "You can go to the south or down a ladder.")$
  318. Connect(r_sewerTunnel31, r_sewerTunnel32, D_UP)$
  319. Scenery(r_sewerTunnel32, "ladder")$
  320.  
  321. define tp_deepSewer r_sewerTunnel33 CreateThing(r_provingTunnelD)$
  322. SetupRoomP(r_sewerTunnel33, "at a north-east-west Tee in the low tunnel", "")$
  323. Connect(r_sewerTunnel32, r_sewerTunnel33, D_SOUTH)$
  324.  
  325. define tp_deepSewer r_sewerTunnel34 CreateThing(r_provingTunnelD)$
  326. SetupRoomP(r_sewerTunnel34, "in a low east-west tunnel", "")$
  327. Connect(r_sewerTunnel33, r_sewerTunnel34, D_WEST)$
  328. Connect(r_sewerTunnel8, r_sewerTunnel34, D_EAST)$
  329.  
  330. define tp_deepSewer r_sewerTunnel35 CreateThing(r_provingTunnelD)$
  331. SetupRoomP(r_sewerTunnel35, "in a low east-west tunnel", "")$
  332. Connect(r_sewerTunnel33, r_sewerTunnel35, D_EAST)$
  333.  
  334. define tp_deepSewer r_sewerTunnel36 CreateThing(r_provingTunnelD)$
  335. SetupRoomP(r_sewerTunnel36, "at the end of a crack",
  336.     "There is a hole in floor here, from which the noises are coming. It "
  337.     "sounds like a lot of things quietly rubbing against each other, along "
  338.     "with an occasional hissing.")$
  339. HUniConnect(r_sewerTunnel27, r_sewerTunnel36, D_WEST)$
  340. HUniConnect(r_sewerTunnel27, r_sewerTunnel36, D_ENTER)$
  341. UniConnect(r_sewerTunnel36, r_sewerTunnel27, D_EAST)$
  342. UniConnect(r_sewerTunnel36, r_sewerTunnel27, D_EXIT)$
  343. AutoGraphics(r_sewerTunnel36, AutoPaths)$
  344. AutoPens(r_sewerTunnel36, C_DARK_GREY, C_LIGHT_GREY, 0, 0)$
  345. Scenery(r_sewerTunnel36, "crack.hole")$
  346. r_sewerTunnel36@p_oListenString :=
  347.     "The rubbing noise is quite strange - it comes and goes in intensity, "
  348.     "and seems to consist of many quieter noises. The hissing is infrequent "
  349.     "and also varies from soft to loud."$
  350. r_sewerTunnel36@p_rDownEMessage := "crawls out of the pit."$
  351. r_sewerTunnel36@p_rExitEMessage := "crawls out of the pit."$
  352. r_sewerTunnel36@p_Image := "Proving/sewerTunnel36"$
  353. r_sewerTunnel36@p_rDownImage := "Proving/sewerTunnel36-D"$
  354. define tp_deepSewer o_snakeHole CreateThing(nil)$
  355. FakeObject(o_snakeHole, r_sewerTunnel36, "hole.pit",
  356.     "The hole is small, but it looks like you could squeeze into it.")$
  357. o_snakeHole@p_oListenString :=
  358.     "The rubbing noises are definitely coming from the hole."$
  359. o_snakeHole@p_oSmellString :=
  360.     "You smell a combination of must and death."$
  361. o_snakeHole@p_Image := "Proving/sewerTunnel36-D"$
  362.  
  363. define tp_deepSewer r_sewerSnakePit CreateThing(r_provingTunnelD)$
  364. SetupRoomP(r_sewerSnakePit, "in a snake pit",
  365.     "The pit is littered with bones and small bits of eggshell.")$
  366. Connect(r_sewerTunnel36, r_sewerSnakePit, D_DOWN)$
  367. UniConnect(r_sewerSnakePit, r_sewerTunnel36, D_EXIT)$
  368. AutoGraphics(r_sewerSnakePit, AutoTunnelChamber)$
  369. Scenery(r_sewerSnakePit,
  370.     "bone,bit,litter,eggshell,shell;shell,small,bits,of,egg.pit;snake.hole")$
  371. r_sewerSnakePit@p_rLastVisit := 0$
  372. define tp_deepSewer proc chamber4Enter(thing room)void:
  373.     thing me, monster;
  374.     int i, now;
  375.  
  376.     now := Time();
  377.     me := Me();
  378.     if me@p_pStandard and now - r_sewerSnakePit@p_rLastVisit >= 300 then
  379.     r_sewerSnakePit@p_rLastVisit := now;
  380.     for i from 0 upto Random(10) + 10 do
  381.         monster :=
  382.         case Random(20)
  383.         incase 0:
  384.             m_hugeSnake
  385.         incase 1:
  386.         incase 2:
  387.         incase 3:
  388.             m_largeSnake
  389.         default:
  390.             m_snake
  391.         esac;
  392.         ignore CreateMonster(me, monster, r_sewerSnakePit);
  393.     od;
  394.     if FindName(me@p_pCarrying, p_oName, "armour") = fail and
  395.         FindName(me@p_pCarrying, p_oName, "mail") = fail
  396.     then
  397.         DepositClone(r_sewerSnakePit, o_leatherArmour);
  398.     fi;
  399.     fi;
  400. corp;
  401. AddAnyEnterAction(r_sewerSnakePit, chamber4Enter, false)$
  402. r_sewerSnakePit@p_Image := "Proving/sewerChamber4"$
  403. r_sewerSnakePit@p_oSmellString :=
  404.     "The musty, dry smell is now identified with the snakes, and is quite "
  405.     "strong down here. There are also other smells mixed in, not very "
  406.     "pleasant and vaguely animal-like."$
  407.  
  408. define tp_deepSewer r_sewerTunnel37 CreateThing(r_provingTunnelD)$
  409. SetupRoomP(r_sewerTunnel37, "in a low east-west tunnel", "")$
  410. Connect(r_sewerTunnel35, r_sewerTunnel37, D_EAST)$
  411.  
  412. define tp_deepSewer r_sewerTunnel38 CreateThing(r_provingTunnelD)$
  413. SetupRoomP(r_sewerTunnel38, "in a low east-west tunnel", "")$
  414. Connect(r_sewerTunnel37, r_sewerTunnel38, D_EAST)$
  415.  
  416. define tp_deepSewer PR_CHAMBER_ID NextEffectId()$
  417. define tp_deepSewer proc drawChamber()void:
  418.  
  419.     if not KnowsEffect(nil, PR_CHAMBER_ID) then
  420.     DefineEffect(nil, PR_CHAMBER_ID);
  421.     GSetImage(nil, "Proving/chamber");
  422.     IfFound(nil);
  423.         ShowCurrentImage();
  424.     Else(nil);
  425.         GSetPen(nil, C_BLACK);
  426.         GAMove(nil, 0.44, 0.0);
  427.         GRectangle(nil, 0.06, 1.0, true);
  428.  
  429.         GSetPen(nil, C_DARK_GREY);
  430.         GAMove(nil, 0.0, 0.0);
  431.         GRectangle(nil, 0.43, 1.0, true);
  432.  
  433.         GSetPen(nil, C_LIGHT_GREY);
  434.         GAMove(nil, 0.03, 0.1);
  435.         GRectangle(nil, 0.37, 0.79, true);
  436.         GAMove(nil, 0.0, 0.21);
  437.         GRectangle(nil, 0.43, 0.1, true);
  438.         GAMove(nil, 0.0, 0.45);
  439.         GRectangle(nil, 0.43, 0.1, true);
  440.         GAMove(nil, 0.0, 0.69);
  441.         GRectangle(nil, 0.43, 0.1, true);
  442.         GAMove(nil, 0.1, 0.0);
  443.         GRectangle(nil, 0.03, 1.0, true);
  444.         GAMove(nil, 0.2, 0.0);
  445.         GRectangle(nil, 0.03, 1.0, true);
  446.         GAMove(nil, 0.3, 0.0);
  447.         GRectangle(nil, 0.03, 1.0, true);
  448.  
  449.         GSetPen(nil, C_MEDIUM_GREY);
  450.         GAMove(nil, 0.12, 0.33);
  451.         GRectangle(nil, 0.2, 0.34, true);
  452.     Fi(nil);
  453.     EndEffect();
  454.     fi;
  455.     CallEffect(nil, PR_CHAMBER_ID);
  456. corp;
  457.  
  458. define tp_deepSewer CHAMBER_MAP_GROUP NextMapGroup()$
  459.  
  460. define tp_deepSewer r_chamberModel CreateThing(r_provingTunnel2)$
  461. RoomName(r_chamberModel, "Large", "Chamber")$
  462. r_chamberModel@p_MapGroup := CHAMBER_MAP_GROUP$
  463. r_chamberModel@p_rDrawAction := drawChamber$
  464. r_chamberModel@p_rEnterRoomDraw := EnterRoomDraw$
  465. r_chamberModel@p_rLeaveRoomDraw := LeaveRoomDraw$
  466. r_chamberModel@p_oSmellString :=
  467.     "The chamber smells a bit musty and a bit dusty, but is surprisingly "
  468.     "fresh, considering how far underground it is."$
  469. r_chamberModel@p_oListenString :=
  470.     "You can't hear much of anything here, but the regular air motion does "
  471.     "indicate that there are several exits."$
  472. Scenery(r_chamberModel,
  473.     "chamber;large,rectangular."
  474.     "rock."
  475.     "passage;open."
  476.     "wall;outer."
  477.     "chamber;middle,of,the."
  478.     "structure;low,building-like,building,like."
  479.     "window;small,horizontal."
  480.     "dust")$
  481. SetThingStatus(r_chamberModel, ts_readonly)$
  482.  
  483. define tp_deepSewer proc makeChamber(fixed x, y; string name)thing:
  484.     thing chamber;
  485.  
  486.     chamber := CreateThing(r_chamberModel);
  487.     chamber@p_rName := name;
  488.     chamber@p_rContents := CreateThingList();
  489.     chamber@p_rExits := CreateIntList();
  490.     chamber@p_rCursorX := x;
  491.     chamber@p_rCursorY := y;
  492.     SetThingStatus(chamber, ts_wizard);
  493.     chamber
  494. corp;
  495.  
  496. define tp_deepSewer r_chamberW makeChamber(0.073, 0.495,
  497.     "on the west side of the chamber")$
  498. r_chamberW@p_rDesc :=
  499.     "This is a large rectangular chamber hewn from the rock. There are open "
  500.     "passages on all of the outer walls. The middle of the chamber is filled "
  501.     "with a low building-like structure which has small horizontal windows "
  502.     "but no visible door."$
  503. Connect(r_sewerTunnel38, r_chamberW, D_EAST)$
  504.  
  505. define tp_deepSewer r_chamberNW makeChamber(0.114, 0.25,
  506.     "in the north-west corner of the chamber")$
  507. Connect(r_chamberW, r_chamberNW, D_NORTH)$
  508. Connect(r_chamberW, r_chamberNW, D_NORTHEAST)$
  509.  
  510. define tp_deepSewer r_chamberN makeChamber(0.213, 0.215,
  511.     "on the north side of the chamber")$
  512. Connect(r_chamberNW, r_chamberN, D_EAST)$
  513.  
  514. define tp_deepSewer r_chamberNE makeChamber(0.313, 0.25,
  515.     "in the north-east corner of the chamber")$
  516. Connect(r_chamberN, r_chamberNE, D_EAST)$
  517.  
  518. define tp_deepSewer r_chamberE makeChamber(0.358, 0.495,
  519.     "on the east side of the chamber")$
  520. Connect(r_chamberNE, r_chamberE, D_SOUTH)$
  521. Connect(r_chamberNE, r_chamberE, D_SOUTHEAST)$
  522.  
  523. define tp_deepSewer r_chamberSE makeChamber(0.313, 0.74,
  524.     "in the south-east corner of the chamber")$
  525. Connect(r_chamberE, r_chamberSE, D_SOUTH)$
  526. Connect(r_chamberE, r_chamberSE, D_SOUTHWEST)$
  527.  
  528. define tp_deepSewer r_chamberS makeChamber(0.213, 0.77,
  529.     "on the south side of the chamber")$
  530. Connect(r_chamberSE, r_chamberS, D_WEST)$
  531.  
  532. define tp_deepSewer r_chamberSW makeChamber(0.114, 0.74,
  533.     "in the south-west corner of the chamber")$
  534. Connect(r_chamberS, r_chamberSW, D_WEST)$
  535. Connect(r_chamberW, r_chamberSW, D_SOUTH)$
  536. Connect(r_chamberW, r_chamberSW, D_SOUTHEAST)$
  537.  
  538. define tp_deepSewer r_cell CreateThing(r_indoors)$
  539. r_cell@p_rName := "in a small featureless room"$
  540. r_cell@p_rDesc := "There is a small wooden cot against one wall."$
  541. r_cell@p_oSmellString :=
  542.     "The air is fairly close in here, as if the normal occupant hasn't had "
  543.     "a good bath in a very long time."$
  544. r_cell@p_oListenString := "It is pretty quiet in here."$
  545. AutoGraphics(r_cell, AutoOpenRoom)$
  546. AutoPens(r_cell, C_DARK_GREY, C_LIGHT_GREY, C_LIGHT_GREY, 0)$
  547. Scenery(r_cell, "cot;small,wooden")$
  548. SetThingStatus(r_cell, ts_readonly)$
  549.  
  550. define tp_deepSewer proc makeCell(thing chamber; int dir)thing:
  551.     thing cell;
  552.  
  553.     cell := CreateThing(r_cell);
  554.     cell@p_rContents := CreateThingList();
  555.     cell@p_rExits := CreateIntList();
  556.     Connect(chamber, cell, dir);
  557.     UniConnect(cell, chamber, D_EXIT);
  558.     SetThingStatus(cell, ts_wizard);
  559.     cell
  560. corp;
  561.  
  562. ignore makeCell(r_chamberNW, D_WEST)$
  563. ignore makeCell(r_chamberNW, D_NORTH)$
  564. ignore makeCell(r_chamberN, D_NORTH)$
  565. ignore makeCell(r_chamberNE, D_NORTH)$
  566. ignore makeCell(r_chamberNE, D_EAST)$
  567. define tp_deepSewer r_cell1 makeCell(r_chamberSE, D_EAST)$
  568. r_cell1@p_rDesc :=
  569.     "There is a small wooden cot against one wall, and a small hole in the "
  570.     "floor with a ladder leading down."$
  571. Scenery(r_cell1, "cot;small,wooden.ladder.hole;small")$
  572. r_cell1@p_oListenString :=
  573.     "You can hear faint dripping noises coming up from the hole, but other "
  574.     "than that it is fairly quiet in here."$
  575. r_cell1@p_oSmellString :=
  576.     "There is the usual smell of an unwashed body in here, but it isn't as "
  577.     "strong as in the other cells, likely because of the slight breeze "
  578.     "coming through the hole in the floor."$
  579. ignore makeCell(r_chamberSE, D_SOUTH)$
  580. ignore makeCell(r_chamberS, D_SOUTH)$
  581. ignore makeCell(r_chamberSW, D_SOUTH)$
  582. ignore makeCell(r_chamberSW, D_WEST)$
  583.  
  584. define tp_deepSewer r_sewerTunnel39 CreateThing(r_provingTunnelD)$
  585. SetupRoomP(r_sewerTunnel39, "at the end of a very low tunnel",
  586.     "You can go to the south or up a ladder.")$
  587. Connect(r_cell1, r_sewerTunnel39, D_DOWN)$
  588. Scenery(r_sewerTunnel39, "ladder.hole")$
  589.  
  590. define tp_deepSewer r_sewerTunnel40 CreateThing(r_provingTunnelD)$
  591. SetupRoomP(r_sewerTunnel40, "in a very low north-south tunnel", "")$
  592. Connect(r_sewerTunnel39, r_sewerTunnel40, D_SOUTH)$
  593.  
  594. define tp_deepSewer r_sewerTunnel41 CreateThing(r_provingTunnelD)$
  595. SetupRoomP(r_sewerTunnel41, "in a very low north-south tunnel", "")$
  596. Connect(r_sewerTunnel40, r_sewerTunnel41, D_SOUTH)$
  597.  
  598. define tp_deepSewer r_sewerTunnel42 CreateThing(r_provingTunnelD)$
  599. SetupRoomP(r_sewerTunnel42, "in a crossing of very low tunnels", "")$
  600. Connect(r_sewerTunnel41, r_sewerTunnel42, D_SOUTH)$
  601.  
  602. define tp_deepSewer r_sewerTunnel43 CreateThing(r_provingTunnelD)$
  603. SetupRoomP(r_sewerTunnel43, "in a very low east-west tunnel", "")$
  604. Connect(r_sewerTunnel42, r_sewerTunnel43, D_WEST)$
  605.  
  606. define tp_deepSewer r_sewerTunnel44 CreateThing(r_provingTunnelD)$
  607. SetupRoomP(r_sewerTunnel44,
  608.     "in a north and east corner in the very low tunnel", "")$
  609. Connect(r_sewerTunnel43, r_sewerTunnel44, D_WEST)$
  610.  
  611. define tp_deepSewer r_sewerTunnel45 CreateThing(r_provingTunnelD)$
  612. SetupRoomP(r_sewerTunnel45, "in a very low north-south tunnel", "")$
  613. Connect(r_sewerTunnel44, r_sewerTunnel45, D_NORTH)$
  614.  
  615. define tp_deepSewer r_sewerTunnel46 CreateThing(r_provingTunnelD)$
  616. SetupRoomP(r_sewerTunnel46, "in a very low north-south tunnel", "")$
  617. Connect(r_sewerTunnel45, r_sewerTunnel46, D_NORTH)$
  618.  
  619. define tp_deepSewer r_sewerTunnel47 CreateThing(r_provingTunnelD)$
  620. SetupRoomP(r_sewerTunnel47, "at the end of a very low tunnel",
  621.     "You can go to the south or up a ladder.")$
  622. Connect(r_sewerTunnel46, r_sewerTunnel47, D_NORTH)$
  623. Scenery(r_sewerTunnel47, "ladder")$
  624.  
  625. define tp_deepSewer r_sewerBuilding CreateThing(r_provingTunnelD)$
  626. SetupRoomP(r_sewerBuilding, "in a small doorless room",
  627.     "This stone room has small horizontal windows looking out into a larger "
  628.     "space with many exits. The only exit from here is down a ladder.")$
  629. Connect(r_sewerTunnel47, r_sewerBuilding, D_UP)$
  630. AutoGraphics(r_sewerBuilding, AutoClosedRoom)$
  631. Scenery(r_sewerBuilding,
  632.     "room;stone.window;small,horizontal.space;larger.ladder")$
  633. define tp_deepSewer proc sewerBuildingEnter(thing room)void:
  634.     if FindName(Me()@p_pCarrying, p_oName, "lamp") = fail then
  635.     DepositClone(r_sewerBuilding, o_oilLamp);
  636.     fi;
  637. corp;
  638. AddAnyEnterAction(r_sewerBuilding, sewerBuildingEnter, false)$
  639.  
  640. define tp_deepSewer r_sewerTunnel48 CreateThing(r_provingTunnelD)$
  641. SetupRoomP(r_sewerTunnel48, "in a very low north-south tunnel", "")$
  642. Connect(r_sewerTunnel42, r_sewerTunnel48, D_SOUTH)$
  643.  
  644. define tp_deepSewer r_sewerTunnel49 CreateThing(r_provingTunnelD)$
  645. SetupRoomP(r_sewerTunnel49, "in a very low north-south tunnel", "")$
  646. Connect(r_sewerTunnel48, r_sewerTunnel49, D_SOUTH)$
  647.  
  648. define tp_deepSewer r_sewerTunnel50 CreateThing(r_provingTunnelD)$
  649. SetupRoomP(r_sewerTunnel50,
  650.     "in a north and east corner in the very low tunnel", "")$
  651. Connect(r_sewerTunnel49, r_sewerTunnel50, D_SOUTH)$
  652.  
  653. define tp_deepSewer r_sewerTunnel51 CreateThing(r_provingTunnelD)$
  654. SetupRoomP(r_sewerTunnel51,
  655.     "in a north-south-east Tee in the very low tunnel", "")$
  656. Connect(r_sewerTunnel50, r_sewerTunnel51, D_EAST)$
  657.  
  658. define tp_deepSewer r_sewerTunnel52 CreateThing(r_provingTunnelD)$
  659. SetupRoomP(r_sewerTunnel52,
  660.     "in a south and east corner in the very low tunnel", "")$
  661. Connect(r_sewerTunnel51, r_sewerTunnel52, D_NORTH)$
  662.  
  663. define tp_deepSewer r_sewerTunnel53 CreateThing(r_provingTunnelD)$
  664. SetupRoomP(r_sewerTunnel53,
  665.     "in a north and west corner in the very low tunnel", "")$
  666. Connect(r_sewerTunnel52, r_sewerTunnel53, D_EAST)$
  667.  
  668. define tp_deepSewer r_sewerTunnel54 CreateThing(r_provingTunnelD)$
  669. SetupRoomP(r_sewerTunnel54, "in a very low north-south tunnel", "")$
  670. Connect(r_sewerTunnel53, r_sewerTunnel54, D_NORTH)$
  671.  
  672. define tp_deepSewer r_sewerTunnel55 CreateThing(r_provingTunnelD)$
  673. SetupRoomP(r_sewerTunnel55,
  674.     "in a south and west corner in the very low tunnel", "")$
  675. Connect(r_sewerTunnel54, r_sewerTunnel55, D_NORTH)$
  676.  
  677. define tp_deepSewer r_sewerTunnel56 CreateThing(r_provingTunnelD)$
  678. SetupRoomP(r_sewerTunnel56, "in a very low east-west tunnel", "")$
  679. Connect(r_sewerTunnel55, r_sewerTunnel56, D_WEST)$
  680. Connect(r_sewerTunnel42, r_sewerTunnel56, D_EAST)$
  681.  
  682. define tp_deepSewer r_sewerTunnel57 CreateThing(r_provingTunnelD)$
  683. SetupRoomP(r_sewerTunnel57, "at the south end of the very low tunnel",
  684.     "A tiny, badly carved crawlway heads off to the southwest.")$
  685. Connect(r_sewerTunnel51, r_sewerTunnel57, D_SOUTH)$
  686. Scenery(r_sewerTunnel57, "crawlway;tiny,badly,carved")$
  687. define tp_deepSewer PR_TUNNEL57_ID NextEffectId()$
  688. define tp_deepSewer proc drawTunnel57()void:
  689.  
  690.     if not KnowsEffect(nil, PR_TUNNEL57_ID) then
  691.     DefineEffect(nil, PR_TUNNEL57_ID);
  692.     GSetImage(nil, "Proving/tunnel57");
  693.     IfFound(nil);
  694.         ShowCurrentImage();
  695.     Else(nil);
  696.         GSetPen(nil, C_DARK_GREY);
  697.         GAMove(nil, 0.0, 0.0);
  698.         GRectangle(nil, 0.5, 1.0, true);
  699.         GSetPen(nil, C_LIGHT_GREY);
  700.         GAMove(nil, 0.25, 0.497);
  701.         GEllipse(nil, 0.04375, 0.08, true);
  702.         GAMove(nil, 0.208, 0.0);
  703.         GRectangle(nil, 0.086, 0.5, true);
  704.         GPolygonStart(nil);
  705.         GAMove(nil, 0.0, 0.999);
  706.         GADraw(nil, 0.022, 0.999);
  707.         GADraw(nil, 0.261, 0.53);
  708.         GADraw(nil, 0.244, 0.465);
  709.         GADraw(nil, 0.0, 0.94);
  710.         GPolygonEnd(nil);
  711.     Fi(nil);
  712.     EndEffect();
  713.     fi;
  714.     CallEffect(nil, PR_TUNNEL57_ID);
  715. corp;
  716. AutoGraphics(r_sewerTunnel57, drawTunnel57)$
  717.  
  718. define tp_deepSewer r_goblinCityTunnel CreateThing(r_provingTunnel2)$
  719. r_goblinCityTunnel@p_oListenString := "You can't hear much of anything here."$
  720. r_goblinCityTunnel@p_oSmellString := "You can't smell much of anything here."$
  721. SetThingStatus(r_goblinCityTunnel, ts_readonly)$
  722.  
  723. define tp_deepSewer r_sewerTunnel58 CreateThing(r_goblinCityTunnel)$
  724. SetupRoomP(r_sewerTunnel58, "in a well-used tunnel crossing", "")$
  725. Connect(r_chamberE, r_sewerTunnel58, D_EAST)$
  726.  
  727. define tp_deepSewer PR_CHAMBER6_ID NextEffectId()$
  728. define tp_deepSewer proc drawChamber6()void:
  729.  
  730.     if not KnowsEffect(nil, PR_CHAMBER6_ID) then
  731.     DefineEffect(nil, PR_CHAMBER6_ID);
  732.     GSetImage(nil, "Proving/chamber6");
  733.     IfFound(nil);
  734.         ShowCurrentImage();
  735.     Else(nil);
  736.         GSetPen(nil, C_DARK_GREY);
  737.         GAMove(nil, 0.0, 0.0);
  738.         GRectangle(nil, 0.499, 1.0, true);
  739.  
  740.         GSetPen(nil, C_LIGHT_GREY);
  741.         GAMove(nil, 0.03125, 0.1);
  742.         GRectangle(nil, 0.434, 0.79, true);
  743.         GAMove(nil, 0.0, 0.45);
  744.         GRectangle(nil, 0.499, 0.1, true);
  745.         GAMove(nil, 0.103, 0.0);
  746.         GRectangle(nil, 0.03125, 1.0, true);
  747.         GAMove(nil, 0.234, 0.0);
  748.         GRectangle(nil, 0.03125, 1.0, true);
  749.         GAMove(nil, 0.366, 0.0);
  750.         GRectangle(nil, 0.03125, 1.0, true);
  751.     Fi(nil);
  752.     EndEffect();
  753.     fi;
  754.     CallEffect(nil, PR_CHAMBER6_ID);
  755. corp;
  756.  
  757. define tp_deepSewer CHAMBER6_MAP_GROUP NextMapGroup()$
  758.  
  759. define tp_deepSewer r_chamber6Model CreateThing(r_provingTunnel2)$
  760. RoomName(r_chamber6Model, "Large", "Chamber")$
  761. r_chamber6Model@p_MapGroup := CHAMBER6_MAP_GROUP$
  762. r_chamber6Model@p_rDrawAction := drawChamber6$
  763. r_chamber6Model@p_rEnterRoomDraw := EnterRoomDraw$
  764. r_chamber6Model@p_rLeaveRoomDraw := LeaveRoomDraw$
  765. r_chamber6Model@p_oSmellString :=
  766.     "You smell nothing special here, other than the usual tang of "
  767.     "unwashed bodies."$
  768. r_chamber6Model@p_oListenString :=
  769.     "It is fairly quiet here, but again there is evidence of good airflow "
  770.     "through this chamber."$
  771. SetThingStatus(r_chamber6Model, ts_readonly)$
  772.  
  773. define tp_deepSewer proc makeChamber2(fixed x, y; string name)thing:
  774.     thing chamber;
  775.  
  776.     chamber := CreateThing(r_chamber6Model);
  777.     chamber@p_rName := name;
  778.     chamber@p_rContents := CreateThingList();
  779.     chamber@p_rExits := CreateIntList();
  780.     chamber@p_rCursorX := x;
  781.     chamber@p_rCursorY := y;
  782.     SetThingStatus(chamber, ts_wizard);
  783.     chamber
  784. corp;
  785.  
  786. define tp_deepSewer r_chamber6W makeChamber2(0.117, 0.495,
  787.     "on the west side of the chamber")$
  788. Connect(r_sewerTunnel58, r_chamber6W, D_EAST)$
  789.  
  790. define tp_deepSewer r_chamber6NW makeChamber2(0.117, 0.17,
  791.     "in the north-west corner of the chamber")$
  792. Connect(r_chamber6W, r_chamber6NW, D_NORTH)$
  793.  
  794. define tp_deepSewer r_chamber6N makeChamber2(0.247, 0.17,
  795.     "on the north side of the chamber")$
  796. Connect(r_chamber6NW, r_chamber6N, D_EAST)$
  797. Connect(r_chamber6W, r_chamber6N, D_NORTHEAST)$
  798.  
  799. define tp_deepSewer r_chamber6NE makeChamber2(0.38, 0.17,
  800.     "in the north-east corner of the chamber")$
  801. Connect(r_chamber6N, r_chamber6NE, D_EAST)$
  802.  
  803. define tp_deepSewer r_chamber6E makeChamber2(0.38, 0.495,
  804.     "on the west side of the chamber")$
  805. Connect(r_chamber6NE, r_chamber6E, D_SOUTH)$
  806. Connect(r_chamber6N, r_chamber6E, D_SOUTHEAST)$
  807.  
  808. define tp_deepSewer r_chamber6SE makeChamber2(0.38, 0.81,
  809.     "in the south-east corner of the chamber")$
  810. Connect(r_chamber6E, r_chamber6SE, D_SOUTH)$
  811.  
  812. define tp_deepSewer r_chamber6S makeChamber2(0.247, 0.81,
  813.     "on the south side of the chamber")$
  814. Connect(r_chamber6SE, r_chamber6S, D_WEST)$
  815. Connect(r_chamber6E, r_chamber6S, D_SOUTHWEST)$
  816. Connect(r_chamber6W, r_chamber6S, D_SOUTHEAST)$
  817.  
  818. define tp_deepSewer r_chamber6SW makeChamber2(0.117, 0.81,
  819.     "in the south-west corner of the chamber")$
  820. Connect(r_chamber6S, r_chamber6SW, D_WEST)$
  821. Connect(r_chamber6W, r_chamber6SW, D_SOUTH)$
  822.  
  823. define tp_deepSewer r_chamber6Center makeChamber2(0.247, 0.495,
  824.     "in the middle of the chamber")$
  825. Connect(r_chamber6W, r_chamber6Center, D_EAST)$
  826. Connect(r_chamber6NW, r_chamber6Center, D_SOUTHEAST)$
  827. Connect(r_chamber6N, r_chamber6Center, D_SOUTH)$
  828. Connect(r_chamber6NE, r_chamber6Center, D_SOUTHWEST)$
  829. Connect(r_chamber6E, r_chamber6Center, D_WEST)$
  830. Connect(r_chamber6SE, r_chamber6Center, D_NORTHWEST)$
  831. Connect(r_chamber6S, r_chamber6Center, D_NORTH)$
  832. Connect(r_chamber6SW, r_chamber6Center, D_NORTHEAST)$
  833.  
  834. ignore DeleteSymbol(tp_deepSewer, "makeChamber")$
  835.  
  836. define tp_deepSewer r_goblinArmoury CreateThing(r_indoors)$
  837. SetupRoomP(r_goblinArmoury, "in a goblin armoury",
  838.     "The goblins may not be the friendliest folks when you meet them in "
  839.     "distant tunnels, but they certainly are fine craftsmen. The weapons "
  840.     "and armour for sale here (even to non-goblins!) are all fine items.")$
  841. AutoGraphics(r_goblinArmoury, AutoOpenRoom)$
  842. AutoPens(r_goblinArmoury, C_DARK_GREY, C_LIGHT_GREY, 0, 0)$
  843. Connect(r_chamber6NE, r_goblinArmoury, D_NORTH)$
  844. UniConnect(r_goblinArmoury, r_chamber6NE, D_EXIT)$
  845. MakeStore(r_goblinArmoury)$
  846. r_goblinArmoury@p_Image := "Proving/goblinArmoury"$
  847.  
  848. define tp_proving o_goblinSword WeaponSell(r_goblinArmoury, "sword;goblin",
  849.     "The goblin sword is a good weapon. Its feel is a bit strange, and you "
  850.     "can't read the runes carved into it, but you can handle it just fine.",
  851.     300, 1, 0, 1, 0, 0, 8, 13)$
  852. o_goblinSword@p_Image := "Proving/goblinSword"$
  853.  
  854. WeaponSell(r_goblinArmoury, "axe;goblin",
  855.     "The goblin axe is not very big, but makes an effective weapon. The "
  856.     "handle is a bit large for you, but the weight of the head and the "
  857.     "length of the handle more than compensate.",
  858.     150, 1, 0, 0, 0, 0, 12, 9)@p_Image := "Proving/goblinAxe"$
  859.  
  860. WeaponSell(r_goblinArmoury, "armour;goblin,leather",
  861.     "The goblins make good armour - this one is made of thick boiled leather "
  862.     "reinforced with numerous tiny rivets, and embellished with strange "
  863.     "carvings and some shoulder spikes. It doesn't fit very well, however.",
  864.     250, 0, 0, -1, -3, 0, 0, 0)@p_Image := "Proving/goblinLeatherArmour"$
  865.  
  866. WeaponSell(r_goblinArmoury, "mail;goblin,chain.chain",
  867.     "This is another example of fine goblin workmanship. However, since it "
  868.     "was made for a goblin, it doesn't fit you very well.",
  869.     900, -1, 0, -1, -5, 0, 0, 0)@p_Image := "Proving/goblinChainMail"$
  870.  
  871. WeaponSell(r_goblinArmoury, "mail;goblin,plate.plate",
  872.     "This plate mail is fairly adjustable, so even though it was made for a "
  873.     "goblin, it works well for you. There are some runes carved on the "
  874.     "inside of each piece - perhaps they are for luck.",
  875.     4000, 0, 1, 1, -6, 0, 0, 0)@p_Image := "Proving/goblinPlateMail"$
  876.  
  877. define tp_deepSewer r_goblinHealer CreateThing(r_indoors)$
  878. SetupRoomP(r_goblinHealer, "in a goblin apothecary",
  879.     "The goblin running this establishment is a rare item indeed - he is "
  880.     "willing, for money, to help others out. He will sell you healing, "
  881.     "just like the fellow aboveground. His establishment is little more "
  882.     "than a literal hole-in-the-wall, but he seems to know his trade.")$
  883. AutoGraphics(r_goblinHealer, AutoOpenRoom)$
  884. AutoPens(r_goblinHealer, C_DARK_GREY, C_LIGHT_GREY, 0, 0)$
  885. Connect(r_chamber6NW, r_goblinHealer, D_NORTH)$
  886. UniConnect(r_goblinHealer, r_chamber6NW, D_EXIT)$
  887. HealSell(r_goblinHealer, "heal;minor.minor", 20, 6)$
  888. HealSell(r_goblinHealer, "heal;small.small", 40, 15)$
  889. HealSell(r_goblinHealer, "heal;medium.medium", 100, 40)$
  890. HealSell(r_goblinHealer, "heal;large.large", 350, 140)$
  891. HealSell(r_goblinHealer, "heal;great.great", 1000, 500)$
  892. r_goblinHealer@p_rBuyAction := HealingBuy$
  893. r_goblinHealer@p_Image := "Proving/goblinHealer"$
  894.  
  895. define tp_deepSewer r_goblinStore CreateThing(r_indoors)$
  896. SetupRoomP(r_goblinStore, "in a goblin store",
  897.     "This store is a medium-sized hole carved out of the rock, with some "
  898.     "wooden shelves holding the merchandise. The stock here is pretty "
  899.     "limited, but there are lots of each item that is for sale.")$
  900. AutoGraphics(r_goblinStore, AutoOpenRoom)$
  901. AutoPens(r_goblinStore, C_DARK_GREY, C_LIGHT_GREY, 0, 0)$
  902. Scenery(r_goblinStore, "shelf,shelves.merchandise.stock")$
  903. r_goblinStore@p_Image := "Proving/goblinStore"$
  904. Connect(r_chamber6SE, r_goblinStore, D_SOUTH)$
  905. UniConnect(r_goblinStore, r_chamber6SE, D_EXIT)$
  906. MakeStore(r_goblinStore)$
  907. AddObjectForSale(r_goblinStore, CreateThing(o_torch), 15, nil)$
  908. AddObjectForSale(r_goblinStore, CreateThing(o_sack), 30, nil)$
  909. AddObjectForSale(r_goblinStore, CreateThing(o_refill), 75, nil)$
  910. WeaponSell(r_goblinStore, "shield;troll-hide.shield;troll,hide",
  911.     "The troll-hide shield, being made from the hide of a cave troll, "
  912.     "is much stronger than a regular hide shield.",
  913.     100, 0, 0, 0, 0, -2, 0, 0)@p_Image := "Proving/troll-hideShield"$
  914.  
  915. define tp_deepSewer o_mushroom AddForSale(r_goblinStore, "mushroom;healing",
  916.     "", 25, nil)$
  917. define tp_deepSewer proc mushroomEat()status:
  918.     thing th, me;
  919.     int current, max;
  920.  
  921.     th := It();
  922.     me := Me();
  923.     Print("You eat the mushroom. It makes you feel better.\n");
  924.     current := me@p_pHitNow;
  925.     max := me@p_pHitMax;
  926.     if current ~= max then
  927.     current := current + Random(10) + 10;
  928.     if current > max then
  929.         current := max;
  930.     fi;
  931.     me@p_pHitNow := current;
  932.     fi;
  933.     if CanSee(Here(), me) and not me@p_pHidden then
  934.     OPrint(Capitalize(CharacterNameG(me)) + " eats a mushroom.\n");
  935.     fi;
  936.     ClearThing(th);
  937.     DelElement(me@p_pCarrying, th);
  938.     succeed
  939. corp;
  940. o_mushroom@p_oEatChecker := mushroomEat$
  941. o_mushroom@p_oSmellString :=
  942.     "The mushroom smells a lot like a normal mushroom, but there is an "
  943.     "added tang to the odour."$
  944. o_mushroom@p_oTouchString :=
  945.     "The mushroom is a bit past its prime, so it is a little bit soft, "
  946.     "but it is still edible."$
  947. o_mushroom@p_Image := "Proving/mushroom"$
  948.  
  949. define tp_deepSewer p_oMapImage CreateStringProp()$
  950. define tp_deepSewer proc readMap()string:
  951.     if GOn(nil) then
  952.     ShowImage(It()@p_oMapImage);
  953.     else
  954.     Print("With graphics enabled, you would see the map itself.\n");
  955.     fi;
  956.     "The map has some lines and dots drawn on it."
  957. corp;
  958.  
  959. define tp_deepSewer o_map1 AddForSale(r_goblinStore, "map;lower",
  960.     "The map is a piece of parchment with lines and dots drawn on it.",
  961.     100, nil)$
  962. o_map1@p_oMapImage := "Proving/map1"$
  963. o_map1@p_oReadAction := readMap$
  964.  
  965. define tp_deepSewer o_map2 AddForSale(r_goblinStore, "map;upper",
  966.     "The map is a piece of parchment with lines and dots drawn on it.",
  967.     100, nil)$
  968. o_map2@p_oMapImage := "Proving/map2"$
  969. o_map2@p_oReadAction := readMap$
  970.  
  971. define tp_deepSewer r_goblinRoom CreateThing(r_indoors)$
  972. SetupRoomP(r_goblinRoom, "in an unused room", "")$
  973. AutoGraphics(r_goblinRoom, AutoOpenRoom)$
  974. AutoPens(r_goblinRoom, C_DARK_GREY, C_LIGHT_GREY, 0, 0)$
  975. Connect(r_chamber6SW, r_goblinRoom, D_SOUTH)$
  976. UniConnect(r_goblinRoom, r_chamber6SW, D_EXIT)$
  977.  
  978. define tp_deepSewer r_provingTunnel3 CreateThing(r_goblinCityTunnel)$
  979. define tp_deepSewer proc drawTunnel3()void:
  980.     thing here;
  981.     list int exits;
  982.  
  983.     AutoTunnels();
  984.     here := Here();
  985.     exits := here@p_rExits;
  986.     GSetPen(nil, C_BROWN);
  987.     if here@p_rNorth ~= nil and FindElement(exits, D_NORTH) = -1 then
  988.     GAMove(nil, 0.237, 0.42);
  989.     HorizontalDoor();
  990.     fi;
  991.     if here@p_rEast ~= nil and FindElement(exits, D_EAST) = -1 then
  992.     GAMove(nil, 0.295, 0.46);
  993.     VerticalDoor();
  994.     fi;
  995.     if here@p_rSouth ~= nil and FindElement(exits, D_SOUTH) = -1 then
  996.     GAMove(nil, 0.237, 0.58);
  997.     HorizontalDoor();
  998.     fi;
  999.     if here@p_rWest ~= nil and FindElement(exits, D_WEST) = -1 then
  1000.     GAMove(nil, 0.206, 0.46);
  1001.     VerticalDoor();
  1002.     fi;
  1003. corp;
  1004. AutoGraphics(r_provingTunnel3, drawTunnel3)$
  1005. AutoPens(r_provingTunnel3, C_DARK_GREY, C_LIGHT_GREY, 0, 0)$
  1006. SetThingStatus(r_provingTunnel3, ts_wizard)$
  1007.  
  1008. define tp_deepSewer r_sewerTunnel59 CreateThing(r_provingTunnel3)$
  1009. SetupRoomP(r_sewerTunnel59, "at a tunnel tee", "")$
  1010. Connect(r_chamber6E, r_sewerTunnel59, D_EAST)$
  1011.  
  1012. define tp_deepSewer r_sewerTunnel60 CreateThing(r_provingTunnel3)$
  1013. SetupRoomP(r_sewerTunnel60, "in a north-south tunnel", "")$
  1014. Connect(r_sewerTunnel59, r_sewerTunnel60, D_NORTH)$
  1015.  
  1016. define tp_deepSewer r_sewerTunnel61 CreateThing(r_provingTunnel3)$
  1017. SetupRoomP(r_sewerTunnel61, "at a south/west corner", "")$
  1018. Connect(r_sewerTunnel60, r_sewerTunnel61, D_NORTH)$
  1019.  
  1020. define tp_deepSewer r_sewerTunnel62 CreateThing(r_provingTunnel3)$
  1021. SetupRoomP(r_sewerTunnel62, "in an east-west tunnel", "")$
  1022. Connect(r_sewerTunnel61, r_sewerTunnel62, D_WEST)$
  1023.  
  1024. define tp_deepSewer r_sewerTunnel63 CreateThing(r_provingTunnel3)$
  1025. SetupRoomP(r_sewerTunnel63, "at a tunnel tee", "")$
  1026. Connect(r_sewerTunnel62, r_sewerTunnel63, D_WEST)$
  1027. Connect(r_chamber6N, r_sewerTunnel63, D_NORTH)$
  1028.  
  1029. define tp_deepSewer r_sewerTunnel64 CreateThing(r_provingTunnel3)$
  1030. SetupRoomP(r_sewerTunnel64, "in an east-west tunnel", "")$
  1031. Connect(r_sewerTunnel63, r_sewerTunnel64, D_WEST)$
  1032.  
  1033. define tp_deepSewer r_sewerTunnel65 CreateThing(r_provingTunnel3)$
  1034. SetupRoomP(r_sewerTunnel65, "at a south/east corner", "")$
  1035. Connect(r_sewerTunnel64, r_sewerTunnel65, D_WEST)$
  1036.  
  1037. define tp_deepSewer r_sewerTunnel66 CreateThing(r_provingTunnel3)$
  1038. SetupRoomP(r_sewerTunnel66, "in a north-south tunnel", "")$
  1039. Connect(r_sewerTunnel65, r_sewerTunnel66, D_SOUTH)$
  1040. Connect(r_sewerTunnel58, r_sewerTunnel66, D_NORTH)$
  1041.  
  1042. define tp_deepSewer r_sewerTunnel67 CreateThing(r_provingTunnel3)$
  1043. SetupRoomP(r_sewerTunnel67, "in a north-south tunnel", "")$
  1044. Connect(r_sewerTunnel58, r_sewerTunnel67, D_SOUTH)$
  1045.  
  1046. define tp_deepSewer r_sewerTunnel68 CreateThing(r_provingTunnel3)$
  1047. SetupRoomP(r_sewerTunnel68, "at a north/east corner", "")$
  1048. Connect(r_sewerTunnel67, r_sewerTunnel68, D_SOUTH)$
  1049.  
  1050. define tp_deepSewer r_sewerTunnel69 CreateThing(r_provingTunnel3)$
  1051. SetupRoomP(r_sewerTunnel69, "in an east-west tunnel", "")$
  1052. Connect(r_sewerTunnel68, r_sewerTunnel69, D_EAST)$
  1053.  
  1054. define tp_deepSewer r_sewerTunnel70 CreateThing(r_provingTunnel3)$
  1055. SetupRoomP(r_sewerTunnel70, "at a tunnel tee", "")$
  1056. Connect(r_sewerTunnel69, r_sewerTunnel70, D_EAST)$
  1057. Connect(r_chamber6S, r_sewerTunnel70, D_SOUTH)$
  1058.  
  1059. define tp_deepSewer r_sewerTunnel71 CreateThing(r_provingTunnel3)$
  1060. SetupRoomP(r_sewerTunnel71, "in an east-west tunnel", "")$
  1061. Connect(r_sewerTunnel70, r_sewerTunnel71, D_EAST)$
  1062.  
  1063. define tp_deepSewer r_sewerTunnel72 CreateThing(r_provingTunnel3)$
  1064. SetupRoomP(r_sewerTunnel72, "at a north/west corner", "")$
  1065. Connect(r_sewerTunnel71, r_sewerTunnel72, D_EAST)$
  1066.  
  1067. define tp_deepSewer r_sewerTunnel73 CreateThing(r_provingTunnel3)$
  1068. SetupRoomP(r_sewerTunnel73, "in a north-south tunnel", "")$
  1069. Connect(r_sewerTunnel72, r_sewerTunnel73, D_NORTH)$
  1070. Connect(r_sewerTunnel59, r_sewerTunnel73, D_SOUTH)$
  1071.  
  1072. define tp_deepSewer r_shaman CreateThing(r_indoors)$
  1073. SetupRoomP(r_shaman, "in the shaman's room",
  1074.     "The goblin shaman offers a few strange items for sale. His room is "
  1075.     "little different from the others around it.")$
  1076. RoomName(r_shaman, "Shaman's", "Room")$
  1077. AutoGraphics(r_shaman, AutoClosedRoom)$
  1078. AutoPens(r_shaman, C_DARK_GREY, C_LIGHT_GREY, C_BLACK, C_BROWN)$
  1079. Scenery(r_shaman,
  1080.     "cot;wooden."
  1081.     "table;sturdy,wooden."
  1082.     "chair;pair,of,unpadded."
  1083.     "chest;small,clothes."
  1084.     "furniture,furnishing;sparse")$
  1085. r_shaman@p_Image := "Proving/shaman"$
  1086. HUniConnect(r_sewerTunnel64, r_shaman, D_SOUTH)$
  1087. UniConnect(r_shaman, r_sewerTunnel64, D_NORTH)$
  1088. UniConnect(r_shaman, r_sewerTunnel64, D_EXIT)$
  1089. MakeStore(r_shaman)$
  1090. define tp_deepSewer proc drinkPotion(thing me, it; string reaction)void:
  1091.  
  1092.     Print(reaction + "! That was awful!\n");
  1093.     if not me@p_pHidden then
  1094.     OPrint(Capitalize(CharacterNameG(me)) +
  1095.         " drinks an unpleasant potion.\n");
  1096.     else
  1097.     OPrint("You hear a gagging sound.\n");
  1098.     fi;
  1099.     AddTail(me@p_pHiddenList, it);
  1100.     DelElement(me@p_pCarrying, it);
  1101. corp;
  1102. define tp_deepSewer o_strengthPotion AddForSale(r_shaman, "potion;strength",
  1103.     "The strength potion comes in a small red bottle. It appears to contain "
  1104.     "enough of the potion for one dose.",
  1105.     1000, nil)$
  1106. define tp_deepSewer proc strengthCancel(thing th)void:
  1107.     thing who;
  1108.  
  1109.     who := th@p_oConsumer;
  1110.     who@p_pStrength := who@p_pStrength - 1;
  1111.     ClearThing(th);
  1112.     DelElement(who@p_pHiddenList, th);
  1113.     SPrint(who, "You suddenly feel let down.\n");
  1114. corp;
  1115. define tp_deepSewer proc strengthDrink()status:
  1116.     thing me, it;
  1117.  
  1118.     me := Me();
  1119.     it := It();
  1120.     it@p_oConsumer := me;
  1121.     me@p_pStrength := me@p_pStrength + 1;
  1122.     drinkPotion(me, it, "Yuck");
  1123.     DoAfter(10 * 60, it, strengthCancel);
  1124.     succeed
  1125. corp;
  1126. o_strengthPotion@p_oEatChecker := strengthDrink$
  1127. o_strengthPotion@p_Image := "Proving/strengthPotion"$
  1128. define tp_deepSewer o_speedPotion AddForSale(r_shaman, "potion;speed",
  1129.     "The speed potion comes in a small green bottle. It appears to contain "
  1130.     "enough of the potion for one dose.",
  1131.     1000, nil)$
  1132. define tp_deepSewer proc speedCancel(thing th)void:
  1133.     thing who;
  1134.  
  1135.     who := th@p_oConsumer;
  1136.     who@p_pSpeed := who@p_pSpeed - 1;
  1137.     ClearThing(th);
  1138.     DelElement(who@p_pHiddenList, th);
  1139.     SPrint(who, "You suddenly feel let down.\n");
  1140. corp;
  1141. define tp_deepSewer proc speedDrink()status:
  1142.     thing me, it;
  1143.  
  1144.     me := Me();
  1145.     it := It();
  1146.     it@p_oConsumer := me;
  1147.     me@p_pSpeed := me@p_pSpeed + 1;
  1148.     drinkPotion(me, it, "Yech");
  1149.     DoAfter(10 * 60, it, speedCancel);
  1150.     succeed
  1151. corp;
  1152. o_speedPotion@p_oEatChecker := speedDrink$
  1153. o_speedPotion@p_Image := "Proving/speedPotion"$
  1154. define tp_deepSewer o_excessPotion AddForSale(r_shaman, "potion;excess",
  1155.     "The excess potion comes in a small blue bottle. It appears to contain "
  1156.     "enough of the potion for one dose.",
  1157.     1000, nil)$
  1158. define tp_deepSewer proc excessCancel(thing th)void:
  1159.     thing who;
  1160.  
  1161.     who := th@p_oConsumer;
  1162.     who@p_pHitMax := who@p_pHitMax - 10;
  1163.     ClearThing(th);
  1164.     DelElement(who@p_pHiddenList, th);
  1165.     SPrint(who, "You suddenly feel let down.\n");
  1166. corp;
  1167. define tp_deepSewer proc excessDrink()status:
  1168.     thing me, it;
  1169.  
  1170.     me := Me();
  1171.     it := It();
  1172.     it@p_oConsumer := me;
  1173.     me@p_pHitMax := me@p_pHitMax + 10;
  1174.     drinkPotion(me, it, "Ug");
  1175.     DoAfter(60 * 60, it, excessCancel);
  1176.     succeed
  1177. corp;
  1178. o_excessPotion@p_oEatChecker := excessDrink$
  1179. o_excessPotion@p_Image := "Proving/excessPotion"$
  1180.  
  1181. define tp_deepSewer r_cell2 CreateThing(r_indoors)$
  1182. r_cell2@p_rName := "in a featureless room"$
  1183. r_cell2@p_rDesc :=
  1184.     "The room is sparsely furnished with a wooden cot, a sturdy wooden "
  1185.     "table with a pair of unpadded chairs, and a small clothes chest."$
  1186. r_cell2@p_oListenString := "It is nicely quiet in here."$
  1187. r_cell2@p_oSmellString :=
  1188.     "It is a bit close and stuffy in here, but not too bad."$
  1189. AutoGraphics(r_cell2, AutoClosedRoom)$
  1190. AutoPens(r_cell2, C_DARK_GREY, C_LIGHT_GREY, C_BLACK, C_BROWN)$
  1191. Scenery(r_cell2,
  1192.     "cot;wooden,wood."
  1193.     "table;sturdy,wooden,wood."
  1194.     "chair;pair,of,unpadded."
  1195.     "chest;small clothes."
  1196.     "furniture,furnishing;sparse")$
  1197. SetThingStatus(r_cell2, ts_readonly)$
  1198.  
  1199. define tp_deepSewer proc makeCell2(thing tunnel; int dir)thing:
  1200.     thing cell;
  1201.  
  1202.     cell := CreateThing(r_cell2);
  1203.     cell@p_rContents := CreateThingList();
  1204.     cell@p_rExits := CreateIntList();
  1205.     HUniConnect(tunnel, cell, dir);
  1206.     UniConnect(cell, tunnel, DirBack(dir));
  1207.     UniConnect(cell, tunnel, D_EXIT);
  1208.     SetThingStatus(cell, ts_wizard);
  1209.     cell
  1210. corp;
  1211.  
  1212. ignore makeCell2(r_sewerTunnel59, D_EAST)$
  1213. ignore makeCell2(r_sewerTunnel60, D_EAST)$
  1214. ignore makeCell2(r_sewerTunnel60, D_WEST)$
  1215. ignore makeCell2(r_sewerTunnel61, D_EAST)$
  1216. ignore makeCell2(r_sewerTunnel61, D_NORTH)$
  1217. ignore makeCell2(r_sewerTunnel62, D_NORTH)$
  1218. ignore makeCell2(r_sewerTunnel62, D_SOUTH)$
  1219. ignore makeCell2(r_sewerTunnel63, D_NORTH)$
  1220. ignore makeCell2(r_sewerTunnel64, D_NORTH)$
  1221. ignore makeCell2(r_sewerTunnel65, D_NORTH)$
  1222. ignore makeCell2(r_sewerTunnel65, D_WEST)$
  1223. ignore makeCell2(r_sewerTunnel66, D_EAST)$
  1224. ignore makeCell2(r_sewerTunnel66, D_WEST)$
  1225. ignore makeCell2(r_sewerTunnel67, D_EAST)$
  1226. ignore makeCell2(r_sewerTunnel67, D_WEST)$
  1227. ignore makeCell2(r_sewerTunnel68, D_WEST)$
  1228. ignore makeCell2(r_sewerTunnel68, D_SOUTH)$
  1229. ignore makeCell2(r_sewerTunnel69, D_NORTH)$
  1230. ignore makeCell2(r_sewerTunnel69, D_SOUTH)$
  1231. ignore makeCell2(r_sewerTunnel70, D_SOUTH)$
  1232. ignore makeCell2(r_sewerTunnel71, D_NORTH)$
  1233. ignore makeCell2(r_sewerTunnel71, D_SOUTH)$
  1234. ignore makeCell2(r_sewerTunnel72, D_SOUTH)$
  1235. ignore makeCell2(r_sewerTunnel72, D_EAST)$
  1236. ignore makeCell2(r_sewerTunnel73, D_EAST)$
  1237. ignore makeCell2(r_sewerTunnel73, D_WEST)$
  1238.  
  1239. ignore DeleteSymbol(tp_deepSewer, "makeCell2")$
  1240.  
  1241. define tp_deepSewer r_crawlway CreateThing(r_tunnel)$
  1242. AutoGraphics(r_crawlway, AutoPaths)$
  1243. AutoPens(r_crawlway, C_DARK_GREY, C_LIGHT_GREY, 0, 0)$
  1244. r_crawlway@p_rName := "in a winding crawlway"$
  1245. r_crawlway@p_rDark := true$
  1246. r_crawlway@p_oListenString := "It is very quiet in this little crawlway!"$
  1247. r_crawlway@p_oSmellString :=
  1248.     "There is a fairly strong smell of unwashed bodies, mixed with other "
  1249.     "less pleasant things, here."$
  1250. SetThingStatus(r_crawlway, ts_readonly)$
  1251. monsterSet3(r_crawlway)$
  1252.  
  1253. define tp_deepSewer proc makeCrawlway(thing previous; int dir)thing:
  1254.     thing crawlway;
  1255.  
  1256.     crawlway := CreateThing(r_crawlway);
  1257.     crawlway@p_rContents := CreateThingList();
  1258.     crawlway@p_rExits := CreateIntList();
  1259.     Connect(previous, crawlway, dir);
  1260.     SetThingStatus(crawlway, ts_wizard);
  1261.     crawlway
  1262. corp;
  1263.  
  1264. define tp_deepSewer r_crawlway1 makeCrawlway(r_sewerTunnel57, D_SOUTHWEST)$
  1265.  
  1266. define tp_deepSewer r_crawlway2 makeCrawlway(r_crawlway1, D_WEST)$
  1267.  
  1268. define tp_deepSewer r_crawlway3 makeCrawlway(r_crawlway2, D_SOUTHWEST)$
  1269. r_crawlway3@p_rDesc := "You can smell something bad nearby."$
  1270. r_crawlway3@p_oSmellString := "Yes, definitely something rotten around here."$
  1271.  
  1272. define tp_deepSewer r_sewerChamber5 CreateThing(r_crawlway)$
  1273. SetupRoomP(r_sewerChamber5, "in a goblin hideout",
  1274.     "The hideout is littered with just about every unmentionable thing you "
  1275.     "can think of. Small crawlways lead off in several directions.")$
  1276. Connect(r_crawlway3, r_sewerChamber5, D_WEST)$
  1277. define tp_deepSewer PR_CHAMBER5_ID NextEffectId()$
  1278. define tp_deepSewer proc drawChamber5()void:
  1279.  
  1280.     if not KnowsEffect(nil, PR_CHAMBER5_ID) then
  1281.     DefineEffect(nil, PR_CHAMBER5_ID);
  1282.     GSetImage(nil, "Proving/chamber5");
  1283.     IfFound(nil);
  1284.         ShowCurrentImage();
  1285.     Else(nil);
  1286.         DrawTunnelChamber(C_DARK_GREY, C_LIGHT_GREY);
  1287.         GSetPen(nil, C_LIGHT_GREY);
  1288.         GPolygonStart(nil);
  1289.         GAMove(nil, 0.499, 0.0);
  1290.         GADraw(nil, 0.499, 0.06);
  1291.         GADraw(nil, 0.33, 0.55);
  1292.         GADraw(nil, 0.28, 0.57);
  1293.         GADraw(nil, 0.478, 0.0);
  1294.         GPolygonEnd(nil);
  1295.         GAMove(nil, 0.252, 0.46);
  1296.         GRectangle(nil, 0.248, 0.08, true);
  1297.         GAMove(nil, 0.234, 0.5);
  1298.         GRectangle(nil, 0.03125, 0.499, true);
  1299.         GAMove(nil, 0.0, 0.46);
  1300.         GRectangle(nil, 0.25, 0.08, true);
  1301.         GPolygonStart(nil);
  1302.         GAMove(nil, 0.0, 0.0);
  1303.         GADraw(nil, 0.025, 0.0);
  1304.         GADraw(nil, 0.2, 0.5);
  1305.         GADraw(nil, 0.175, 0.55);
  1306.         GADraw(nil, 0.0, 0.06);
  1307.         GPolygonEnd(nil);
  1308.     Fi(nil);
  1309.     EndEffect();
  1310.     fi;
  1311.     CallEffect(nil, PR_CHAMBER5_ID);
  1312. corp;
  1313. AutoGraphics(r_sewerChamber5, drawChamber5)$
  1314. Scenery(r_sewerChamber5, "thing;unmentionable")$
  1315. r_sewerChamber5@p_oSmellString :=
  1316.     "The smell of rotten meat, rotten vegetables, rotten breath and rotten "
  1317.     "bodies is nearly overpowering!"$
  1318. r_sewerChamber5@p_oListenString :=
  1319.     "The loudest sounds here are those of your breathing and of your "
  1320.     "stomache objecting to the stench!"$
  1321. r_sewerChamber5@p_rLastVisit := 0$
  1322. define tp_deepSewer proc chamber5Enter(thing room)void:
  1323.     thing me, monster, shield;
  1324.     int i, now, count;
  1325.     list thing lt;
  1326.  
  1327.     now := Time();
  1328.     me := Me();
  1329.     if me@p_pStandard and now - r_sewerChamber5@p_rLastVisit >= 300 then
  1330.     r_sewerChamber5@p_rLastVisit := now;
  1331.     for i from 0 upto Random(5) + 4 do
  1332.         monster := if Random(10) = 0 then m_fighterGoblin else m_goblin fi;
  1333.         ignore CreateMonster(me, monster, r_sewerChamber5);
  1334.     od;
  1335.     lt := me@p_pCarrying;
  1336.     count := Count(lt);
  1337.     i := 0;
  1338.     while i < count do
  1339.         shield := lt[i];
  1340.         if shield@p_oShieldProt <= o_woodenShield@p_oShieldProt then
  1341.         i := count + 1;
  1342.         else
  1343.         i := i + 1;
  1344.         fi;
  1345.     od;
  1346.     if i = count then
  1347.         DepositClone(r_sewerChamber5, o_woodenShield);
  1348.     fi;
  1349.     fi;
  1350. corp;
  1351. AddAnyEnterAction(r_sewerChamber5, chamber5Enter, false)$
  1352.  
  1353. define tp_deepSewer r_crawlway4 makeCrawlway(r_sewerChamber5, D_NORTHEAST)$
  1354.  
  1355. define tp_deepSewer r_crawlway5 makeCrawlway(r_sewerChamber5, D_SOUTH)$
  1356.  
  1357. define tp_deepSewer r_crawlway6 makeCrawlway(r_crawlway5, D_WEST)$
  1358.  
  1359. define tp_deepSewer r_crawlway7 makeCrawlway(r_crawlway5, D_SOUTHWEST)$
  1360.  
  1361. define tp_deepSewer r_crawlway8 makeCrawlway(r_crawlway7, D_SOUTH)$
  1362.  
  1363. define tp_deepSewer r_crawlway9 makeCrawlway(r_crawlway8, D_NORTHWEST)$
  1364.  
  1365. define tp_deepSewer r_crawlway10 makeCrawlway(r_crawlway9, D_NORTH)$
  1366.  
  1367. define tp_deepSewer r_crawlway11 makeCrawlway(r_crawlway10, D_NORTHEAST)$
  1368. Connect(r_sewerChamber5, r_crawlway11, D_WEST)$
  1369.  
  1370. define tp_deepSewer r_crawlway12 makeCrawlway(r_sewerChamber5, D_NORTHWEST)$
  1371.  
  1372. define tp_deepSewer r_crawlway13 makeCrawlway(r_crawlway12, D_WEST)$
  1373.  
  1374. define tp_deepSewer r_crawlway14 makeCrawlway(r_crawlway13, D_NORTHWEST)$
  1375.  
  1376. define tp_deepSewer r_crawlway15 makeCrawlway(r_crawlway14, D_SOUTHWEST)$
  1377.  
  1378. define tp_deepSewer r_crawlway16 makeCrawlway(r_crawlway15, D_SOUTHWEST)$
  1379.  
  1380. ignore DeleteSymbol(tp_deepSewer, "makeCrawlway")$
  1381.  
  1382. define tp_proving r_crawlway17 CreateThing(r_crawlway)$
  1383. SetupRoomP(r_crawlway17, "at the end of a crawlway",
  1384.     "You are high up on the north wall of a large cavern. You can drop down "
  1385.     "to the cavern floor, but you would not be able to get back up.")$
  1386. r_crawlway17@p_oSmellString :=
  1387.     "The usual smell of these crawlways has finally faded out."$
  1388. r_crawlway17@p_oListenString := "You can hear water dripping below."$
  1389. Connect(r_crawlway16, r_crawlway17, D_SOUTH)$
  1390. Scenery(r_crawlway17, "cavern;large.wall;north.floor;cavern")$
  1391.  
  1392. unuse tp_deepSewer
  1393.