[comp.sources.games] v07i092: NetHack3 - display oriented dungeons & dragons

billr@saab.CNA.TEK.COM (Bill Randle) (07/25/89)

Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
Posting-number: Volume 7, Issue 92
Archive-name: NetHack3/Part37



#! /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 37 (of 38)."
# Contents:  Makefile.top amiga/NetHack.cnf amiga/amitty.c
#   auxil/history include/amiconf.h include/artifact.h include/edog.h
#   include/epri.h include/eshk.h include/flag.h include/hack.h
#   include/lev_comp.h include/mfndpos.h include/monsym.h
#   include/msdos.h include/permonst.h include/prop.h include/sp_lev.h
#   include/tosconf.h include/tradstdc.h include/trap.h
#   include/trapname.h include/vault.h include/wseg.h others/Make.ini
#   others/pctty.c src/ioctl.c src/lev_main.c src/panic.c src/rip.c
#   src/rnd.c src/version.c src/were.c
# Wrapped by billr@saab on Sun Jul 23 21:33:23 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Makefile.top' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile.top'\"
else
echo shar: Extracting \"'Makefile.top'\" \(2572 characters\)
sed "s/^X//" >'Makefile.top' <<'END_OF_FILE'
X#	Hack Makefile.
X#	SCCS Id: @(#)Makefile.top	3.0	89/03/23
X
X# make NetHack
XGAME     = nethack
XGAMEUID  = games
XGAMEGRP  = bin
X
X#	GAMEDIR also appears in config.h as "HACKDIR".
XGAMEDIR  = /usr/games/lib/$(GAME)dir
XSHELLDIR = /usr/games
XMANDIR   = /usr/man/man6
XMANEXT   = 6
X# manual installation for most BSD-style systems
XGAMEMANCREATE = cp auxil/nethack.6
XLEVMANCREATE = cp auxil/lev_comp.6
X# manual installation for most SYSV-style systems
X# GAMEMANCREATE = nroff -man auxil/nethack.6 >
X# LEVMANCREATE = nroff -man auxil/lev_comp.6 >
X
XAUXHELP = help hh cmdhelp history opthelp oracles
XVARAUX = data rumors
XSPEC_LEVS = endgame castle tower1 tower2 tower3
XAUX = $(AUXHELP) $(VARAUX) $(SPEC_LEVS) license
X
X$(GAME):
X	( cd src ; make )
X
Xall:	$(GAME) Guidebook data rumors spec_levs
X	@echo "Done."
X
XGuidebook:
X	( cd auxil ; make Guidebook )
X
Xdata:
X	( cd auxil ; make data )
X
Xrumors:
X	( cd auxil ; make rumors )
X
Xspec_levs:
X	( cd src ; make lev_comp )
X	( cd auxil ; make spec_levs )
X	
Xupdate: $(GAME) data rumors spec_levs
X# copy over new versions of the game files
X	( cd auxil ; cp $(AUX) $(GAMEDIR) )
X#	(don't yank the old version out from under people who're playing it)
X	mv $(GAMEDIR)/$(GAME) $(GAMEDIR)/$(GAME).old
X	cp src/$(GAME) $(GAMEDIR)
X	cp auxil/$(GAME).sh $(SHELLDIR)/$(GAME)
X# correct the permissions on the new versions
X	-( cd $(GAMEDIR) ; chown $(GAMEUID) $(AUX) $(GAME) ; \
X			chgrp $(GAMEGRP) $(AUX) $(GAME) ; \
X			chmod 644 $(AUX) )
X	-chown $(GAMEUID) $(SHELLDIR)/$(GAME)
X	chgrp $(GAMEGRP) $(SHELLDIR)/$(GAME)
X	chmod 0755 $(SHELLDIR)/$(GAME)
X	chmod 04755 $(GAMEDIR)/$(GAME)
X# and touch time-sensitive files
X	-touch -c $(GAMEDIR)/bones* $(GAMEDIR)/?lock* $(GAMEDIR)/wizard*
X	-touch -c $(GAMEDIR)/save/*
X	touch $(GAMEDIR)/perm $(GAMEDIR)/record
X
Xinstall: $(GAME) data rumors spec_levs
X# set up the directories
X	-mkdir $(SHELLDIR)
X	-rm -rf $(GAMEDIR)
X	-mkdir $(GAMEDIR) $(GAMEDIR)/save
X# create some files
X	touch $(GAMEDIR)/perm $(GAMEDIR)/record $(GAMEDIR)/logfile
X# copy over the game files
X	( cd auxil ; cp $(AUX) $(GAMEDIR) )
X	cp src/$(GAME) $(GAMEDIR)
X	cp auxil/$(GAME).sh $(SHELLDIR)/$(GAME)
X# set up the permissions
X	-chown $(GAMEUID) $(SHELLDIR)/$(GAME) $(GAMEDIR) $(GAMEDIR)/*
X	chgrp $(GAMEGRP) $(SHELLDIR)/$(GAME) $(GAMEDIR) $(GAMEDIR)/*
X	chmod 0755 $(SHELLDIR)/$(GAME)
X	chmod 644 $(GAMEDIR)/*
X	chmod 755 $(GAMEDIR) $(GAMEDIR)/save
X	chmod 04755 $(GAMEDIR)/$(GAME)
X# and copy the man pages
X	-$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT)
X	-$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT)
X
Xclean:
X	( cd src ; make clean)
X
Xspotless:
X	( cd src ; make spotless)
END_OF_FILE
if test 2572 -ne `wc -c <'Makefile.top'`; then
    echo shar: \"'Makefile.top'\" unpacked with wrong size!
fi
# end of 'Makefile.top'
fi
if test -f 'amiga/NetHack.cnf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'amiga/NetHack.cnf'\"
else
echo shar: Extracting \"'amiga/NetHack.cnf'\" \(2149 characters\)
sed "s/^X//" >'amiga/NetHack.cnf' <<'END_OF_FILE'
X# A '#' at the beginning of a line means the rest of the line is a comment.
X
X# This configuration file is set up for two cases, a person with a hard
X# disk as drive DH0:, and 1 person with two floppy disks.  If several people
X# are to use it, don't specify "name" or personal prefences like "dogname"
X# or "packorder" in OPTIONS.
X
X# To change configuration, comment out the unwanted configurations, and
X# remove the comment from the configuration you want.
X
X# Some options to set personal preferences.  If several people are to
X# use it, options like these should not be set.
X#OPTIONS=name:Janet-V,female,dogname:Fido,fruit:apricot
X#OPTIONS=packorder:")[%?+/=!(*0_`,endgame:10t/2a,noverbose
X
X# Other general options
X#OPTIONS=time,rest_on_space,nopickup
X
X# The search path for files like record, help, opthelp, etc.
XPATH=NetHack:
X
X# My own setup
XOPTIONS=name:Rhialto,catname:Killie,time,nopickup
X
X# A hard disk configuration.
X#
X#HACKDIR=DH0:/games/hack
X# The ";n" means don't prompt to insert a disk.
X#SAVE=;n
X#RAMDISK=Ram:
X#LEVELS=DH0:games/hack/bones
X#SAVE=DH0:/games/hack/bones;n
X
X# A 2-floppy configuration.
X#
XHACKDIR=NetHack:
XLEVELS=df1:
XSAVE=df1:save
XRAMDISK=Ram:
X
X# The 32 GRAPHICS characters (0-31) are:
X# stone, vertical wall, horizontal wall, top left corner, top right corner, 
X# bottom left corner, bottom right corner, crosswall, up T wall, down T wall, 
X# left T wall, right T wall, vertical beam, horizontal beam, left slant, right
X# slant, door, floor, corridor, up stairs, down stairs, trap, web, pool,
X# fountain, sink, throne, altar, up ladder, down ladder, vertical drawbridge
X# wall, horizontal drawbridge wall 
X#
X# If you specify less that 32 ASCII values, the remaining characters will be
X# set to their respective defaults.
X#
X# Note that the hack.font has special graphics characters from 192 on.
X
X# An example using the hack.font graphics character set:
X#	   ' '  |   -   .   .   `   '   -   -   -   -   -   |   -   \   /   +   .   #   <   >   ^   "   }   {   #   \   _   <   >   #   #
XGRAPHICS = 032 192 193 194 195 196 197 198 216 214 215 213 192 193 092 047 198 046 035 060 062 094 034 125 123 035 092 095 060 062 035 035
END_OF_FILE
if test 2149 -ne `wc -c <'amiga/NetHack.cnf'`; then
    echo shar: \"'amiga/NetHack.cnf'\" unpacked with wrong size!
fi
# end of 'amiga/NetHack.cnf'
fi
if test -f 'amiga/amitty.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'amiga/amitty.c'\"
else
echo shar: Extracting \"'amiga/amitty.c'\" \(990 characters\)
sed "s/^X//" >'amiga/amitty.c' <<'END_OF_FILE'
X/*    SCCS Id: @(#)amitty.c     3.0    89/04/26
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X/* tty.c - (Amiga) version */
X
X
X#include "hack.h"
X
Xextern int Enable_Abort;
X
Xchar erase_char, kill_char;
X
X/*
X * Get initial state of terminal, set ospeed (for termcap routines)
X * and switch off tab expansion if necessary.
X * Called by startup() in termcap.c and after returning from ! or ^Z
X */
Xvoid gettty()
X{
X    erase_char = 127;	    /* DEL */
X    kill_char = 21;	    /* cntl-U */
X    flags.cbreak = TRUE;
X    Enable_Abort = 0;
X    curx = 1;
X    cury = 1;
X}
X
X/* reset terminal to original state */
Xvoid settty(s)
Xchar *s;
X{
X    end_screen();
X    if (s) {
X	printf(s);
X    }
X    (void) fflush(stdout);
X    /* Do not close the screen, that is done in msexit() */
X}
X
X
X/* fatal error */
X/*VARARGS1*/
Xvoid error(s,x,y)
Xchar *s;
X{
X	end_screen();
X	putchar('\n');
X	printf(s,x,y);
X	putchar('\n');
X	abort(1);
X}
END_OF_FILE
if test 990 -ne `wc -c <'amiga/amitty.c'`; then
    echo shar: \"'amiga/amitty.c'\" unpacked with wrong size!
fi
# end of 'amiga/amitty.c'
fi
if test -f 'auxil/history' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'auxil/history'\"
else
echo shar: Extracting \"'auxil/history'\" \(1934 characters\)
sed "s/^X//" >'auxil/history' <<'END_OF_FILE'
X
XBehold, mortal, the origins of NetHack...
X
XJay Fenlason wrote the original Hack with help from Kenny Woodland,
XMike Thome, and Jon Payne.
X
XAndries Brouwer did a major re-write and published (at least) three versions
X(1.0.1, 1.0.2, and 1.0.3) for UNIX(tm) machines to the Usenet.
X
XDon Kneller ported 1.0.3 Hack to Microsoft(tm) C and MSDOS(tm), producing
XPC HACK 1.01e, added support for DEC Rainbow graphics in version 1.03g,
Xand went on to produce at least four more versions (3.0, 3.2, 3.51, and 3.6).
X
XR. Black ported PC HACK 3.51 to Lattice(tm) C and the Atari 520/1040,
Xproducing ST Hack 1.03.
X
XMike Stephenson merged these various versions back together, incorporating
Xmany of the added features, and produced NetHack version 1.4.  He then
Xcoordinated a cast of thousands in enhancing and debugging NetHack 1.4 and 
Xreleased NetHack versions 2.2 and 2.3.  Later, he coordinated a major rewrite
Xof the game, heading a team which included Ken Arromdee, Jean-Christophe
XCollet, Steve Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike
XThreepoint, and Janet Walz, to produce NetHack 3.0. 
X
XOlaf Seibert ported NetHack 2.3 and 3.0 to the Amiga.
X
X 
XFrom time to time, some depraved individual out there in netland sends a
Xparticularly intriguing modification to help out with the game.  The Gods of
Xthe Dungeon sometimes make note of the names of the worst of these miscreants
Xin this, the list of Dungeoneers:
X
X    Tom Almy                  Eric Hendrickson       Izchak Miller
X    Ken Arromdee              Bruce Holloway         Gil Neiger
X    Eric Backus               Richard P. Hughey      Eric S. Raymond
X    John S. Bien              Greg Laskin            John Rupley
X    Ralf Brown                Steve Linhart          Kevin Sweet
X    Jean-Christophe Collet    Roland McGrath         Scott R. Turner
X    Steve Creps               Bruce Mewborne         Janet Walz
X
X    and...                    The Unknown Hacker
X
END_OF_FILE
if test 1934 -ne `wc -c <'auxil/history'`; then
    echo shar: \"'auxil/history'\" unpacked with wrong size!
fi
# end of 'auxil/history'
fi
if test -f 'include/amiconf.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/amiconf.h'\"
else
echo shar: Extracting \"'include/amiconf.h'\" \(1047 characters\)
sed "s/^X//" >'include/amiconf.h' <<'END_OF_FILE'
X/*      SCCS Id: @(#)amiconf.h  3.0     89/04/28
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef AMICONF_H
X#define AMICONF_H
X
X#define MSDOS           /* must be defined to allow some inclusions */
X#define AMIGA           /* and for some other inclusions */
X
X#define O_BINARY        0
X#define remove(x)       unlink(x)
X
X#define DGK             /* You'll probably want this; define it in PCCONF.H */
X#define RANDOM
X
X#ifndef MSDOS_H
X#include "msdos.h"
X#endif
X#ifndef PCCONF_H
X#include "pcconf.h"     /* remainder of stuff is almost same as the PC */
X#endif
X
X#undef  index
X#undef  rindex
X
X/*
X *  Configurable Amiga options:
X */
X
X#define MSDOSCOLOR              /* Use colored monsters and objects */
X#define HACKFONT                /* Use special hack.font */
X#define SHELL                   /* Have a shell escape command (!) */
X#define MAIL                    /* Get mail at unexpected occasions */
X#undef  TERMLIB
X#define fopen       fopenp      /* Open most text files according to PATH */
X
X#endif /* AMICONF_H /* */
END_OF_FILE
if test 1047 -ne `wc -c <'include/amiconf.h'`; then
    echo shar: \"'include/amiconf.h'\" unpacked with wrong size!
fi
# end of 'include/amiconf.h'
fi
if test -f 'include/artifact.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/artifact.h'\"
else
echo shar: Extracting \"'include/artifact.h'\" \(1241 characters\)
sed "s/^X//" >'include/artifact.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)artifact.h	3.0	88/07/27
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifdef NAMED_ITEMS
X#ifndef ARTIFACT_H
X#define ARTIFACT_H
X
X#define SPFX_NONE   0x00	/* no special effects, just a bonus */
X#define SPFX_NOGEN  0x01	/* item is special, bequeathed by gods */
X#define SPFX_RESTR  0x02	/* item is restricted - can't be named */
X#define	SPFX_INTEL  0x04	/* item is self-willed - intelligent */
X#define SPFX_SPEEK  0x08	/* item can speak */
X#define SPFX_SEEK   0x10	/* item helps you search for things */
X#define SPFX_WARN   0x20	/* item warns you of danger */
X#define SPFX_ATTK   0x40	/* item has a special attack (attk) */
X#define SPFX_DEFN   0x80	/* item has a special defence (defn) */
X#define SPFX_DMONS  0x100	/* attack bonus on one type of monster */
X#define	SPFX_DCLAS  0x200	/* attack bonus on one class of monster */
X#define SPFX_DRLI   0x400	/* drains a level from monsters */
X#define SPFX_SEARCH 0x800	/* helps searching */
X
Xstruct artifact {
X	unsigned    otyp;
X	char	    *name;
X	unsigned    spfx;
X	unsigned    mtype;
X	struct attack attk, defn;
X	unsigned    align;
X};
X
X#endif /* ARTIFACT_H /* */
X#endif /* NAMED_ITEMS /* */
END_OF_FILE
if test 1241 -ne `wc -c <'include/artifact.h'`; then
    echo shar: \"'include/artifact.h'\" unpacked with wrong size!
fi
# end of 'include/artifact.h'
fi
if test -f 'include/edog.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/edog.h'\"
else
echo shar: Extracting \"'include/edog.h'\" \(745 characters\)
sed "s/^X//" >'include/edog.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)edog.h	3.0	88/10/08
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef EDOG_H
X#define EDOG_H
X
X/*	various types of food, the lower, the better liked.	*/
X
X#define	DOGFOOD	0
X#define	CADAVER	1
X#define	ACCFOOD	2
X#define	MANFOOD	3
X#define	APPORT	4
X#define	POISON	5
X#define	UNDEF	6
X#define	TABU	7
X
Xstruct edog {
X	long droptime;			/* moment dog dropped object */
X	unsigned dropdist;		/* dist of drpped obj from @ */
X	unsigned apport;		/* amount of training */
X	long whistletime;		/* last time he whistled */
X	long hungrytime;		/* will get hungry at this time */
X};
X#define	EDOG(mp)	((struct edog *)(&(mp->mextra[0])))
X
X#endif /* EDOG_H /**/
END_OF_FILE
if test 745 -ne `wc -c <'include/edog.h'`; then
    echo shar: \"'include/edog.h'\" unpacked with wrong size!
fi
# end of 'include/edog.h'
fi
if test -f 'include/epri.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/epri.h'\"
else
echo shar: Extracting \"'include/epri.h'\" \(537 characters\)
sed "s/^X//" >'include/epri.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)epri.h	3.0	88/04/25
X/* 	Copyright (c) 	Izchak Miller, 1989. 		*/
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef EPRI_H
X#define EPRI_H
X
X#if defined(ALTARS) && defined(THEOLOGY)
Xstruct epri {
X	schar shroom;		/* index in rooms */
X	schar shralign;		/* alignment of priest's shrine */
X	coord shrpos;		/* position of shrine */
X	int shrlevel;		/* level of shrine */
X	boolean ismale;
X	char deitynam[PL_NSIZ];
X};
X
X#define	EPRI(mon)	((struct epri *)(&(mon->mextra[0])))
X#endif
X
X#endif /* EPRI_H /**/
END_OF_FILE
if test 537 -ne `wc -c <'include/epri.h'`; then
    echo shar: \"'include/epri.h'\" unpacked with wrong size!
fi
# end of 'include/epri.h'
fi
if test -f 'include/eshk.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/eshk.h'\"
else
echo shar: Extracting \"'include/eshk.h'\" \(1051 characters\)
sed "s/^X//" >'include/eshk.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)eshk.h	3.0	88/04/25
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef ESHK_H
X#define ESHK_H
X
X#define	BILLSZ	200
X
Xstruct bill_x {
X	unsigned bo_id;
X	unsigned price;		/* price per unit */
X	Bitfield(useup,1);
X	Bitfield(bquan,7);
X};
X
Xstruct eshk {
X	long int robbed;	/* amount stolen by most recent customer */
X	long int credit;	/* amount credited to customer */
X	long int debit;		/* amount of debt for using unpaid items */
X	boolean following;	/* following customer since he owes us sth */
X	schar shoproom;		/* index in rooms; set by inshop() */
X	coord shk;		/* usual position shopkeeper */
X	coord shd;		/* position shop door */
X	int shoplevel;		/* level of his shop */
X	int billct;
X	struct bill_x bill[BILLSZ];
X	int visitct;		/* nr of visits by most recent customer */
X	char customer[PL_NSIZ];	/* most recent customer */
X	boolean ismale;
X	char shknam[PL_NSIZ];
X};
X
X#define	ESHK(mon)	((struct eshk *)(&(mon->mextra[0])))
X#endif /* ESHK_H /**/
END_OF_FILE
if test 1051 -ne `wc -c <'include/eshk.h'`; then
    echo shar: \"'include/eshk.h'\" unpacked with wrong size!
fi
# end of 'include/eshk.h'
fi
if test -f 'include/flag.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/flag.h'\"
else
echo shar: Extracting \"'include/flag.h'\" \(2510 characters\)
sed "s/^X//" >'include/flag.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)flag.h	3.0	89/02/02
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef FLAG_H
X#define FLAG_H
X
Xstruct flag {
X	unsigned ident;		/* social security number for each monster */
X	boolean  debug;		/* in debugging mode */
X#define	wizard	flags.debug
X	boolean  explore;	/* in exploration mode */
X#define	discover	flags.explore
X	unsigned toplin;	/* a top line (message) has been printed */
X				/* 0: top line empty; 2: no --More-- reqd. */
X	boolean  cbreak;	/* in cbreak mode, rogue format */
X	boolean  standout;	/* use standout for --More-- */
X	boolean  nonull;	/* avoid sending nulls to the terminal */
X	boolean  ignintr;	/* ignore interrupts */
X	boolean  time;		/* display elapsed 'time' */
X	boolean  nonews;	/* suppress news printing */
X	boolean  notombstone;
X	unsigned end_top, end_around;	/* describe desired score list */
X	boolean  end_own;		/* idem (list all own scores) */
X	boolean  no_rest_on_space;	/* spaces are ignored */
X	boolean  beginner;
X	boolean  female;
X	boolean  invlet_constant;	/* let objects keep their
X					   inventory symbol */
X	boolean  move;
X	boolean  mv;
X	unsigned run;		/* 0: h (etc), 1: H (etc), 2: fh (etc) */
X				/* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF- */
X	boolean  nopick;	/* do not pickup objects (as when running) */
X	boolean  echo;		/* 1 to echo characters */
X	boolean  botl;		/* partially redo status line */
X	boolean  botlx;		/* print an entirely new bottom line */
X	boolean  nscrinh;	/* inhibit nscr() in pline(); */
X	boolean  made_amulet;
X	unsigned no_of_wizards;	/* 0, 1 or 2 (wizard and his shadow) */
X				/* reset from 2 to 1, but never to 0 */
X	unsigned moonphase;
X#define	NEW_MOON	0
X#define	FULL_MOON	4
X
X	boolean  sortpack;	/* sorted inventory */
X	boolean  confirm;	/* confirm before hitting tame monsters */
X	boolean  safe_dog;	/* give complete protection to the dog */
X	boolean  soundok;	/* ok to tell about sounds heard */
X	boolean  verbose;	/* max battle info */
X	boolean  silent;	/* whether the bell rings or not */
X	boolean  pickup;	/* whether you pickup or move and look */
X	boolean  num_pad;	/* use numbers for movement commands */
X#ifdef DGK
X	boolean  IBMBIOS;	/* whether we can use a BIOS call for
X				 * redrawing the screen and character input */
X#ifdef DECRAINBOW
X	boolean  DECRainbow;	/* Used for DEC Rainbow graphics. */
X#endif
X	boolean  rawio;		/* Whether can use rawio (IOCTL call) */
X#endif
X};
X
Xextern struct flag flags;
X
X#endif /* FLAG_H /**/
END_OF_FILE
if test 2510 -ne `wc -c <'include/flag.h'`; then
    echo shar: \"'include/flag.h'\" unpacked with wrong size!
fi
# end of 'include/flag.h'
fi
if test -f 'include/hack.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/hack.h'\"
else
echo shar: Extracting \"'include/hack.h'\" \(1821 characters\)
sed "s/^X//" >'include/hack.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)hack.h	3.0	88/07/19
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef HACK_H
X#define HACK_H
X
X#ifndef CONFIG_H
X#include "config.h"
X#endif
X
X#define	TELL		1
X#define NOTELL		0
X#define ON 		1
X#define OFF 		0
X#define	BOLT_LIM    8	/* from this distance ranged attacks will be made */
X#ifdef HARD
X#define	MAX_CARR_CAP	120	/* so that boulders can be heavier */
X#else
X#define	MAX_CARR_CAP	500
X#endif
X#define	FAR	(COLNO+2)	/* position outside screen */
X#ifdef NULL
X#undef NULL
X#endif /* NULL */
X#define NULL  ((genericptr_t)0)
X#define DUMMY { 0 }
X
X#ifndef DECL_H
X#include "decl.h"
X#endif
X
X#ifndef MONSYM_H
X#include 	"monsym.h"
X#endif
X#ifndef MKROOM_H
X#include	"mkroom.h"
X#endif
X#ifndef OBJCLASS_H
X#include	"objclass.h"
X#endif
X
Xextern coord bhitpos;	/* place where thrown weapon falls to the ground */
X
X#ifndef GOLD_H
X#include	"gold.h"
X#endif
X#ifndef TRAP_H
X#include	"trap.h"
X#endif
X#ifndef FLAG_H
X#include	"flag.h"
X#endif
X
X#ifndef RM_H
X#include	"rm.h"
X#endif
X
X#ifdef STRONGHOLD
X# define Inhell		(dlevel > stronghold_level && dlevel <= MAXLEVEL)
X#else
X# define Inhell 	(dlevel >= HELLLEVEL)
X#endif
X
X#ifdef SPELLS
X#define	NO_SPELL	0
X#endif
X
X/*** some utility macros ***/
X# ifndef STUPID_CPP	/* otherwise these macros are functions in hack.c */
X#define yn() yn_function(ynchars, 'n')
X#define ynq() yn_function(ynqchars, 'q')
X#define ynaq() yn_function(ynaqchars, 'y')
X#define nyaq() yn_function(nyaqchars, 'n')
X
X#define max(a, b) ((a) > (b) ? (a) : (b))
X#define min(x,y) ((x) < (y) ? (x) : (y))
X#define	plur(x)	(((x) == 1) ? "" : "s")
X
X#define	makeknown(x)	objects[x].oc_name_known = 1
X# endif /* STUPID_CPP */
X
X#ifdef MSDOS
X#define getuid() 1
X#define getlogin() ((char *) NULL)
X#endif /* MSDOS */
X
X#endif /* HACK_H /**/
END_OF_FILE
if test 1821 -ne `wc -c <'include/hack.h'`; then
    echo shar: \"'include/hack.h'\" unpacked with wrong size!
fi
# end of 'include/hack.h'
fi
if test -f 'include/lev_comp.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/lev_comp.h'\"
else
echo shar: Extracting \"'include/lev_comp.h'\" \(906 characters\)
sed "s/^X//" >'include/lev_comp.h' <<'END_OF_FILE'
X
Xtypedef union 
X{
X	int	i;
X	char*	map;
X} YYSTYPE;
Xextern YYSTYPE yylval;
X# define CHAR 257
X# define INTEGER 258
X# define MAZE_ID 259
X# define LEVEL_ID 260
X# define GEOMETRY_ID 261
X# define OBJECT_ID 262
X# define MONSTER_ID 263
X# define TRAP_ID 264
X# define DOOR_ID 265
X# define DRAWBRIDGE_ID 266
X# define MAZEWALK_ID 267
X# define REGION_ID 268
X# define RANDOM_OBJECTS_ID 269
X# define RANDOM_MONSTERS_ID 270
X# define RANDOM_PLACES_ID 271
X# define ALTAR_ID 272
X# define LADDER_ID 273
X# define NON_DIGGABLE_ID 274
X# define ROOM_ID 275
X# define DOOR_STATE 276
X# define LIGHT_STATE 277
X# define DIRECTION 278
X# define RANDOM_TYPE 279
X# define O_REGISTER 280
X# define M_REGISTER 281
X# define P_REGISTER 282
X# define A_REGISTER 283
X# define ALIGNMENT 284
X# define LEFT_OR_RIGHT 285
X# define CENTER 286
X# define TOP_OR_BOT 287
X# define ALTAR_TYPE 288
X# define UP_OR_DOWN 289
X# define STRING 290
X# define MAP_ID 291
END_OF_FILE
if test 906 -ne `wc -c <'include/lev_comp.h'`; then
    echo shar: \"'include/lev_comp.h'\" unpacked with wrong size!
fi
# end of 'include/lev_comp.h'
fi
if test -f 'include/mfndpos.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/mfndpos.h'\"
else
echo shar: Extracting \"'include/mfndpos.h'\" \(1067 characters\)
sed "s/^X//" >'include/mfndpos.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)mfndpos.h	3.0	88/10/15
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X/* mfndpos.h - version 1.0.2 */
X 
X#ifndef MFNDPOS_H
X#define MFNDPOS_H
X
X/* changed by GAN 02/06/87 to add nine extra bits for traps -
X * this because new traps make nine for traps insufficient
X */
X 
X#define ALLOW_TRAPS     0777777L
X#define ALLOW_U         01000000L	/* can attack you */
X#define ALLOW_M         02000000L	/* can attack other monsters */
X#define ALLOW_TM        04000000L
X#define ALLOW_ALL       (ALLOW_U | ALLOW_M | ALLOW_TM | ALLOW_TRAPS)
X#define ALLOW_SSM       010000000L	/* ignores scare monster */
X#define ALLOW_ROCK      020000000L	/* pushes rocks */
X#define NOTONL          040000000L	/* stays off direct line to player */
X#define NOGARLIC        0100000000L	/* hates garlic */
X#define ALLOW_WALL      0200000000L	/* walks through walls */
X#define ALLOW_DIG       0400000000L	/* digs */
X#define ALLOW_SANCT	01000000000L	/* enters a temple */
X
X#endif /* MFNDPOS_H /**/
END_OF_FILE
if test 1067 -ne `wc -c <'include/mfndpos.h'`; then
    echo shar: \"'include/mfndpos.h'\" unpacked with wrong size!
fi
# end of 'include/mfndpos.h'
fi
if test -f 'include/monsym.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/monsym.h'\"
else
echo shar: Extracting \"'include/monsym.h'\" \(1980 characters\)
sed "s/^X//" >'include/monsym.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)makemon.c	3.0	88/04/11
X/*	Monster symbols and creation information rev 1.0 */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef MONSYM_H
X#define MONSYM_H
X
X#define	S_ANT		'a'
X#define	S_BLOB		'b'
X#define	S_COCKATRICE	'c'
X#define	S_DOG		'd'
X#define	S_EYE		'e'
X#define S_FELINE	'f'
X#define	S_GREMLIN	'g'
X#define	S_HUMANOID	'h'
X#define	S_IMP		'i'
X#define	S_J		'j'
X#define	S_KOBOLD	'k'
X#define	S_LICH		'l'
X#define	S_MIMIC		'm'
X#define	S_NAGA		'n'
X#define	S_ORC		'o'
X#define	S_PIERCER	'p'
X#define	S_QUADRUPED		'q'
X#define	S_RODENT	'r'
X#define	S_SPIDER	's'
X#define	S_TRAPPER	't'
X#define	S_UNICORN	'u'
X#define	S_VORTEX	'v'
X#define	S_WORM		'w'
X#define	S_XAN		'x'
X#define S_YLIGHT	'y'
X#define	S_ZRUTY		'z'
X#define	S_APE		'A'
X#define	S_BAT		'B'
X#define	S_CENTAUR	'C'
X#define	S_DRAGON	'D'
X#define	S_ELEMENTAL	'E'
X#define	S_FUNGUS	'F'
X#define	S_GNOME		'G'
X#define	S_GIANT		'H'
X#define	S_STALKER	'I'
X#define	S_JELLY		'J'
X#define	S_KOP		'K'
X#define	S_LEPRECHAUN	'L'
X#define	S_MUMMY		'M'
X#define	S_NYMPH		'N'
X#define	S_OGRE		'O'
X#define	S_PUDDING	'P'
X#define	S_QUANTMECH	'Q'
X#define	S_RUSTMONST	'R'
X#define	S_SNAKE		'S'
X#define	S_TROLL		'T'
X#define	S_UMBER		'U'
X#define	S_VAMPIRE	'V'
X#define	S_WRAITH	'W'
X#define	S_XORN		'X'
X#define	S_YETI		'Y'
X#define	S_ZOMBIE	'Z'
X#define	S_HUMAN		'@'
X#define	S_GHOST		' '
X#define S_GOLEM		'\''
X#define	S_DEMON		'&'
X#define	S_EEL		';'
X#define	S_CHAMELEON	':'
X
X#define	S_WORM_TAIL	'~'
X#define	S_MIMIC_DEF	']'
X
X#define	G_UNIQ		0x800		/* generated only once */
X#define	G_HELL		0x400		/* generated only in "hell" */
X#define	G_NOGEN		0x200		/* generated only specially */
X#define	G_NOCORPSE	0x100		/* no corpse left ever */
X#define	G_SGROUP	0x080		/* appear in small groups normally */
X#define	G_LGROUP	0x040		/* appear in large groups normally */
X#define	G_GENO		0x020		/* can be genocided */
X#define G_GENOD		0x010		/* have been genocided */
X#define G_FREQ		0x007		/* creation frequency mask */
X
X#endif /* MONSYM_H /* */
END_OF_FILE
if test 1980 -ne `wc -c <'include/monsym.h'`; then
    echo shar: \"'include/monsym.h'\" unpacked with wrong size!
fi
# end of 'include/monsym.h'
fi
if test -f 'include/msdos.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/msdos.h'\"
else
echo shar: Extracting \"'include/msdos.h'\" \(534 characters\)
sed "s/^X//" >'include/msdos.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)msdos.h	3.0	88/07/21
X/* msdos.h - function declarations for msdos.c */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef MSDOS_H
X#define MSDOS_H
X
X#ifdef TOS
X#define msmsg	cprintf
X#endif
Xextern const char *alllevels, *allbones;
Xextern char levels[], bones[], permbones[], SAVEF[], hackdir[];
Xextern int ramdisk;
X#if defined(DGK) && !defined(TOS)
Xextern int count_only;
X#endif
X
X#define CTRL(ch) (ch & 0x37)
X#define ABORT CTRL('A')
X#define COUNT 0x1
X#define WRITE 0x2
X
X#endif /* MSDOS_H /* */
END_OF_FILE
if test 534 -ne `wc -c <'include/msdos.h'`; then
    echo shar: \"'include/msdos.h'\" unpacked with wrong size!
fi
# end of 'include/msdos.h'
fi
if test -f 'include/permonst.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/permonst.h'\"
else
echo shar: Extracting \"'include/permonst.h'\" \(1735 characters\)
sed "s/^X//" >'include/permonst.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)permonst.h	3.0	88/04/05
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef PERMONST_H
X#define PERMONST_H
X
X/*	This structure covers all attack forms.
X *	aatyp is the gross attack type (eg. claw, bite, breath, ...)
X *	adtyp is the damage type (eg. physical, fire, cold, spell, ...)
X *	damn is the number of hit dice of damage from the attack.
X *	damd is the number of sides on each die.
X *
X *	Some attacks can do no points of damage.  Additionally, some can
X *	have special effects *and* do damage as well.  If damn and damd
X *	are set, they may have a special meaning.  For example, if set
X *	for a blinding attack, they determine the amount of time blinded.
X */
Xstruct attack {
X
X	uchar           aatyp;
X	uchar           adtyp, damn, damd;
X};
X
X/*	Max # of attacks for any given monster.
X */
X
X#define	NATTK	5
X
X#include "monattk.h"
X#include "monflag.h"
X
Xstruct permonst {
X
X	char		*mname, mlet;		/* full name and sym */
X	schar		mlevel,			/* base monster level */
X			mmove,			/* move speed */
X			ac,			/* (base) armor class */
X			mr,			/* (base) magic resistance */
X			maligntyp;		/* basic monster alignment */
X	unsigned	geno;			/* creation/geno mask value */
X	struct	attack	mattk[NATTK];		/* attacks matrix */
X	unsigned	cwt,			/* weight of corpse */
X			cnutrit;		/* its nutritional value */
X	short		pxlth;			/* length of extension */
X	uchar		msound;			/* noise it makes */
X	long		mflags1,		/* boolean bitflags */
X			mflags2;		/* more boolean bitflags */
X};
X
Xextern struct permonst mons[];		/* the master list of monster types */
Xextern struct permonst playermon, *uasmon;	/* you in the same terms */
X
X#endif /* PERMONST_H /**/
END_OF_FILE
if test 1735 -ne `wc -c <'include/permonst.h'`; then
    echo shar: \"'include/permonst.h'\" unpacked with wrong size!
fi
# end of 'include/permonst.h'
fi
if test -f 'include/prop.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/prop.h'\"
else
echo shar: Extracting \"'include/prop.h'\" \(1205 characters\)
sed "s/^X//" >'include/prop.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)prop.h	3.0	89/06/24
X/* NetHack may be freely redistributed.  See license for details. */
X/* Copyright (c) 1989 Mike Threepoint */
X
X#ifndef PROP_H
X#define PROP_H
X
X#define FIRE_RES		1
X#define SLEEP_RES		2
X#define COLD_RES		3
X#define DISINT_RES		4
X#define SHOCK_RES		5
X#define POISON_RES		6
X#define ADORNED 		7
X#define REGENERATION		8
X#define SEARCHING		9
X#define SEE_INVIS		10
X#define INVIS			11
X#define TELEPORT		12
X#define TELEPORT_CONTROL	13
X#define POLYMORPH		14
X#define POLYMORPH_CONTROL	15
X#define LEVITATION		16
X#define STEALTH 		17
X#define AGGRAVATE_MONSTER	18
X#define CONFLICT		19
X#define PROTECTION		20
X#define PROT_FROM_SHAPE_CHANGERS	21
X#define WARNING 		22
X#define TELEPAT 		23
X#define FAST			24
X#define STUN			25
X#define CONFUSION		26
X#define SICK			27
X#define BLINDED 		28
X#define SLEEPING		29
X#define WOUNDED_LEGS		30
X#define STONED			31
X#define STRANGLED		32
X#define HALLUC			33
X#define FUMBLING		34
X#define JUMPING 		35
X#define WWALKING		36
X#define HUNGER			37
X#define GLIB			38
X#define REFLECTING		39
X#define LIFESAVED		40
X#define ANTIMAGIC		41
X#define DISPLACED		42
X#define CLAIRVOYANT		43
X#define LAST_PROP		(CLAIRVOYANT)		/* the last property */
X
X#endif /* PROP_H /**/
END_OF_FILE
if test 1205 -ne `wc -c <'include/prop.h'`; then
    echo shar: \"'include/prop.h'\" unpacked with wrong size!
fi
# end of 'include/prop.h'
fi
if test -f 'include/sp_lev.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/sp_lev.h'\"
else
echo shar: Extracting \"'include/sp_lev.h'\" \(2019 characters\)
sed "s/^X//" >'include/sp_lev.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)sp_lev.h	3.0	88/18/12
X/* 	Copyright (c) 1989 by Jean-Christophe Collet */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#define W_NORTH     0
X#define W_SOUTH     2
X#define W_EAST	    1
X#define W_WEST	    3
X
X/* 
X * Structures manipulated by the special levels loader & compiler
X */
X
Xtypedef struct {
X	xchar x, y, mask;
X} door;
X
Xtypedef struct {
X	xchar x, y, type;
X} trap;
X
Xtypedef struct {
X	xchar x, y, class;
X	short id;
X} monster;
X
Xtypedef struct {
X	xchar x, y, class;
X	short id;
X} object;
X
Xtypedef struct {
X	xchar x, y, align, shrine;
X} altar;
X
Xtypedef struct {
X	xchar x, y, dir, open;
X} drawbridge;
X
Xtypedef struct {
X	xchar x, y, dir;
X} walk;
X
Xtypedef struct {
X	xchar x1, y1, x2, y2;
X} dig;
X
Xtypedef struct {
X	xchar x, y, up;
X} lad;
X
Xtypedef struct {
X	xchar x1, y1, x2, y2;
X	xchar rtype, rlit;
X} region;
X
Xtypedef struct {
X	char halign, valign;
X	char xsize, ysize;
X	char **map;
X	char nrobjects;
X	char *robjects;
X	char nloc;
X	char *rloc_x;
X	char *rloc_y;
X	char nrmonst;
X	char *rmonst;
X	char nreg;
X	region **regions;
X	char ndoor;
X	door **doors;
X	char ntraps;
X	trap **traps;
X	char nmonster;
X	monster **monsters;
X	char nobjects;
X	object **objects;
X	char ndrawbridge;
X	drawbridge **drawbridges;
X	char nwalk;
X	walk **walks;
X	char ndig;
X	dig **digs;
X	char nlad;
X	lad **lads;
X#ifdef ALTARS
X	char naltar;
X	altar **altars;
X#endif /* ALTARS /**/
X} mazepart;
X    
Xtypedef struct {
X	char numpart;
X	mazepart **parts;
X} specialmaze;
X
Xtypedef struct {
X	xchar x, y, w, h;
X	xchar rtype, rlit;
X	char ndoor;
X	door **doors;
X	char ntraps;
X	trap **traps;
X	char nmonster;
X	monster **monsters;
X	char nobjects;
X	object **objects;
X#ifdef ALTARS
X	char naltar;
X	altar **altars;
X#endif /* ALTARS /**/
X} room;
X
Xtypedef struct {
X	xchar x1,y1, x2,y2;
X} corridor;
X
Xtypedef struct {
X	xchar nroom;
X	room **rooms;
X	xchar ncorr;
X	corridor **corrs;
X	char ntraps;
X	trap **traps;
X	char nmonster;
X	monster **monsters;
X	char nobjects;
X	object **objects;
X	xchar xdnstairs, ydnstairs;
X	xchar xupstairs, yupstairs;
X} splev;
END_OF_FILE
if test 2019 -ne `wc -c <'include/sp_lev.h'`; then
    echo shar: \"'include/sp_lev.h'\" unpacked with wrong size!
fi
# end of 'include/sp_lev.h'
fi
if test -f 'include/tosconf.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/tosconf.h'\"
else
echo shar: Extracting \"'include/tosconf.h'\" \(564 characters\)
sed "s/^X//" >'include/tosconf.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)tosconf.h	3.0	88/07/21
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifdef TOS
X#ifndef TOSCONF_H
X#define TOSCONF_H
X
X#define MSDOS		/* must be defined to allow some inclusions */
X
X#define FCMASK	0x8000
X
X#ifdef UNIXDEBUG
X#define O_BINARY	0
X#define remove(x)	unlink(x)
X#endif
X
X#define Rand() rand()
X#define Srand() srand()
X
X#include "msdos.h"
X#include "pcconf.h"	    /* remainder of stuff is same as the PC */
X
X#endif /* TOSCONF_H /* */
X#endif /* TOS /* */
END_OF_FILE
if test 564 -ne `wc -c <'include/tosconf.h'`; then
    echo shar: \"'include/tosconf.h'\" unpacked with wrong size!
fi
# end of 'include/tosconf.h'
fi
if test -f 'include/tradstdc.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/tradstdc.h'\"
else
echo shar: Extracting \"'include/tradstdc.h'\" \(1489 characters\)
sed "s/^X//" >'include/tradstdc.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)tradstdc.h	3.0	89/07/12
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef TRADSTDC_H
X#define	TRADSTDC_H
X
X#ifdef DUMB
X#undef void
X#define void	int
X#endif
X
X/*
X * ANSI X3J11 detection.
X * Makes substitutes for compatibility with the old C standard.
X */
X
X#if (defined(__STDC__) || defined(MSDOS)) && !defined(AMIGA)
X
X/* Used for robust ANSI parameter forward declarations:
X * int sprintf P((char *, const char *, ...));
X */
X
X/* However, if you do use a prototype in declaring a function but define
X * the function in an old-style manner, the compiler might (justifiably) barf.
X * Since we have to define functions in the old-style manner to accommodate
X * traditional compilers, we don't want to use prototypes if the ANSI-standard
X * compiler barfs on these.
X */
X#ifdef __GNUC__ /* add other compilers as the need arises */
X# define P(s)		()
X#else
X# define P(s)		s
X#endif
X
X# ifdef __TURBOC__	/* Cover for stupid Turbo C */
X#  define genericptr_t	void *
X# else
Xtypedef void *		genericptr_t;
X#  ifndef __STDC__
X#   define const
X#   define signed
X#   define volatile
X#  endif
X# endif
X
X#else /* __STDC__ */	/* a "traditional" C  compiler */
X
X# define P(s)		()
X
X# ifndef genericptr_t
X#  ifdef AMIGA
Xtypedef void *		genericptr_t;
X#  else
Xtypedef char *		genericptr_t;
X#  endif
X# endif
X
X# define const
X# define signed
X# define volatile
X
X#endif /* __STDC__ */
X
X#endif /* TRADSTDC_H /**/
END_OF_FILE
if test 1489 -ne `wc -c <'include/tradstdc.h'`; then
    echo shar: \"'include/tradstdc.h'\" unpacked with wrong size!
fi
# end of 'include/tradstdc.h'
fi
if test -f 'include/trap.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/trap.h'\"
else
echo shar: Extracting \"'include/trap.h'\" \(1165 characters\)
sed "s/^X//" >'include/trap.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)trap.h	3.0	88/06/19
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef TRAP_H
X#define TRAP_H
X
Xstruct trap {
X	struct trap *ntrap;
X	xchar tx,ty;
X	Bitfield(ttyp,5);
X	Bitfield(tseen,1);
X	Bitfield(once,1);
X	unsigned pm;		/* monster type for (MONST | STATUE)_TRAP */
X};
X
Xextern struct trap *ftrap;
X#define newtrap()	(struct trap *) alloc(sizeof(struct trap))
X
X/* Standard Hack traps. */
X#define NO_TRAP         0
X#define MONST_TRAP      1
X#define STATUE_TRAP     2
X#define BEAR_TRAP       3
X#define ARROW_TRAP      4
X#define DART_TRAP       5
X#define TRAPDOOR        6
X#define TELEP_TRAP      7
X#define PIT             8
X#define SLP_GAS_TRAP    9
X
X/* Defines below this line are automatically added by makedefs (-t option) */
X/* if you add any additional code below the next line, it will disappear.  */
X/* DO NOT REMOVE THIS LINE */
X
X#define	MGTRP		10
X#define	SQBRD		11
X#define	WEB		12
X#define	SPIKED_PIT	13
X#define	LEVEL_TELEP	14
X#define	ANTI_MAGIC	15
X#define	RUST_TRAP	16
X#define	POLY_TRAP	17
X#define	LANDMINE	18
X
X#define	TRAPNUM	19
X
X#endif /* TRAP_H /**/
END_OF_FILE
if test 1165 -ne `wc -c <'include/trap.h'`; then
    echo shar: \"'include/trap.h'\" unpacked with wrong size!
fi
# end of 'include/trap.h'
fi
if test -f 'include/trapname.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/trapname.h'\"
else
echo shar: Extracting \"'include/trapname.h'\" \(661 characters\)
sed "s/^X//" >'include/trapname.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)trapname.h	3.0	88/11/08
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef TRAPNAME_H	/* must be included after "hack.h" */
X#define TRAPNAME_H
X
Xchar *traps[] = {
X	"",
X	" monster trap",
X	" statue trap",
X	" bear trap",
X	"n arrow trap",
X	" dart trap",
X	" trapdoor",
X	" teleportation trap",
X	" pit",
X	" sleeping gas trap"
X	," magic trap"
X	," squeaky board"
X	," web"
X	," spiked pit"
X	," level teleporter"
X#ifdef SPELLS
X	,"n anti-magic field" 
X#endif
X	," rust trap"
X#ifdef POLYSELF
X	," polymorph trap"
X#endif
X	," land mine"
X};
X
X#endif	/* TRAPNAME_H /* */
END_OF_FILE
if test 661 -ne `wc -c <'include/trapname.h'`; then
    echo shar: \"'include/trapname.h'\" unpacked with wrong size!
fi
# end of 'include/trapname.h'
fi
if test -f 'include/vault.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/vault.h'\"
else
echo shar: Extracting \"'include/vault.h'\" \(526 characters\)
sed "s/^X//" >'include/vault.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)vault.h	3.0	88/04/25
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#ifndef VAULT_H
X#define VAULT_H
X
X#define	FCSIZ	(ROWNO+COLNO)
Xstruct fakecorridor {
X	xchar fx,fy,ftyp;
X};
X
Xstruct egd {
X	int fcbeg, fcend;	/* fcend: first unused pos */
X	xchar gdx, gdy;		/* goal of guard's walk */
X	unsigned gddone:1;
X	struct fakecorridor fakecorr[FCSIZ];
X};
X
X#define	EGD	((struct egd *)(&(guard->mextra[0])))
X
X#endif /* VAULT_H /* */
END_OF_FILE
if test 526 -ne `wc -c <'include/vault.h'`; then
    echo shar: \"'include/vault.h'\" unpacked with wrong size!
fi
# end of 'include/vault.h'
fi
if test -f 'include/wseg.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/wseg.h'\"
else
echo shar: Extracting \"'include/wseg.h'\" \(516 characters\)
sed "s/^X//" >'include/wseg.h' <<'END_OF_FILE'
X/*	SCCS Id: @(#)wseg.h	3.0	88/10/15
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X/* wseg.h - version 1.0.2 */
X
X#ifndef WSEG_H
X#define WSEG_H
X
X# ifdef WORM
X/* worm structure */
Xstruct wseg {
X	struct wseg *nseg;
X	xchar wx,wy;
X	Bitfield(wdispl,1);
X};
X
X#define newseg()	(struct wseg *) alloc(sizeof(struct wseg))
X
Xextern struct wseg *wsegs[32], *wheads[32], *m_atseg;
Xextern long wgrowtime[32];
X
X# endif
X
X#endif /* WSEG_H /**/
END_OF_FILE
if test 516 -ne `wc -c <'include/wseg.h'`; then
    echo shar: \"'include/wseg.h'\" unpacked with wrong size!
fi
# end of 'include/wseg.h'
fi
if test -f 'others/Make.ini' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'others/Make.ini'\"
else
echo shar: Extracting \"'others/Make.ini'\" \(1759 characters\)
sed "s/^X//" >'others/Make.ini' <<'END_OF_FILE'
X#	SCCS Id: @(#)Make.ini	1.4	87/08/08
X# This is a sample `make.ini' file for NDMAKE v3.7.  You will probably want
X# to customize it for your system.
X
X
X
X# The order to search for rules and files is specified by .SUFFIXES
X.SUFFIXES : .exe .obj .c .for .asm
X
X# A few macros.
XCFLAGS = -A$(MODEL)
XMODEL = S
XSETARGV = $(LIB)\$(MODEL)SETARGV
XLIBS =
XBIN =
XLFLAGS =
X
X# A universally useful target.
Xclean:
X	+-erase *.bak
X	+-erase *.map
X
X# .BEFORE and .AFTER can be used to turn DPATH off and on.
X.BEFORE:; @+echo For help with ndmake, use the command `make -h'
X.AFTER:; @+echo All done.
X
X
X# DEFAULT RULES
X# To produce a `.obj' file from a `.asm' file using MASM.
X.asm.obj:; masm $*.asm;
X
X# To produce a `.obj' file from a `.c' file using Microsoft C. 
X.c.obj:; msc $(CFLAGS) -I\c $*.c
X
X# To produce a `.obj' file from a `.for' file using Microsoft Fortran.
X.for.obj:
X	for1 $*.for;
X	pas2
X
X# To produce a `.exe' file from an `.obj' file.  Note that there is a
X# problem because LIBS may be different for linking `.obj' files
X# produced by different compilers (C, FORTRAN, PASCAL, etc).  To avoid
X# this problem you may want to have the C compiler produce `.cbj' files,
X# the FORTRAN compiler produce `.fbj' files, etc.  Then you could write
X# specific rules for `.cbj.exe' and `.fbj.exe' which would use the correct
X# libraries.
X.obj.exe:
X	link $*.obj $(SETARGV), $@,, $(LIBS) $(LFLAGS);
X
X# To produce a `.exe' file from a `.asm' file.
X.asm.exe:
X	masm $*.asm;
X	link $*.obj, $@,, $(LIBS)
X	erase $*.obj
X
X# To produce a `.exe' file from a `.c' file.
X.c.exe:
X	msc $(CFLAGS) -I\c $*.c
X	link $*.obj $(SETARGV), $@,, $(LIBS) $(LFLAGS)
X	erase $*.obj
X
X# To produce a `.exe' file from a `.for' file.
X.for.exe:
X	for1 $*.for;
X	pas2
X	link $*.obj, $@,, $(LIB)\FORTRAN.LIB
X	erase $*.obj
END_OF_FILE
if test 1759 -ne `wc -c <'others/Make.ini'`; then
    echo shar: \"'others/Make.ini'\" unpacked with wrong size!
fi
# end of 'others/Make.ini'
fi
if test -f 'others/pctty.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'others/pctty.c'\"
else
echo shar: Extracting \"'others/pctty.c'\" \(931 characters\)
sed "s/^X//" >'others/pctty.c' <<'END_OF_FILE'
X/*	SCCS Id: @(#)pctty.c	3.0	87/05/03
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X/* tty.c - (PC) version */
X
X#include "hack.h"
X
Xchar erase_char, kill_char;
X
X/*
X * Get initial state of terminal, set ospeed (for termcap routines)
X * and switch off tab expansion if necessary.
X * Called by startup() in termcap.c and after returning from ! or ^Z
X */
Xvoid
Xgettty(){
X	erase_char = '\b';
X	kill_char = 21;		/* cntl-U */
X	flags.cbreak = TRUE;
X#ifndef TOS
X	disable_ctrlP();	/* turn off ^P processing */
X#endif
X}
X
X/* reset terminal to original state */
Xvoid
Xsettty(s) char *s; {
X	end_screen();
X	if(s) Printf(s);
X	(void) fflush(stdout);
X#ifndef TOS
X	enable_ctrlP();		/* turn on ^P processing */
X#endif
X}
X
X/* fatal error */
X/*VARARGS1*/
Xvoid
Xerror(s,x,y)
Xchar *s, *x, *y;
X{
X	end_screen();
X	putchar('\n');
X	Printf(s,x,y);
X	putchar('\n');
X	exit(1);
X}
END_OF_FILE
if test 931 -ne `wc -c <'others/pctty.c'`; then
    echo shar: \"'others/pctty.c'\" unpacked with wrong size!
fi
# end of 'others/pctty.c'
fi
if test -f 'src/ioctl.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'src/ioctl.c'\"
else
echo shar: Extracting \"'src/ioctl.c'\" \(1608 characters\)
sed "s/^X//" >'src/ioctl.c' <<'END_OF_FILE'
X/*	SCCS Id: @(#)ioctl.c	2.0	87/09/18
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X/* This cannot be part of hack.tty.c (as it was earlier) since on some
X   systems (e.g. MUNIX) the include files <termio.h> and <sgtty.h>
X   define the same constants, and the C preprocessor complains. */
X
X/* block some unused #defines to avoid overloading some cpp's */
X#define MONATTK_H
X#include "hack.h"
X
X#if defined(BSD) || defined(ULTRIX)
X#include	<sgtty.h>
Xstruct ltchars ltchars, ltchars0;
X#else
X#include	<termio.h>	/* also includes part of <sgtty.h> */
Xstruct termio termio;
X#endif
X
Xvoid
Xgetioctls() {
X#if defined(BSD) || defined(ULTRIX)
X	(void) ioctl(fileno(stdin), (int) TIOCGLTC, (char *) &ltchars);
X	(void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) &ltchars0);
X#else
X	(void) ioctl(fileno(stdin), (int) TCGETA, &termio);
X#endif
X}
X
Xvoid
Xsetioctls() {
X#if defined(BSD) || defined(ULTRIX)
X	(void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) &ltchars);
X#else
X	/* Now modified to run under Sys V R3.	- may have to be #ifdef'ed */
X	(void) ioctl(fileno(stdin), (int) TCSETAW, &termio);
X#endif
X}
X
X#ifdef SUSPEND		/* implies BSD */
Xint
Xdosuspend() {
X#include	<signal.h>
X#ifdef SIGTSTP
X	if(signal(SIGTSTP, SIG_IGN) == SIG_DFL) {
X		settty(NULL);
X		(void) signal(SIGTSTP, SIG_DFL);
X		(void) kill(0, SIGTSTP);
X		gettty();
X		setftty();
X		docrt();
X	} else {
X		pline("I don't think your shell has job control.");
X	}
X#else
X	pline("Sorry, it seems we have no SIGTSTP here.  Try ! or S.");
X#endif
X	return(0);
X}
X#endif /* SUSPEND /**/
END_OF_FILE
if test 1608 -ne `wc -c <'src/ioctl.c'`; then
    echo shar: \"'src/ioctl.c'\" unpacked with wrong size!
fi
# end of 'src/ioctl.c'
fi
if test -f 'src/lev_main.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'src/lev_main.c'\"
else
echo shar: Extracting \"'src/lev_main.c'\" \(1360 characters\)
sed "s/^X//" >'src/lev_main.c' <<'END_OF_FILE'
X/*	SCCS Id: @(#)lev_main.c	3.0	89/07/02
X/*	Copyright (c) 1989 by Jean-Christophe Collet */
X/* NetHack may be freely redistributed.  See license for details. */
X
X/*
X * This file contains the main function for the parser
X * and some useful functions needed by yacc
X */
X
X#include <stdio.h>
X
X#define MAX_ERRORS	25
X
Xextern int line_number;
Xchar *fname = "(stdin)";
Xint fatal_error = 0;
X
Xmain(argc, argv) 
Xint argc;
Xchar **argv;
X{
X	FILE *fin;
X	int i;
X
X	if (argc == 1)		/* Read standard input */
X	    yyparse();
X	else 			/* Otherwise every argument is a filename */
X	    for(i=1; i<argc; i++) {
X		    fin = freopen(argv[i], "r", stdin);
X		    fname = argv[i];
X		    if (!fin) 
X			fprintf(stderr,"Can't open %s\n", argv[i]);
X		    else
X			yyparse();
X		    line_number = 1;
X		    fatal_error = 0;
X	    }
X	return 0;
X}
X
X/* 
X * Each time the parser detects an error, it uses this function.
X * Here we take count of the errors. To continue farther than
X * MAX_ERRORS wouldn't be reasonable.
X */
X
Xyyerror(s)
Xchar *s;
X{
X	fprintf(stderr,"%s : line %d : %s\n",fname,line_number, s);
X	if (++fatal_error > MAX_ERRORS) {
X		fprintf(stderr,"Too many errors, good bye!\n");
X		exit(1);
X	}
X}
X
X/* 
X * Just display a warning (that is : a non fatal error)
X */
X
Xyywarning(s)
Xchar *s;
X{
X	fprintf(stderr,"%s : line %d : WARNING : %s\n",fname,line_number,s);
X}
X
Xyywrap()
X{
X       return 1;
X}
END_OF_FILE
if test 1360 -ne `wc -c <'src/lev_main.c'`; then
    echo shar: \"'src/lev_main.c'\" unpacked with wrong size!
fi
# end of 'src/lev_main.c'
fi
if test -f 'src/panic.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'src/panic.c'\"
else
echo shar: Extracting \"'src/panic.c'\" \(777 characters\)
sed "s/^X//" >'src/panic.c' <<'END_OF_FILE'
X/*	SCCS Id: @(#)panic.c	3.0	88/05/03
X * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
X *
X *	This code was adapted from the code in end.c to run in a standalone
X *	mode for the makedefs / drg code.
X */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#include	"config.h"
X
X#ifdef MSDOS
X#undef exit
Xextern void exit P((int));
X#endif
X 
X/*VARARGS1*/
Xboolean panicking;
X
Xvoid
Xpanic(str,a1,a2,a3,a4,a5,a6)
Xchar *str;
X{
X	if(panicking++)
X#ifdef SYSV
X	    (void)
X#endif
X		abort();    /* avoid loops - this should never happen*/
X
X	(void) fputs(" ERROR:  ", stderr);
X	Printf(str,a1,a2,a3,a4,a5,a6);
X	(void) fflush(stderr);
X#ifdef UNIX
X# ifdef SYSV
X		(void)
X# endif
X		    abort();	/* generate core dump */
X#endif
X	exit(1);		/* redundant */
X	return;
X}
X
END_OF_FILE
if test 777 -ne `wc -c <'src/panic.c'`; then
    echo shar: \"'src/panic.c'\" unpacked with wrong size!
fi
# end of 'src/panic.c'
fi
if test -f 'src/rip.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'src/rip.c'\"
else
echo shar: Extracting \"'src/rip.c'\" \(2039 characters\)
sed "s/^X//" >'src/rip.c' <<'END_OF_FILE'
X/*	SCCS Id: @(#)rip.c	3.0	88/04/27
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#include "hack.h"
X
Xstatic char *rip[] = {
X"                       ----------",
X"                      /          \\",
X"                     /    REST    \\",
X"                    /      IN      \\",
X"                   /     PEACE      \\",
X"                  /                  \\",
X"                  |                  |",
X"                  |                  |",
X"                  |                  |",
X"                  |                  |",
X"                  |                  |",
X"                  |       1001       |",
X"                 *|     *  *  *      | *",
X"        _________)/\\\\_//(\\/(/\\)/\\//\\/|_)_______\n",
X0
X};
X
Xstatic void
Xcenter(line, text)
Xint line;
Xchar *text;
X{
X	register char *ip,*op;
X	ip = text;
X	op = &rip[line][28 - ((strlen(text)+1)>>1)];
X	while(*ip) *op++ = *ip++;
X}
X
Xvoid
Xoutrip(){
X	register char **dp = rip;
X	register char *dpx;
X	char buf[BUFSZ];
X	register int x, y;
X
X	cls();
X	Sprintf(buf,"%s", plname);
X	buf[16] = 0;
X	center(6, buf);
X	Sprintf(buf, "%ld AU", u.ugold);
X	center(7, buf);
X	Sprintf(buf, "killed by%s",
X		!strncmp(killer, "the ", 4) ? "" :
X		!strcmp(killer, "starvation") ? "" :
X 		!strcmp(killer, "strangulation") ? "" :
X		!strncmp(killer, "Mr.", 3) ? "" :
X		!strncmp(killer, "Ms.", 3) ? "" :
X		index(vowels, *killer) ? " an" : " a");
X	center(8, buf);
X	Strcpy(buf, killer);
X	if(strlen(buf) > 16) {
X	    register int i,i0,i1;
X		i0 = i1 = 0;
X		for(i = 0; i <= 16; i++)
X			if(buf[i] == ' ') i0 = i, i1 = i+1;
X		if(!i0) i0 = i1 = 16;
X		buf[i1 + 16] = 0;
X		center(10, buf+i1);
X		buf[i0] = 0;
X	}
X	center(9, buf);
X	Sprintf(buf, "%4d", getyear());
X	center(11, buf);
X	for(y=8; *dp; y++,dp++){
X		x = 0;
X		dpx = *dp;
X		while(dpx[x]) {
X			while(dpx[x] == ' ') x++;
X			curs(x,y);
X			while(dpx[x] && dpx[x] != ' '){
X				if(done_stopprint)
X					return;
X				curx++;
X				(void) putchar(dpx[x++]);
X			}
X		}
X	}
X	getret();
X}
X
END_OF_FILE
if test 2039 -ne `wc -c <'src/rip.c'`; then
    echo shar: \"'src/rip.c'\" unpacked with wrong size!
fi
# end of 'src/rip.c'
fi
if test -f 'src/rnd.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'src/rnd.c'\"
else
echo shar: Extracting \"'src/rnd.c'\" \(1547 characters\)
sed "s/^X//" >'src/rnd.c' <<'END_OF_FILE'
X/*	SCCS Id: @(#)rnd.c	3.0	87/07/06
X */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#include	"hack.h"
X
X#if defined(LINT) && defined(UNIX)	/* rand() is long... */
Xextern int rand();
X#define RND(x)	(rand() % x)
X#else /* LINT */
X/* rand() is either random() or lrand48() - see config.h. */
X#ifdef UNIX
X#define RND(x)	(int)(Rand() % (long)(x))
X#else
X/* Good luck: the bottom order bits are cyclic. */
X#define RND(x)	(int)((Rand()>>3) % (x))
X#endif
X#endif /* LINT */
X
Xint
Xrn1(x,y)	/* y <= rn1(x,y) < (y+x) */
Xregister int x, y;
X{
X	return(RND(x)+y);
X}
X
Xint
Xrn2(x)		/* 0 <= rn2(x) < x */
Xregister int x;
X{
X	return(RND(x));
X}
X
Xint
Xrnl(x)		/* 0 <= rnl(x) < x; somtimes subtracting Luck */
Xregister x;	/* good luck approaches 0, bad luck approaches (x-1) */
X{
X	register int i = RND(x);
X
X	if (Luck && rn2(50 - Luck)) {
X	    i -= (x <= 15 && Luck >= -5 ? Luck/3 : Luck);
X	    if (i < 0) i = 0;
X	    else if (i >= x) i = x-1;
X	}
X
X	return i;
X}
X
Xint
Xrnd(x)		/* 1 <= rnd(x) <= x */
Xregister int x;
X{
X	return(RND(x)+1);
X}
X
Xint
Xd(n,x)		/* n <= d(n,x) <= (n*x) */
Xregister int n, x;
X{
X	register int tmp = n;
X
X	while(n--) tmp += RND(x);
X	return(tmp);
X}
X
Xint
Xrne(x)	  /* by stewr 870807 */
Xregister int x;
X{
X	register int tmp = 1;
X	while(!rn2(x)) tmp++;
X	return(tmp);
X}
X
X#ifdef THEOLOGY
Xint
Xrnz(i)
Xint i;
X{
X# ifdef LINT
X	int x = i;
X	int tmp = 1000;
X# else
X	register long x = i;
X	register long tmp = 1000;
X# endif
X	tmp += rn2(1000);
X	tmp *= rne(4);
X	if (rn2(2)) { x *= tmp; x /= 1000; }
X	else { x *= 1000; x /= tmp; }
X	return((int)x);
X}
X#endif
END_OF_FILE
if test 1547 -ne `wc -c <'src/rnd.c'`; then
    echo shar: \"'src/rnd.c'\" unpacked with wrong size!
fi
# end of 'src/rnd.c'
fi
if test -f 'src/version.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'src/version.c'\"
else
echo shar: Extracting \"'src/version.c'\" \(551 characters\)
sed "s/^X//" >'src/version.c' <<'END_OF_FILE'
X/*	SCCS Id: @(#)version.c	3.0	89/06/12
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#include	"hack.h"
X#include	"date.h"
X
Xint
Xdoversion(){
X
X#ifdef BETA
X	pline("%s NetHack Beta Version %s - last build %s.",
X#else
X	pline("%s NetHack Version %s - last build %s.",
X#endif
X#if defined(MSDOS)
X# if defined(TOS)
X		"ST",
X# else
X#  if defined(AMIGA)
X		"Amiga",
X#  else
X		"PC",
X#  endif
X# endif
X#endif
X#ifdef UNIX
X		"Unix",
X#endif
X		VERSION, datestring);
X	return 0;
X}
END_OF_FILE
if test 551 -ne `wc -c <'src/version.c'`; then
    echo shar: \"'src/version.c'\" unpacked with wrong size!
fi
# end of 'src/version.c'
fi
if test -f 'src/were.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'src/were.c'\"
else
echo shar: Extracting \"'src/were.c'\" \(2460 characters\)
sed "s/^X//" >'src/were.c' <<'END_OF_FILE'
X/*	SCCS Id: @(#)were.c	3.0	88/07/06
X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
X/* NetHack may be freely redistributed.  See license for details. */
X
X#include	"hack.h"
X
Xvoid
Xwere_change(mon)
Xregister struct monst *mon;
X{
X	register int pm = monsndx(mon->data);
X
X	if(Protection_from_shape_changers) return;
X	if(is_were(mon->data))
X	    if(is_human(mon->data)) {
X		if(!rn2(50-(night()*20)) || flags.moonphase == FULL_MOON) {
X		    new_were(mon);
X		    if(pm != PM_WERERAT && flags.soundok)
X			You("hear a %s howling at the moon.",
X			      pm == PM_WEREJACKAL ? "jackal" : "wolf");
X		}
X	    } else if(!rn2(30)) new_were(mon);
X}
X
Xvoid
Xnew_were(mon)
Xregister struct monst *mon;
X{
X	int pm;
X
X	switch((pm = monsndx(mon->data))) {
X
X	    case PM_WEREWOLF:	pm = PM_WOLFWERE;
X				break;
X	    case PM_WOLFWERE:	pm = PM_WEREWOLF;
X				break;
X	    case PM_WEREJACKAL:	pm = PM_JACKALWERE;
X				break;
X	    case PM_JACKALWERE:	pm = PM_WEREJACKAL;
X				break;
X	    case PM_WERERAT:	pm = PM_RATWERE;
X				break;
X	    case PM_RATWERE:	pm = PM_WERERAT;
X				break;
X	    default:	impossible("unknown lycanthrope %s.", mon->data->mname);
X			return;
X	}
X
X	if(canseemon(mon))
X	    pline("%s changes into a %s.", Monnam(mon), mons[pm].mname);
X
X	mon->data = &mons[pm];
X	/* regenerate by 1/4 of the lost hit points */
X	mon->mhp += (mon->mhpmax - mon->mhp) / 4;
X	unpmon(mon);
X	pmon(mon);		/* display new appearance */
X}
X
Xboolean
Xwere_summon(ptr,yours)	/* were-creature (even you) summons a horde */
Xregister struct permonst *ptr;
Xregister boolean yours;
X{
X	register int i, typ, pm = monsndx(ptr);
X	register struct monst *mtmp;
X	boolean success = FALSE;
X
X	if(Protection_from_shape_changers)
X		return FALSE;
X	for(i = rnd(5); i > 0; i--) {
X	   switch(pm) {
X
X		case PM_WERERAT:
X		case PM_RATWERE:
X			typ = rn2(3) ? PM_SEWER_RAT : rn2(3) ? PM_GIANT_RAT : PM_RABID_RAT ;
X			break;
X		case PM_WEREJACKAL:
X		case PM_JACKALWERE:
X			typ = PM_JACKAL;
X			break;
X		case PM_WEREWOLF:
X		case PM_WOLFWERE:
X			typ = rn2(5) ? PM_WOLF : PM_WINTER_WOLF ;
X			break;
X		default:
X			continue;
X	    }
X	    mtmp = makemon(&mons[typ], u.ux, u.uy);
X	    if (mtmp) success = TRUE;
X	    if (yours && mtmp)
X		(void) tamedog(mtmp, (struct obj *) 0);
X	}
X	return success;
X}
X
X#ifdef POLYSELF
Xvoid
Xyou_were() {
X	if(u.umonnum == u.ulycn) return;
X	if(Polymorph_control) {
X	    pline("Do you want to change into a %s? ", mons[u.ulycn].mname);
X	    if(yn() == 'n') return;
X	}
X	(void) polymon(u.ulycn);
X}
X#endif
END_OF_FILE
if test 2460 -ne `wc -c <'src/were.c'`; then
    echo shar: \"'src/were.c'\" unpacked with wrong size!
fi
# end of 'src/were.c'
fi
echo shar: End of archive 37 \(of 38\).
cp /dev/null ark37isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 38 archives.
    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