home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!news.tek.com!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v18i025: ccr - colossal cave (adventure) implemented in TADS, Part10/11
- Date: 12 Jul 1993 19:29:16 GMT
- Organization: Tektronix, Inc, Redmond, OR, USA
- Lines: 2086
- Approved: billr@saab.CNA.TEK.COM
- Message-ID: <21se2c$1d3@ying.cna.tek.com>
- NNTP-Posting-Host: saab.cna.tek.com
- Xref: uunet comp.sources.games:1825
-
- Submitted-by: David Baggett <dmb@xbar.ai.mit.edu>
- Posting-number: Volume 18, Issue 25
- Archive-name: ccr/part10
- Environment: TADS
-
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 10 (of 11)."
- # Contents: copying.doc src/ccr-std.t src/ccr-verb.t
- # Wrapped by billr@saab on Mon Jul 12 12:02:45 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'copying.doc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'copying.doc'\"
- else
- echo shar: Extracting \"'copying.doc'\" \(17982 characters\)
- sed "s/^X//" >'copying.doc' <<'END_OF_FILE'
- X GNU GENERAL PUBLIC LICENSE
- X Version 2, June 1991
- X
- X Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- X 675 Mass Ave, Cambridge, MA 02139, USA
- X Everyone is permitted to copy and distribute verbatim copies
- X of this license document, but changing it is not allowed.
- X
- X Preamble
- X
- X The licenses for most software are designed to take away your
- Xfreedom to share and change it. By contrast, the GNU General Public
- XLicense is intended to guarantee your freedom to share and change free
- Xsoftware--to make sure the software is free for all its users. This
- XGeneral Public License applies to most of the Free Software
- XFoundation's software and to any other program whose authors commit to
- Xusing it. (Some other Free Software Foundation software is covered by
- Xthe GNU Library General Public License instead.) You can apply it to
- Xyour programs, too.
- X
- X When we speak of free software, we are referring to freedom, not
- Xprice. Our General Public Licenses are designed to make sure that you
- Xhave the freedom to distribute copies of free software (and charge for
- Xthis service if you wish), that you receive source code or can get it
- Xif you want it, that you can change the software or use pieces of it
- Xin new free programs; and that you know you can do these things.
- X
- X To protect your rights, we need to make restrictions that forbid
- Xanyone to deny you these rights or to ask you to surrender the rights.
- XThese restrictions translate to certain responsibilities for you if you
- Xdistribute copies of the software, or if you modify it.
- X
- X For example, if you distribute copies of such a program, whether
- Xgratis or for a fee, you must give the recipients all the rights that
- Xyou have. You must make sure that they, too, receive or can get the
- Xsource code. And you must show them these terms so they know their
- Xrights.
- X
- X We protect your rights with two steps: (1) copyright the software, and
- X(2) offer you this license which gives you legal permission to copy,
- Xdistribute and/or modify the software.
- X
- X Also, for each author's protection and ours, we want to make certain
- Xthat everyone understands that there is no warranty for this free
- Xsoftware. If the software is modified by someone else and passed on, we
- Xwant its recipients to know that what they have is not the original, so
- Xthat any problems introduced by others will not reflect on the original
- Xauthors' reputations.
- X
- X Finally, any free program is threatened constantly by software
- Xpatents. We wish to avoid the danger that redistributors of a free
- Xprogram will individually obtain patent licenses, in effect making the
- Xprogram proprietary. To prevent this, we have made it clear that any
- Xpatent must be licensed for everyone's free use or not licensed at all.
- X
- X The precise terms and conditions for copying, distribution and
- Xmodification follow.
- X
- X GNU GENERAL PUBLIC LICENSE
- X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- X
- X 0. This License applies to any program or other work which contains
- Xa notice placed by the copyright holder saying it may be distributed
- Xunder the terms of this General Public License. The "Program", below,
- Xrefers to any such program or work, and a "work based on the Program"
- Xmeans either the Program or any derivative work under copyright law:
- Xthat is to say, a work containing the Program or a portion of it,
- Xeither verbatim or with modifications and/or translated into another
- Xlanguage. (Hereinafter, translation is included without limitation in
- Xthe term "modification".) Each licensee is addressed as "you".
- X
- XActivities other than copying, distribution and modification are not
- Xcovered by this License; they are outside its scope. The act of
- Xrunning the Program is not restricted, and the output from the Program
- Xis covered only if its contents constitute a work based on the
- XProgram (independent of having been made by running the Program).
- XWhether that is true depends on what the Program does.
- X
- X 1. You may copy and distribute verbatim copies of the Program's
- Xsource code as you receive it, in any medium, provided that you
- Xconspicuously and appropriately publish on each copy an appropriate
- Xcopyright notice and disclaimer of warranty; keep intact all the
- Xnotices that refer to this License and to the absence of any warranty;
- Xand give any other recipients of the Program a copy of this License
- Xalong with the Program.
- X
- XYou may charge a fee for the physical act of transferring a copy, and
- Xyou may at your option offer warranty protection in exchange for a fee.
- X
- X 2. You may modify your copy or copies of the Program or any portion
- Xof it, thus forming a work based on the Program, and copy and
- Xdistribute such modifications or work under the terms of Section 1
- Xabove, provided that you also meet all of these conditions:
- X
- X a) You must cause the modified files to carry prominent notices
- X stating that you changed the files and the date of any change.
- X
- X b) You must cause any work that you distribute or publish, that in
- X whole or in part contains or is derived from the Program or any
- X part thereof, to be licensed as a whole at no charge to all third
- X parties under the terms of this License.
- X
- X c) If the modified program normally reads commands interactively
- X when run, you must cause it, when started running for such
- X interactive use in the most ordinary way, to print or display an
- X announcement including an appropriate copyright notice and a
- X notice that there is no warranty (or else, saying that you provide
- X a warranty) and that users may redistribute the program under
- X these conditions, and telling the user how to view a copy of this
- X License. (Exception: if the Program itself is interactive but
- X does not normally print such an announcement, your work based on
- X the Program is not required to print an announcement.)
- X
- XThese requirements apply to the modified work as a whole. If
- Xidentifiable sections of that work are not derived from the Program,
- Xand can be reasonably considered independent and separate works in
- Xthemselves, then this License, and its terms, do not apply to those
- Xsections when you distribute them as separate works. But when you
- Xdistribute the same sections as part of a whole which is a work based
- Xon the Program, the distribution of the whole must be on the terms of
- Xthis License, whose permissions for other licensees extend to the
- Xentire whole, and thus to each and every part regardless of who wrote it.
- X
- XThus, it is not the intent of this section to claim rights or contest
- Xyour rights to work written entirely by you; rather, the intent is to
- Xexercise the right to control the distribution of derivative or
- Xcollective works based on the Program.
- X
- XIn addition, mere aggregation of another work not based on the Program
- Xwith the Program (or with a work based on the Program) on a volume of
- Xa storage or distribution medium does not bring the other work under
- Xthe scope of this License.
- X
- X 3. You may copy and distribute the Program (or a work based on it,
- Xunder Section 2) in object code or executable form under the terms of
- XSections 1 and 2 above provided that you also do one of the following:
- X
- X a) Accompany it with the complete corresponding machine-readable
- X source code, which must be distributed under the terms of Sections
- X 1 and 2 above on a medium customarily used for software interchange; or,
- X
- X b) Accompany it with a written offer, valid for at least three
- X years, to give any third party, for a charge no more than your
- X cost of physically performing source distribution, a complete
- X machine-readable copy of the corresponding source code, to be
- X distributed under the terms of Sections 1 and 2 above on a medium
- X customarily used for software interchange; or,
- X
- X c) Accompany it with the information you received as to the offer
- X to distribute corresponding source code. (This alternative is
- X allowed only for noncommercial distribution and only if you
- X received the program in object code or executable form with such
- X an offer, in accord with Subsection b above.)
- X
- XThe source code for a work means the preferred form of the work for
- Xmaking modifications to it. For an executable work, complete source
- Xcode means all the source code for all modules it contains, plus any
- Xassociated interface definition files, plus the scripts used to
- Xcontrol compilation and installation of the executable. However, as a
- Xspecial exception, the source code distributed need not include
- Xanything that is normally distributed (in either source or binary
- Xform) with the major components (compiler, kernel, and so on) of the
- Xoperating system on which the executable runs, unless that component
- Xitself accompanies the executable.
- X
- XIf distribution of executable or object code is made by offering
- Xaccess to copy from a designated place, then offering equivalent
- Xaccess to copy the source code from the same place counts as
- Xdistribution of the source code, even though third parties are not
- Xcompelled to copy the source along with the object code.
- X
- X 4. You may not copy, modify, sublicense, or distribute the Program
- Xexcept as expressly provided under this License. Any attempt
- Xotherwise to copy, modify, sublicense or distribute the Program is
- Xvoid, and will automatically terminate your rights under this License.
- XHowever, parties who have received copies, or rights, from you under
- Xthis License will not have their licenses terminated so long as such
- Xparties remain in full compliance.
- X
- X 5. You are not required to accept this License, since you have not
- Xsigned it. However, nothing else grants you permission to modify or
- Xdistribute the Program or its derivative works. These actions are
- Xprohibited by law if you do not accept this License. Therefore, by
- Xmodifying or distributing the Program (or any work based on the
- XProgram), you indicate your acceptance of this License to do so, and
- Xall its terms and conditions for copying, distributing or modifying
- Xthe Program or works based on it.
- X
- X 6. Each time you redistribute the Program (or any work based on the
- XProgram), the recipient automatically receives a license from the
- Xoriginal licensor to copy, distribute or modify the Program subject to
- Xthese terms and conditions. You may not impose any further
- Xrestrictions on the recipients' exercise of the rights granted herein.
- XYou are not responsible for enforcing compliance by third parties to
- Xthis License.
- X
- X 7. If, as a consequence of a court judgment or allegation of patent
- Xinfringement or for any other reason (not limited to patent issues),
- Xconditions are imposed on you (whether by court order, agreement or
- Xotherwise) that contradict the conditions of this License, they do not
- Xexcuse you from the conditions of this License. If you cannot
- Xdistribute so as to satisfy simultaneously your obligations under this
- XLicense and any other pertinent obligations, then as a consequence you
- Xmay not distribute the Program at all. For example, if a patent
- Xlicense would not permit royalty-free redistribution of the Program by
- Xall those who receive copies directly or indirectly through you, then
- Xthe only way you could satisfy both it and this License would be to
- Xrefrain entirely from distribution of the Program.
- X
- XIf any portion of this section is held invalid or unenforceable under
- Xany particular circumstance, the balance of the section is intended to
- Xapply and the section as a whole is intended to apply in other
- Xcircumstances.
- X
- XIt is not the purpose of this section to induce you to infringe any
- Xpatents or other property right claims or to contest validity of any
- Xsuch claims; this section has the sole purpose of protecting the
- Xintegrity of the free software distribution system, which is
- Ximplemented by public license practices. Many people have made
- Xgenerous contributions to the wide range of software distributed
- Xthrough that system in reliance on consistent application of that
- Xsystem; it is up to the author/donor to decide if he or she is willing
- Xto distribute software through any other system and a licensee cannot
- Ximpose that choice.
- X
- XThis section is intended to make thoroughly clear what is believed to
- Xbe a consequence of the rest of this License.
- X
- X 8. If the distribution and/or use of the Program is restricted in
- Xcertain countries either by patents or by copyrighted interfaces, the
- Xoriginal copyright holder who places the Program under this License
- Xmay add an explicit geographical distribution limitation excluding
- Xthose countries, so that distribution is permitted only in or among
- Xcountries not thus excluded. In such case, this License incorporates
- Xthe limitation as if written in the body of this License.
- X
- X 9. The Free Software Foundation may publish revised and/or new versions
- Xof the General Public License from time to time. Such new versions will
- Xbe similar in spirit to the present version, but may differ in detail to
- Xaddress new problems or concerns.
- X
- XEach version is given a distinguishing version number. If the Program
- Xspecifies a version number of this License which applies to it and "any
- Xlater version", you have the option of following the terms and conditions
- Xeither of that version or of any later version published by the Free
- XSoftware Foundation. If the Program does not specify a version number of
- Xthis License, you may choose any version ever published by the Free Software
- XFoundation.
- X
- X 10. If you wish to incorporate parts of the Program into other free
- Xprograms whose distribution conditions are different, write to the author
- Xto ask for permission. For software which is copyrighted by the Free
- XSoftware Foundation, write to the Free Software Foundation; we sometimes
- Xmake exceptions for this. Our decision will be guided by the two goals
- Xof preserving the free status of all derivatives of our free software and
- Xof promoting the sharing and reuse of software generally.
- X
- X NO WARRANTY
- X
- X 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
- XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
- XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
- XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
- XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
- XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
- XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
- XREPAIR OR CORRECTION.
- X
- X 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
- XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
- XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
- XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
- XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
- XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
- XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
- XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
- XPOSSIBILITY OF SUCH DAMAGES.
- X
- X END OF TERMS AND CONDITIONS
- X
- X Appendix: How to Apply These Terms to Your New Programs
- X
- X If you develop a new program, and you want it to be of the greatest
- Xpossible use to the public, the best way to achieve this is to make it
- Xfree software which everyone can redistribute and change under these terms.
- X
- X To do so, attach the following notices to the program. It is safest
- Xto attach them to the start of each source file to most effectively
- Xconvey the exclusion of warranty; and each file should have at least
- Xthe "copyright" line and a pointer to where the full notice is found.
- X
- X <one line to give the program's name and a brief idea of what it does.>
- X Copyright (C) 19yy <name of author>
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 2 of the License, or
- X (at your option) any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- XAlso add information on how to contact you by electronic and paper mail.
- X
- XIf the program is interactive, make it output a short notice like this
- Xwhen it starts in an interactive mode:
- X
- X Gnomovision version 69, Copyright (C) 19yy name of author
- X Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- X This is free software, and you are welcome to redistribute it
- X under certain conditions; type `show c' for details.
- X
- XThe hypothetical commands `show w' and `show c' should show the appropriate
- Xparts of the General Public License. Of course, the commands you use may
- Xbe called something other than `show w' and `show c'; they could even be
- Xmouse-clicks or menu items--whatever suits your program.
- X
- XYou should also get your employer (if you work as a programmer) or your
- Xschool, if any, to sign a "copyright disclaimer" for the program, if
- Xnecessary. Here is a sample; alter the names:
- X
- X Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- X `Gnomovision' (which makes passes at compilers) written by James Hacker.
- X
- X <signature of Ty Coon>, 1 April 1989
- X Ty Coon, President of Vice
- X
- XThis General Public License does not permit incorporating your program into
- Xproprietary programs. If your program is a subroutine library, you may
- Xconsider it more useful to permit linking proprietary applications with the
- Xlibrary. If this is what you want to do, use the GNU Library General
- XPublic License instead of this License.
- END_OF_FILE
- if test 17982 -ne `wc -c <'copying.doc'`; then
- echo shar: \"'copying.doc'\" unpacked with wrong size!
- fi
- # end of 'copying.doc'
- fi
- if test -f 'src/ccr-std.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'src/ccr-std.t'\"
- else
- echo shar: Extracting \"'src/ccr-std.t'\" \(18170 characters\)
- sed "s/^X//" >'src/ccr-std.t' <<'END_OF_FILE'
- X/*
- X * Colossal Cave Revisited
- X *
- X * A remake of Willie Crowther and Don Woods' classic Adventure.
- X * Converted from Donald Ekman's PC port of the original FORTRAN source.
- X * TADS version by David M. Baggett for ADVENTIONS.
- X *
- X * Please document all changes in the history so we know who did what.
- X *
- X * This source code is copylefted under the terms of the GNU Public
- X * License. Essentially, this means that you are free to do whatever
- X * you wish with this source code, provided you do not charge any
- X * money for it or for any derivative works.
- X *
- X * ADVENTIONS distributes this game, but you are free to do what you will
- X * with it, provided you adhere to the terms in the GNU Public License.
- X * Send correspondence regarding this game or original works distributed
- X * by ADVENTIONS to
- X *
- X * ADVENTIONS
- X * PO Box 851
- X * Columbia, MD 21044
- X *
- X * If you would like a catalog of releases, please enclose a SASE. Thanks!
- X *
- X * Contributors
- X *
- X * dmb In real life: David M. Baggett
- X * Internet: <dmb@ai.mit.edu>
- X * Compu$erve: 76440,2671 (ADVENTIONS account)
- X * GEnie: ADVENTIONS
- X *
- X * Modification History
- X *
- X * 1-Jan-93 dmb rec.arts.int-fiction BETA release (source only)
- X * For beta testing only -- not for general
- X * distribution.
- X *
- X */
- X
- X/*
- X * This file includes the typical standard definitions.
- X */
- Xcheck_for_closing: function;
- Xcheck_for_endgame: function;
- Xmakend: function;
- X
- X/*
- X * This is the program's entry point.
- X */
- Xinit: function
- X{
- X local l;
- X
- X "\b\b\b\b";
- X version.sdesc; // display the game's name and version number
- X "\b";
- X
- X //
- X // See if the player wants an easy or normal game. (This
- X // was the "Do you want instructions?" query in the original.)
- X // In novice mode the lamp batteries last longer.
- X //
- X // It might also make sense to make some other things easier, like
- X // the number of dwarves or their tenacity, but for now we only make
- X // the change that was made for the original's novice mode.
- X //
- X // Novice mode costs the player global.novicepoints.
- X //
- X "Shall I go easy on you this game? (An easy game will cost you ";
- X say(-1 * global.novicepoints); " points.)\n>";
- X if (yorn()) {
- X incscore(global.novicepoints);
- X
- X //
- X // Change some stuff to make the game easier.
- X //
- X brass_lantern.turnsleft := 1000;
- X }
- X
- X "\b";
- X
- X //
- X // Randomize after the first turn. (This allows us to make a verb
- X // that prevents randomization for regression testing.)
- X //
- X setfuse(makend, 1, nil);
- X
- X setdaemon(turncount, nil); // start turn counter daemon
- X setdaemon(check_for_closing, nil); // start cave closing daemon
- X setdaemon(check_for_endgame, nil); // start endgame daemon
- X Me.location := At_End_Of_Road; // move player -> 1st location
- X Me.location.lookAround(true); // show player where he is
- X
- X //
- X // Initialize non-player characters (dwarves, pirate) if we're
- X // in debug mode. Otherwise do it from preinit.
- X //
- X if (global.debug)
- X initNPC();
- X
- X //
- X // Check room connections for integrity.
- X //
- X check_connections();
- X}
- Xmakend: function(parm)
- X{
- X if (global.nondeterministic) {
- X randomize();
- X }
- X else {
- X "\b*** This will be a deterministic game. ***";
- X }
- X
- X //
- X // Once we've randomized (if we're going to at all), place
- X // all the NPC's.
- X //
- X Dwarves.place;
- X notify(Dwarves, &move, 0);
- X
- X Pirates.place;
- X notify(Pirates, &move, 0);
- X}
- X
- X/*
- X * The following function is run at compile time to build lists and
- X * do other compute-intensive things ahead of time.
- X */
- Xpreinit: function
- X{
- X local o;
- X
- X //
- X // Construct list of light sources
- X //
- X global.lamplist := [];
- X o := firstobj(lightsource);
- X while (o <> nil) {
- X global.lamplist := global.lamplist + o;
- X o := nextobj(o, lightsource);
- X }
- X
- X //
- X // Count treasures to get initial number of treasures
- X // left to find.
- X //
- X global.treasures := 0;
- X o := firstobj(CCR_treasure_item);
- X while (o <> nil) {
- X global.treasurelist := global.treasurelist + o;
- X global.treasures := global.treasures + 1;
- X
- X o := nextobj(o, CCR_treasure_item);
- X }
- X
- X //
- X // Initialize non-player characters (dwarves, pirate) from
- X // here if we're not in debug mode. Otherwise do it in init.
- X //
- X if (not global.debug)
- X initNPC();
- X}
- X
- Xdie: function
- X{
- X local resurrect;
- X
- X P(); I();
- X
- X // DMB: "reincarnate" in the text below should actually
- X // be "resurrect," since presumably you're coming back
- X // as the same person you were before. I have left the
- X // original text as is, however, for the sake of purity.
- X
- X resurrect := nil; // assume no resurrection
- X
- X if (global.closed) {
- X "It looks as though you're dead. Well, seeing as how
- X it's so close to closing time anyway, I think we'll
- X just call it a day.";
- X
- X call_it_a_day();
- X }
- X else if (global.deaths = 0) {
- X "Oh dear, you seem to have gotten yourself killed. I
- X might be able to help you out, but I've never really
- X done this before. Do you want me to try to
- X reincarnate you?\b>";
- X
- X if (yorn()) {
- X "\bAll right. But don't blame me if something
- X goes wr...... \b \ \ \ \ \ \ \ \ \ \ \ \ \ \
- X \ \ \ \ \ \ --- POOF!! --- \bYou are engulfed
- X in a cloud of orange smoke. Coughing and
- X gasping, you emerge from the smoke and
- X find that you're....";
- X
- X resurrect := true;
- X }
- X else
- X "\bVery well.";
- X }
- X else if (global.deaths = 1) {
- X "You clumsy oaf, you've done it again! I don't know
- X how long I can keep this up. Do you want me to try
- X reincarnating you again?\b>";
- X
- X if (yorn()) {
- X "\bOkay, now where did I put my orange
- X smoke?.... >POOF!<\bEverything disappears in
- X a dense cloud of orange smoke.";
- X
- X resurrect := true;
- X }
- X else
- X "\bProbably a wise choice.";
- X }
- X else if (global.deaths = 2) {
- X "Now you've really done it! I'm out of orange smoke!
- X You don't expect me to do a decent reincarnation
- X without any orange smoke, do you?\b>";
- X
- X if (yorn()) {
- X "\bOkay, if you're so smart, do it yourself!
- X I'm leaving!";
- X }
- X else
- X "\bI thought not!";
- X }
- X
- X global.deaths := global.deaths + 1;
- X incscore(global.deathpoints);
- X
- X if (resurrect) {
- X //
- X // Resurrection:
- X //
- X // 1) Drop all player's items where he was killed.
- X // 2) Move lamp outside of building and turn it off.
- X // 3) Move the player into the building.
- X //
- X while (length(Me.contents) > 0)
- X Me.contents[1].moveInto(Me.location);
- X brass_lantern.turnoff;
- X brass_lantern.moveInto(At_End_Of_Road);
- X
- X "\b";
- X Me.travelTo(Inside_Building);
- X }
- X else {
- X //
- X // Player's done for good -- show score and quit.
- X //
- X scoreRank();
- X terminate();
- X quit();
- X abort;
- X }
- X}
- X
- X/*
- X * The player loses without any chance of reincarnation (for example,
- X * if his batteries run out.)
- X */
- Xcall_it_a_day: function
- X{
- X scoreRank();
- X terminate();
- X quit();
- X abort;
- X}
- X
- X/*
- X * The player has finished the game on a positive note.
- X */
- Xwin: function
- X{
- X scoreRank();
- X terminate();
- X quit();
- X abort;
- X}
- X
- X/*
- X * Show score and ranking
- X */
- XscoreRank: function
- X{
- X local pn;
- X
- X "You have scored "; say(global.score); " out of a possible ";
- X say(global.maxscore); ", using "; say(global.turnsofar);
- X if (global.turnsofar = 1)
- X " turn.";
- X else
- X " turns.";
- X
- X "\n";
- X
- X if (global.score < 35) {
- X //
- X // DMB: This originally said, "Better luck next time,"
- X // but this isn't really appropriate anymore since
- X // we now give the player his ranking when he types
- X // \"score.\" (In the original, you only got your
- X // rank when the game was over.)
- X //
- X "You are obviously a rank amateur.";
- X pn := 35 - global.score;
- X }
- X else if (global.score < 100) {
- X "Your score qualifies you as a Novice Class adventurer.";
- X pn := 100 - global.score;
- X }
- X else if (global.score < 130) {
- X "You have achieved the rating: \"Experienced Adventurer\".";
- X pn := 130 - global.score;
- X }
- X else if (global.score < 200) {
- X "You may now consider yourself a \"Seasoned Adventurer\".";
- X pn := 200 - global.score;
- X }
- X else if (global.score < 250) {
- X "You have reached \"Junior Master\" status.";
- X pn := 250 - global.score;
- X }
- X else if (global.score < 300) {
- X "Your score puts you in Master Adventurer Class C.";
- X pn := 300 - global.score;
- X }
- X else if (global.score < 330) {
- X "Your score puts you in Master Adventurer Class B.";
- X pn := 330 - global.score;
- X }
- X else if (global.score < 349) {
- X "Your score puts you in Master Adventurer Class A.";
- X pn := 349 - global.score;
- X }
- X else {
- X "All of Adventuredom gives tribute to you, Adventurer
- X Grandmaster!";
- X
- X pn := 0;
- X }
- X
- X "\n";
- X
- X if (pn > 0) {
- X "To achieve the next higher rating, you need ";
- X say(pn); " more ";
- X
- X if (pn = 1)
- X "point.";
- X else
- X "points.";
- X }
- X else
- X "To achieve the next higher rating would be a neat trick!";
- X
- X "\n";
- X}
- X
- X/*
- X * Print a nice message when we exit.
- X */
- Xterminate: function
- X{
- X "\b";
- X "Come back and visit the newly remodelled Colossal Cave soon!";
- X}
- X
- X/*
- X * What we say when the user enters a blank line.
- X */
- Xpardon: function
- X{
- X "What?";
- X}
- X
- X/*
- X * The numObj object is used to convey a number to the game whenever
- X * the player uses a number in his command. For example, "turn dial
- X * to 621" results in an indirect object of numObj, with its "value"
- X * property set to 621.
- X */
- XnumObj: basicNumObj; // use default definition from adv.t
- X
- X/*
- X * strObj works like numObj, but for strings. So, a player command of
- X * type "hello" on the keyboard
- X * will result in a direct object of strObj, with its "value" property
- X * set to the string 'hello'.
- X *
- X * Note that, because a string direct object is used in the save, restore,
- X * and script commands, this object must handle those commands.
- X */
- XstrObj: basicStrObj; // use default definition from adv.t
- X
- X/*
- X * The "global" object is the dumping ground for any data items that
- X * don't fit very well into any other objects. The properties of this
- X * object that are particularly important to the objects and functions
- X * are defined here; if you replace this object, but keep other parts
- X * of this file, be sure to include the properties defined here.
- X */
- Xglobal: object
- X //
- X // Scoring values
- X // Points for treasures are kept in the treasures themselves.
- X //
- X score = 36 // start out with 36 points:
- X // (2 + (-1 * quitpoints) +
- X // (-1 * deathpoints) * 3)
- X maxscore = 350 // maximum possible score
- X novicepoints = -5 // points for playing in easy mode (neg.)
- X quitpoints = -4 // points for quitting (neg.)
- X deathpoints = -10 // points gained each time player dies (neg.)
- X farinpoints = 25 // points for getting well into the cave
- X wittpoints = 1 // points for reaching Witt's End
- X closingpoints = 25 // points for surviving until cave closing time
- X endpoints = 10 // points for getting to final puzzle
- X almostpoints = 20 // points for *almost* getting final puzzle
- X winpoints = 35 // points for winning the final puzzle
- X
- X treasures = 0 // treasures left to deposit;
- X // filled in by preinit
- X treasurelist = [] // list of all treasures in the game;
- X // filled in by preinit
- X
- X //
- X // NPC stuff
- X //
- X dwarves = 5 // number of dwarves wandering about the cave
- X // (Was 5 in original.)
- X pirates = 1 // number of pirates lurking in the cave
- X // (Was 1 in original.)
- X
- X dtenacity = 96 // percentage chance that a dwarf will
- X // follow the player if in an adjacent
- X // location. (Was 100 in original.)
- X ptenacity = 50 // percentage chance that a pirate will
- X // follow the player if in an adjacent
- X // location. Don't set this too high or
- X // the game will get really bogus!
- X
- X //
- X // Where to start dwarves and pirate(s) out. Dwarves are placed
- X // in the locations given by drawfloc; if no locations remain when
- X // we're placing a dwarf, we just put him in a random room selected
- X // from NPCrooms.
- X //
- X // Note that the player gets the axe from the dwarf, so it's
- X // fairly important to put at least dwarf early on (but only
- X // in a room that's not off limits to NPC's!)
- X //
- X // Ditto for pirate(s).
- X //
- X dwarfloc = [
- X In_Hall_Of_Mists
- X ]
- X pirateloc = []
- X
- X dwarfattack = 75 // percentage chance that a dwarf will
- X // throw a knife at the player if he's
- X // in the same location. (Was 100 in
- X // the original.)
- X dwarfhit = 66 // percentage chance the player will
- X // hit a dwarf with his axe
- X // (Was 1 in 3 chance in the original.)
- X dwarfaccuracy = 9 // percentage chance that a dwarf will
- X // hit the player with a thrown knife
- X // (Was 9.5 in the original.)
- X
- X //
- X // Output formatting
- X //
- X verbose = nil // we are currently in TERSE mode
- X indent = true // indent paragraph beginnings
- X doublespace = true // double space the text
- X
- X //
- X // Other stuff
- X //
- X deaths = 0 // number of times the player has died
- X closingtime = 30 // close this many turns after player takes
- X // the last treasure. (was 30 in original)
- X bonustime = 20 // start endgame this many turns after
- X // the cave closes. In the original this
- X // was 50, but since we've change things
- X // slightly (the closing timer starts once
- X // the player deposits the last treasure in
- X // the building, not once he merely *sees*
- X // it), we've had to make this value smaller.
- X // If we were to leave it the way it was,
- X // it would be very hard to finish the game
- X // before the lamp batteries died.
- X panictime = 15 // extend timer by this many turns when player
- X // panics at closing time
- X
- X closed = nil // is the cave closed yet?
- X
- X turnsofar = 0 // no turns have transpired so far
- X lamplist = [] // list of all known light providers
- X // in the game
- X NPCrooms = [] // list of rooms NPC's (dwarves, pirate)
- X // can go to
- X
- X //
- X // Special wizard stuff. Don't mess with it!
- X //
- X nondeterministic = true // default to nondeterministic game
- X debug = nil // debugging messages on/off
- X;
- X
- X/*
- X * The "version" object defines, via its "sdesc" property, the name and
- X * version number of the game. Change this to a suitable name for your
- X * game.
- X */
- Xversion: object
- X sdesc = {
- X "\(Colossal Cave Revisited\)\n
- X Version 1.0, released April 1993.\b";
- X
- X "A remake of Willie Crowther and Don Woods' classic
- X Adventure.\n Converted from Donald Ekman's PC port of
- X the original FORTRAN source.\n TADS version by David
- X M.\ Baggett for \(ADVENTIONS\).\b";
- X
- X "\(Colossal Cave Revisited\) and its accompanying
- X source code are\n Copyright (C) 1993 David M.\
- X Baggett."; P();
- X
- X I(); "This program is free software; you can
- X redistribute it and/or modify it under the terms of
- X version 2 of the GNU General Public License as
- X published by the Free Software Foundation."; P();
- X
- X I(); "This program is distributed in the hope that it
- X will be useful, but WITHOUT ANY WARRANTY; without
- X even the implied warranty of MERCHANTABILITY or
- X FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- X General Public License for more details."; P();
- X
- X I(); "You should have received a copy of the GNU
- X General Public License along with this program; if
- X not, write to the Free Software Foundation, Inc., 675
- X Mass Ave, Cambridge, MA 02139, USA."; P();
- X
- X I(); "\(ADVENTIONS\) distributes this game, but you are
- X free to do what you will with it, provided you adhere
- X to the terms in the GNU Public License v2. Send
- X correspondence regarding this game or other works
- X distributed by \(ADVENTIONS\) to"; P();
- X
- X "\t\(ADVENTIONS\)\n
- X \tPO Box 851\n
- X \tColumbia, MD 21044"; P();
- X
- X I(); "If you want to report a bug or typo, be sure to
- X include the version number of the copy you are
- X playing, as well as the configuration of the machine
- X you are running it on."; P();
- X
- X I(); "\(ADVENTIONS\) has many other games like this
- X available, including adventures in the popular
- X Unnkulian saga. Send a self-addressed, stamped
- X envelope to the address above for a current catalog
- X of our releases, or drop us email online:\b
- X
- X \tCompuserve:\t76440,2671\n
- X \tGEnie:\t\tADVENTIONS\n
- X \tInternet:\tdmb@ai.mit.edu\b
- X
- X or on the following BBS's:\b
- X
- X \tFANTAZIA (410) 521-5636 (8N1)\n
- X \tHigh Energy BBS (415) 493-2420 (8N1)"; P();
- X
- X "***"; P();
- X
- X I(); "Most game companies have abandoned interactive
- X fiction because it isn't profitable enough. We think
- X that interactive novels are exciting and important
- X elements of the gaming world that offer possibilities
- X currently impossible to explore in graphics-oriented
- X settings. We spend as much time on our games as
- X \"normal\" authors spend on novels. Please support
- X us to help keep the interactive fiction genre alive.
- X Thanks, and have fun!"; P();
- X
- X "***";
- X }
- X;
- X
- X/*
- X * "Me" is the player's actor. Pick up the default definition, basicMe,
- X * from "adv.t".
- X */
- XMe: basicMe
- X panicked = nil // has the player panicked after closing time?
- X
- X // The original code only allowed the player to carry
- X // seven objects at a time. Weight wasn't taken into
- X // consideration.
- X
- X maxbulk = 7
- X
- X //
- X // Give the player points for getting a fair ways into
- X // the cave.
- X //
- X awardedpointsforgettingfarin = nil
- X travelTo(room) = {
- X if (room = nil)
- X pass travelTo;
- X else if (global.closed and room.isoutside) {
- X "A mysterious recorded voice groans into life
- X and announces, \"This exit is closed. Please
- X leave via main office.\"";
- X
- X if (not self.panicked) {
- X self.panicked := true;
- X
- X //
- X // The player is obviously panicking
- X // at closing time and is desperately
- X // trying to get out. In the original
- X // code the endgame timer is (erroneously?)
- X // set to 15 in this circumstance.
- X //
- X // Comments in the code suggest that the
- X // intention was to *extend* the timer
- X // by 15, so we'll do that here.
- X //
- X global.bonustime := global.bonustime +
- X global.panictime;
- X }
- X
- X return; // no pass travelTo
- X }
- X else if (not self.awardedpointsforgettingfarin) {
- X if (not room.notfarin) {
- X incscore(global.farinpoints);
- X self.awardedpointsforgettingfarin := true;
- X }
- X }
- X
- X pass travelTo;
- X }
- X;
- X
- X/*
- X * darkTravel() is called whenever the player attempts to move from a dark
- X * location into another dark location.
- X *
- X * This isn't quite the way the original worked, but it's close enough.
- X */
- XdarkTravel: function
- X{
- X "It is now pitch dark. If you proceed you will likely fall
- X into a pit.";
- X
- X /*
- X * 1 in 4 chance of death.
- X */
- X if (rand(4) = 1) {
- X P(); I();
- X "You fell into a pit and broke every bone in your body!";
- X die();
- X }
- X}
- END_OF_FILE
- if test 18170 -ne `wc -c <'src/ccr-std.t'`; then
- echo shar: \"'src/ccr-std.t'\" unpacked with wrong size!
- fi
- # end of 'src/ccr-std.t'
- fi
- if test -f 'src/ccr-verb.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'src/ccr-verb.t'\"
- else
- echo shar: Extracting \"'src/ccr-verb.t'\" \(17740 characters\)
- sed "s/^X//" >'src/ccr-verb.t' <<'END_OF_FILE'
- X/*
- X * Colossal Cave Revisited
- X *
- X * A remake of Willie Crowther and Don Woods' classic Adventure.
- X * Converted from Donald Ekman's PC port of the original FORTRAN source.
- X * TADS version by David M. Baggett for ADVENTIONS.
- X *
- X * Please document all changes in the history so we know who did what.
- X *
- X * This source code is copylefted under the terms of the GNU Public
- X * License. Essentially, this means that you are free to do whatever
- X * you wish with this source code, provided you do not charge any
- X * money for it or for any derivative works.
- X *
- X * ADVENTIONS distributes this game, but you are free to do what you will
- X * with it, provided you adhere to the terms in the GNU Public License.
- X * Send correspondence regarding this game or original works distributed
- X * by ADVENTIONS to
- X *
- X * ADVENTIONS
- X * PO Box 851
- X * Columbia, MD 21044
- X *
- X * If you would like a catalog of releases, please enclose a SASE. Thanks!
- X *
- X * Contributors
- X *
- X * dmb In real life: David M. Baggett
- X * Internet: <dmb@ai.mit.edu>
- X * Compu$erve: 76440,2671 (ADVENTIONS account)
- X * GEnie: ADVENTIONS
- X *
- X * Modification History
- X *
- X * 1-Jan-93 dmb rec.arts.int-fiction BETA release (source only)
- X * For beta testing only -- not for general
- X * distribution.
- X * 20-Apr-93 dmb Added a few verbs for regression testing.
- X *
- X */
- X
- X/*
- X * This file defines new verbs, including the myriad new travel verbs.
- X */
- X
- X/*
- X * system verbs
- X */
- XspaceVerb: deepverb
- X sdesc = "space"
- X verb = 'space'
- X action(actor) = {
- X if (global.doublespace) {
- X "Now single-spacing text.";
- X global.doublespace := nil;
- X }
- X else {
- X "Now double-spacing text.";
- X global.doublespace := true;
- X }
- X
- X abort; /* doesn't count as a turn */
- X }
- X;
- XindentVerb: deepverb
- X sdesc = "indent"
- X verb = 'indent'
- X action(actor) = {
- X if (global.indent) {
- X "Paragraph indentation now off.";
- X global.indent := nil;
- X }
- X else {
- X "Paragraph indentation now on.";
- X global.indent := true;
- X }
- X
- X abort; /* doesn't count as a turn */
- X }
- X;
- Xdeterministicverb: deepverb
- X verb = 'deterministic' 'norandom' 'norandomize'
- X action(actor) = { global.nondeterministic := nil; }
- X;
- Xnodwarves: deepverb
- X verb = 'nodwarf' 'nodwarves'
- X action(actor) = {
- X Dwarves.loclist := [];
- X Pirates.loclist := [];
- X "\b*** Dwarves and pirates disabled. ***\n";
- X treasure_chest.moveInto(Dead_End_13);
- X }
- X;
- X
- X/*
- X * Special and/or magic verbs
- X */
- XyesVerb: deepverb
- X //
- X // This is a hack to allow the following:
- X //
- X // >kill dragon
- X // With what, your bare hands?
- X // >yes
- X //
- X sdesc = "answer yes to"
- X verb = 'yes' 'uh-huh' 'uhuh' 'yea' 'yeah' 'yup' 'sure' 'yep'
- X
- X action(actor) = {
- X //
- X // If we asked "with your bear hands?" last turn,
- X // do special stuff.
- X //
- X if (Dragon.rhetoricalturn = global.turnsofar - 1)
- X Dragon.kill;
- X else if (Bear.rhetoricalturn = global.turnsofar - 1)
- X Bear.nicetry;
- X else if (Dwarves.rhetoricalturn = global.turnsofar - 1)
- X Dwarves.nicetry;
- X else
- X "You're sounding awfully positive!";
- X }
- X;
- X
- XfeeVerb: deepverb
- X said = nil
- X
- X sdesc = "fee"
- X verb = 'fee'
- X action(actor) = {
- X if (self.said)
- X self.fail;
- X else {
- X "Ok!";
- X fieVerb.tcount := global.turnsofar + 1;
- X foeVerb.tcount := global.turnsofar + 2;
- X fooVerb.tcount := global.turnsofar + 3;
- X self.said := true;
- X fieVerb.said := nil;
- X foeVerb.said := nil;
- X }
- X }
- X
- X fail = {
- X if (self.said) {
- X "What's the matter, can't you read? Now
- X you'd best start over. ";
- X }
- X else {
- X "Nothing happens.";
- X }
- X
- X self.reset;
- X }
- X
- X reset = {
- X fieVerb.tcount := -1;
- X foeVerb.tcount := -1;
- X fooVerb.tcount := -1;
- X
- X self.said := nil;
- X fieVerb.said := nil;
- X foeVerb.said := nil;
- X }
- X;
- XfieVerb: deepverb
- X said = nil
- X tcount = -1
- X sdesc = "fie"
- X verb = 'fie'
- X action(actor) = {
- X if (self.tcount = global.turnsofar) {
- X self.said := true;
- X "Ok!";
- X }
- X else
- X feeVerb.fail;
- X }
- X;
- XfoeVerb: deepverb
- X said = nil
- X tcount = -1
- X sdesc = "foe"
- X verb = 'foe'
- X action(actor) = {
- X if (not fieVerb.said)
- X feeVerb.fail;
- X else if (self.tcount = global.turnsofar) {
- X self.said := true;
- X "Ok!";
- X }
- X else
- X feeVerb.fail;
- X }
- X;
- XfooVerb: deepverb
- X tcount = -1
- X sdesc = "foo"
- X verb = 'foo'
- X action(actor) = {
- X if (not foeVerb.said)
- X feeVerb.fail;
- X else if (self.tcount = global.turnsofar) {
- X if (golden_eggs.isIn(In_Giant_Room))
- X "Nothing happens.";
- X else {
- X if (golden_eggs.isIn(Me.location))
- X "The nest of golden eggs has
- X vanished!";
- X else
- X "Done!";
- X
- X golden_eggs.moveInto(In_Giant_Room);
- X
- X if (golden_eggs.isIn(Me.location)) {
- X P(); I();
- X "A large nest full of golden
- X eggs suddenly appears out of
- X nowhere!";
- X }
- X }
- X
- X feeVerb.reset;
- X }
- X else
- X feeVerb.fail;
- X }
- X;
- XfumVerb: deepverb
- X sdesc = "fum"
- X verb = 'fum'
- X action(actor) = {
- X feeVerb.fail;
- X }
- X;
- X
- XlosingmagicVerb: deepverb
- X sdesc = "foobar"
- X verb = 'sesame' 'open-sesame' 'opensesame' 'abracadabra'
- X 'shazam' 'shazzam' 'hocus' 'pocus' 'hokus' 'pokus'
- X 'hocuspocus' 'hocus-pocus' 'hokuspokus' 'hokus-pokus'
- X 'foobar'
- X action(actor) = {
- X "Good try, but that is an old worn-out magic word.";
- X }
- X;
- X
- X/*
- X * new general-purpose verbs.
- X */
- XhelpVerb: deepverb
- X sdesc = "help"
- X verb = 'help' 'info' 'information'
- X action(actor) = { help(); }
- X;
- XwaveVerb: deepverb
- X sdesc = "wave"
- X verb = 'wave' 'shake'
- X doAction = 'Wave'
- X;
- X
- XbreakVerb: deepverb
- X sdesc = "break"
- X verb = 'break' 'destroy' 'damage' 'bust' 'mangle' 'smash'
- X doAction = 'Break'
- X;
- X
- XsmellVerb: deepverb
- X sdesc = "smell"
- X verb = 'smell' 'sniff' 'waft'
- X doAction = 'Smell'
- X;
- X
- XrubVerb: deepverb
- X sdesc = "rub"
- X verb = 'rub' 'caress' 'fondle' 'pat' 'pet' 'hug' 'cuddle' 'squeeze'
- X doAction = 'Rub'
- X;
- X
- XcountVerb: deepverb
- X verb = 'count'
- X sdesc = "count"
- X doAction = 'Count'
- X;
- X
- XtieVerb: deepverb
- X sdesc = "tie"
- X verb = 'tie' 'knot'
- X doAction = 'Tie'
- X;
- X
- XuntieVerb: deepverb
- X sdesc = "untie"
- X verb = 'untie' 'unknot'
- X doAction = 'Untie'
- X;
- X
- XpourVerb: deepverb
- X sdesc = "pour"
- X verb = 'pour' 'dump'
- X prepDefault = onPrep
- X ioAction(onPrep) = 'PourOn'
- X;
- XdouseVerb: deepverb
- X sdesc = "douse"
- X verb = 'douse' 'drench'
- X prepDefault = withPrep
- X ioAction(withPrep) = 'DouseWith'
- X;
- X
- XoilVerb: deepverb
- X sdesc = "oil"
- X verb = 'oil' 'grease' 'lubricate'
- X doAction = 'Oil'
- X;
- X
- XwaterVerb: deepverb
- X sdesc = "water"
- X verb = 'water'
- X doAction = 'Water'
- X;
- X
- XkickVerb: deepverb
- X sdesc = "kick"
- X verb = 'kick' 'knee'
- X doAction = 'Kick'
- X;
- X
- XsingVerb: deepverb
- X sdesc = "sing"
- X verb = 'sing' 'whistle'
- X doAction = 'Sing'
- X action(actor) = { "You don't sound half bad. But don't quit your day job."; }
- X;
- X
- XuseVerb: deepverb
- X sdesc = "use"
- X verb = 'use' 'utilize' 'employ'
- X doAction = 'Use'
- X;
- X
- XlightVerb: deepverb
- X sedsc = "light"
- X verb = 'light'
- X doAction = 'Light'
- X;
- X
- XpickVerb: deepverb
- X sdesc = "pick"
- X verb = 'pick'
- X doAction = 'Pick'
- X;
- X
- XwakeVerb: deepverb
- X sdesc = "wake"
- X verb = 'wake' 'awaken' 'wake up' 'disturb'
- X doAction = 'Wake'
- X;
- X
- XdigVerb: deepverb
- X sdesc = "dig"
- X verb = 'dig' 'burrow'
- X action(actor) = {
- X "Digging without a shovel is quite impractical. Even
- X with a shovel progress is unlikely.";
- X }
- X;
- X
- XblastVerb: deepverb
- X sdesc = "blast"
- X verb = 'blast' 'blast with'
- X action(actor) = {
- X if (Me.isIn(At_Ne_End) or Me.isIn(At_Sw_End))
- X black_mark_rod.doBlastWith(actor);
- X else
- X "Blasting requires dynamite.";
- X }
- X doAction = 'BlastWith'
- X;
- X
- XfeedVerb: deepverb
- X sdesc = "feed"
- X verb = 'feed' 'stuff' 'fatten'
- X doAction = 'Feed'
- X;
- X
- XfillVerb: deepverb
- X sdesc = "fill"
- X verb = 'fill'
- X doAction = 'Fill'
- X;
- X
- XemptyVerb: deepverb
- X sdesc = "empty"
- X verb = 'empty'
- X doAction = 'Empty'
- X;
- X
- X/*
- X * Do this later.
- X */
- XbackVerb: travelVerb
- X verb = 'back' 'return' 'retreat'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.back);
- X }
- X;
- X
- X/*
- X * From here until the end of the file we define the new direction verbs.
- X * Not very exciting reading.
- X */
- XjumpVerb: travelVerb // this is normally defined in adv.t
- X verb = 'jump' 'leap'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.road);
- X }
- X;
- X
- XroadVerb: travelVerb
- X verb = 'road' 'hill'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.road);
- X }
- X;
- X
- XupstreamVerb: travelVerb
- X verb = 'upstream'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.upstream);
- X }
- X;
- X
- XdownstreamVerb: travelVerb
- X verb = 'downstream'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.downstream);
- X }
- X;
- X
- XforestVerb: travelVerb
- X verb = 'forest'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.forest);
- X }
- X;
- X
- XforwardsVerb: travelVerb
- X verb = 'forwards' 'continue' 'onward'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.forwards);
- X }
- X;
- X
- XvalleyVerb: travelVerb
- X verb = 'valley'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.valley);
- X }
- X;
- X
- XstairsVerb: travelVerb
- X verb = 'stairs'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.stairs);
- X }
- X;
- X
- XbuildingVerb: travelVerb
- X verb = 'building' 'house'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.building);
- X }
- X;
- X
- XgullyVerb: travelVerb
- X verb = 'gully'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.gully);
- X }
- X;
- X
- XstreamVerb: travelVerb
- X verb = 'stream'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.stream);
- X }
- X;
- X
- XrockVerb: travelVerb
- X verb = 'rock'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.rock);
- X }
- X;
- X
- XbedVerb: travelVerb
- X verb = 'bed'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.bed);
- X }
- X;
- X
- XcrawlVerb: travelVerb
- X verb = 'crawl'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.crawl);
- X }
- X;
- X
- XcobbleVerb: travelVerb
- X verb = 'cobble'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.cobble);
- X }
- X;
- X
- XsurfaceVerb: travelVerb
- X verb = 'surface'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.tosurface);
- X }
- X;
- X
- XdarkVerb: travelVerb
- X verb = 'dark'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.dark);
- X }
- X;
- X
- XpassageVerb: travelVerb
- X verb = 'passage' 'tunnel'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.passage);
- X }
- X;
- X
- XlowVerb: travelVerb
- X verb = 'low'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.low);
- X }
- X;
- X
- XcanyonVerb: travelVerb
- X verb = 'canyon'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.canyon);
- X }
- X;
- X
- XawkwardVerb: travelVerb
- X verb = 'awkward'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.awkward);
- X }
- X;
- X
- XgiantVerb: travelVerb
- X verb = 'giant'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.giant);
- X }
- X;
- X
- XviewVerb: travelVerb
- X verb = 'view'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.view);
- X }
- X;
- X
- XpitVerb: travelVerb
- X verb = 'pit'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.pit);
- X }
- X;
- X
- XoutdoorsVerb: travelVerb
- X verb = 'outdoors'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.outdoors);
- X }
- X;
- X
- XcrackVerb: travelVerb
- X verb = 'crack'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.crack);
- X }
- X;
- X
- XstepsVerb: travelVerb
- X verb = 'steps'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.steps);
- X }
- X;
- X
- XdomeVerb: travelVerb
- X verb = 'dome'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.dome);
- X }
- X;
- X
- XleftVerb: travelVerb
- X verb = 'left'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.left);
- X }
- X;
- X
- XrightVerb: travelVerb
- X verb = 'right'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.right);
- X }
- X;
- X
- XhallVerb: travelVerb
- X verb = 'hall'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.hall);
- X }
- X;
- X
- XbarrenVerb: travelVerb
- X verb = 'barren'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.barren);
- X }
- X;
- X
- XoverVerb: travelVerb
- X verb = 'over'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.over);
- X }
- X;
- X
- XacrossVerb: travelVerb
- X verb = 'across'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.across);
- X }
- X;
- X
- XdebrisVerb: travelVerb
- X verb = 'debris'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.debris);
- X }
- X;
- X
- XholeVerb: travelVerb
- X verb = 'hole'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.hole);
- X }
- X;
- X
- XwallVerb: travelVerb
- X verb = 'wall'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.wall);
- X }
- X;
- X
- XbrokenVerb: travelVerb
- X verb = 'broken'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.broken);
- X }
- X;
- X
- Xy2Verb: travelVerb
- X verb = 'y2'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.y2);
- X }
- X;
- X
- XfloorVerb: travelVerb
- X verb = 'floor'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.floor);
- X }
- X;
- X
- XroomVerb: travelVerb
- X verb = 'room'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.toroom);
- X }
- X;
- X
- XslitVerb: travelVerb
- X verb = 'slit'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.slit);
- X }
- X;
- X
- XslabVerb: travelVerb
- X verb = 'slab' 'slabroom'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.slab);
- X }
- X;
- X
- XxyzzyVerb: travelVerb
- X verb = 'xyzzy'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.xyzzy);
- X }
- X;
- X
- XdepressionVerb: travelVerb
- X verb = 'depression' 'grate' // DMB: added 'grate'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.depression);
- X }
- X;
- X
- XentranceVerb: travelVerb
- X verb = 'entrance'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.entrance);
- X }
- X;
- X
- XplughVerb: travelVerb
- X verb = 'plugh'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.plugh);
- X }
- X;
- X
- XsecretVerb: travelVerb
- X verb = 'secret'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.secret);
- X }
- X;
- X
- XcaveVerb: travelVerb
- X verb = 'cave'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.cave);
- X }
- X;
- X
- XcrossVerb: travelVerb
- X verb = 'cross'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.cross);
- X }
- X doAction = 'Cross'
- X;
- X
- XbedquiltVerb: travelVerb
- X verb = 'bedquilt'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.bedquilt);
- X }
- X;
- X
- XploverVerb: travelVerb
- X verb = 'plover'
- X action(actor) = {
- X local loc;
- X
- X //
- X // If the player teleports by using the plover
- X // magic word while holding the emerald, the
- X // emerald goes back to its original source.
- X //
- X loc := actor.location;
- X actor.travelTo(self.travelDir(actor));
- X if (loc <> actor.location and egg_sized_emerald.isIn(Me))
- X egg_sized_emerald.moveInto(In_Plover_Room);
- X }
- X travelDir(actor) = {
- X return(actor.location.plover);
- X }
- X;
- X
- XorientalVerb: travelVerb
- X verb = 'oriental'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.oriental);
- X }
- X;
- X
- XcavernVerb: travelVerb
- X verb = 'cavern'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.cavern);
- X }
- X;
- X
- XshellVerb: travelVerb
- X verb = 'shell'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.shell);
- X }
- X;
- X
- XreservoirVerb: travelVerb
- X verb = 'reservoir'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.reservoir);
- X }
- X;
- X
- XmainVerb: travelVerb
- X verb = 'main' 'office'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.main);
- X }
- X;
- X
- XforkVerb: travelVerb
- X verb = 'fork'
- X action(actor) = {
- X actor.travelTo(self.travelDir(actor));
- X }
- X travelDir(actor) = {
- X return(actor.location.fork);
- X }
- X;
- END_OF_FILE
- if test 17740 -ne `wc -c <'src/ccr-verb.t'`; then
- echo shar: \"'src/ccr-verb.t'\" unpacked with wrong size!
- fi
- # end of 'src/ccr-verb.t'
- fi
- echo shar: End of archive 10 \(of 11\).
- cp /dev/null ark10isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 11 archives.
- echo "Now run buildit.sh to make gam file"
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-