home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume18 / ccr / part10 < prev    next >
Encoding:
Internet Message Format  |  1993-07-18  |  57.3 KB

  1. Path: uunet!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v18i025:  ccr - colossal cave (adventure) implemented in TADS, Part10/11
  5. Date: 12 Jul 1993 19:29:16 GMT
  6. Organization: Tektronix, Inc, Redmond, OR, USA
  7. Lines: 2086
  8. Approved: billr@saab.CNA.TEK.COM
  9. Message-ID: <21se2c$1d3@ying.cna.tek.com>
  10. NNTP-Posting-Host: saab.cna.tek.com
  11. Xref: uunet comp.sources.games:1825
  12.  
  13. Submitted-by: David Baggett <dmb@xbar.ai.mit.edu>
  14. Posting-number: Volume 18, Issue 25
  15. Archive-name: ccr/part10
  16. Environment: TADS
  17.  
  18.  
  19.  
  20. #! /bin/sh
  21. # This is a shell archive.  Remove anything before this line, then unpack
  22. # it by saving it into a file and typing "sh file".  To overwrite existing
  23. # files, type "sh file -c".  You can also feed this as standard input via
  24. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  25. # will see the following message at the end:
  26. #        "End of archive 10 (of 11)."
  27. # Contents:  copying.doc src/ccr-std.t src/ccr-verb.t
  28. # Wrapped by billr@saab on Mon Jul 12 12:02:45 1993
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'copying.doc' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'copying.doc'\"
  32. else
  33. echo shar: Extracting \"'copying.doc'\" \(17982 characters\)
  34. sed "s/^X//" >'copying.doc' <<'END_OF_FILE'
  35. X            GNU GENERAL PUBLIC LICENSE
  36. X               Version 2, June 1991
  37. X
  38. X Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  39. X                          675 Mass Ave, Cambridge, MA 02139, USA
  40. X Everyone is permitted to copy and distribute verbatim copies
  41. X of this license document, but changing it is not allowed.
  42. X
  43. X                Preamble
  44. X
  45. X  The licenses for most software are designed to take away your
  46. Xfreedom to share and change it.  By contrast, the GNU General Public
  47. XLicense is intended to guarantee your freedom to share and change free
  48. Xsoftware--to make sure the software is free for all its users.  This
  49. XGeneral Public License applies to most of the Free Software
  50. XFoundation's software and to any other program whose authors commit to
  51. Xusing it.  (Some other Free Software Foundation software is covered by
  52. Xthe GNU Library General Public License instead.)  You can apply it to
  53. Xyour programs, too.
  54. X
  55. X  When we speak of free software, we are referring to freedom, not
  56. Xprice.  Our General Public Licenses are designed to make sure that you
  57. Xhave the freedom to distribute copies of free software (and charge for
  58. Xthis service if you wish), that you receive source code or can get it
  59. Xif you want it, that you can change the software or use pieces of it
  60. Xin new free programs; and that you know you can do these things.
  61. X
  62. X  To protect your rights, we need to make restrictions that forbid
  63. Xanyone to deny you these rights or to ask you to surrender the rights.
  64. XThese restrictions translate to certain responsibilities for you if you
  65. Xdistribute copies of the software, or if you modify it.
  66. X
  67. X  For example, if you distribute copies of such a program, whether
  68. Xgratis or for a fee, you must give the recipients all the rights that
  69. Xyou have.  You must make sure that they, too, receive or can get the
  70. Xsource code.  And you must show them these terms so they know their
  71. Xrights.
  72. X
  73. X  We protect your rights with two steps: (1) copyright the software, and
  74. X(2) offer you this license which gives you legal permission to copy,
  75. Xdistribute and/or modify the software.
  76. X
  77. X  Also, for each author's protection and ours, we want to make certain
  78. Xthat everyone understands that there is no warranty for this free
  79. Xsoftware.  If the software is modified by someone else and passed on, we
  80. Xwant its recipients to know that what they have is not the original, so
  81. Xthat any problems introduced by others will not reflect on the original
  82. Xauthors' reputations.
  83. X
  84. X  Finally, any free program is threatened constantly by software
  85. Xpatents.  We wish to avoid the danger that redistributors of a free
  86. Xprogram will individually obtain patent licenses, in effect making the
  87. Xprogram proprietary.  To prevent this, we have made it clear that any
  88. Xpatent must be licensed for everyone's free use or not licensed at all.
  89. X
  90. X  The precise terms and conditions for copying, distribution and
  91. Xmodification follow.
  92. X
  93. X            GNU GENERAL PUBLIC LICENSE
  94. X   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  95. X
  96. X  0. This License applies to any program or other work which contains
  97. Xa notice placed by the copyright holder saying it may be distributed
  98. Xunder the terms of this General Public License.  The "Program", below,
  99. Xrefers to any such program or work, and a "work based on the Program"
  100. Xmeans either the Program or any derivative work under copyright law:
  101. Xthat is to say, a work containing the Program or a portion of it,
  102. Xeither verbatim or with modifications and/or translated into another
  103. Xlanguage.  (Hereinafter, translation is included without limitation in
  104. Xthe term "modification".)  Each licensee is addressed as "you".
  105. X
  106. XActivities other than copying, distribution and modification are not
  107. Xcovered by this License; they are outside its scope.  The act of
  108. Xrunning the Program is not restricted, and the output from the Program
  109. Xis covered only if its contents constitute a work based on the
  110. XProgram (independent of having been made by running the Program).
  111. XWhether that is true depends on what the Program does.
  112. X
  113. X  1. You may copy and distribute verbatim copies of the Program's
  114. Xsource code as you receive it, in any medium, provided that you
  115. Xconspicuously and appropriately publish on each copy an appropriate
  116. Xcopyright notice and disclaimer of warranty; keep intact all the
  117. Xnotices that refer to this License and to the absence of any warranty;
  118. Xand give any other recipients of the Program a copy of this License
  119. Xalong with the Program.
  120. X
  121. XYou may charge a fee for the physical act of transferring a copy, and
  122. Xyou may at your option offer warranty protection in exchange for a fee.
  123. X
  124. X  2. You may modify your copy or copies of the Program or any portion
  125. Xof it, thus forming a work based on the Program, and copy and
  126. Xdistribute such modifications or work under the terms of Section 1
  127. Xabove, provided that you also meet all of these conditions:
  128. X
  129. X    a) You must cause the modified files to carry prominent notices
  130. X    stating that you changed the files and the date of any change.
  131. X
  132. X    b) You must cause any work that you distribute or publish, that in
  133. X    whole or in part contains or is derived from the Program or any
  134. X    part thereof, to be licensed as a whole at no charge to all third
  135. X    parties under the terms of this License.
  136. X
  137. X    c) If the modified program normally reads commands interactively
  138. X    when run, you must cause it, when started running for such
  139. X    interactive use in the most ordinary way, to print or display an
  140. X    announcement including an appropriate copyright notice and a
  141. X    notice that there is no warranty (or else, saying that you provide
  142. X    a warranty) and that users may redistribute the program under
  143. X    these conditions, and telling the user how to view a copy of this
  144. X    License.  (Exception: if the Program itself is interactive but
  145. X    does not normally print such an announcement, your work based on
  146. X    the Program is not required to print an announcement.)
  147. X
  148. XThese requirements apply to the modified work as a whole.  If
  149. Xidentifiable sections of that work are not derived from the Program,
  150. Xand can be reasonably considered independent and separate works in
  151. Xthemselves, then this License, and its terms, do not apply to those
  152. Xsections when you distribute them as separate works.  But when you
  153. Xdistribute the same sections as part of a whole which is a work based
  154. Xon the Program, the distribution of the whole must be on the terms of
  155. Xthis License, whose permissions for other licensees extend to the
  156. Xentire whole, and thus to each and every part regardless of who wrote it.
  157. X
  158. XThus, it is not the intent of this section to claim rights or contest
  159. Xyour rights to work written entirely by you; rather, the intent is to
  160. Xexercise the right to control the distribution of derivative or
  161. Xcollective works based on the Program.
  162. X
  163. XIn addition, mere aggregation of another work not based on the Program
  164. Xwith the Program (or with a work based on the Program) on a volume of
  165. Xa storage or distribution medium does not bring the other work under
  166. Xthe scope of this License.
  167. X
  168. X  3. You may copy and distribute the Program (or a work based on it,
  169. Xunder Section 2) in object code or executable form under the terms of
  170. XSections 1 and 2 above provided that you also do one of the following:
  171. X
  172. X    a) Accompany it with the complete corresponding machine-readable
  173. X    source code, which must be distributed under the terms of Sections
  174. X    1 and 2 above on a medium customarily used for software interchange; or,
  175. X
  176. X    b) Accompany it with a written offer, valid for at least three
  177. X    years, to give any third party, for a charge no more than your
  178. X    cost of physically performing source distribution, a complete
  179. X    machine-readable copy of the corresponding source code, to be
  180. X    distributed under the terms of Sections 1 and 2 above on a medium
  181. X    customarily used for software interchange; or,
  182. X
  183. X    c) Accompany it with the information you received as to the offer
  184. X    to distribute corresponding source code.  (This alternative is
  185. X    allowed only for noncommercial distribution and only if you
  186. X    received the program in object code or executable form with such
  187. X    an offer, in accord with Subsection b above.)
  188. X
  189. XThe source code for a work means the preferred form of the work for
  190. Xmaking modifications to it.  For an executable work, complete source
  191. Xcode means all the source code for all modules it contains, plus any
  192. Xassociated interface definition files, plus the scripts used to
  193. Xcontrol compilation and installation of the executable.  However, as a
  194. Xspecial exception, the source code distributed need not include
  195. Xanything that is normally distributed (in either source or binary
  196. Xform) with the major components (compiler, kernel, and so on) of the
  197. Xoperating system on which the executable runs, unless that component
  198. Xitself accompanies the executable.
  199. X
  200. XIf distribution of executable or object code is made by offering
  201. Xaccess to copy from a designated place, then offering equivalent
  202. Xaccess to copy the source code from the same place counts as
  203. Xdistribution of the source code, even though third parties are not
  204. Xcompelled to copy the source along with the object code.
  205. X
  206. X  4. You may not copy, modify, sublicense, or distribute the Program
  207. Xexcept as expressly provided under this License.  Any attempt
  208. Xotherwise to copy, modify, sublicense or distribute the Program is
  209. Xvoid, and will automatically terminate your rights under this License.
  210. XHowever, parties who have received copies, or rights, from you under
  211. Xthis License will not have their licenses terminated so long as such
  212. Xparties remain in full compliance.
  213. X
  214. X  5. You are not required to accept this License, since you have not
  215. Xsigned it.  However, nothing else grants you permission to modify or
  216. Xdistribute the Program or its derivative works.  These actions are
  217. Xprohibited by law if you do not accept this License.  Therefore, by
  218. Xmodifying or distributing the Program (or any work based on the
  219. XProgram), you indicate your acceptance of this License to do so, and
  220. Xall its terms and conditions for copying, distributing or modifying
  221. Xthe Program or works based on it.
  222. X
  223. X  6. Each time you redistribute the Program (or any work based on the
  224. XProgram), the recipient automatically receives a license from the
  225. Xoriginal licensor to copy, distribute or modify the Program subject to
  226. Xthese terms and conditions.  You may not impose any further
  227. Xrestrictions on the recipients' exercise of the rights granted herein.
  228. XYou are not responsible for enforcing compliance by third parties to
  229. Xthis License.
  230. X
  231. X  7. If, as a consequence of a court judgment or allegation of patent
  232. Xinfringement or for any other reason (not limited to patent issues),
  233. Xconditions are imposed on you (whether by court order, agreement or
  234. Xotherwise) that contradict the conditions of this License, they do not
  235. Xexcuse you from the conditions of this License.  If you cannot
  236. Xdistribute so as to satisfy simultaneously your obligations under this
  237. XLicense and any other pertinent obligations, then as a consequence you
  238. Xmay not distribute the Program at all.  For example, if a patent
  239. Xlicense would not permit royalty-free redistribution of the Program by
  240. Xall those who receive copies directly or indirectly through you, then
  241. Xthe only way you could satisfy both it and this License would be to
  242. Xrefrain entirely from distribution of the Program.
  243. X
  244. XIf any portion of this section is held invalid or unenforceable under
  245. Xany particular circumstance, the balance of the section is intended to
  246. Xapply and the section as a whole is intended to apply in other
  247. Xcircumstances.
  248. X
  249. XIt is not the purpose of this section to induce you to infringe any
  250. Xpatents or other property right claims or to contest validity of any
  251. Xsuch claims; this section has the sole purpose of protecting the
  252. Xintegrity of the free software distribution system, which is
  253. Ximplemented by public license practices.  Many people have made
  254. Xgenerous contributions to the wide range of software distributed
  255. Xthrough that system in reliance on consistent application of that
  256. Xsystem; it is up to the author/donor to decide if he or she is willing
  257. Xto distribute software through any other system and a licensee cannot
  258. Ximpose that choice.
  259. X
  260. XThis section is intended to make thoroughly clear what is believed to
  261. Xbe a consequence of the rest of this License.
  262. X
  263. X  8. If the distribution and/or use of the Program is restricted in
  264. Xcertain countries either by patents or by copyrighted interfaces, the
  265. Xoriginal copyright holder who places the Program under this License
  266. Xmay add an explicit geographical distribution limitation excluding
  267. Xthose countries, so that distribution is permitted only in or among
  268. Xcountries not thus excluded.  In such case, this License incorporates
  269. Xthe limitation as if written in the body of this License.
  270. X
  271. X  9. The Free Software Foundation may publish revised and/or new versions
  272. Xof the General Public License from time to time.  Such new versions will
  273. Xbe similar in spirit to the present version, but may differ in detail to
  274. Xaddress new problems or concerns.
  275. X
  276. XEach version is given a distinguishing version number.  If the Program
  277. Xspecifies a version number of this License which applies to it and "any
  278. Xlater version", you have the option of following the terms and conditions
  279. Xeither of that version or of any later version published by the Free
  280. XSoftware Foundation.  If the Program does not specify a version number of
  281. Xthis License, you may choose any version ever published by the Free Software
  282. XFoundation.
  283. X
  284. X  10. If you wish to incorporate parts of the Program into other free
  285. Xprograms whose distribution conditions are different, write to the author
  286. Xto ask for permission.  For software which is copyrighted by the Free
  287. XSoftware Foundation, write to the Free Software Foundation; we sometimes
  288. Xmake exceptions for this.  Our decision will be guided by the two goals
  289. Xof preserving the free status of all derivatives of our free software and
  290. Xof promoting the sharing and reuse of software generally.
  291. X
  292. X                NO WARRANTY
  293. X
  294. X  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  295. XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  296. XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  297. XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  298. XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  299. XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  300. XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  301. XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  302. XREPAIR OR CORRECTION.
  303. X
  304. X  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  305. XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  306. XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  307. XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  308. XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  309. XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  310. XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  311. XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  312. XPOSSIBILITY OF SUCH DAMAGES.
  313. X
  314. X             END OF TERMS AND CONDITIONS
  315. X
  316. X    Appendix: How to Apply These Terms to Your New Programs
  317. X
  318. X  If you develop a new program, and you want it to be of the greatest
  319. Xpossible use to the public, the best way to achieve this is to make it
  320. Xfree software which everyone can redistribute and change under these terms.
  321. X
  322. X  To do so, attach the following notices to the program.  It is safest
  323. Xto attach them to the start of each source file to most effectively
  324. Xconvey the exclusion of warranty; and each file should have at least
  325. Xthe "copyright" line and a pointer to where the full notice is found.
  326. X
  327. X    <one line to give the program's name and a brief idea of what it does.>
  328. X    Copyright (C) 19yy  <name of author>
  329. X
  330. X    This program is free software; you can redistribute it and/or modify
  331. X    it under the terms of the GNU General Public License as published by
  332. X    the Free Software Foundation; either version 2 of the License, or
  333. X    (at your option) any later version.
  334. X
  335. X    This program is distributed in the hope that it will be useful,
  336. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  337. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  338. X    GNU General Public License for more details.
  339. X
  340. X    You should have received a copy of the GNU General Public License
  341. X    along with this program; if not, write to the Free Software
  342. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  343. X
  344. XAlso add information on how to contact you by electronic and paper mail.
  345. X
  346. XIf the program is interactive, make it output a short notice like this
  347. Xwhen it starts in an interactive mode:
  348. X
  349. X    Gnomovision version 69, Copyright (C) 19yy name of author
  350. X    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  351. X    This is free software, and you are welcome to redistribute it
  352. X    under certain conditions; type `show c' for details.
  353. X
  354. XThe hypothetical commands `show w' and `show c' should show the appropriate
  355. Xparts of the General Public License.  Of course, the commands you use may
  356. Xbe called something other than `show w' and `show c'; they could even be
  357. Xmouse-clicks or menu items--whatever suits your program.
  358. X
  359. XYou should also get your employer (if you work as a programmer) or your
  360. Xschool, if any, to sign a "copyright disclaimer" for the program, if
  361. Xnecessary.  Here is a sample; alter the names:
  362. X
  363. X  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  364. X  `Gnomovision' (which makes passes at compilers) written by James Hacker.
  365. X
  366. X  <signature of Ty Coon>, 1 April 1989
  367. X  Ty Coon, President of Vice
  368. X
  369. XThis General Public License does not permit incorporating your program into
  370. Xproprietary programs.  If your program is a subroutine library, you may
  371. Xconsider it more useful to permit linking proprietary applications with the
  372. Xlibrary.  If this is what you want to do, use the GNU Library General
  373. XPublic License instead of this License.
  374. END_OF_FILE
  375. if test 17982 -ne `wc -c <'copying.doc'`; then
  376.     echo shar: \"'copying.doc'\" unpacked with wrong size!
  377. fi
  378. # end of 'copying.doc'
  379. fi
  380. if test -f 'src/ccr-std.t' -a "${1}" != "-c" ; then 
  381.   echo shar: Will not clobber existing file \"'src/ccr-std.t'\"
  382. else
  383. echo shar: Extracting \"'src/ccr-std.t'\" \(18170 characters\)
  384. sed "s/^X//" >'src/ccr-std.t' <<'END_OF_FILE'
  385. X/*
  386. X * Colossal Cave Revisited
  387. X *
  388. X * A remake of Willie Crowther and Don Woods' classic Adventure.
  389. X * Converted from Donald Ekman's PC port of the original FORTRAN source.
  390. X * TADS version by David M. Baggett for ADVENTIONS.
  391. X *
  392. X * Please document all changes in the history so we know who did what.
  393. X *
  394. X * This source code is copylefted under the terms of the GNU Public
  395. X * License.  Essentially, this means that you are free to do whatever
  396. X * you wish with this source code, provided you do not charge any
  397. X * money for it or for any derivative works.
  398. X *
  399. X * ADVENTIONS distributes this game, but you are free to do what you will
  400. X * with it, provided you adhere to the terms in the GNU Public License.
  401. X * Send correspondence regarding this game or original works distributed
  402. X * by ADVENTIONS to 
  403. X *
  404. X *    ADVENTIONS
  405. X *    PO Box 851
  406. X *    Columbia, MD 21044
  407. X *
  408. X * If you would like a catalog of releases, please enclose a SASE.  Thanks!
  409. X *
  410. X * Contributors
  411. X *
  412. X *    dmb    In real life:    David M. Baggett
  413. X *        Internet:    <dmb@ai.mit.edu>
  414. X *        Compu$erve:    76440,2671 (ADVENTIONS account)
  415. X *        GEnie:        ADVENTIONS
  416. X *
  417. X * Modification History
  418. X *
  419. X * 1-Jan-93    dmb    rec.arts.int-fiction BETA release (source only)
  420. X *                      For beta testing only -- not for general
  421. X *            distribution.
  422. X *
  423. X */
  424. X
  425. X/*
  426. X * This file includes the typical standard definitions.
  427. X */
  428. Xcheck_for_closing: function;
  429. Xcheck_for_endgame: function;
  430. Xmakend: function;
  431. X
  432. X/*
  433. X * This is the program's entry point.
  434. X */
  435. Xinit: function
  436. X{
  437. X    local l;
  438. X
  439. X    "\b\b\b\b";
  440. X    version.sdesc;    // display the game's name and version number
  441. X    "\b";
  442. X
  443. X    //
  444. X    // See if the player wants an easy or normal game.  (This
  445. X    // was the "Do you want instructions?" query in the original.)
  446. X    // In novice mode the lamp batteries last longer.
  447. X    //
  448. X    // It might also make sense to make some other things easier, like
  449. X    // the number of dwarves or their tenacity, but for now we only make
  450. X    // the change that was made for the original's novice mode.
  451. X    //
  452. X    // Novice mode costs the player global.novicepoints.
  453. X    //
  454. X    "Shall I go easy on you this game?  (An easy game will cost you ";
  455. X    say(-1 * global.novicepoints); " points.)\n>";
  456. X    if (yorn()) {
  457. X        incscore(global.novicepoints);
  458. X
  459. X        //
  460. X        // Change some stuff to make the game easier.
  461. X        //
  462. X        brass_lantern.turnsleft := 1000;
  463. X    }
  464. X
  465. X    "\b";
  466. X
  467. X    //
  468. X    // Randomize after the first turn.  (This allows us to make a verb
  469. X    // that prevents randomization for regression testing.)
  470. X    //
  471. X    setfuse(makend, 1, nil);
  472. X    
  473. X    setdaemon(turncount, nil);        // start turn counter daemon
  474. X    setdaemon(check_for_closing, nil);    // start cave closing daemon
  475. X    setdaemon(check_for_endgame, nil);    // start endgame daemon
  476. X    Me.location := At_End_Of_Road;        // move player -> 1st location
  477. X    Me.location.lookAround(true);        // show player where he is
  478. X
  479. X    //
  480. X    // Initialize non-player characters (dwarves, pirate) if we're
  481. X    // in debug mode.  Otherwise do it from preinit.
  482. X    //
  483. X    if (global.debug)
  484. X        initNPC();
  485. X
  486. X    //
  487. X    // Check room connections for integrity.
  488. X    //
  489. X    check_connections();
  490. X}
  491. Xmakend: function(parm)
  492. X{
  493. X    if (global.nondeterministic) {
  494. X        randomize();
  495. X    }
  496. X    else {
  497. X        "\b*** This will be a deterministic game. ***";
  498. X    }
  499. X
  500. X    //
  501. X    // Once we've randomized (if we're going to at all), place
  502. X    // all the NPC's.
  503. X    //
  504. X    Dwarves.place;
  505. X    notify(Dwarves, &move, 0);
  506. X
  507. X    Pirates.place;
  508. X    notify(Pirates, &move, 0);
  509. X}
  510. X
  511. X/*
  512. X * The following function is run at compile time to build lists and
  513. X * do other compute-intensive things ahead of time.
  514. X */
  515. Xpreinit: function
  516. X{
  517. X    local o;
  518. X
  519. X    //
  520. X    // Construct list of light sources
  521. X    //
  522. X    global.lamplist := [];
  523. X    o := firstobj(lightsource);
  524. X    while (o <> nil) {
  525. X        global.lamplist := global.lamplist + o;
  526. X        o := nextobj(o, lightsource);
  527. X    }
  528. X
  529. X    //
  530. X    // Count treasures to get initial number of treasures
  531. X    // left to find.
  532. X    //
  533. X    global.treasures := 0;
  534. X    o := firstobj(CCR_treasure_item);
  535. X    while (o <> nil) {
  536. X        global.treasurelist := global.treasurelist + o;
  537. X        global.treasures := global.treasures + 1;
  538. X
  539. X        o := nextobj(o, CCR_treasure_item);
  540. X    }
  541. X
  542. X    //
  543. X    // Initialize non-player characters (dwarves, pirate) from
  544. X    // here if we're not in debug mode.  Otherwise do it in init.
  545. X    //
  546. X    if (not global.debug)
  547. X        initNPC();
  548. X}
  549. X
  550. Xdie: function
  551. X{
  552. X    local    resurrect;
  553. X
  554. X    P(); I();
  555. X
  556. X    // DMB: "reincarnate" in the text below should actually
  557. X    // be "resurrect," since presumably you're coming back
  558. X    // as the same person you were before.  I have left the
  559. X    // original text as is, however, for the sake of purity.
  560. X
  561. X    resurrect := nil;    // assume no resurrection
  562. X
  563. X    if (global.closed) {
  564. X        "It looks as though you're dead.  Well, seeing as how 
  565. X        it's so close to closing time anyway, I think we'll 
  566. X        just call it a day.";
  567. X
  568. X        call_it_a_day();
  569. X    }
  570. X    else if (global.deaths = 0) {
  571. X        "Oh dear, you seem to have gotten yourself killed.  I 
  572. X        might be able to help you out, but I've never really 
  573. X        done this before.  Do you want me to try to 
  574. X        reincarnate you?\b>";
  575. X
  576. X        if (yorn()) {
  577. X            "\bAll right.  But don't blame me if something 
  578. X            goes wr...... \b \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
  579. X            \ \ \ \ \ \ --- POOF!! --- \bYou are engulfed 
  580. X            in a cloud of orange smoke.  Coughing and 
  581. X            gasping, you emerge from the smoke and 
  582. X            find that you're....";
  583. X
  584. X            resurrect := true;
  585. X        }
  586. X        else
  587. X            "\bVery well.";
  588. X    }
  589. X    else if (global.deaths = 1) {
  590. X        "You clumsy oaf, you've done it again!  I don't know 
  591. X        how long I can keep this up.  Do you want me to try 
  592. X        reincarnating you again?\b>";
  593. X
  594. X        if (yorn()) {
  595. X            "\bOkay, now where did I put my orange 
  596. X            smoke?....  >POOF!<\bEverything disappears in 
  597. X            a dense cloud of orange smoke.";
  598. X
  599. X            resurrect := true;
  600. X        }
  601. X        else
  602. X            "\bProbably a wise choice.";
  603. X    }
  604. X    else if (global.deaths = 2) {
  605. X        "Now you've really done it!  I'm out of orange smoke! 
  606. X        You don't expect me to do a decent reincarnation 
  607. X        without any orange smoke, do you?\b>";
  608. X
  609. X        if (yorn()) {
  610. X            "\bOkay, if you're so smart, do it yourself!  
  611. X            I'm leaving!";
  612. X        }
  613. X        else
  614. X            "\bI thought not!";
  615. X    }
  616. X
  617. X    global.deaths := global.deaths + 1;
  618. X    incscore(global.deathpoints);
  619. X
  620. X    if (resurrect) {
  621. X        //
  622. X        // Resurrection:
  623. X        //
  624. X        // 1) Drop all player's items where he was killed.
  625. X        // 2) Move lamp outside of building and turn it off.
  626. X        // 3) Move the player into the building.
  627. X        //
  628. X        while (length(Me.contents) > 0)
  629. X            Me.contents[1].moveInto(Me.location);
  630. X        brass_lantern.turnoff;
  631. X        brass_lantern.moveInto(At_End_Of_Road);
  632. X
  633. X        "\b";
  634. X        Me.travelTo(Inside_Building);
  635. X    }
  636. X    else {
  637. X        //
  638. X        // Player's done for good -- show score and quit.
  639. X        //
  640. X        scoreRank();
  641. X        terminate();
  642. X        quit();
  643. X        abort;
  644. X    }
  645. X}
  646. X
  647. X/*
  648. X * The player loses without any chance of reincarnation (for example,
  649. X * if his batteries run out.)
  650. X */
  651. Xcall_it_a_day: function
  652. X{
  653. X    scoreRank();
  654. X    terminate();
  655. X    quit();
  656. X    abort;
  657. X}
  658. X
  659. X/*
  660. X * The player has finished the game on a positive note.
  661. X */
  662. Xwin: function
  663. X{
  664. X    scoreRank();
  665. X    terminate();
  666. X    quit();
  667. X    abort;
  668. X}
  669. X
  670. X/*
  671. X * Show score and ranking
  672. X */
  673. XscoreRank: function
  674. X{
  675. X    local    pn;
  676. X
  677. X    "You have scored "; say(global.score); " out of a possible ";
  678. X    say(global.maxscore); ", using "; say(global.turnsofar);
  679. X    if (global.turnsofar = 1)
  680. X        " turn.";
  681. X    else
  682. X        " turns.";
  683. X
  684. X    "\n";
  685. X        
  686. X    if (global.score < 35) {
  687. X        //
  688. X        // DMB: This originally said, "Better luck next time,"
  689. X        // but this isn't really appropriate anymore since
  690. X        // we now give the player his ranking when he types
  691. X        // \"score.\"  (In the original, you only got your
  692. X        // rank when the game was over.)
  693. X        //
  694. X        "You are obviously a rank amateur.";
  695. X        pn := 35 - global.score;
  696. X    }
  697. X    else if (global.score < 100) {
  698. X        "Your score qualifies you as a Novice Class adventurer.";
  699. X        pn := 100 - global.score;
  700. X    }
  701. X    else if (global.score < 130) {
  702. X        "You have achieved the rating: \"Experienced Adventurer\".";
  703. X        pn := 130 - global.score;
  704. X    }
  705. X    else if (global.score < 200) {
  706. X        "You may now consider yourself a \"Seasoned Adventurer\".";
  707. X        pn := 200 - global.score;
  708. X    }
  709. X    else if (global.score < 250) {
  710. X        "You have reached \"Junior Master\" status.";
  711. X        pn := 250 - global.score;
  712. X    }
  713. X    else if (global.score < 300) {
  714. X        "Your score puts you in Master Adventurer Class C.";
  715. X        pn := 300 - global.score;
  716. X    }
  717. X    else if (global.score < 330) {
  718. X        "Your score puts you in Master Adventurer Class B.";
  719. X        pn := 330 - global.score;
  720. X    }
  721. X    else if (global.score < 349) {
  722. X        "Your score puts you in Master Adventurer Class A.";
  723. X        pn := 349 - global.score;
  724. X    }
  725. X    else {
  726. X        "All of Adventuredom gives tribute to you, Adventurer
  727. X        Grandmaster!";
  728. X
  729. X        pn := 0;
  730. X    }
  731. X
  732. X    "\n";
  733. X
  734. X    if (pn > 0) {
  735. X        "To achieve the next higher rating, you need ";
  736. X        say(pn); " more ";
  737. X
  738. X        if (pn = 1)
  739. X            "point.";
  740. X        else
  741. X            "points.";
  742. X    }
  743. X    else
  744. X        "To achieve the next higher rating would be a neat trick!";
  745. X    
  746. X    "\n";
  747. X}
  748. X
  749. X/*
  750. X * Print a nice message when we exit.
  751. X */
  752. Xterminate: function
  753. X{
  754. X    "\b";
  755. X    "Come back and visit the newly remodelled Colossal Cave soon!";
  756. X}
  757. X
  758. X/*
  759. X * What we say when the user enters a blank line.
  760. X */
  761. Xpardon: function
  762. X{
  763. X    "What?";
  764. X}
  765. X
  766. X/*
  767. X *   The numObj object is used to convey a number to the game whenever
  768. X *   the player uses a number in his command.  For example, "turn dial
  769. X *   to 621" results in an indirect object of numObj, with its "value"
  770. X *   property set to 621.
  771. X */
  772. XnumObj: basicNumObj;  // use default definition from adv.t
  773. X
  774. X/*
  775. X *   strObj works like numObj, but for strings.  So, a player command of
  776. X *     type "hello" on the keyboard
  777. X *   will result in a direct object of strObj, with its "value" property
  778. X *   set to the string 'hello'.
  779. X *
  780. X *   Note that, because a string direct object is used in the save, restore,
  781. X *   and script commands, this object must handle those commands.
  782. X */
  783. XstrObj: basicStrObj;     // use default definition from adv.t
  784. X
  785. X/*
  786. X *   The "global" object is the dumping ground for any data items that
  787. X *   don't fit very well into any other objects.  The properties of this
  788. X *   object that are particularly important to the objects and functions
  789. X *   are defined here; if you replace this object, but keep other parts
  790. X *   of this file, be sure to include the properties defined here.
  791. X */
  792. Xglobal: object
  793. X    //
  794. X    // Scoring values
  795. X    // Points for treasures are kept in the treasures themselves.
  796. X    //
  797. X    score = 36        // start out with 36 points:
  798. X                // (2 + (-1 * quitpoints) +
  799. X                // (-1 * deathpoints) * 3)
  800. X    maxscore = 350        // maximum possible score
  801. X    novicepoints = -5    // points for playing in easy mode (neg.)
  802. X    quitpoints = -4        // points for quitting (neg.)
  803. X    deathpoints = -10    // points gained each time player dies (neg.)
  804. X    farinpoints = 25    // points for getting well into the cave
  805. X    wittpoints = 1        // points for reaching Witt's End
  806. X    closingpoints = 25    // points for surviving until cave closing time
  807. X    endpoints = 10        // points for getting to final puzzle
  808. X    almostpoints = 20    // points for *almost* getting final puzzle
  809. X    winpoints = 35        // points for winning the final puzzle
  810. X
  811. X    treasures = 0        // treasures left to deposit;
  812. X                // filled in by preinit
  813. X    treasurelist = []    // list of all treasures in the game;
  814. X                // filled in by preinit
  815. X
  816. X    //
  817. X    // NPC stuff
  818. X    //
  819. X    dwarves = 5        // number of dwarves wandering about the cave
  820. X                // (Was 5 in original.)
  821. X    pirates = 1        // number of pirates lurking in the cave
  822. X                // (Was 1 in original.)
  823. X
  824. X    dtenacity = 96        // percentage chance that a dwarf will
  825. X                // follow the player if in an adjacent
  826. X                // location.  (Was 100 in original.)
  827. X    ptenacity = 50        // percentage chance that a pirate will
  828. X                // follow the player if in an adjacent
  829. X                // location.  Don't set this too high or
  830. X                // the game will get really bogus!
  831. X
  832. X    //
  833. X    // Where to start dwarves and pirate(s) out.  Dwarves are placed
  834. X    // in the locations given by drawfloc; if no locations remain when
  835. X    // we're placing a dwarf, we just put him in a random room selected
  836. X    // from NPCrooms.
  837. X    //
  838. X    // Note that the player gets the axe from the dwarf, so it's
  839. X    // fairly important to put at least dwarf early on (but only
  840. X    // in a room that's not off limits to NPC's!)
  841. X    //
  842. X    // Ditto for pirate(s).
  843. X    //
  844. X    dwarfloc = [
  845. X        In_Hall_Of_Mists
  846. X    ]
  847. X    pirateloc = []
  848. X
  849. X    dwarfattack = 75    // percentage chance that a dwarf will
  850. X                // throw a knife at the player if he's
  851. X                // in the same location.  (Was 100 in
  852. X                // the original.)
  853. X    dwarfhit = 66        // percentage chance the player will
  854. X                // hit a dwarf with his axe
  855. X                // (Was 1 in 3 chance in the original.)
  856. X    dwarfaccuracy = 9    // percentage chance that a dwarf will
  857. X                // hit the player with a thrown knife
  858. X                // (Was 9.5 in the original.)
  859. X
  860. X    //
  861. X    // Output formatting
  862. X    //
  863. X    verbose = nil        // we are currently in TERSE mode
  864. X    indent = true        // indent paragraph beginnings
  865. X    doublespace = true    // double space the text
  866. X
  867. X    //
  868. X    // Other stuff
  869. X    //
  870. X    deaths = 0        // number of times the player has died
  871. X    closingtime = 30    // close this many turns after player takes
  872. X                // the last treasure.  (was 30 in original)
  873. X    bonustime = 20        // start endgame this many turns after
  874. X                // the cave closes.  In the original this
  875. X                // was 50, but since we've change things
  876. X                // slightly (the closing timer starts once
  877. X                // the player deposits the last treasure in
  878. X                // the building, not once he merely *sees*
  879. X                // it), we've had to make this value smaller.
  880. X                // If we were to leave it the way it was,
  881. X                // it would be very hard to finish the game
  882. X                // before the lamp batteries died.
  883. X    panictime = 15        // extend timer by this many turns when player
  884. X                // panics at closing time
  885. X
  886. X    closed = nil        // is the cave closed yet?
  887. X
  888. X    turnsofar = 0        // no turns have transpired so far 
  889. X    lamplist = []        // list of all known light providers
  890. X                // in the game
  891. X    NPCrooms = []        // list of rooms NPC's (dwarves, pirate)
  892. X                // can go to
  893. X
  894. X    //
  895. X    // Special wizard stuff.  Don't mess with it!
  896. X    //
  897. X    nondeterministic = true    // default to nondeterministic game
  898. X    debug = nil        // debugging messages on/off
  899. X;
  900. X
  901. X/*
  902. X *   The "version" object defines, via its "sdesc" property, the name and
  903. X *   version number of the game.  Change this to a suitable name for your
  904. X *   game.
  905. X */
  906. Xversion: object
  907. X    sdesc = {
  908. X        "\(Colossal Cave Revisited\)\n
  909. X        Version 1.0, released April 1993.\b";
  910. X
  911. X        "A remake of Willie Crowther and Don Woods' classic
  912. X        Adventure.\n Converted from Donald Ekman's PC port of 
  913. X        the original FORTRAN source.\n TADS version by David 
  914. X        M.\ Baggett for \(ADVENTIONS\).\b";
  915. X
  916. X        "\(Colossal Cave Revisited\) and its accompanying 
  917. X        source code are\n Copyright (C) 1993 David M.\ 
  918. X        Baggett."; P();
  919. X
  920. X        I(); "This program is free software; you can 
  921. X        redistribute it and/or modify it under the terms of 
  922. X        version 2 of the GNU General Public License as 
  923. X        published by the Free Software Foundation."; P();
  924. X
  925. X        I(); "This program is distributed in the hope that it 
  926. X        will be useful, but WITHOUT ANY WARRANTY; without 
  927. X        even the implied warranty of MERCHANTABILITY or 
  928. X        FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
  929. X        General Public License for more details."; P();
  930. X
  931. X        I(); "You should have received a copy of the GNU 
  932. X        General Public License along with this program; if 
  933. X        not, write to the Free Software Foundation, Inc., 675 
  934. X        Mass Ave, Cambridge, MA 02139, USA."; P();
  935. X
  936. X        I(); "\(ADVENTIONS\) distributes this game, but you are 
  937. X        free to do what you will with it, provided you adhere 
  938. X        to the terms in the GNU Public License v2. Send 
  939. X        correspondence regarding this game or other works 
  940. X        distributed by \(ADVENTIONS\) to"; P();
  941. X
  942. X        "\t\(ADVENTIONS\)\n
  943. X         \tPO Box 851\n
  944. X         \tColumbia, MD 21044"; P();
  945. X
  946. X        I(); "If you want to report a bug or typo, be sure to 
  947. X        include the version number of the copy you are 
  948. X        playing, as well as the configuration of the machine 
  949. X        you are running it on."; P();
  950. X
  951. X        I(); "\(ADVENTIONS\) has many other games like this 
  952. X        available, including adventures in the popular 
  953. X        Unnkulian saga.  Send a self-addressed, stamped 
  954. X        envelope to the address above for a current catalog 
  955. X        of our releases, or drop us email online:\b
  956. X
  957. X        \tCompuserve:\t76440,2671\n
  958. X        \tGEnie:\t\tADVENTIONS\n
  959. X        \tInternet:\tdmb@ai.mit.edu\b
  960. X
  961. X        or on the following BBS's:\b
  962. X
  963. X        \tFANTAZIA (410) 521-5636 (8N1)\n
  964. X        \tHigh Energy BBS (415) 493-2420 (8N1)"; P();
  965. X
  966. X        "***"; P();
  967. X
  968. X        I(); "Most game companies have abandoned interactive 
  969. X        fiction because it isn't profitable enough.  We think 
  970. X        that interactive novels are exciting and important 
  971. X        elements of the gaming world that offer possibilities 
  972. X        currently impossible to explore in graphics-oriented 
  973. X        settings.  We spend as much time on our games as 
  974. X        \"normal\" authors spend on novels.  Please support 
  975. X        us to help keep the interactive fiction genre alive.  
  976. X        Thanks, and have fun!"; P();
  977. X
  978. X        "***";
  979. X    }
  980. X;
  981. X
  982. X/*
  983. X *   "Me" is the player's actor.  Pick up the default definition, basicMe,
  984. X *   from "adv.t".
  985. X */
  986. XMe: basicMe
  987. X    panicked = nil    // has the player panicked after closing time?
  988. X    
  989. X    // The original code only allowed the player to carry
  990. X    // seven objects at a time.  Weight wasn't taken into
  991. X    // consideration.
  992. X
  993. X    maxbulk = 7
  994. X
  995. X    //
  996. X    // Give the player points for getting a fair ways into
  997. X    // the cave.
  998. X    //
  999. X    awardedpointsforgettingfarin = nil
  1000. X    travelTo(room) = {
  1001. X        if (room = nil)
  1002. X            pass travelTo;
  1003. X        else if (global.closed and room.isoutside) {
  1004. X            "A mysterious recorded voice groans into life 
  1005. X            and announces, \"This exit is closed.  Please 
  1006. X            leave via main office.\"";
  1007. X
  1008. X            if (not self.panicked) {
  1009. X                self.panicked := true;
  1010. X
  1011. X                //
  1012. X                // The player is obviously panicking
  1013. X                // at closing time and is desperately
  1014. X                // trying to get out.  In the original
  1015. X                // code the endgame timer is (erroneously?)
  1016. X                // set to 15 in this circumstance.
  1017. X                //
  1018. X                // Comments in the code suggest that the
  1019. X                // intention was to *extend* the timer
  1020. X                // by 15, so we'll do that here.
  1021. X                //
  1022. X                global.bonustime := global.bonustime +
  1023. X                    global.panictime;
  1024. X            }
  1025. X            
  1026. X            return;        // no pass travelTo
  1027. X        }
  1028. X        else if (not self.awardedpointsforgettingfarin) {
  1029. X            if (not room.notfarin) {
  1030. X                incscore(global.farinpoints);
  1031. X                self.awardedpointsforgettingfarin := true;
  1032. X            }
  1033. X        }
  1034. X
  1035. X        pass travelTo;
  1036. X    }
  1037. X;
  1038. X
  1039. X/*
  1040. X * darkTravel() is called whenever the player attempts to move from a dark
  1041. X * location into another dark location.
  1042. X *
  1043. X * This isn't quite the way the original worked, but it's close enough.
  1044. X */
  1045. XdarkTravel: function
  1046. X{
  1047. X    "It is now pitch dark.  If you proceed you will likely fall 
  1048. X    into a pit."; 
  1049. X
  1050. X    /*
  1051. X     * 1 in 4 chance of death.
  1052. X     */
  1053. X    if (rand(4) = 1) {
  1054. X        P(); I();
  1055. X        "You fell into a pit and broke every bone in your body!";
  1056. X        die();
  1057. X    }
  1058. X}
  1059. END_OF_FILE
  1060. if test 18170 -ne `wc -c <'src/ccr-std.t'`; then
  1061.     echo shar: \"'src/ccr-std.t'\" unpacked with wrong size!
  1062. fi
  1063. # end of 'src/ccr-std.t'
  1064. fi
  1065. if test -f 'src/ccr-verb.t' -a "${1}" != "-c" ; then 
  1066.   echo shar: Will not clobber existing file \"'src/ccr-verb.t'\"
  1067. else
  1068. echo shar: Extracting \"'src/ccr-verb.t'\" \(17740 characters\)
  1069. sed "s/^X//" >'src/ccr-verb.t' <<'END_OF_FILE'
  1070. X/*
  1071. X * Colossal Cave Revisited
  1072. X *
  1073. X * A remake of Willie Crowther and Don Woods' classic Adventure.
  1074. X * Converted from Donald Ekman's PC port of the original FORTRAN source.
  1075. X * TADS version by David M. Baggett for ADVENTIONS.
  1076. X *
  1077. X * Please document all changes in the history so we know who did what.
  1078. X *
  1079. X * This source code is copylefted under the terms of the GNU Public
  1080. X * License.  Essentially, this means that you are free to do whatever
  1081. X * you wish with this source code, provided you do not charge any
  1082. X * money for it or for any derivative works.
  1083. X *
  1084. X * ADVENTIONS distributes this game, but you are free to do what you will
  1085. X * with it, provided you adhere to the terms in the GNU Public License.
  1086. X * Send correspondence regarding this game or original works distributed
  1087. X * by ADVENTIONS to 
  1088. X *
  1089. X *    ADVENTIONS
  1090. X *    PO Box 851
  1091. X *    Columbia, MD 21044
  1092. X *
  1093. X * If you would like a catalog of releases, please enclose a SASE.  Thanks!
  1094. X *
  1095. X * Contributors
  1096. X *
  1097. X *    dmb    In real life:    David M. Baggett
  1098. X *        Internet:    <dmb@ai.mit.edu>
  1099. X *        Compu$erve:    76440,2671 (ADVENTIONS account)
  1100. X *        GEnie:        ADVENTIONS
  1101. X *
  1102. X * Modification History
  1103. X *
  1104. X *  1-Jan-93    dmb    rec.arts.int-fiction BETA release (source only)
  1105. X *                      For beta testing only -- not for general
  1106. X *            distribution.
  1107. X * 20-Apr-93    dmb    Added a few verbs for regression testing.
  1108. X *
  1109. X */
  1110. X
  1111. X/*
  1112. X * This file defines new verbs, including the myriad new travel verbs.
  1113. X */
  1114. X
  1115. X/*
  1116. X * system verbs
  1117. X */
  1118. XspaceVerb: deepverb
  1119. X    sdesc = "space"
  1120. X    verb = 'space'
  1121. X     action(actor) = {
  1122. X        if (global.doublespace) {
  1123. X            "Now single-spacing text.";
  1124. X            global.doublespace := nil;
  1125. X        }
  1126. X        else {
  1127. X            "Now double-spacing text.";
  1128. X            global.doublespace := true;
  1129. X        }
  1130. X
  1131. X        abort;    /* doesn't count as a turn */
  1132. X     }
  1133. X;
  1134. XindentVerb: deepverb
  1135. X    sdesc = "indent"
  1136. X    verb = 'indent'
  1137. X     action(actor) = {
  1138. X        if (global.indent) {
  1139. X            "Paragraph indentation now off.";
  1140. X            global.indent := nil;
  1141. X        }
  1142. X        else {
  1143. X            "Paragraph indentation now on.";
  1144. X            global.indent := true;
  1145. X        }
  1146. X        
  1147. X        abort;    /* doesn't count as a turn */
  1148. X     }
  1149. X;
  1150. Xdeterministicverb: deepverb
  1151. X    verb = 'deterministic' 'norandom' 'norandomize'
  1152. X    action(actor) = { global.nondeterministic := nil; }
  1153. X;
  1154. Xnodwarves: deepverb
  1155. X    verb = 'nodwarf' 'nodwarves'
  1156. X    action(actor) = {
  1157. X        Dwarves.loclist := [];
  1158. X        Pirates.loclist := [];
  1159. X        "\b*** Dwarves and pirates disabled. ***\n";
  1160. X        treasure_chest.moveInto(Dead_End_13);
  1161. X    }
  1162. X;
  1163. X/*
  1164. X * Special and/or magic verbs
  1165. X */
  1166. XyesVerb: deepverb
  1167. X    //
  1168. X    // This is a hack to allow the following:
  1169. X    //
  1170. X    // >kill dragon
  1171. X    // With what, your bare hands?
  1172. X    // >yes
  1173. X    //
  1174. X    sdesc = "answer yes to"
  1175. X    verb = 'yes' 'uh-huh' 'uhuh' 'yea' 'yeah' 'yup' 'sure' 'yep'
  1176. X
  1177. X    action(actor) = {
  1178. X        //
  1179. X        // If we asked "with your bear hands?" last turn,
  1180. X        // do special stuff.
  1181. X        //
  1182. X        if (Dragon.rhetoricalturn = global.turnsofar - 1)
  1183. X            Dragon.kill;
  1184. X        else if (Bear.rhetoricalturn = global.turnsofar - 1)
  1185. X            Bear.nicetry;
  1186. X        else if (Dwarves.rhetoricalturn = global.turnsofar - 1)
  1187. X            Dwarves.nicetry;
  1188. X        else
  1189. X            "You're sounding awfully positive!";
  1190. X    }
  1191. X;
  1192. X
  1193. XfeeVerb: deepverb
  1194. X    said = nil
  1195. X
  1196. X    sdesc = "fee"
  1197. X    verb = 'fee'
  1198. X    action(actor) = {
  1199. X        if (self.said)
  1200. X            self.fail;
  1201. X        else {
  1202. X            "Ok!";
  1203. X            fieVerb.tcount := global.turnsofar + 1;
  1204. X            foeVerb.tcount := global.turnsofar + 2;
  1205. X            fooVerb.tcount := global.turnsofar + 3;
  1206. X            self.said := true;
  1207. X            fieVerb.said := nil;
  1208. X            foeVerb.said := nil;
  1209. X        }
  1210. X    }
  1211. X
  1212. X    fail = {
  1213. X        if (self.said) {
  1214. X            "What's the matter, can't you read?  Now 
  1215. X            you'd best start over. ";
  1216. X        }
  1217. X        else {
  1218. X            "Nothing happens.";
  1219. X        }
  1220. X
  1221. X        self.reset;
  1222. X    }
  1223. X
  1224. X    reset = {
  1225. X        fieVerb.tcount := -1;
  1226. X        foeVerb.tcount := -1;
  1227. X        fooVerb.tcount := -1;
  1228. X
  1229. X        self.said := nil;
  1230. X        fieVerb.said := nil;
  1231. X        foeVerb.said := nil;
  1232. X    }
  1233. X;
  1234. XfieVerb: deepverb
  1235. X    said = nil
  1236. X    tcount = -1
  1237. X    sdesc = "fie"
  1238. X    verb = 'fie'
  1239. X    action(actor) = {
  1240. X        if (self.tcount = global.turnsofar) {
  1241. X            self.said := true;
  1242. X            "Ok!";
  1243. X        }
  1244. X        else
  1245. X            feeVerb.fail;
  1246. X    }
  1247. X;
  1248. XfoeVerb: deepverb
  1249. X    said = nil
  1250. X    tcount = -1
  1251. X    sdesc = "foe"
  1252. X    verb = 'foe'
  1253. X    action(actor) = {
  1254. X        if (not fieVerb.said)
  1255. X            feeVerb.fail;
  1256. X        else if (self.tcount = global.turnsofar) {
  1257. X            self.said := true;
  1258. X            "Ok!";
  1259. X        }
  1260. X        else
  1261. X            feeVerb.fail;
  1262. X    }
  1263. X;
  1264. XfooVerb: deepverb
  1265. X    tcount = -1
  1266. X    sdesc = "foo"
  1267. X    verb = 'foo'
  1268. X    action(actor) = {
  1269. X        if (not foeVerb.said)
  1270. X            feeVerb.fail;
  1271. X        else if (self.tcount = global.turnsofar) {
  1272. X            if (golden_eggs.isIn(In_Giant_Room))
  1273. X                "Nothing happens.";
  1274. X            else {
  1275. X                if (golden_eggs.isIn(Me.location))
  1276. X                    "The nest of golden eggs has 
  1277. X                    vanished!";
  1278. X                else
  1279. X                    "Done!";
  1280. X
  1281. X                golden_eggs.moveInto(In_Giant_Room);
  1282. X
  1283. X                if (golden_eggs.isIn(Me.location)) {
  1284. X                    P(); I();
  1285. X                    "A large nest full of golden 
  1286. X                    eggs suddenly appears out of 
  1287. X                    nowhere!";
  1288. X                }
  1289. X            }
  1290. X
  1291. X            feeVerb.reset;
  1292. X        }
  1293. X        else
  1294. X            feeVerb.fail;
  1295. X    }
  1296. X;
  1297. XfumVerb: deepverb
  1298. X    sdesc = "fum"
  1299. X    verb = 'fum'
  1300. X    action(actor) = {
  1301. X        feeVerb.fail;
  1302. X    }
  1303. X;
  1304. X
  1305. XlosingmagicVerb: deepverb
  1306. X    sdesc = "foobar"
  1307. X    verb = 'sesame' 'open-sesame' 'opensesame' 'abracadabra'
  1308. X        'shazam' 'shazzam' 'hocus' 'pocus' 'hokus' 'pokus'
  1309. X        'hocuspocus' 'hocus-pocus' 'hokuspokus' 'hokus-pokus'
  1310. X        'foobar'
  1311. X    action(actor) = {
  1312. X        "Good try, but that is an old worn-out magic word.";
  1313. X    }
  1314. X;
  1315. X
  1316. X/*
  1317. X * new general-purpose verbs.
  1318. X */
  1319. XhelpVerb: deepverb
  1320. X    sdesc = "help"
  1321. X    verb = 'help' 'info' 'information'
  1322. X    action(actor) = { help(); }
  1323. X;
  1324. XwaveVerb: deepverb
  1325. X    sdesc = "wave"
  1326. X    verb = 'wave' 'shake'
  1327. X    doAction = 'Wave'
  1328. X;
  1329. X
  1330. XbreakVerb: deepverb
  1331. X    sdesc = "break"
  1332. X    verb = 'break' 'destroy' 'damage' 'bust' 'mangle' 'smash'
  1333. X    doAction = 'Break'
  1334. X;
  1335. X
  1336. XsmellVerb: deepverb
  1337. X    sdesc = "smell"
  1338. X    verb = 'smell' 'sniff' 'waft'
  1339. X    doAction = 'Smell'
  1340. X;
  1341. X
  1342. XrubVerb: deepverb
  1343. X    sdesc = "rub"
  1344. X    verb = 'rub' 'caress' 'fondle' 'pat' 'pet' 'hug' 'cuddle' 'squeeze'
  1345. X    doAction = 'Rub'
  1346. X;
  1347. X
  1348. XcountVerb: deepverb
  1349. X    verb = 'count'
  1350. X    sdesc = "count"
  1351. X    doAction = 'Count'
  1352. X;
  1353. X
  1354. XtieVerb: deepverb
  1355. X    sdesc = "tie"
  1356. X    verb = 'tie' 'knot'
  1357. X    doAction = 'Tie'
  1358. X;
  1359. X
  1360. XuntieVerb: deepverb
  1361. X    sdesc = "untie"
  1362. X    verb = 'untie' 'unknot'
  1363. X    doAction = 'Untie'
  1364. X;
  1365. X
  1366. XpourVerb: deepverb
  1367. X    sdesc = "pour"
  1368. X    verb = 'pour' 'dump'
  1369. X    prepDefault = onPrep
  1370. X    ioAction(onPrep) = 'PourOn'
  1371. X;
  1372. XdouseVerb: deepverb
  1373. X    sdesc = "douse"
  1374. X    verb = 'douse' 'drench'
  1375. X    prepDefault = withPrep
  1376. X    ioAction(withPrep) = 'DouseWith'
  1377. X;
  1378. X
  1379. XoilVerb: deepverb
  1380. X    sdesc = "oil"
  1381. X    verb = 'oil' 'grease' 'lubricate'
  1382. X    doAction = 'Oil'
  1383. X;
  1384. X
  1385. XwaterVerb: deepverb
  1386. X    sdesc = "water"
  1387. X    verb = 'water'
  1388. X    doAction = 'Water'
  1389. X;
  1390. X
  1391. XkickVerb: deepverb
  1392. X    sdesc = "kick"
  1393. X    verb = 'kick' 'knee'
  1394. X    doAction = 'Kick'
  1395. X;
  1396. X
  1397. XsingVerb: deepverb
  1398. X    sdesc = "sing"
  1399. X    verb = 'sing' 'whistle'
  1400. X    doAction = 'Sing'
  1401. X    action(actor) = { "You don't sound half bad.    But don't quit your day job."; }
  1402. X;
  1403. X
  1404. XuseVerb: deepverb
  1405. X    sdesc = "use"
  1406. X    verb = 'use' 'utilize' 'employ'
  1407. X    doAction = 'Use'
  1408. X;
  1409. X
  1410. XlightVerb: deepverb
  1411. X    sedsc = "light"
  1412. X    verb = 'light'
  1413. X    doAction = 'Light'
  1414. X;
  1415. X
  1416. XpickVerb: deepverb
  1417. X    sdesc = "pick"
  1418. X    verb = 'pick'
  1419. X    doAction = 'Pick'
  1420. X;
  1421. X
  1422. XwakeVerb: deepverb
  1423. X    sdesc = "wake"
  1424. X    verb = 'wake' 'awaken' 'wake up' 'disturb'
  1425. X    doAction = 'Wake'
  1426. X;
  1427. X
  1428. XdigVerb: deepverb
  1429. X    sdesc = "dig"
  1430. X    verb = 'dig' 'burrow'
  1431. X    action(actor) = {
  1432. X        "Digging without a shovel is quite impractical.  Even 
  1433. X        with a shovel progress is unlikely.";
  1434. X    }
  1435. X;
  1436. X
  1437. XblastVerb: deepverb
  1438. X    sdesc = "blast"
  1439. X    verb = 'blast' 'blast with'
  1440. X    action(actor) = {
  1441. X        if (Me.isIn(At_Ne_End) or Me.isIn(At_Sw_End))
  1442. X            black_mark_rod.doBlastWith(actor);
  1443. X        else
  1444. X            "Blasting requires dynamite.";
  1445. X    }
  1446. X    doAction = 'BlastWith'
  1447. X;
  1448. X
  1449. XfeedVerb: deepverb
  1450. X    sdesc = "feed"
  1451. X    verb = 'feed' 'stuff' 'fatten'
  1452. X    doAction = 'Feed'
  1453. X;
  1454. X
  1455. XfillVerb: deepverb
  1456. X    sdesc = "fill"
  1457. X    verb = 'fill'
  1458. X    doAction = 'Fill'
  1459. X;
  1460. X
  1461. XemptyVerb: deepverb
  1462. X    sdesc = "empty"
  1463. X    verb = 'empty'
  1464. X    doAction = 'Empty'
  1465. X;
  1466. X
  1467. X/*
  1468. X * Do this later.
  1469. X */
  1470. XbackVerb: travelVerb
  1471. X    verb = 'back' 'return' 'retreat'
  1472. X     action(actor) = {
  1473. X        actor.travelTo(self.travelDir(actor));
  1474. X    }
  1475. X    travelDir(actor) = {
  1476. X        return(actor.location.back);
  1477. X    }
  1478. X;
  1479. X
  1480. X/*
  1481. X * From here until the end of the file we define the new direction verbs.
  1482. X * Not very exciting reading.
  1483. X */
  1484. XjumpVerb: travelVerb    // this is normally defined in adv.t
  1485. X    verb = 'jump' 'leap'
  1486. X     action(actor) = {
  1487. X        actor.travelTo(self.travelDir(actor));
  1488. X    }
  1489. X    travelDir(actor) = {
  1490. X        return(actor.location.road);
  1491. X    }
  1492. X;
  1493. X
  1494. XroadVerb: travelVerb
  1495. X    verb = 'road' 'hill'
  1496. X     action(actor) = {
  1497. X        actor.travelTo(self.travelDir(actor));
  1498. X    }
  1499. X    travelDir(actor) = {
  1500. X        return(actor.location.road);
  1501. X    }
  1502. X;
  1503. X
  1504. XupstreamVerb: travelVerb
  1505. X    verb = 'upstream'
  1506. X     action(actor) = {
  1507. X        actor.travelTo(self.travelDir(actor));
  1508. X    }
  1509. X    travelDir(actor) = {
  1510. X        return(actor.location.upstream);
  1511. X    }
  1512. X;
  1513. X
  1514. XdownstreamVerb: travelVerb
  1515. X    verb = 'downstream'
  1516. X     action(actor) = {
  1517. X        actor.travelTo(self.travelDir(actor));
  1518. X    }
  1519. X    travelDir(actor) = {
  1520. X        return(actor.location.downstream);
  1521. X    }
  1522. X;
  1523. X
  1524. XforestVerb: travelVerb
  1525. X    verb = 'forest'
  1526. X     action(actor) = {
  1527. X        actor.travelTo(self.travelDir(actor));
  1528. X    }
  1529. X    travelDir(actor) = {
  1530. X        return(actor.location.forest);
  1531. X    }
  1532. X;
  1533. X
  1534. XforwardsVerb: travelVerb
  1535. X    verb = 'forwards' 'continue' 'onward'
  1536. X     action(actor) = {
  1537. X        actor.travelTo(self.travelDir(actor));
  1538. X    }
  1539. X    travelDir(actor) = {
  1540. X        return(actor.location.forwards);
  1541. X    }
  1542. X;
  1543. X
  1544. XvalleyVerb: travelVerb
  1545. X    verb = 'valley'
  1546. X     action(actor) = {
  1547. X        actor.travelTo(self.travelDir(actor));
  1548. X    }
  1549. X    travelDir(actor) = {
  1550. X        return(actor.location.valley);
  1551. X    }
  1552. X;
  1553. X
  1554. XstairsVerb: travelVerb
  1555. X    verb = 'stairs'
  1556. X     action(actor) = {
  1557. X        actor.travelTo(self.travelDir(actor));
  1558. X    }
  1559. X    travelDir(actor) = {
  1560. X        return(actor.location.stairs);
  1561. X    }
  1562. X;
  1563. X
  1564. XbuildingVerb: travelVerb
  1565. X    verb = 'building' 'house'
  1566. X     action(actor) = {
  1567. X        actor.travelTo(self.travelDir(actor));
  1568. X    }
  1569. X    travelDir(actor) = {
  1570. X        return(actor.location.building);
  1571. X    }
  1572. X;
  1573. X
  1574. XgullyVerb: travelVerb
  1575. X    verb = 'gully'
  1576. X     action(actor) = {
  1577. X        actor.travelTo(self.travelDir(actor));
  1578. X    }
  1579. X    travelDir(actor) = {
  1580. X        return(actor.location.gully);
  1581. X    }
  1582. X;
  1583. X
  1584. XstreamVerb: travelVerb
  1585. X    verb = 'stream'
  1586. X     action(actor) = {
  1587. X        actor.travelTo(self.travelDir(actor));
  1588. X    }
  1589. X    travelDir(actor) = {
  1590. X        return(actor.location.stream);
  1591. X    }
  1592. X;
  1593. X
  1594. XrockVerb: travelVerb
  1595. X    verb = 'rock'
  1596. X     action(actor) = {
  1597. X        actor.travelTo(self.travelDir(actor));
  1598. X    }
  1599. X    travelDir(actor) = {
  1600. X        return(actor.location.rock);
  1601. X    }
  1602. X;
  1603. X
  1604. XbedVerb: travelVerb
  1605. X    verb = 'bed'
  1606. X     action(actor) = {
  1607. X        actor.travelTo(self.travelDir(actor));
  1608. X    }
  1609. X    travelDir(actor) = {
  1610. X        return(actor.location.bed);
  1611. X    }
  1612. X;
  1613. X
  1614. XcrawlVerb: travelVerb
  1615. X    verb = 'crawl'
  1616. X     action(actor) = {
  1617. X        actor.travelTo(self.travelDir(actor));
  1618. X    }
  1619. X    travelDir(actor) = {
  1620. X        return(actor.location.crawl);
  1621. X    }
  1622. X;
  1623. X
  1624. XcobbleVerb: travelVerb
  1625. X    verb = 'cobble'
  1626. X     action(actor) = {
  1627. X        actor.travelTo(self.travelDir(actor));
  1628. X    }
  1629. X    travelDir(actor) = {
  1630. X        return(actor.location.cobble);
  1631. X    }
  1632. X;
  1633. X
  1634. XsurfaceVerb: travelVerb
  1635. X    verb = 'surface'
  1636. X     action(actor) = {
  1637. X        actor.travelTo(self.travelDir(actor));
  1638. X    }
  1639. X    travelDir(actor) = {
  1640. X        return(actor.location.tosurface);
  1641. X    }
  1642. X;
  1643. X
  1644. XdarkVerb: travelVerb
  1645. X    verb = 'dark'
  1646. X     action(actor) = {
  1647. X        actor.travelTo(self.travelDir(actor));
  1648. X    }
  1649. X    travelDir(actor) = {
  1650. X        return(actor.location.dark);
  1651. X    }
  1652. X;
  1653. X
  1654. XpassageVerb: travelVerb
  1655. X    verb = 'passage' 'tunnel'
  1656. X     action(actor) = {
  1657. X        actor.travelTo(self.travelDir(actor));
  1658. X    }
  1659. X    travelDir(actor) = {
  1660. X        return(actor.location.passage);
  1661. X    }
  1662. X;
  1663. X
  1664. XlowVerb: travelVerb
  1665. X    verb = 'low'
  1666. X     action(actor) = {
  1667. X        actor.travelTo(self.travelDir(actor));
  1668. X    }
  1669. X    travelDir(actor) = {
  1670. X        return(actor.location.low);
  1671. X    }
  1672. X;
  1673. X
  1674. XcanyonVerb: travelVerb
  1675. X    verb = 'canyon'
  1676. X     action(actor) = {
  1677. X        actor.travelTo(self.travelDir(actor));
  1678. X    }
  1679. X    travelDir(actor) = {
  1680. X        return(actor.location.canyon);
  1681. X    }
  1682. X;
  1683. X
  1684. XawkwardVerb: travelVerb
  1685. X    verb = 'awkward'
  1686. X     action(actor) = {
  1687. X        actor.travelTo(self.travelDir(actor));
  1688. X    }
  1689. X    travelDir(actor) = {
  1690. X        return(actor.location.awkward);
  1691. X    }
  1692. X;
  1693. X
  1694. XgiantVerb: travelVerb
  1695. X    verb = 'giant'
  1696. X     action(actor) = {
  1697. X        actor.travelTo(self.travelDir(actor));
  1698. X    }
  1699. X    travelDir(actor) = {
  1700. X        return(actor.location.giant);
  1701. X    }
  1702. X;
  1703. X
  1704. XviewVerb: travelVerb
  1705. X    verb = 'view'
  1706. X     action(actor) = {
  1707. X        actor.travelTo(self.travelDir(actor));
  1708. X    }
  1709. X    travelDir(actor) = {
  1710. X        return(actor.location.view);
  1711. X    }
  1712. X;
  1713. X
  1714. XpitVerb: travelVerb
  1715. X    verb = 'pit'
  1716. X     action(actor) = {
  1717. X        actor.travelTo(self.travelDir(actor));
  1718. X    }
  1719. X    travelDir(actor) = {
  1720. X        return(actor.location.pit);
  1721. X    }
  1722. X;
  1723. X
  1724. XoutdoorsVerb: travelVerb
  1725. X    verb = 'outdoors'
  1726. X     action(actor) = {
  1727. X        actor.travelTo(self.travelDir(actor));
  1728. X    }
  1729. X    travelDir(actor) = {
  1730. X        return(actor.location.outdoors);
  1731. X    }
  1732. X;
  1733. X
  1734. XcrackVerb: travelVerb
  1735. X    verb = 'crack'
  1736. X     action(actor) = {
  1737. X        actor.travelTo(self.travelDir(actor));
  1738. X    }
  1739. X    travelDir(actor) = {
  1740. X        return(actor.location.crack);
  1741. X    }
  1742. X;
  1743. X
  1744. XstepsVerb: travelVerb
  1745. X    verb = 'steps'
  1746. X     action(actor) = {
  1747. X        actor.travelTo(self.travelDir(actor));
  1748. X    }
  1749. X    travelDir(actor) = {
  1750. X        return(actor.location.steps);
  1751. X    }
  1752. X;
  1753. X
  1754. XdomeVerb: travelVerb
  1755. X    verb = 'dome'
  1756. X     action(actor) = {
  1757. X        actor.travelTo(self.travelDir(actor));
  1758. X    }
  1759. X    travelDir(actor) = {
  1760. X        return(actor.location.dome);
  1761. X    }
  1762. X;
  1763. X
  1764. XleftVerb: travelVerb
  1765. X    verb = 'left'
  1766. X     action(actor) = {
  1767. X        actor.travelTo(self.travelDir(actor));
  1768. X    }
  1769. X    travelDir(actor) = {
  1770. X        return(actor.location.left);
  1771. X    }
  1772. X;
  1773. X
  1774. XrightVerb: travelVerb
  1775. X    verb = 'right'
  1776. X     action(actor) = {
  1777. X        actor.travelTo(self.travelDir(actor));
  1778. X    }
  1779. X    travelDir(actor) = {
  1780. X        return(actor.location.right);
  1781. X    }
  1782. X;
  1783. X
  1784. XhallVerb: travelVerb
  1785. X    verb = 'hall'
  1786. X     action(actor) = {
  1787. X        actor.travelTo(self.travelDir(actor));
  1788. X    }
  1789. X    travelDir(actor) = {
  1790. X        return(actor.location.hall);
  1791. X    }
  1792. X;
  1793. X
  1794. XbarrenVerb: travelVerb
  1795. X    verb = 'barren'
  1796. X     action(actor) = {
  1797. X        actor.travelTo(self.travelDir(actor));
  1798. X    }
  1799. X    travelDir(actor) = {
  1800. X        return(actor.location.barren);
  1801. X    }
  1802. X;
  1803. X
  1804. XoverVerb: travelVerb
  1805. X    verb = 'over'
  1806. X     action(actor) = {
  1807. X        actor.travelTo(self.travelDir(actor));
  1808. X    }
  1809. X    travelDir(actor) = {
  1810. X        return(actor.location.over);
  1811. X    }
  1812. X;
  1813. X
  1814. XacrossVerb: travelVerb
  1815. X    verb = 'across'
  1816. X     action(actor) = {
  1817. X        actor.travelTo(self.travelDir(actor));
  1818. X    }
  1819. X    travelDir(actor) = {
  1820. X        return(actor.location.across);
  1821. X    }
  1822. X;
  1823. X
  1824. XdebrisVerb: travelVerb
  1825. X    verb = 'debris'
  1826. X     action(actor) = {
  1827. X        actor.travelTo(self.travelDir(actor));
  1828. X    }
  1829. X    travelDir(actor) = {
  1830. X        return(actor.location.debris);
  1831. X    }
  1832. X;
  1833. X
  1834. XholeVerb: travelVerb
  1835. X    verb = 'hole'
  1836. X     action(actor) = {
  1837. X        actor.travelTo(self.travelDir(actor));
  1838. X    }
  1839. X    travelDir(actor) = {
  1840. X        return(actor.location.hole);
  1841. X    }
  1842. X;
  1843. X
  1844. XwallVerb: travelVerb
  1845. X    verb = 'wall'
  1846. X     action(actor) = {
  1847. X        actor.travelTo(self.travelDir(actor));
  1848. X    }
  1849. X    travelDir(actor) = {
  1850. X        return(actor.location.wall);
  1851. X    }
  1852. X;
  1853. X
  1854. XbrokenVerb: travelVerb
  1855. X    verb = 'broken'
  1856. X     action(actor) = {
  1857. X        actor.travelTo(self.travelDir(actor));
  1858. X    }
  1859. X    travelDir(actor) = {
  1860. X        return(actor.location.broken);
  1861. X    }
  1862. X;
  1863. X
  1864. Xy2Verb: travelVerb
  1865. X    verb = 'y2'
  1866. X     action(actor) = {
  1867. X        actor.travelTo(self.travelDir(actor));
  1868. X    }
  1869. X    travelDir(actor) = {
  1870. X        return(actor.location.y2);
  1871. X    }
  1872. X;
  1873. X
  1874. XfloorVerb: travelVerb
  1875. X    verb = 'floor'
  1876. X     action(actor) = {
  1877. X        actor.travelTo(self.travelDir(actor));
  1878. X    }
  1879. X    travelDir(actor) = {
  1880. X        return(actor.location.floor);
  1881. X    }
  1882. X;
  1883. X
  1884. XroomVerb: travelVerb
  1885. X    verb = 'room'
  1886. X     action(actor) = {
  1887. X        actor.travelTo(self.travelDir(actor));
  1888. X    }
  1889. X    travelDir(actor) = {
  1890. X        return(actor.location.toroom);
  1891. X    }
  1892. X;
  1893. X
  1894. XslitVerb: travelVerb
  1895. X    verb = 'slit'
  1896. X     action(actor) = {
  1897. X        actor.travelTo(self.travelDir(actor));
  1898. X    }
  1899. X    travelDir(actor) = {
  1900. X        return(actor.location.slit);
  1901. X    }
  1902. X;
  1903. X
  1904. XslabVerb: travelVerb
  1905. X    verb = 'slab' 'slabroom'
  1906. X     action(actor) = {
  1907. X        actor.travelTo(self.travelDir(actor));
  1908. X    }
  1909. X    travelDir(actor) = {
  1910. X        return(actor.location.slab);
  1911. X    }
  1912. X;
  1913. X
  1914. XxyzzyVerb: travelVerb
  1915. X    verb = 'xyzzy'
  1916. X     action(actor) = {
  1917. X        actor.travelTo(self.travelDir(actor));
  1918. X    }
  1919. X    travelDir(actor) = {
  1920. X        return(actor.location.xyzzy);
  1921. X    }
  1922. X;
  1923. X
  1924. XdepressionVerb: travelVerb
  1925. X    verb = 'depression' 'grate'    // DMB: added 'grate'
  1926. X     action(actor) = {
  1927. X        actor.travelTo(self.travelDir(actor));
  1928. X    }
  1929. X    travelDir(actor) = {
  1930. X        return(actor.location.depression);
  1931. X    }
  1932. X;
  1933. X
  1934. XentranceVerb: travelVerb
  1935. X    verb = 'entrance'
  1936. X     action(actor) = {
  1937. X        actor.travelTo(self.travelDir(actor));
  1938. X    }
  1939. X    travelDir(actor) = {
  1940. X        return(actor.location.entrance);
  1941. X    }
  1942. X;
  1943. X
  1944. XplughVerb: travelVerb
  1945. X    verb = 'plugh'
  1946. X     action(actor) = {
  1947. X        actor.travelTo(self.travelDir(actor));
  1948. X    }
  1949. X    travelDir(actor) = {
  1950. X        return(actor.location.plugh);
  1951. X    }
  1952. X;
  1953. X
  1954. XsecretVerb: travelVerb
  1955. X    verb = 'secret'
  1956. X     action(actor) = {
  1957. X        actor.travelTo(self.travelDir(actor));
  1958. X    }
  1959. X    travelDir(actor) = {
  1960. X        return(actor.location.secret);
  1961. X    }
  1962. X;
  1963. X
  1964. XcaveVerb: travelVerb
  1965. X    verb = 'cave'
  1966. X     action(actor) = {
  1967. X        actor.travelTo(self.travelDir(actor));
  1968. X    }
  1969. X    travelDir(actor) = {
  1970. X        return(actor.location.cave);
  1971. X    }
  1972. X;
  1973. X
  1974. XcrossVerb: travelVerb
  1975. X    verb = 'cross'
  1976. X     action(actor) = {
  1977. X        actor.travelTo(self.travelDir(actor));
  1978. X    }
  1979. X    travelDir(actor) = {
  1980. X        return(actor.location.cross);
  1981. X    }
  1982. X    doAction = 'Cross'
  1983. X;
  1984. X
  1985. XbedquiltVerb: travelVerb
  1986. X    verb = 'bedquilt'
  1987. X     action(actor) = {
  1988. X        actor.travelTo(self.travelDir(actor));
  1989. X    }
  1990. X    travelDir(actor) = {
  1991. X        return(actor.location.bedquilt);
  1992. X    }
  1993. X;
  1994. X
  1995. XploverVerb: travelVerb
  1996. X    verb = 'plover'
  1997. X     action(actor) = {
  1998. X        local    loc;
  1999. X
  2000. X        //
  2001. X        // If the player teleports by using the plover
  2002. X        // magic word while holding the emerald, the
  2003. X        // emerald goes back to its original source.
  2004. X        //
  2005. X        loc := actor.location;
  2006. X        actor.travelTo(self.travelDir(actor));
  2007. X        if (loc <> actor.location and egg_sized_emerald.isIn(Me))
  2008. X            egg_sized_emerald.moveInto(In_Plover_Room);
  2009. X    }
  2010. X    travelDir(actor) = {
  2011. X        return(actor.location.plover);
  2012. X    }
  2013. X;
  2014. X
  2015. XorientalVerb: travelVerb
  2016. X    verb = 'oriental'
  2017. X     action(actor) = {
  2018. X        actor.travelTo(self.travelDir(actor));
  2019. X    }
  2020. X    travelDir(actor) = {
  2021. X        return(actor.location.oriental);
  2022. X    }
  2023. X;
  2024. X
  2025. XcavernVerb: travelVerb
  2026. X    verb = 'cavern'
  2027. X     action(actor) = {
  2028. X        actor.travelTo(self.travelDir(actor));
  2029. X    }
  2030. X    travelDir(actor) = {
  2031. X        return(actor.location.cavern);
  2032. X    }
  2033. X;
  2034. X
  2035. XshellVerb: travelVerb
  2036. X    verb = 'shell'
  2037. X     action(actor) = {
  2038. X        actor.travelTo(self.travelDir(actor));
  2039. X    }
  2040. X    travelDir(actor) = {
  2041. X        return(actor.location.shell);
  2042. X    }
  2043. X;
  2044. X
  2045. XreservoirVerb: travelVerb
  2046. X    verb = 'reservoir'
  2047. X     action(actor) = {
  2048. X        actor.travelTo(self.travelDir(actor));
  2049. X    }
  2050. X    travelDir(actor) = {
  2051. X        return(actor.location.reservoir);
  2052. X    }
  2053. X;
  2054. X
  2055. XmainVerb: travelVerb
  2056. X    verb = 'main' 'office'
  2057. X     action(actor) = {
  2058. X        actor.travelTo(self.travelDir(actor));
  2059. X    }
  2060. X    travelDir(actor) = {
  2061. X        return(actor.location.main);
  2062. X    }
  2063. X;
  2064. X
  2065. XforkVerb: travelVerb
  2066. X    verb = 'fork'
  2067. X     action(actor) = {
  2068. X        actor.travelTo(self.travelDir(actor));
  2069. X    }
  2070. X    travelDir(actor) = {
  2071. X        return(actor.location.fork);
  2072. X    }
  2073. X;
  2074. END_OF_FILE
  2075. if test 17740 -ne `wc -c <'src/ccr-verb.t'`; then
  2076.     echo shar: \"'src/ccr-verb.t'\" unpacked with wrong size!
  2077. fi
  2078. # end of 'src/ccr-verb.t'
  2079. fi
  2080. echo shar: End of archive 10 \(of 11\).
  2081. cp /dev/null ark10isdone
  2082. MISSING=""
  2083. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  2084.     if test ! -f ark${I}isdone ; then
  2085.     MISSING="${MISSING} ${I}"
  2086.     fi
  2087. done
  2088. if test "${MISSING}" = "" ; then
  2089.     echo You have unpacked all 11 archives.
  2090.     echo "Now run buildit.sh to make gam file"
  2091.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2092. else
  2093.     echo You still need to unpack the following archives:
  2094.     echo "        " ${MISSING}
  2095. fi
  2096. ##  End of shell archive.
  2097. exit 0
  2098.