Before applying these patches to an original 3.2.0 source distribution, a few files need to be renamed or removed by hand. Namely: rename sys/unix/ioctl.c to sys/share/ioctl.c rename sys/unix/unixtty.c to sys/share/unixtty.c rename sys/mac/old/mrecover.c to sys/mac/mrecover.c remove sys/mac/old/mrecover.hqx New files created by the patches below (which may not work with ancient versions of patch): include/beconf.h sys/be/README sys/be/bemain.c sys/mac/mrecover.hqx sys/msdos/Makefile.SC sys/msdos/pckeys.c *** Old/Files Tue May 28 17:20:00 1996 --- ./Files Fri May 24 15:25:04 1996 *************** *** 27,45 **** include: (files for all versions) align.h amiconf.h artifact.h artilist.h attrib.h ! color.h config.h coord.h decl.h def_os2.h ! dgn_file.h display.h dlb.h dungeon.h edog.h ! emin.h engrave.h epri.h eshk.h extern.h ! flag.h func_tab.h global.h hack.h lev.h ! macconf.h macwin.h mail.h mfndpos.h micro.h ! mkroom.h monattk.h mondata.h monflag.h monst.h ! monsym.h ntconf.h obj.h objclass.h os2conf.h ! patchlevel.h pcconf.h permonst.h prop.h qtext.h ! quest.h rect.h rm.h sp_lev.h spell.h ! system.h termcap.h timeout.h tosconf.h tradstdc.h ! trampoli.h trap.h unixconf.h vault.h vision.h ! vmsconf.h winami.h winprocs.h wintype.h you.h ! youprop.h (file for tty versions) wintty.h (files for X versions) --- 27,45 ---- include: (files for all versions) align.h amiconf.h artifact.h artilist.h attrib.h ! beconf.h color.h config.h coord.h decl.h ! def_os2.h dgn_file.h display.h dlb.h dungeon.h ! edog.h emin.h engrave.h epri.h eshk.h ! extern.h flag.h func_tab.h global.h hack.h ! lev.h macconf.h macwin.h mail.h mfndpos.h ! micro.h mkroom.h monattk.h mondata.h monflag.h ! monst.h monsym.h ntconf.h obj.h objclass.h ! os2conf.h patchlevel.h pcconf.h permonst.h prop.h ! qtext.h quest.h rect.h rm.h sp_lev.h ! spell.h system.h termcap.h timeout.h tosconf.h ! tradstdc.h trampoli.h trap.h unixconf.h vault.h ! vision.h vmsconf.h winami.h winprocs.h wintype.h ! you.h youprop.h (file for tty versions) wintty.h (files for X versions) *************** *** 97,123 **** Install.tos Makefile.utl atari.cnf atarifnt.uue nethack.mnu setup.g tos.c sys/mac: (files for Macintosh versions) Install.mw MacHelp NHDeflts NHrsrc.hqx NHsound.hqx News README dprintf.c maccurs.c macerrs.c macfile.c macmain.c macmenu.c macsnd.c mactopl.c mactty.c macunix.c macwin.c mgetline.c mmodal.c ! mstring.c mttymain.c sys/mac/old: (files for old Think and MPW C compilers) DCproj.hqx Install.mpw Install.thk LCproj.hqx MDproj.hqx NHmake.hqx NHproj.hqx NetHack.r mhdump.c mpwhack.h - mrecover.c mrecover.hqx sys/msdos: (files for MSDOS version) ! Install.dos Makefile.BC Makefile.GCC Makefile.MSC moveinit.pat ! msdos.c msdoshlp.txt ovlinit.c pctiles.c pctiles.h ! pcvideo.h portio.h schema1.BC schema1.MSC schema2.BC ! schema2.MSC schema3.MSC setup.bat sound.c tile2bin.c ! video.c vidtxt.c vidvga.c (files for running MSDOS binary under Windows) nhico.uu nhpif.uu --- 97,126 ---- Install.tos Makefile.utl atari.cnf atarifnt.uue nethack.mnu setup.g tos.c + sys/be: + (files for BeBox version) + README bemain.c + sys/mac: (files for Macintosh versions) Install.mw MacHelp NHDeflts NHrsrc.hqx NHsound.hqx News README dprintf.c maccurs.c macerrs.c macfile.c macmain.c macmenu.c macsnd.c mactopl.c mactty.c macunix.c macwin.c mgetline.c mmodal.c ! mrecover.c mrecover.hqx mstring.c mttymain.c sys/mac/old: (files for old Think and MPW C compilers) DCproj.hqx Install.mpw Install.thk LCproj.hqx MDproj.hqx NHmake.hqx NHproj.hqx NetHack.r mhdump.c mpwhack.h sys/msdos: (files for MSDOS version) ! Install.dos Makefile.BC Makefile.GCC Makefile.MSC Makefile.SC ! moveinit.pat msdos.c msdoshlp.txt ovlinit.c pckeys.c ! pctiles.c pctiles.h pcvideo.h portio.h schema1.BC ! schema1.MSC schema2.BC schema2.MSC schema3.MSC setup.bat ! sound.c tile2bin.c video.c vidtxt.c vidvga.c (files for running MSDOS binary under Windows) nhico.uu nhpif.uu *************** *** 140,145 **** --- 143,150 ---- pcsys.c pcunix.c (file for MSDOS, OS/2, and Atari versions) pctty.c + (files for UNIX and Be versions) + ioctl.c unixtty.c (Berkeley random number file, which may be included in any version) random.c (file for VMS version) *************** *** 159,166 **** sys/unix: (files for UNIX versions) Install.unx Makefile.dat Makefile.doc Makefile.src Makefile.top ! Makefile.utl ioctl.c nethack.sh setup.sh unixmain.c ! unixtty.c unixunix.c (files for replacement cpp, apparently only needed by some UNIX systems) cpp1.shr cpp2.shr cpp3.shr (file for sound driver for 386 UNIX) --- 164,170 ---- sys/unix: (files for UNIX versions) Install.unx Makefile.dat Makefile.doc Makefile.src Makefile.top ! Makefile.utl nethack.sh setup.sh unixmain.c unixunix.c (files for replacement cpp, apparently only needed by some UNIX systems) cpp1.shr cpp2.shr cpp3.shr (file for sound driver for 386 UNIX) *** Old/README Tue May 28 17:20:05 1996 --- ./README Fri May 24 14:40:32 1996 *************** *** 62,85 **** j. A 'sys/amiga/splitter' subsubdirectory, which contains files for the Amiga splitter program. k. A 'sys/atari' subdirectory, which contains files specific to TOS. ! l. A 'sys/mac' subdirectory, which contains files specific to MacOS. ! m. A 'sys/mac/old' subdirectory which contains files used by ! untested compilers. ! n. A 'sys/msdos' subdirectory, which contains files specific to MS-DOS. ! o. A 'sys/msdos/old' subsubdirectory, which contains files for old MS-DOS compilers (no longer officially supported). ! p. A 'sys/os2' subdirectory, which contains files specific to OS/2. ! q. A 'sys/unix' subdirectory, which contains files specific to UNIX. ! r. A 'sys/vms' subdirectory, which contains files specific to VMS. ! s. A 'sys/winnt' subdirectory, which contains files specific to Windows NT. ! t. A 'win' directory, which contains subdirectories for files that are windowing-system specific (but not operating-system specific). ! u. A 'win/share' subdirectory, which contains files shared by some windowing systems. ! v. A 'win/tty' subdirectory, which contains files specific to ttys. ! w. A 'win/win32' subdirectory, which contains files specific to the Windows NT Win32 API. ! x. A 'win/X11' subdirectory, which contains files specific to X11. The names of these directories should not be changed unless you are ready to go through the makefiles and the makedefs program and change --- 62,86 ---- j. A 'sys/amiga/splitter' subsubdirectory, which contains files for the Amiga splitter program. k. A 'sys/atari' subdirectory, which contains files specific to TOS. ! l. A 'sys/be' subdirectory, which contains files specific to Be OS. ! m. A 'sys/mac' subdirectory, which contains files specific to MacOS. ! n. A 'sys/mac/old' subdirectory which contains files used by ! untested compilers. ! o. A 'sys/msdos' subdirectory, which contains files specific to MS-DOS. ! p. A 'sys/msdos/old' subsubdirectory, which contains files for old MS-DOS compilers (no longer officially supported). ! q. A 'sys/os2' subdirectory, which contains files specific to OS/2. ! r. A 'sys/unix' subdirectory, which contains files specific to UNIX. ! s. A 'sys/vms' subdirectory, which contains files specific to VMS. ! t. A 'sys/winnt' subdirectory, which contains files specific to Windows NT. ! u. A 'win' directory, which contains subdirectories for files that are windowing-system specific (but not operating-system specific). ! v. A 'win/share' subdirectory, which contains files shared by some windowing systems. ! w. A 'win/tty' subdirectory, which contains files specific to ttys. ! x. A 'win/win32' subdirectory, which contains files specific to the Windows NT Win32 API. ! y. A 'win/X11' subdirectory, which contains files specific to X11. The names of these directories should not be changed unless you are ready to go through the makefiles and the makedefs program and change *** Old/dat/cmdhelp Tue May 28 17:20:46 1996 --- dat/cmdhelp Wed May 22 17:53:27 1996 *************** *** 97,102 **** --- 97,103 ---- M-a Adjust inventory letters M-c Talk to someone M-d Dip an object into something + M-e Advance or check weapons skills M-f Force a lock M-i Invoke an object's special powers M-j Jump to another location *** Old/dat/data.base Tue May 28 17:20:48 1996 --- dat/data.base Thu May 23 10:47:39 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)data.base 3.2 96/02/27 # Copyright (c) 1994, 1995, 1996 by the NetHack Development Team # Copyright (c) 1994 by Boudewijn Wayers # NetHack may be freely redistributed. See license for details. --- 1,4 ---- ! # SCCS Id: @(#)data.base 3.2 96/05/13 # Copyright (c) 1994, 1995, 1996 by the NetHack Development Team # Copyright (c) 1994 by Boudewijn Wayers # NetHack may be freely redistributed. See license for details. *************** *** 13,20 **** # # If the first character of a key field is "~", then anything which matches # the rest of that key will be treated as if it did not match any of the ! # following keys for that entry. For instance `~orc ??m*' followed by ! # `orc*' prevents "orc mummy" and "orc zombie" from matching "orc*". # aclys aklys --- 13,20 ---- # # If the first character of a key field is "~", then anything which matches # the rest of that key will be treated as if it did not match any of the ! # following keys for that entry. For instance, `~orc ??m*' preceding `orc*' ! # prevents "orc mummy" and "orc zombie" from matching. # aclys aklys *************** *** 287,292 **** --- 287,308 ---- sun god Tezcatlipoca transformed himself into Mixcoatl-Camaxtli to make fire by twirling the sacred fire sticks. [ Encyclopedia of Gods, by Michael Jordan ] + s*d*g*r* cat + Imagine a sealed container, so perfectly constructed that no + physical influence can pass either inwards or outwards across its + walls. Imagine that inside the container is a cat, and also a + device that can be triggered by some quantum event. If that event + takes place, then the device smashes a phial containing cyanide and + the cat is killed. If the event does not take place, the cat lives + on. In Schroedinger's original version, the quantum event was the + decay of a radioactive atom. ... To the outside observer, the cat + is indeed in a linear combination of being alive and dead, and only + when the container is finally opened would the cat's state vector + collapse into one or the other. On the other hand, to a (suitably + protected) observer inside the container, the cat's state-vector + would have collapsed much earlier, and the outside observer's + linear combination has no relevance. + [ The Emperor's New Mind, by Roger Penrose ] *cat kitten Well-known quadruped domestic animal from the family of *************** *** 526,531 **** --- 542,564 ---- they like, and a dwarvish gift is likely to turn to gold in the hand. But on the whole they are a snappish lot. [ The Immortals, by Derek and Julia Parker ] + earendil + elwing + In after days, when because of the triumph of Morgoth Elves and + Men became estranged, as he most wished, those of the Elven-race + that lived still in Middle-earth waned and faded, and Men usurped + the sunlight. Then the Quendi wandered in the lonely places of the + great lands and the isles, and took to the moonlight and the + starlight, and to the woods and the caves, becoming as shadows + and memories, save those who ever and anon set sail into the West + and vanished from Middle-earth. But in the dawn of years Elves + and Men were allies and held themselves akin, and there were some + among Men that learned the wisdom of the Eldar, and became great + and valiant among the captains of the Noldor. And in the glory + and beauty of the Elves, and in their fate, full share had the + offspring of elf and mortal, Earendil, and Elwing, and Elrond + their child. + [ The Silmarillion, by J.R.R. Tolkien ] eel giant eel The behaviour of eels in fresh water extends the air of *************** *** 749,764 **** slaves that have to work till they die for want of air and light. [ The Hobbit, by J.R.R. Tolkien ] - goblin king - The Great Goblin gave a truly awful howl of rage when he - looked at it, and all his soldiers gnashed their teeth, - clashed their shields, and stamped. They knew the sword at - once. It had killed hundreds of goblins in its time, when - the fair elves of Gondolin hunted them in the hills or did - battle before their walls. They had called it Orcrist, - Goblin-cleaver, but the goblins called it simply Biter. They - hated it and hated worse any one that carried it. - [ The Hobbit, by J.R.R. Tolkien ] gold gold piece zorkmid --- 782,787 ---- *************** *** 903,909 **** sit on that stone, he would be unable to quit it for ever. The ninety-nine years is nearly up, so trouble may soon be heard of on the road between Hurworth and Neasham. ! [ Katharine Briggs, A dictionary of Fairies ] hom*nculus A homunculus is a creature summoned by a mage to perform some particular task. They are particularly good at spying. They --- 926,932 ---- sit on that stone, he would be unable to quit it for ever. The ninety-nine years is nearly up, so trouble may soon be heard of on the road between Hurworth and Neasham. ! [ A Dictionary of Fairies, by Katharine Briggs ] hom*nculus A homunculus is a creature summoned by a mage to perform some particular task. They are particularly good at spying. They *************** *** 1017,1023 **** well as the English Puritans regarded all fairies as devils. The fairies of tradition often hover uneasily between the ghostly and the diabolic state. ! [ Katharine Briggs, A Dictionary of Fairies ] incubus succubus The incubus and succubus are male and female versions of the --- 1040,1046 ---- well as the English Puritans regarded all fairies as devils. The fairies of tradition often hover uneasily between the ghostly and the diabolic state. ! [ A Dictionary of Fairies, by Katharine Briggs ] incubus succubus The incubus and succubus are male and female versions of the *************** *** 1770,1775 **** --- 1793,1799 ---- warning, and damage, both spell and physical, is partially absorbed by the orb itself. When invoked it has the power to teleport the invoker between levels. + goblin king orcrist The Great Goblin gave a truly awful howl of rage when he looked at it, and all his soldiers gnashed their teeth, *************** *** 1949,1957 **** and rarely seen, this creature is reputed to be a relative of the ferocious yeti. sceptre of might ! This quarterstaff was created aeons ago in some unknown cave, and has been passed down from generation to generation of ! cavemen. It is a very mighty quarterstaff indeed, and in addition will protect anyone who carries it from magic missile attacks. When invoked, it causes conflict in the area around it. --- 1973,1981 ---- and rarely seen, this creature is reputed to be a relative of the ferocious yeti. sceptre of might ! This mace was created aeons ago in some unknown cave, and has been passed down from generation to generation of ! cave dwellers. It is a very mighty mace indeed, and in addition will protect anyone who carries it from magic missile attacks. When invoked, it causes conflict in the area around it. *** Old/dat/hh Tue May 28 17:21:06 1996 --- dat/hh Wed May 22 17:48:42 1996 *************** *** 74,79 **** --- 74,80 ---- M-a adjust adjust inventory letters M-c chat talk to someone M-d dip dip an object into something + M-e enhance advance or check weapons skills M-f force force a lock M-i invoke invoke an object's special powers M-j jump jump to another location *** Old/dat/medusa.des Tue May 28 17:21:15 1996 --- dat/medusa.des Sat May 18 11:51:00 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)medusa.des 3.2 96/02/14 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1990, 1991 by M. Stephenson # NetHack may be freely redistributed. See license for details. --- 1,4 ---- ! # SCCS Id: @(#)medusa.des 3.2 96/05/11 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1990, 1991 by M. Stephenson # NetHack may be freely redistributed. See license for details. *************** *** 42,48 **** TELEPORT_REGION:(26,04,50,15),(0,0,0,0),up # Stairs STAIR:(05,14),up ! STAIR:(35,10),down # Doors DOOR:closed,(46,07) DOOR:locked,(38,08) --- 42,48 ---- TELEPORT_REGION:(26,04,50,15),(0,0,0,0),up # Stairs STAIR:(05,14),up ! STAIR:(36,10),down # Doors DOOR:closed,(46,07) DOOR:locked,(38,08) *************** *** 54,60 **** NON_DIGGABLE:(30,06,46,13) # Objects CONTAINER:'`',"statue",(36,10),uncursed,"knight",0,"Perseus" ! OBJECT:'[',"shield of reflection",contained # These aren't really containers, but specifying CONTAINER forces them to be # empty, since CONTAINERs contain only what is explicitly specified. CONTAINER:'`',"statue",random --- 54,63 ---- NON_DIGGABLE:(30,06,46,13) # Objects CONTAINER:'`',"statue",(36,10),uncursed,"knight",0,"Perseus" ! OBJECT[75%]:'[',"shield of reflection",contained,cursed,+0 ! OBJECT[25%]:'[',"levitation boots",contained,random,+0 ! OBJECT[50%]:')',"scimitar",contained,blessed,+2 ! OBJECT[50%]:'(',"sack",contained # These aren't really containers, but specifying CONTAINER forces them to be # empty, since CONTAINERs contain only what is explicitly specified. CONTAINER:'`',"statue",random *************** *** 146,152 **** NON_DIGGABLE:(60,02,73,17) # Objects CONTAINER:'`',"statue",(68,10),uncursed,"knight",0,"Perseus" ! OBJECT:'[',"shield of reflection",contained CONTAINER:'`',"statue",(64,08) CONTAINER:'`',"statue",(65,08) CONTAINER:'`',"statue",(64,09) --- 149,158 ---- NON_DIGGABLE:(60,02,73,17) # Objects CONTAINER:'`',"statue",(68,10),uncursed,"knight",0,"Perseus" ! OBJECT[25%]:'[',"shield of reflection",contained,cursed,+0 ! OBJECT[75%]:'[',"levitation boots",contained,random,+0 ! OBJECT[50%]:')',"scimitar",contained,blessed,+2 ! OBJECT[50%]:'(',"sack",contained CONTAINER:'`',"statue",(64,08) CONTAINER:'`',"statue",(65,08) CONTAINER:'`',"statue",(64,09) *** Old/dat/opthelp Tue May 28 17:21:20 1996 --- dat/opthelp Tue May 14 16:57:46 1996 *************** *** 121,126 **** --- 121,140 ---- exml exmm exmr (explosion matrix middle row) exbl exbm exbr (explosion matrix bottom row) default: |-\\/*!)(0#@*/-\\||\\-//-\\|\ |\\-/ + menu_* create single character accelerators for menu commands. Below + is a list of all commands. Each is followed by a list of window- + ports that implement them: 'x' is X11, 't' is tty. + menu_deselect_all deselect all items in a menu [-](xt) + menu_deselect_page deselect all items on this page of a menu [\](t) + menu_first_page jump to the first page in a menu [^](t) + menu_invert_all invert all items in a menu [@](xt) + menu_invert_page invert all items on this page of a menu [~](t) + menu_last_page jump to the last page in a menu [|](t) + menu_next_page goto the next menu page [>](t) + menu_previous_page goto the previous menu page [<](t) + menu_search search for a menu item [:](x) + menu_select_all select all items in a menu [.](xt) + menu_select_page select all items on this page of a menu [,](t) monsters like dungeon, but for monster symbols default: abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ@\ \\&;:~] *** Old/doc/Guidebook.mn Tue May 28 17:21:44 1996 --- doc/Guidebook.mn Fri May 24 22:21:52 1996 *************** *** 4,10 **** .ds vr "NetHack 3.2 .ds f0 "\*(vr .ds f1 ! .ds f2 "April 3, 1996 .mt A Guide to the Mazes of Menace (Guidebook for NetHack 3.2) --- 4,10 ---- .ds vr "NetHack 3.2 .ds f0 "\*(vr .ds f1 ! .ds f2 "May 24, 1996 .mt A Guide to the Mazes of Menace (Guidebook for NetHack 3.2) *************** *** 26,32 **** usually seemed better off than when they passed through the first time. And who was to say that all of those who did not return had not just kept going? .pg ! Asking around, you hear about a bauble, some call it The Amulet of Yendor, which, if you can find it, will bring you great wealth. One legend you were told even mentioned that the one who finds the amulet will be granted immortality by the gods. The amulet is rumored to be somewhere beyond the --- 26,32 ---- usually seemed better off than when they passed through the first time. And who was to say that all of those who did not return had not just kept going? .pg ! Asking around, you hear about a bauble, called the Amulet of Yendor by some, which, if you can find it, will bring you great wealth. One legend you were told even mentioned that the one who finds the amulet will be granted immortality by the gods. The amulet is rumored to be somewhere beyond the *************** *** 70,76 **** \fIPriests\fP and \fIPriestesses\fP are clerics militant, crusaders advancing the cause of righteousness with arms, armor, and arts thaumaturgic. Their ability to commune with deities via prayer ! occasionally extricates them from peril; but can also put them in it. .pg \fIRogues\fP are agile and stealthy thieves, with knowledge of locks, traps, and poisons. Their advantage lies in surprise, which they employ --- 70,76 ---- \fIPriests\fP and \fIPriestesses\fP are clerics militant, crusaders advancing the cause of righteousness with arms, armor, and arts thaumaturgic. Their ability to commune with deities via prayer ! occasionally extricates them from peril, but can also put them in it. .pg \fIRogues\fP are agile and stealthy thieves, with knowledge of locks, traps, and poisons. Their advantage lies in surprise, which they employ *************** *** 89,95 **** in them stealth and cunning. .pg \fIWizards\fP start out with a knowledge of magic, a selection of magical ! items and a particular affinity for dweomercraft. Although seemingly weak and easy to overcome at first sight, an experienced Wizard is a deadly foe. .pg You set out for the dungeon and after several days of uneventful --- 89,95 ---- in them stealth and cunning. .pg \fIWizards\fP start out with a knowledge of magic, a selection of magical ! items, and a particular affinity for dweomercraft. Although seemingly weak and easy to overcome at first sight, an experienced Wizard is a deadly foe. .pg You set out for the dungeon and after several days of uneventful *************** *** 141,147 **** .pg In order to understand what is going on in NetHack, first you must understand what NetHack is doing with the screen. The NetHack screen ! replaces the ``You see...'' descriptions of text adventure games. Figure 1 is a sample of what a NetHack screen might look like. .TS S --- 141,147 ---- .pg In order to understand what is going on in NetHack, first you must understand what NetHack is doing with the screen. The NetHack screen ! replaces the ``You see ...'' descriptions of text adventure games. Figure 1 is a sample of what a NetHack screen might look like. .TS S *************** *** 201,207 **** Charisma affects how certain creatures react toward you. In particular, it can affect the prices shopkeepers offer you. .lp Alignment ! \fBLawful\fP, \fBNeutral\fP, or \fBChaotic\fP. Basically, Lawful is good and Chaotic is evil. Your alignment influences how other monsters react toward you. Monsters of a like alignment are more likely to be non-aggressive, while those of an opposing alignment are more likely --- 201,207 ---- Charisma affects how certain creatures react toward you. In particular, it can affect the prices shopkeepers offer you. .lp Alignment ! \fBLawful\fP, \fBNeutral\fP, or \fBChaotic\fP. Often, Lawful is good and Chaotic is evil. Your alignment influences how other monsters react toward you. Monsters of a like alignment are more likely to be non-aggressive, while those of an opposing alignment are more likely *************** *** 312,318 **** A pool of water or moat or a pool of lava. .lp { A fountain. ! .lp "\\\\ An opulent throne. .lp "a-zA-Z and other symbols Letters and certain other symbols represent the various inhabitants --- 312,318 ---- A pool of water or moat or a pool of lava. .lp { A fountain. ! .lp "\e An opulent throne. .lp "a-zA-Z and other symbols Letters and certain other symbols represent the various inhabitants *************** *** 373,381 **** .lp & Tell what a command does. .lp < ! Go up a staircase to the previous level (if you are on the stairs). .lp > ! Go down a staircase to the next level (if you are on the stairs). .lp [yuhjklbn] Go one step in the direction indicated (see Figure 2). If there is a monster there, you will fight the monster instead. Only these --- 373,381 ---- .lp & Tell what a command does. .lp < ! Go up to the previous level (if you are on the staircase or ladder). .lp > ! Go down to the next level (if you are on the staircase or ladder). .lp [yuhjklbn] Go one step in the direction indicated (see Figure 2). If there is a monster there, you will fight the monster instead. Only these *************** *** 386,394 **** center; c c. y k u 7 8 9 ! \\\\\\\\ | / \\\\\\\\ | / h- . -l 4- . -6 ! / | \\\\\\\\ / | \\\\\\\\ b j n 1 2 3 (if \fBnumber_pad\fP is set) .TE --- 386,394 ---- center; c c. y k u 7 8 9 ! \e | / \e | / h- . -l 4- . -6 ! / | \e / | \e b j n 1 2 3 (if \fBnumber_pad\fP is set) .TE *************** *** 411,417 **** .lp a Apply (use) a tool (pick-axe, key, lamp...). .lp A ! Remove all armor. Use `T' (take off) to take off only one piece of armor. .lp ^A Redo the previous command. .lp c --- 411,419 ---- .lp a Apply (use) a tool (pick-axe, key, lamp...). .lp A ! Remove one or more worn items, such as armor. ! Use `T' (take off) to take off only one piece of armor ! or `R' (remove) to take off only one accessory. .lp ^A Redo the previous command. .lp c *************** *** 443,449 **** Engraving the word ``Elbereth'' will cause most monsters to not attack you hand-to-hand (but if you attack, you will rub it out); this is often useful to give yourself a breather. (This feature may be compiled out ! of the game, so your version might not necessarily have it.) .sd .si E- - write in the dust with your fingers. --- 445,451 ---- Engraving the word ``Elbereth'' will cause most monsters to not attack you hand-to-hand (but if you attack, you will rub it out); this is often useful to give yourself a breather. (This feature may be compiled out ! of the game, so your version might not have it.) .sd .si E- - write in the dust with your fingers. *************** *** 543,549 **** Count your gold pieces. .lp + List the spells you know (same as `x'). ! .lp "\\\\ Show what types of objects have been discovered. .lp ! Escape to a shell. --- 545,551 ---- Count your gold pieces. .lp + List the spells you know (same as `x'). ! .lp "\e Show what types of objects have been discovered. .lp ! Escape to a shell. *************** *** 558,565 **** with another key, modifies it by setting the `meta' [8th, or `high'] bit), you can invoke the extended commands by meta-ing the first letter of the command. In OS/2, PC, and ST NetHack, the `Alt' key ! can be used in this fashion; on the Amiga set altmeta to get this ! behavior. .lp M-a Adjust inventory letters (most useful when the .op fixinv --- 560,568 ---- with another key, modifies it by setting the `meta' [8th, or `high'] bit), you can invoke the extended commands by meta-ing the first letter of the command. In OS/2, PC, and ST NetHack, the `Alt' key ! can be used in this fashion; on the Amiga set the ! .op altmeta ! option to get this behavior. .lp M-a Adjust inventory letters (most useful when the .op fixinv *************** *** 568,573 **** --- 571,578 ---- Talk to someone. .lp M-d Dip an object into something. + .lp M-e + Advance or check weapons skills. .lp M-f Force a lock. .lp M-i *************** *** 686,692 **** when you move. Otherwise your pet will be stranded and may become wild. .hn 2 ! Ghost levels .pg You may encounter the shades and corpses of other adventurers (or even former incarnations of yourself!) and their personal effects. Ghosts --- 691,697 ---- when you move. Otherwise your pet will be stranded and may become wild. .hn 2 ! Bones levels .pg You may encounter the shades and corpses of other adventurers (or even former incarnations of yourself!) and their personal effects. Ghosts *************** *** 764,786 **** There are wielded weapons, like maces and swords, and thrown weapons, like arrows and spears. To hit monsters with a weapon, you must wield it and attack them, or throw it at them. You can simply select to throw a spear. ! To shoot an arrow, you must first wield a bow, then throw the arrow. Crossbows shoot crossbow bolts. Slings hurl rocks and (other) stones (like gems). You can wield only one weapon at a time, but you can change weapons unless you're wielding a cursed one. .pg Enchanted weapons have a ``plus'' (or ``to hit enhancement'' which can be either positive or negative) that adds or subtracts to/from your chance to hit and the damage you do to a monster. The only way to determine a weapon's enchantment is to have it magically identified somehow. .pg Those of you in the audience who are AD&D players, be aware that each weapon which exists in AD&D does the same damage to monsters in NetHack. Some of the more obscure weapons (such as the \fIaklys\fP, \fIlucern hammer\fP, and \fIbec-de-corbin\fP) are defined in an appendix to \fIUnearthed Arcana\fP, an AD&D supplement. .pg ! The commands to use weapons are `w' (wield) and `t' (throw). .hn 2 Armor (`[') .pg --- 769,802 ---- There are wielded weapons, like maces and swords, and thrown weapons, like arrows and spears. To hit monsters with a weapon, you must wield it and attack them, or throw it at them. You can simply select to throw a spear. ! To shoot an arrow, you should first wield a bow, then throw the arrow. Crossbows shoot crossbow bolts. Slings hurl rocks and (other) stones (like gems). You can wield only one weapon at a time, but you can change weapons unless you're wielding a cursed one. + To switch to bare hands, wield `-', or use the `A' command which + allows you to unwield the current weapon in addition to taking off + other worn items. + .pg + The ``#enhance'' command will be present if + the ``weapon skills'' feature is enabled, and deals with your + proficiency in various types of weapons. .pg Enchanted weapons have a ``plus'' (or ``to hit enhancement'' which can be either positive or negative) that adds or subtracts to/from your chance to hit and the damage you do to a monster. The only way to determine a weapon's enchantment is to have it magically identified somehow. .pg + Most weapons are subject to some type of damage like rust. Such + damage can be repaired. + .pg Those of you in the audience who are AD&D players, be aware that each weapon which exists in AD&D does the same damage to monsters in NetHack. Some of the more obscure weapons (such as the \fIaklys\fP, \fIlucern hammer\fP, and \fIbec-de-corbin\fP) are defined in an appendix to \fIUnearthed Arcana\fP, an AD&D supplement. .pg ! The commands to use weapons are `w' (wield), `t' (throw), and ! the ``#enhance'' extended command. .hn 2 Armor (`[') .pg *************** *** 814,820 **** You can also wear other pieces of armor (ex. helmets, boots, shields, cloaks) to lower your armor class even further, but you can only wear one item of each category (one suit of armor, one cloak, one helmet, one ! shield, and so on). .pg If a piece of armor is enchanted, its armor protection will be better (or worse) than normal, and its ``plus'' (or minus) will subtract from --- 830,836 ---- You can also wear other pieces of armor (ex. helmets, boots, shields, cloaks) to lower your armor class even further, but you can only wear one item of each category (one suit of armor, one cloak, one helmet, one ! shield, and so on) at a time. .pg If a piece of armor is enchanted, its armor protection will be better (or worse) than normal, and its ``plus'' (or minus) will subtract from *************** *** 825,831 **** --- 841,852 ---- pieces of armor usually have negative enchantments (minuses) in addition to being unremovable. .pg + Many types of armor are subject to some kind of damage like rust. Such + damage can be repaired. Some types or armor may inhibit spell casting. + .pg The commands to use armor are `W' (wear) and `T' (take off). + The `A' command can also be used to take off armor as well as other + worn items. .hn 2 Food (`%') .pg *************** *** 858,872 **** blessed, and how many uses it has left. Some objects of subtle enchantment are difficult to identify without these. .pg ! If you receive mail while you are playing (on versions compiled with this ! feature), a mail daemon may run up and deliver it to you as a ! \fIscroll of mail\fP. To use this feature, you must let NetHack know where ! to look for new mail by setting the ``MAIL'' environment variable to the file ! name of your mailbox. You may also want to set the ``MAILREADER'' environment variable to the file name of your favorite reader, so NetHack can shell to it ! when you read the scroll. You can disable the mail daemon by clearing the .op mail ! flag. .pg The command to read a scroll is `r'. .hn 2 --- 879,898 ---- blessed, and how many uses it has left. Some objects of subtle enchantment are difficult to identify without these. .pg ! A mail daemon may run up and deliver mail to you as a ! \fIscroll of mail\fP (on versions compiled with this feature). ! To use this feature on versions where NetHack mail delivery is triggered ! by electronic mail appearing in your system mailbox, ! you must let NetHack know where to look for new mail by setting ! the ``MAIL'' environment variable to the file name of your mailbox. ! You may also want to set the ``MAILREADER'' environment variable to the file name of your favorite reader, so NetHack can shell to it ! when you read the scroll. ! On versions of NetHack where mail is randomly generated internal to the game, ! these environment variables are ignored. ! You can disable the mail daemon by turning off the .op mail ! option. .pg The command to read a scroll is `r'. .hn 2 *************** *** 922,928 **** Spell books are tomes of mighty magic. When studied with the `r' (read) command, they bestow the knowledge of a spell\(emunless the attempt backfires. ! Reading a cursed spell book, or one with mystic runes beyond your ken can be harmful to your health! .pg A spell (even when learned) can also backfire when you cast it. If you --- 948,954 ---- Spell books are tomes of mighty magic. When studied with the `r' (read) command, they bestow the knowledge of a spell\(emunless the attempt backfires. ! Reading a cursed spell book or one with mystic runes beyond your ken can be harmful to your health! .pg A spell (even when learned) can also backfire when you cast it. If you *************** *** 936,941 **** --- 962,970 ---- familiarity with it will dwindle, until you eventually forget the details completely and must relearn it. .pg + Casting a spell also requires flexible movement, and wearing various types + of armor may interfere with that. + .pg The command to read a spell book is the same as for scrolls, `r' (read). The `+' command lists your current spells and the number of spell points they require. The `Z' (cast) command casts a spell. *************** *** 954,965 **** You may encounter chests or boxes in your travels. These can be opened with the ``#loot'' extended command when they are on the floor, or with the `a' (apply) command when you are carrying one. However, ! chests are often locked, and require you to either use a key to unlock ! it, a tool to pick the lock, or to break it open with brute force. ! Chests are unwieldy objects, and must be set down to be unlocked (by ! kicking them, using a key or lock picking tool with the `a' (apply) ! command, or by using a weapon to force the lock with the ``#force'' ! extended command). .pg Some chests are trapped, causing nasty things to happen when you unlock or open them. You can check for and try to deactivate traps --- 983,992 ---- You may encounter chests or boxes in your travels. These can be opened with the ``#loot'' extended command when they are on the floor, or with the `a' (apply) command when you are carrying one. However, ! chests are often locked, and are in any case unwieldy objects. ! You must set one down before unlocking it by kicking it, ! using a key or lock-picking tool with the `a' (apply) command, ! or by using a weapon to force the lock with the ``#force'' extended command. .pg Some chests are trapped, causing nasty things to happen when you unlock or open them. You can check for and try to deactivate traps *************** *** 1033,1039 **** ``autopickup'' is off, the name is set to ``Blue Meanie'', and the fruit is set to ``papaya'', you would enter the command .sd ! % \fBsetenv NETHACKOPTIONS "female,\\!autopickup,name:Blue Meanie,fruit:papaya"\fP .ed in \fIcsh\fP (note the need to escape the ! since it's special to the shell), or .sd --- 1060,1066 ---- ``autopickup'' is off, the name is set to ``Blue Meanie'', and the fruit is set to ``papaya'', you would enter the command .sd ! % \fBsetenv NETHACKOPTIONS "female,\e!autopickup,name:Blue Meanie,fruit:papaya"\fP .ed in \fIcsh\fP (note the need to escape the ! since it's special to the shell), or .sd *************** *** 1058,1064 **** option in a different syntax, a sequence of decimal numbers giving the character position in the current font to be used in displaying each entry. ! Such a sequence can be continued to multiple lines by putting a `\\' at the end of each line to be continued. Any line starting with `#' is treated as a comment. .pg --- 1085,1091 ---- option in a different syntax, a sequence of decimal numbers giving the character position in the current font to be used in displaying each entry. ! Such a sequence can be continued to multiple lines by putting a `\e' at the end of each line to be continued. Any line starting with `#' is treated as a comment. .pg *************** *** 1109,1115 **** Cannot be set with the `O' command. .lp dungeon Set the graphics symbols for displaying the dungeon ! (default \&`` |--------||.-|++.##<><>_\\\\#{}.}..## #}''). The .op dungeon option should be followed by a string of 1-38 --- 1136,1142 ---- Cannot be set with the `O' command. .lp dungeon Set the graphics symbols for displaying the dungeon ! (default \&``\ |--------||.-|++.##<><>_\e\e#{}.}..##\ #}''). The .op dungeon option should be followed by a string of 1-38 *************** *** 1120,1128 **** if, for example, you use \fIcsh\fP. Note that this option string is escape-processed in conventional C ! fashion. This means that `\\' is a prefix to take the following character literally, and not as a special prefix. The special escape ! form `\\m' switches on the meta bit in the following character, and the `^' prefix causes the following character to be treated as a control character. --- 1147,1155 ---- if, for example, you use \fIcsh\fP. Note that this option string is escape-processed in conventional C ! fashion. This means that `\e' is a prefix to take the following character literally, and not as a special prefix. The special escape ! form `\em' switches on the meta bit in the following character, and the `^' prefix causes the following character to be treated as a control character. *************** *** 1144,1150 **** Cannot be set with the `O' command. .lp effects Set the graphics symbols for displaying special effects ! (default \&``|-\\\\/*!)(0#@*/-\\\\||\\\\-//-\\\\| |\\\\-/''). The .op effects option should be followed by a string of 1-29 --- 1171,1177 ---- Cannot be set with the `O' command. .lp effects Set the graphics symbols for displaying special effects ! (default \&``|-\e\e/*!)(0#@*/-\e\e||\e\e-//-\e\e|\ |\e\e-/''). The .op effects option should be followed by a string of 1-29 *************** *** 1214,1228 **** partial, or full. Traditional was the only interface available for earlier versions; it consists of a prompt for object class characters, followed by an object-by-object prompt for all items matching the selected ! object class(es). Combination starts will a prompt for object class(es) of interest, but then displays a menu of matching objects rather than prompting one-by-one. Partial skips the object class filtering and immediately displays a menu of all objects. Full displays a menu of object classes rather than a character prompt, and then a menu of matching objects for selection. .lp monsters Set the characters used to display monster classes (default ! ``abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@\ \\&;:~]''). This string is subjected to the same processing as the .op dungeon option. --- 1241,1299 ---- partial, or full. Traditional was the only interface available for earlier versions; it consists of a prompt for object class characters, followed by an object-by-object prompt for all items matching the selected ! object class(es). Combination starts with a prompt for object class(es) of interest, but then displays a menu of matching objects rather than prompting one-by-one. Partial skips the object class filtering and immediately displays a menu of all objects. Full displays a menu of object classes rather than a character prompt, and then a menu of matching objects for selection. + .lp menu_deselect_all + Menu character accelerator to deselect all items in a menu. + Implemented by the X11 and tty ports. + Default '-'. + .lp menu_deselect_page + Menu character accelerator deselect all items on this page of a menu. + Implemented only by the tty port. + Default '\e'. + .lp menu_first_page + Menu character accelerator to jump to the first page in a menu. + Implemented only by the tty port. + Default '^'. + .lp menu_invert_all + Menu character accelerator to invert all items in a menu. + Implemented by the X11 and tty ports. + Default '@'. + .lp menu_invert_page + Menu character accelerator to invert all items on this page of a menu. + Implemented only by the tty port. + Default '~'. + .lp menu_last_page + Menu character accelerator to jump to the last page in a menu. + Implemented only by the tty port. + Default '|'. + .lp menu_next_page + Menu character accelerator to goto the next menu page. + Implemented only by the tty port. + Default '>'. + .lp menu_previous_page + Menu character accelerator to goto the previous menu page. + Implemented only by the tty port. + Default '<'. + .lp menu_search + Menu character accelerator to search for a menu item. + Implemented only by the X11 port. + Default ':'. + .lp menu_select_all + Menu character accelerator to select all items in a menu. + Implemented by the X11 and tty ports. + Default '.'. + .lp menu_select_page + Menu character accelerator to select all items on this page of a menu. + Implemented only by the tty port. + Default ','. .lp monsters Set the characters used to display monster classes (default ! ``abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@\ \'&;:~]''). This string is subjected to the same processing as the .op dungeon option. *************** *** 1281,1291 **** iron ball, chain, and venom. Cannot be set with the `O' command. .lp packorder ! Specify the order to list object types in (default ``\\")[%?+/=!(*`0_''). The value of this option should be a string containing the symbols for the various object types. .lp perm_invent ! If True, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. .lp pettype Specify the type of your initial pet, if you are playing a character class --- 1352,1362 ---- iron ball, chain, and venom. Cannot be set with the `O' command. .lp packorder ! Specify the order to list object types in (default ``\e")[%?+/=!(*`0_''). The value of this option should be a string containing the symbols for the various object types. .lp perm_invent ! If true, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. .lp pettype Specify the type of your initial pet, if you are playing a character class *************** *** 1295,1300 **** --- 1366,1376 ---- Specify the object types to be picked up when .op autopickup is on. Default is all types. + .lp preload_tiles + For the protected mode MSDOS version, control whether tiles + get pre-loaded into RAM at the start of the game. Doing so + enhances performance of the tile graphics, but uses more memory. (default on). + Cannot be set with the `O' command. .lp rawio\ \ \ Force raw (non-cbreak) mode for faster output and more bulletproof input (MS-DOS sometimes treats `^P' as a printer toggle *************** *** 1355,1361 **** Provide more commentary during the game (default on). .lp videocolors Set the color palette for PC systems using NO_TERMS ! (default 4 2 6 1 5 3 15 12 10 14 9 13 11). The order of colors is red, green, brown, blue, magenta, cyan, bright.white, bright.red, bright.green, yellow, bright.blue, bright.magenta, and bright.cyan. --- 1431,1437 ---- Provide more commentary during the game (default on). .lp videocolors Set the color palette for PC systems using NO_TERMS ! (default 4-2-6-1-5-3-15-12-10-14-9-13-11). The order of colors is red, green, brown, blue, magenta, cyan, bright.white, bright.red, bright.green, yellow, bright.blue, bright.magenta, and bright.cyan. *** Old/doc/Guidebook.tex Tue May 28 17:21:49 1996 --- doc/Guidebook.tex Tue May 28 11:15:29 1996 *************** *** 39,45 **** %.au \author{Eric S. Raymond\\ (Extensively edited and expanded for 3.0 by Mike Threepoint)} ! \date{April 3, 1995} \maketitle --- 39,45 ---- %.au \author{Eric S. Raymond\\ (Extensively edited and expanded for 3.0 by Mike Threepoint)} ! \date{May 24, 1996} \maketitle *************** *** 61,67 **** who was to say that all of those who did not return had not just kept going? %.pg ! Asking around, you hear about a bauble, some call it The Amulet of Yendor, which, if you can find it, will bring you great wealth. One legend you were told even mentioned that the one who finds the amulet will be granted immortality by the gods. The amulet is rumored to be somewhere beyond the --- 61,67 ---- who was to say that all of those who did not return had not just kept going? %.pg ! Asking around, you hear about a bauble, called the Amulet of Yendor by some, which, if you can find it, will bring you great wealth. One legend you were told even mentioned that the one who finds the amulet will be granted immortality by the gods. The amulet is rumored to be somewhere beyond the *************** *** 83,90 **** \blist{} \item[\bb{Archeologists}]% understand dungeons pretty well; this enables them ! to move quickly and sneak up on dungeon nasties. They start equipped ! with proper tools for a scientific expedition. %.pg % \item[\bb{Barbarians}]% --- 83,90 ---- \blist{} \item[\bb{Archeologists}]% understand dungeons pretty well; this enables them ! to move quickly and sneak up on the local nasties. They start equipped ! with the tools for a proper scientific expedition. %.pg % \item[\bb{Barbarians}]% *************** *** 122,128 **** are clerics militant, crusaders advancing the cause of righteousness with arms, armor, and arts thaumaturgic. Their ability to commune with deities via prayer ! occasionally extricates them from peril; but can also put them in it. %.pg % \item[\bb{Rogues}]% --- 122,128 ---- are clerics militant, crusaders advancing the cause of righteousness with arms, armor, and arts thaumaturgic. Their ability to commune with deities via prayer ! occasionally extricates them from peril, but can also put them in it. %.pg % \item[\bb{Rogues}]% *************** *** 152,158 **** % \item[\bb{Wizards}]% start out with a knowledge of magic, a selection of magical ! items and a particular affinity for dweomercraft. Although seemingly weak and easy to overcome at first sight, an experienced Wizard is a deadly foe. \elist --- 152,158 ---- % \item[\bb{Wizards}]% start out with a knowledge of magic, a selection of magical ! items, and a particular affinity for dweomercraft. Although seemingly weak and easy to overcome at first sight, an experienced Wizard is a deadly foe. \elist *************** *** 279,285 **** %.lp \item[\bb{Alignment}] % ! {\it Lawful}, {\it Neutral\/} or {\it Chaotic}. Basically, Lawful is good and Chaotic is evil. Your alignment influences how other monsters react toward you. Monsters of a like alignment are more likely to be non-aggressive, while those of an opposing alignment are more likely --- 279,285 ---- %.lp \item[\bb{Alignment}] % ! {\it Lawful}, {\it Neutral\/} or {\it Chaotic}. Often, Lawful is good and Chaotic is evil. Your alignment influences how other monsters react toward you. Monsters of a like alignment are more likely to be non-aggressive, while those of an opposing alignment are more likely *************** *** 440,450 **** of the Mazes of Menace. Watch out, they can be nasty and vicious. Sometimes, however, they can be helpful. %.pg You need not memorize all these symbols; you can ask the game what any symbol represents with the `{\tt /}' command (see the Commands section for more info). - \elist %.hn 1 \section{Commands} --- 440,450 ---- of the Mazes of Menace. Watch out, they can be nasty and vicious. Sometimes, however, they can be helpful. + \elist %.pg You need not memorize all these symbols; you can ask the game what any symbol represents with the `{\tt /}' command (see the Commands section for more info). %.hn 1 \section{Commands} *************** *** 506,515 **** Tell what a command does. %.lp \item[\tb{<}] ! Go up a staircase to the previous level (if you are on the stairs). %.lp \item[\tb{>}] ! Go down a staircase to the next level (if you are on the stairs). %.lp \item[\tb{[yuhjklbn]}] Go one step in the direction indicated (see Figure 2). If there is --- 506,515 ---- Tell what a command does. %.lp \item[\tb{<}] ! Go up to the previous level (if you are on the staircase or ladder). %.lp \item[\tb{>}] ! Go down to the next level (if you are on the staircase or ladder). %.lp \item[\tb{[yuhjklbn]}] Go one step in the direction indicated (see Figure 2). If there is *************** *** 557,562 **** --- 557,565 ---- \item[\tb{A}] Remove all armor. Use `{\tt T}' (take off) to take off only one piece of armor. + Remove one or more worn items, such as armor. + Use `{\tt T}' (take off) to take off only one piece of armor + or `{\tt R}' (remove) to take off only one accessory. %.lp \item[\tb{\^{}A}] Redo the previous command. *************** *** 599,605 **** Engraving the word ``{\tt Elbereth}'' will cause most monsters to not attack you hand-to-hand (but if you attack, you will rub it out); this is often useful to give yourself a breather. (This feature may be compiled out ! of the game, so your version might not necessarily have it.)\\ %.sd %.si {\tt E-} -- write in the dust with your fingers. --- 602,608 ---- Engraving the word ``{\tt Elbereth}'' will cause most monsters to not attack you hand-to-hand (but if you attack, you will rub it out); this is often useful to give yourself a breather. (This feature may be compiled out ! of the game, so your version might not have it.)\\ %.sd %.si {\tt E-} -- write in the dust with your fingers. *************** *** 680,686 **** %.lp \item[\tb{w}] Wield weapon.\\ ! {\tt w-} -- wield nothing, use your bare hands. %.lp \item[\tb{W}] Wear armor. --- 683,689 ---- %.lp \item[\tb{w}] Wield weapon.\\ ! {\tt w-} means wield nothing, use your bare hands. %.lp \item[\tb{W}] Wear armor. *************** *** 755,762 **** with another key, modifies it by setting the `meta' [8th, or `high'] bit), you can invoke the extended commands by meta-ing the first letter of the command. In {\it OS/2, PC\/ {\rm and} ST NetHack}, the `Alt' ! key can be used in this fashion; on the Amiga set altmeta to get this ! behavior. \blist{} %.lp \item[\tb{M-a}] --- 758,766 ---- with another key, modifies it by setting the `meta' [8th, or `high'] bit), you can invoke the extended commands by meta-ing the first letter of the command. In {\it OS/2, PC\/ {\rm and} ST NetHack}, the `Alt' ! key can be used in this fashion; on the Amiga set the ! {\it altmeta\/} ! option to get this behavior. \blist{} %.lp \item[\tb{M-a}] *************** *** 770,775 **** --- 774,782 ---- \item[\tb{M-d}] Dip an object into something. %.lp + \item[\tb{M-e}] + Advance or check weapons skills. + %.lp \item[\tb{M-f}] Force a lock. %.lp *************** *** 928,934 **** wild. %.hn 2 ! \subsection*{Ghost levels} %.pg You may encounter the shades and corpses of other adventurers (or even --- 935,941 ---- wild. %.hn 2 ! \subsection*{Bones levels} %.pg You may encounter the shades and corpses of other adventurers (or even *************** *** 1017,1026 **** There are wielded weapons, like maces and swords, and thrown weapons, like arrows and spears. To hit monsters with a weapon, you must wield it and attack them, or throw it at them. You can simply select to throw a spear. ! To shoot an arrow, you must first wield a bow, then throw the arrow. Crossbows shoot crossbow bolts. Slings hurl rocks and (other) stones (like gems). You can wield only one weapon at a time, but you can change weapons unless you're wielding a cursed one. %.pg Enchanted weapons have a ``plus'' (or ``to hit enhancement'' which can be either positive or negative) that adds or subtracts to/from your chance to --- 1024,1042 ---- There are wielded weapons, like maces and swords, and thrown weapons, like arrows and spears. To hit monsters with a weapon, you must wield it and attack them, or throw it at them. You can simply select to throw a spear. ! To shoot an arrow, you should first wield a bow, then throw the arrow. Crossbows shoot crossbow bolts. Slings hurl rocks and (other) stones (like gems). You can wield only one weapon at a time, but you can change weapons unless you're wielding a cursed one. + To switch to bare hands, wield `{\tt \-}', or use the `{\tt A}' command which + allows you to unwield the current weapon in addition to taking off + other worn items. + + %.pg + The ``{\tt \#enhance}'' command will be present if + the ``weapon skills'' feature is enabled, and deals with your + proficiency in various types of weapons. + %.pg Enchanted weapons have a ``plus'' (or ``to hit enhancement'' which can be either positive or negative) that adds or subtracts to/from your chance to *************** *** 1028,1033 **** --- 1044,1053 ---- enchantment is to have it magically identified somehow. %.pg + Most weapons are subject to some type of damage like rust. Such + damage can be repaired. + + %.pg Those of you in the audience who are AD\&D players, be aware that each weapon which exists in AD\&D does the same damage to monsters in {\it NetHack}. Some of the more obscure weapons (such as the % *************** *** 1035,1041 **** in an appendix to {\it Unearthed Arcana}, an AD\&D supplement. %.pg ! The commands to use weapons are `{\tt w}' (wield) and `{\tt t}' (throw). %.hn 2 \subsection*{Armor (`{\tt [}')} --- 1055,1062 ---- in an appendix to {\it Unearthed Arcana}, an AD\&D supplement. %.pg ! The commands to use weapons are `{\tt w}' (wield), `{\tt t}' (throw), and ! the ``{\tt \#enhance}'' extended command. %.hn 2 \subsection*{Armor (`{\tt [}')} *************** *** 1067,1073 **** shields, cloaks) to lower your armor class even further, but you can only wear one item of each category (one suit of armor, one cloak, one helmet, one ! shield, and so on). %.pg If a piece of armor is enchanted, its armor protection will be better --- 1088,1094 ---- shields, cloaks) to lower your armor class even further, but you can only wear one item of each category (one suit of armor, one cloak, one helmet, one ! shield, and so on) at a time. %.pg If a piece of armor is enchanted, its armor protection will be better *************** *** 1080,1086 **** --- 1101,1113 ---- addition to being unremovable. %.pg + Many types of armor are subject to some kind of damage like rust. Such + damage can be repaired. Some types of armor may inhibit spell casting. + + %.pg The commands to use armor are `{\tt W}' (wear) and `{\tt T}' (take off). + The `{\tt A}' command can also be used to take off armor as well as other + worn items. %.hn 2 \subsection*{Food (`{\tt \%}')} *************** *** 1099,1104 **** --- 1126,1132 ---- ``food.'' Many, but not all, of these are edible; some also give you special powers when you eat them. A good rule of thumb is ``you are what you eat.'' + %.pg You can name one food item after something you like to eat with the {\it fruit\/} option, if your dungeon has it. *************** *** 1123,1137 **** enchantment are difficult to identify without these. %.pg ! If you receive mail while you are playing (on ! versions compiled with this feature), a mail daemon may run up and ! deliver it to you as a % ! {\it scroll of mail}. To use this feature, you must let {\it NetHack\/} know where to look for new mail by setting the ! ``MAIL'' environment variable to the file name of your mailbox. You ! may also want to set the ``MAILREADER'' environment variable to the file name of your favorite reader, so {\it NetHack\/} can shell to it when you ! read the scroll. You can disable the mail daemon by clearing the {\it mail\/} option. %.pg --- 1151,1168 ---- enchantment are difficult to identify without these. %.pg ! A mail daemon may run up and deliver mail to you as a % ! {\it scroll of mail} (on versions compiled with this feature). ! To use this feature on versions where {\it NetHack\/} ! mail delivery is triggered by electronic mail appearing in your system mailbox, you must let {\it NetHack\/} know where to look for new mail by setting the ! ``MAIL'' environment variable to the file name of your mailbox. ! You may also want to set the ``MAILREADER'' environment variable to the file name of your favorite reader, so {\it NetHack\/} can shell to it when you ! read the scroll. ! On versions of {\it NetHack\/} where mail is randomly ! generated internal to the game, these environment variables are ignored. ! You can disable the mail daemon by turning off the {\it mail\/} option. %.pg *************** *** 1184,1191 **** --- 1215,1226 ---- Rings are very useful items, since they are relatively permanent magic, unlike the usually fleeting effects of potions, scrolls, and wands. + + %.pg Putting on a ring activates its magic. You can wear only two rings, one on each ring finger. + + %.pg Most rings also cause you to grow hungry more rapidly, the rate varying with the type of ring. *************** *** 1199,1205 **** Spell books are tomes of mighty magic. When studied with the `{\tt r}' (read) command, they bestow the knowledge of a spell---unless the attempt backfires. ! Reading a cursed spell book, or one with mystic runes beyond your ken can be harmful to your health! %.pg --- 1234,1240 ---- Spell books are tomes of mighty magic. When studied with the `{\tt r}' (read) command, they bestow the knowledge of a spell---unless the attempt backfires. ! Reading a cursed spell book or one with mystic runes beyond your ken can be harmful to your health! %.pg *************** *** 1216,1221 **** --- 1251,1260 ---- details completely and must relearn it. %.pg + Casting a spell also requires flexible movement, and wearing various types + of armor may interfere with that. + + %.pg The command to read a spell book is the same as for scrolls, `{\tt r}' (read). The `{\tt +}' command lists your current spells and the number of spell points they require. The `{\tt Z}' (cast) command casts a spell. *************** *** 1239,1250 **** You may encounter chests or boxes in your travels. These can be opened with the ``{\tt \#loot}'' extended command when they are on the floor, or with the `{\tt a}' (apply) command when you are carrying one. However, ! chests are often locked, and require you to either use a key to unlock ! it, a tool to pick the lock, or to break it open with brute force. ! Chests are unwieldy objects, and must be set down to be unlocked (by ! kicking them, using a key or lock picking tool with the `{\tt a}' (apply) ! command, or by using a weapon to force the lock with the ``{\tt \#force}'' ! extended command). %.pg Some chests are trapped, causing nasty things to happen when you --- 1278,1288 ---- You may encounter chests or boxes in your travels. These can be opened with the ``{\tt \#loot}'' extended command when they are on the floor, or with the `{\tt a}' (apply) command when you are carrying one. However, ! chests are often locked, and are in any case unwieldy objects. ! You must set one down before unlocking it by kicking it, ! using a key or lock-picking tool with the `{\tt a}' (apply) command, ! or by using a weapon to force the lock with the ``{\tt \#force}'' ! extended command. %.pg Some chests are trapped, causing nasty things to happen when you *************** *** 1545,1561 **** partial, or full. Traditional was the only interface available for earlier versions; it consists of a prompt for object class characters, followed by an object-by-object prompt for all items matching the selected ! object class(es). Combination starts will a prompt for object class(es) of interest, but then displays a menu of matching objects rather than prompting one-by-one. Partial skips the object class filtering and immediately displays a menu of all objects. Full displays a menu of object classes rather than a character prompt, and then a menu of matching objects for selection. %.lp \item[\ib{monsters}] Set the characters used to display monster classes (default ``\verb+abcdefghijklmnopqrstuv+ ! \verb+wxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@ \\&;:~]+''). This string is subjected to the same processing as the {\it dungeon\/} option. The order of the symbols is ant or other insect, blob, cockatrice, --- 1583,1643 ---- partial, or full. Traditional was the only interface available for earlier versions; it consists of a prompt for object class characters, followed by an object-by-object prompt for all items matching the selected ! object class(es). Combination starts with a prompt for object class(es) of interest, but then displays a menu of matching objects rather than prompting one-by-one. Partial skips the object class filtering and immediately displays a menu of all objects. Full displays a menu of object classes rather than a character prompt, and then a menu of matching objects for selection. + \item[\ib{menu\_deselect\_all}] + Menu character accelerator to deselect all items in a menu. + Implemented by the X11 and tty ports. + Default `-'. + \item[\ib{menu\_deselect\_page}] + Menu character accelerator deselect all items on this page of a menu. + Implemented only by the tty port. + Default `\verb+\+'. + \item[\ib{menu\_first\_page}] + Menu character accelerator to jump to the first page in a menu. + Implemented only by the tty port. + Default `\verb+^+'. + \item[\ib{menu\_invert\_all}] + Menu character accelerator to invert all items in a menu. + Implemented by the X11 and tty ports. + Default `@'. + \item[\ib{menu\_invert\_page}] + Menu character accelerator to invert all items on this page of a menu. + Implemented only by the tty port. + Default `\verb+~+'. + \item[\ib{menu\_last\_page}] + Menu character accelerator to jump to the last page in a menu. + Implemented only by the tty port. + Default `\verb+|+'. + \item[\ib{menu\_next\_page}] + Menu character accelerator to goto the next menu page. + Implemented only by the tty port. + Default `\verb+>+'. + \item[\ib{menu\_previous\_page}] + Menu character accelerator to goto the previous menu page. + Implemented only by the tty port. + Default `\verb+<+'. + \item[\ib{menu\_search}] + Menu character accelerator to search for a menu item. + Implemented only by the X11 port. + Default `:'. + \item[\ib{menu\_select\_all}] + Menu character accelerator to select all items in a menu. + Implemented by the X11 and tty ports. + Default `.'. + \item[\ib{menu\_select\_page}] + Menu character accelerator to select all items on this page of a menu. + Implemented only by the tty port. + Default `,'. %.lp \item[\ib{monsters}] Set the characters used to display monster classes (default ``\verb+abcdefghijklmnopqrstuv+ ! \verb+wxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@ '&;:~]+''). This string is subjected to the same processing as the {\it dungeon\/} option. The order of the symbols is ant or other insect, blob, cockatrice, *************** *** 1621,1627 **** containing the symbols for the various object types. %.lp \item[\ib{perm\_invent}] ! If True, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. %.lp \item[\ib{pettype}] --- 1703,1709 ---- containing the symbols for the various object types. %.lp \item[\ib{perm\_invent}] ! If true, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. %.lp \item[\ib{pettype}] *************** *** 1634,1641 **** Specify the object types to be picked up when {\it autopickup\/} is on. Default is all types. %.lp \item[\ib{rawio}] ! Force raw (non-ctrl-break) mode for faster output and more bulletproof input (MS-DOS sometimes treats `{\tt \^{}P}' as a printer toggle without it) (default off). Note: DEC Rainbows hang if this is turned on. Cannot be set with the `{\tt O}' command. --- 1716,1729 ---- Specify the object types to be picked up when {\it autopickup\/} is on. Default is all types. %.lp + \item[\ib{preload\_tiles}] + For the protected mode MSDOS version, control whether tiles + get pre-loaded into RAM at the start of the game. Doing so + enhances performance of the tile graphics, but uses more memory. (default on). + Cannot be set with the `{\tt O}' command. + %.lp \item[\ib{rawio}] ! Force raw (non-cbreak) mode for faster output and more bulletproof input (MS-DOS sometimes treats `{\tt \^{}P}' as a printer toggle without it) (default off). Note: DEC Rainbows hang if this is turned on. Cannot be set with the `{\tt O}' command. *************** *** 1704,1715 **** Provide more commentary during the game (default on). %.lp \item[\ib{videocolors}] Set the color palette for PC systems using NO\_TERMS ! (default 4 2 6 1 5 3 15 12 10 14 9 13 11). The order of colors is red, green, brown, blue, magenta, cyan, bright.white, bright.red, bright.green, yellow, bright.blue, bright.magenta, and bright.cyan. Cannot be set with the `{\tt O}' command. %.lp \item[\ib{videoshades}] Set the intensity level of the three gray scales available --- 1792,1805 ---- Provide more commentary during the game (default on). %.lp \item[\ib{videocolors}] + \begin{sloppypar} Set the color palette for PC systems using NO\_TERMS ! (default 4-2-6-1-5-3-15-12-10-14-9-13-11). The order of colors is red, green, brown, blue, magenta, cyan, bright.white, bright.red, bright.green, yellow, bright.blue, bright.magenta, and bright.cyan. Cannot be set with the `{\tt O}' command. + \end{sloppypar} %.lp \item[\ib{videoshades}] Set the intensity level of the three gray scales available *** Old/doc/Guidebook.txt Tue May 28 17:21:56 1996 --- doc/Guidebook.txt Fri May 24 22:25:06 1996 *************** *** 33,40 **** off than when they passed through the first time. And who was to say that all of those who did not return had not just kept going? ! Asking around, you hear about a bauble, some call it The ! Amulet of Yendor, which, if you can find it, will bring you great wealth. One legend you were told even mentioned that the one who finds the amulet will be granted immortality by the gods. The amulet is rumored to be somewhere beyond the Valley of Gehennom, --- 33,40 ---- off than when they passed through the first time. And who was to say that all of those who did not return had not just kept going? ! Asking around, you hear about a bauble, called the Amulet of ! Yendor by some, which, if you can find it, will bring you great wealth. One legend you were told even mentioned that the one who finds the amulet will be granted immortality by the gods. The amulet is rumored to be somewhere beyond the Valley of Gehennom, *************** *** 91,97 **** Priests and Priestesses are clerics militant, crusaders ad- vancing the cause of righteousness with arms, armor, and arts thaumaturgic. Their ability to commune with deities via prayer ! occasionally extricates them from peril; but can also put them in it. Rogues are agile and stealthy thieves, with knowledge of --- 91,97 ---- Priests and Priestesses are clerics militant, crusaders ad- vancing the cause of righteousness with arms, armor, and arts thaumaturgic. Their ability to commune with deities via prayer ! occasionally extricates them from peril, but can also put them in it. Rogues are agile and stealthy thieves, with knowledge of *************** *** 111,117 **** cold, and instills in them stealth and cunning. Wizards start out with a knowledge of magic, a selection of ! magical items and a particular affinity for dweomercraft. Although seemingly weak and easy to overcome at first sight, an experienced Wizard is a deadly foe. --- 111,117 ---- cold, and instills in them stealth and cunning. Wizards start out with a knowledge of magic, a selection of ! magical items, and a particular affinity for dweomercraft. Although seemingly weak and easy to overcome at first sight, an experienced Wizard is a deadly foe. *************** *** 126,132 **** ! NetHack 3.2 April 3, 1996 --- 126,132 ---- ! NetHack 3.2 May 24, 1996 *************** *** 181,187 **** In order to understand what is going on in NetHack, first you must understand what NetHack is doing with the screen. The ! NetHack screen replaces the ``You see...'' descriptions of text adventure games. Figure 1 is a sample of what a NetHack screen might look like. --- 181,187 ---- In order to understand what is going on in NetHack, first you must understand what NetHack is doing with the screen. The ! NetHack screen replaces the ``You see ...'' descriptions of text adventure games. Figure 1 is a sample of what a NetHack screen might look like. *************** *** 192,198 **** |....| ---------- |.<..|####...@...$.| ! NetHack 3.2 April 3, 1996 --- 192,198 ---- |....| ---------- |.<..|####...@...$.| ! NetHack 3.2 May 24, 1996 *************** *** 258,264 **** Charisma affects how certain creatures react toward you. In particular, it can affect the prices shopkeepers offer you. ! NetHack 3.2 April 3, 1996 --- 258,264 ---- Charisma affects how certain creatures react toward you. In particular, it can affect the prices shopkeepers offer you. ! NetHack 3.2 May 24, 1996 *************** *** 269,275 **** Alignment ! Lawful, Neutral, or Chaotic. Basically, Lawful is good and Chaotic is evil. Your alignment influences how other mon- sters react toward you. Monsters of a like alignment are more likely to be non-aggressive, while those of an opposing --- 269,275 ---- Alignment ! Lawful, Neutral, or Chaotic. Often, Lawful is good and Chaotic is evil. Your alignment influences how other mon- sters react toward you. Monsters of a like alignment are more likely to be non-aggressive, while those of an opposing *************** *** 324,330 **** displayed. ! NetHack 3.2 April 3, 1996 --- 324,330 ---- displayed. ! NetHack 3.2 May 24, 1996 *************** *** 390,396 **** ! NetHack 3.2 April 3, 1996 --- 390,396 ---- ! NetHack 3.2 May 24, 1996 *************** *** 456,462 **** ! NetHack 3.2 April 3, 1996 --- 456,462 ---- ! NetHack 3.2 May 24, 1996 *************** *** 492,502 **** & Tell what a command does. ! < Go up a staircase to the previous level (if you are on the ! stairs). ! > Go down a staircase to the next level (if you are on the ! stairs). [yuhjklbn] Go one step in the direction indicated (see Figure 2). If --- 492,502 ---- & Tell what a command does. ! < Go up to the previous level (if you are on the staircase or ! ladder). ! > Go down to the next level (if you are on the staircase or ! ladder). [yuhjklbn] Go one step in the direction indicated (see Figure 2). If *************** *** 504,515 **** stead. Only these one-step movement commands cause you to fight monsters; the others (below) are ``safe.'' ! y k u 7 8 9 ! \ | / \ | / ! h- . -l 4- . -6 ! / | \ / | \ ! b j n 1 2 3 ! (if number_pad is set) Figure 2 --- 504,515 ---- stead. Only these one-step movement commands cause you to fight monsters; the others (below) are ``safe.'' ! y k u 7 8 9 ! \ | / \ | / ! h- . -l 4- . -6 ! / | \ / | \ ! b j n 1 2 3 ! (if number_pad is set) Figure 2 *************** *** 522,528 **** Prefix: move without picking up any objects. ! NetHack 3.2 April 3, 1996 --- 522,528 ---- Prefix: move without picking up any objects. ! NetHack 3.2 May 24, 1996 *************** *** 546,553 **** a Apply (use) a tool (pick-axe, key, lamp...). ! A Remove all armor. Use `T' (take off) to take off only one ! piece of armor. ^A Redo the previous command. --- 546,554 ---- a Apply (use) a tool (pick-axe, key, lamp...). ! A Remove one or more worn items, such as armor. Use `T' (take ! off) to take off only one piece of armor or `R' (remove) to ! take off only one accessory. ^A Redo the previous command. *************** *** 577,594 **** bereth'' will cause most monsters to not attack you hand- to-hand (but if you attack, you will rub it out); this is often useful to give yourself a breather. (This feature may ! be compiled out of the game, so your version might not ! necessarily have it.) E- - write in the dust with your fingers. i List your inventory (everything you're carrying). - I List selected parts of your inventory. ! NetHack 3.2 April 3, 1996 --- 578,594 ---- bereth'' will cause most monsters to not attack you hand- to-hand (but if you attack, you will rub it out); this is often useful to give yourself a breather. (This feature may ! be compiled out of the game, so your version might not have ! it.) E- - write in the dust with your fingers. i List your inventory (everything you're carrying). ! NetHack 3.2 May 24, 1996 *************** *** 598,603 **** --- 598,605 ---- NetHack Guidebook 10 + I List selected parts of your inventory. + I* - list all gems in inventory; Iu - list all unpaid items; Ix - list all used up items that are on your shopping bill; *************** *** 650,660 **** W Wear armor. - x List the spells you know (same as `+'). - ! NetHack 3.2 April 3, 1996 --- 652,660 ---- W Wear armor. ! NetHack 3.2 May 24, 1996 *************** *** 664,669 **** --- 664,671 ---- NetHack Guidebook 11 + x List the spells you know (same as `+'). + X Enter explore (discovery) mode. z Zap a wand. *************** *** 712,726 **** [8th, or `high'] bit), you can invoke the extended commands by meta-ing the first letter of the command. In OS/2, PC, and ST NetHack, the `Alt' key can be used in this fashion; on the Amiga ! set altmeta to get this behavior. ! ! __________ (R)UNIX is a registered trademark of AT&T. ! NetHack 3.2 April 3, 1996 --- 714,726 ---- [8th, or `high'] bit), you can invoke the extended commands by meta-ing the first letter of the command. In OS/2, PC, and ST NetHack, the `Alt' key can be used in this fashion; on the Amiga ! set the altmeta option to get this behavior. __________ (R)UNIX is a registered trademark of AT&T. ! NetHack 3.2 May 24, 1996 *************** *** 737,742 **** --- 737,744 ---- M-d Dip an object into something. + M-e Advance or check weapons skills. + M-f Force a lock. M-i Invoke an object's special powers. *************** *** 784,792 **** ! ! ! NetHack 3.2 April 3, 1996 --- 786,792 ---- ! NetHack 3.2 May 24, 1996 *************** *** 852,858 **** ! NetHack 3.2 April 3, 1996 --- 852,858 ---- ! NetHack 3.2 May 24, 1996 *************** *** 888,894 **** next to you when you move. Otherwise your pet will be stranded and may become wild. ! 6.3. Ghost levels You may encounter the shades and corpses of other adventur- ers (or even former incarnations of yourself!) and their personal --- 888,894 ---- next to you when you move. Otherwise your pet will be stranded and may become wild. ! 6.3. Bones levels You may encounter the shades and corpses of other adventur- ers (or even former incarnations of yourself!) and their personal *************** *** 918,924 **** choose a particular object you are carrying, you are usually ! NetHack 3.2 April 3, 1996 --- 918,924 ---- choose a particular object you are carrying, you are usually ! NetHack 3.2 May 24, 1996 *************** *** 984,990 **** you must wield it and attack them, or throw it at them. You can ! NetHack 3.2 April 3, 1996 --- 984,990 ---- you must wield it and attack them, or throw it at them. You can ! NetHack 3.2 May 24, 1996 *************** *** 994,1004 **** NetHack Guidebook 16 ! simply select to throw a spear. To shoot an arrow, you must first wield a bow, then throw the arrow. Crossbows shoot crossbow bolts. Slings hurl rocks and (other) stones (like gems). You can wield only one weapon at a time, but you can ! change weapons unless you're wielding a cursed one. Enchanted weapons have a ``plus'' (or ``to hit enhancement'' which can be either positive or negative) that adds or subtracts --- 994,1011 ---- NetHack Guidebook 16 ! simply select to throw a spear. To shoot an arrow, you should first wield a bow, then throw the arrow. Crossbows shoot crossbow bolts. Slings hurl rocks and (other) stones (like gems). You can wield only one weapon at a time, but you can ! change weapons unless you're wielding a cursed one. To switch to ! bare hands, wield `-', or use the `A' command which allows you to ! unwield the current weapon in addition to taking off other worn ! items. ! ! The ``#enhance'' command will be present if the ``weapon ! skills'' feature is enabled, and deals with your proficiency in ! various types of weapons. Enchanted weapons have a ``plus'' (or ``to hit enhancement'' which can be either positive or negative) that adds or subtracts *************** *** 1006,1018 **** The only way to determine a weapon's enchantment is to have it magically identified somehow. Those of you in the audience who are AD&D players, be aware that each weapon which exists in AD&D does the same damage to monsters in NetHack. Some of the more obscure weapons (such as the aklys, lucern hammer, and bec-de-corbin) are defined in an appendix to Unearthed Arcana, an AD&D supplement. ! The commands to use weapons are `w' (wield) and `t' (throw). 7.3. Armor (`[') --- 1013,1029 ---- The only way to determine a weapon's enchantment is to have it magically identified somehow. + Most weapons are subject to some type of damage like rust. + Such damage can be repaired. + Those of you in the audience who are AD&D players, be aware that each weapon which exists in AD&D does the same damage to monsters in NetHack. Some of the more obscure weapons (such as the aklys, lucern hammer, and bec-de-corbin) are defined in an appendix to Unearthed Arcana, an AD&D supplement. ! The commands to use weapons are `w' (wield), `t' (throw), ! and the ``#enhance'' extended command. 7.3. Armor (`[') *************** *** 1037,1071 **** ring mail 7 studded leather armor 7 leather armor 8 - no armor 10 - You can also wear other pieces of armor (ex. helmets, boots, - shields, cloaks) to lower your armor class even further, but you - can only wear one item of each category (one suit of armor, one - cloak, one helmet, one shield, and so on). ! If a piece of armor is enchanted, its armor protection will ! be better (or worse) than normal, and its ``plus'' (or minus) ! will subtract from your armor class. For example, a +1 chain ! mail would give you better protection than normal chain mail, - NetHack 3.2 April 3, 1996 ! NetHack Guidebook 17 lowering your armor class one unit further to 4. When you put on a piece of armor, you immediately find out the armor class and any ``plusses'' it provides. Cursed pieces of armor usually have negative enchantments (minuses) in addition to being unremovable. The commands to use armor are `W' (wear) and `T' (take off). 7.4. Food (`%') --- 1048,1088 ---- ring mail 7 studded leather armor 7 leather armor 8 ! NetHack 3.2 May 24, 1996 + NetHack Guidebook 17 ! no armor 10 + You can also wear other pieces of armor (ex. helmets, boots, + shields, cloaks) to lower your armor class even further, but you + can only wear one item of each category (one suit of armor, one + cloak, one helmet, one shield, and so on) at a time. + If a piece of armor is enchanted, its armor protection will + be better (or worse) than normal, and its ``plus'' (or minus) + will subtract from your armor class. For example, a +1 chain + mail would give you better protection than normal chain mail, lowering your armor class one unit further to 4. When you put on a piece of armor, you immediately find out the armor class and any ``plusses'' it provides. Cursed pieces of armor usually have negative enchantments (minuses) in addition to being unremovable. + Many types of armor are subject to some kind of damage like + rust. Such damage can be repaired. Some types or armor may in- + hibit spell casting. + The commands to use armor are `W' (wear) and `T' (take off). + The `A' command can also be used to take off armor as well as + other worn items. 7.4. Food (`%') *************** *** 1097,1130 **** which can be used to determine what another object is, whether it is cursed or blessed, and how many uses it has left. Some ob- jects of subtle enchantment are difficult to identify without - these. - - If you receive mail while you are playing (on versions com- - piled with this feature), a mail daemon may run up and deliver it - to you as a scroll of mail. To use this feature, you must let - NetHack know where to look for new mail by setting the ``MAIL'' - environment variable to the file name of your mailbox. You may - also want to set the ``MAILREADER'' environment variable to the - file name of your favorite reader, so NetHack can shell to it - when you read the scroll. You can disable the mail daemon by - clearing the mail flag. - - The command to read a scroll is `r'. - NetHack 3.2 April 3, 1996 - ! NetHack Guidebook 18 7.6. Potions (`!') --- 1114,1147 ---- which can be used to determine what another object is, whether it is cursed or blessed, and how many uses it has left. Some ob- jects of subtle enchantment are difficult to identify without + NetHack 3.2 May 24, 1996 + NetHack Guidebook 18 + these. ! A mail daemon may run up and deliver mail to you as a scroll ! of mail (on versions compiled with this feature). To use this ! feature on versions where NetHack mail delivery is triggered by ! electronic mail appearing in your system mailbox, you must let ! NetHack know where to look for new mail by setting the ``MAIL'' ! environment variable to the file name of your mailbox. You may ! also want to set the ``MAILREADER'' environment variable to the ! file name of your favorite reader, so NetHack can shell to it ! when you read the scroll. On versions of NetHack where mail is ! randomly generated internal to the game, these environment vari- ! ables are ignored. You can disable the mail daemon by turning ! off the mail option. + The command to read a scroll is `r'. 7.6. Potions (`!') *************** *** 1162,1167 **** --- 1179,1197 ---- The command to use a wand is `z' (zap). To break one, use the `a' (apply) command. + + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 19 + + 7.8. Rings (`=') Rings are very useful items, since they are relatively per- *************** *** 1180,1200 **** Spell books are tomes of mighty magic. When studied with the `r' (read) command, they bestow the knowledge of a spell- ! ! ! NetHack 3.2 April 3, 1996 ! ! ! ! ! ! ! NetHack Guidebook 19 ! ! ! unless the attempt backfires. Reading a cursed spell book, or ! one with mystic runes beyond your ken can be harmful to your ! health! A spell (even when learned) can also backfire when you cast it. If you attempt to cast a spell well above your experience --- 1210,1217 ---- Spell books are tomes of mighty magic. When studied with the `r' (read) command, they bestow the knowledge of a spell- ! unless the attempt backfires. Reading a cursed spell book or one ! with mystic runes beyond your ken can be harmful to your health! A spell (even when learned) can also backfire when you cast it. If you attempt to cast a spell well above your experience *************** *** 1208,1213 **** --- 1225,1233 ---- spell, your familiarity with it will dwindle, until you eventual- ly forget the details completely and must relearn it. + Casting a spell also requires flexible movement, and wearing + various types of armor may interfere with that. + The command to read a spell book is the same as for scrolls, `r' (read). The `+' command lists your current spells and the number of spell points they require. The `Z' (cast) command *************** *** 1226,1262 **** You may encounter chests or boxes in your travels. These can be opened with the ``#loot'' extended command when they are - on the floor, or with the `a' (apply) command when you are carry- - ing one. However, chests are often locked, and require you to - either use a key to unlock it, a tool to pick the lock, or to - break it open with brute force. Chests are unwieldy objects, and - must be set down to be unlocked (by kicking them, using a key or - lock picking tool with the `a' (apply) command, or by using a - weapon to force the lock with the ``#force'' extended command). - Some chests are trapped, causing nasty things to happen when - you unlock or open them. You can check for and try to deactivate - traps with the ``#untrap'' extended command. ! 7.11. Amulets (`"') - Amulets are very similar to rings, and often more powerful. - Like rings, amulets have various magical properties, some benefi- - cial, some harmful, which are activated by putting them on. - Only one amulet may be worn at a time, around your neck. - NetHack 3.2 April 3, 1996 ! NetHack Guidebook 20 The commands to use amulets are the same as for rings, `P' (put on) and `R' (remove). --- 1246,1281 ---- You may encounter chests or boxes in your travels. These can be opened with the ``#loot'' extended command when they are ! NetHack 3.2 May 24, 1996 + NetHack Guidebook 20 + on the floor, or with the `a' (apply) command when you are carry- + ing one. However, chests are often locked, and are in any case + unwieldy objects. You must set one down before unlocking it by + kicking it, using a key or lock-picking tool with the `a' (apply) + command, or by using a weapon to force the lock with the + ``#force'' extended command. + Some chests are trapped, causing nasty things to happen when + you unlock or open them. You can check for and try to deactivate + traps with the ``#untrap'' extended command. + 7.11. Amulets (`"') ! Amulets are very similar to rings, and often more powerful. ! Like rings, amulets have various magical properties, some benefi- ! cial, some harmful, which are activated by putting them on. + Only one amulet may be worn at a time, around your neck. The commands to use amulets are the same as for rings, `P' (put on) and `R' (remove). *************** *** 1291,1296 **** --- 1310,1329 ---- enced by the amount of gold you are carrying (shopkeepers aside). + + + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 21 + + 8. Options Due to variations in personal tastes and conceptions of how *************** *** 1311,1330 **** The NETHACKOPTIONS variable is a comma-separated list of in- itial values for the various options. Some can only be turned on or off. You turn one of these on by adding the name of the op- ! tion to the list, and turn it off by typing a `!' or ``no'' ! ! ! NetHack 3.2 April 3, 1996 ! ! ! ! ! ! ! NetHack Guidebook 21 ! ! ! before the name. Others take a character string as a value. You can set string options by typing the option name, a colon, and then the value of the string. The value is terminated by the next comma or the end of string. --- 1344,1351 ---- The NETHACKOPTIONS variable is a comma-separated list of in- itial values for the various options. Some can only be turned on or off. You turn one of these on by adding the name of the op- ! tion to the list, and turn it off by typing a `!' or ``no'' be- ! fore the name. Others take a character string as a value. You can set string options by typing the option name, a colon, and then the value of the string. The value is terminated by the next comma or the end of string. *************** *** 1334,1340 **** Meanie'', and the fruit is set to ``papaya'', you would enter the command ! % setenv NETHACKOPTIONS "female,autopickup,name:Blue Meanie,fruit:papaya" in csh (note the need to escape the ! since it's special to the shell), or --- 1355,1361 ---- Meanie'', and the fruit is set to ``papaya'', you would enter the command ! % setenv NETHACKOPTIONS "female,\!autopickup,name:Blue Meanie,fruit:papaya" in csh (note the need to escape the ! since it's special to the shell), or *************** *** 1357,1362 **** --- 1378,1395 ---- tiple lines by putting a `\' at the end of each line to be con- tinued. Any line starting with `#' is treated as a comment. + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 22 + + The default name of the configuration file varies on dif- ferent operating systems, but NETHACKOPTIONS can also be set to the full name of a file you want to use (possibly preceded by an *************** *** 1377,1395 **** on machines with an IBM PC compatible BIOS ROM (default off, OS/2, PC, and ST NetHack only). - - - - NetHack 3.2 April 3, 1996 - - - - - - - NetHack Guidebook 22 - - catname Name your starting cat (ex. ``catname:Morris''). Cannot be set with the `O' command. --- 1410,1415 ---- *************** *** 1424,1436 **** vanquished monsters list includes all monsters killed by traps and each other as well as by you. dogname Name your starting dog (ex. ``dogname:Fang''). Cannot be set with the `O' command. dungeon Set the graphics symbols for displaying the dungeon (default ! `` |--------||.-|++.##<><>_\\#{}.}..## #}''). The dungeon option should be followed by a string of 1-38 characters to be used instead of the default map-drawing characters. The dungeon map will use the characters you specify instead of --- 1444,1468 ---- vanquished monsters list includes all monsters killed by traps and each other as well as by you. + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 23 + + dogname Name your starting dog (ex. ``dogname:Fang''). Cannot be set with the `O' command. dungeon Set the graphics symbols for displaying the dungeon (default ! `` |--------||.-|++.##<><>_\\#{}.}..## #}''). The dungeon option should be followed by a string of 1-38 characters to be used instead of the default map-drawing characters. The dungeon map will use the characters you specify instead of *************** *** 1445,1461 **** in the following character, and the `^' prefix causes the following character to be treated as a control character. - - NetHack 3.2 April 3, 1996 - - - - - - - NetHack Guidebook 23 - - The order of the symbols is: solid rock, vertical wall, horizontal wall, upper left corner, upper right corner, lower left corner, lower right corner, cross wall, upward T --- 1477,1482 ---- *************** *** 1489,1494 **** --- 1510,1527 ---- the sequence for magic resistance displays; the eight sur- rounding glyphs for swallowed display; nine glyphs for ex- plosions. An explosion consists of three rows (top, middle, + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 24 + + and bottom) of three characters. The explosion is centered in the center of this 3 by 3 array. *************** *** 1510,1527 **** Name a fruit after something you enjoy eating (ex. ``fruit:mango'') (default ``slime mold''). Basically a nos- talgic whimsy that NetHack uses from time to time. You - - - NetHack 3.2 April 3, 1996 - - - - - - - NetHack Guidebook 24 - - should set this to something you find more appetizing than slime mold. Apples, oranges, pears, bananas, and melons al- ready exist in NetHack, so don't use those. --- 1543,1548 ---- *************** *** 1555,1560 **** --- 1576,1593 ---- Display an introductory message when starting the game (de- fault on). + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 25 + + lit_corridor Show corridor squares seen by night vision or a light source held by your character as lit (default off). *************** *** 1574,1602 **** versions; it consists of a prompt for object class charac- ters, followed by an object-by-object prompt for all items matching the selected object class(es). Combination starts ! will a prompt for object class(es) of interest, but then displays a menu of matching objects rather than prompting ! NetHack 3.2 April 3, 1996 - NetHack Guidebook 25 ! one-by-one. Partial skips the object class filtering and ! immediately displays a menu of all objects. Full displays a ! menu of object classes rather than a character prompt, and ! then a menu of matching objects for selection. monsters Set the characters used to display monster classes (default ``abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX- ! YZ@ \&;:~]''). This string is subjected to the same pro- cessing as the dungeon option. The order of the symbols is ant or other insect, blob, cockatrice, dog or other canine, eye or sphere, feline, gremlin, humanoid, imp or minor --- 1607,1679 ---- versions; it consists of a prompt for object class charac- ters, followed by an object-by-object prompt for all items matching the selected object class(es). Combination starts ! with a prompt for object class(es) of interest, but then displays a menu of matching objects rather than prompting + one-by-one. Partial skips the object class filtering and + immediately displays a menu of all objects. Full displays a + menu of object classes rather than a character prompt, and + then a menu of matching objects for selection. + menu_deselect_all + Menu character accelerator to deselect all items in a menu. + Implemented by the X11 and tty ports. Default '-'. ! menu_deselect_page ! Menu character accelerator deselect all items on this page ! of a menu. Implemented only by the tty port. Default '\'. + menu_first_page + Menu character accelerator to jump to the first page in a + menu. Implemented only by the tty port. Default '^'. + menu_invert_all + Menu character accelerator to invert all items in a menu. + Implemented by the X11 and tty ports. Default '@'. + menu_invert_page + Menu character accelerator to invert all items on this page + of a menu. Implemented only by the tty port. Default '~'. + menu_last_page + Menu character accelerator to jump to the last page in a + menu. Implemented only by the tty port. Default '|'. + menu_next_page + Menu character accelerator to goto the next menu page. Im- + plemented only by the tty port. Default '>'. ! NetHack 3.2 May 24, 1996 ! ! ! ! ! ! ! NetHack Guidebook 26 ! ! ! menu_previous_page ! Menu character accelerator to goto the previous menu page. ! Implemented only by the tty port. Default '<'. ! ! menu_search ! Menu character accelerator to search for a menu item. Im- ! plemented only by the X11 port. Default ':'. ! ! menu_select_all ! Menu character accelerator to select all items in a menu. ! Implemented by the X11 and tty ports. Default '.'. ! ! menu_select_page ! Menu character accelerator to select all items on this page ! of a menu. Implemented only by the tty port. Default ','. monsters Set the characters used to display monster classes (default ``abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX- ! YZ@ '&;:~]''). This string is subjected to the same pro- cessing as the dungeon option. The order of the symbols is ant or other insect, blob, cockatrice, dog or other canine, eye or sphere, feline, gremlin, humanoid, imp or minor *************** *** 1632,1659 **** null Send padding nulls to the terminal (default off). - number_pad - Use the number keys to move instead of [yuhjklbn] (default - off). - - objects - Set the characters used to display object classes (default - ``])[="(%!?+/$*`0_.''). This string is subjected to the - same processing as the dungeon option. The order of the - symbols is illegal-object (should never be seen), weapon, - armor, ring, amulet, tool, food, potion, scroll, spell book, - NetHack 3.2 April 3, 1996 - NetHack Guidebook 26 wand, gold, gem or rock, boulder or statue, iron ball, chain, and venom. Cannot be set with the `O' command. --- 1709,1735 ---- null Send padding nulls to the terminal (default off). + NetHack 3.2 May 24, 1996 + NetHack Guidebook 27 + number_pad + Use the number keys to move instead of [yuhjklbn] (default + off). + objects + Set the characters used to display object classes (default + ``])[="(%!?+/$*`0_.''). This string is subjected to the + same processing as the dungeon option. The order of the + symbols is illegal-object (should never be seen), weapon, + armor, ring, amulet, tool, food, potion, scroll, spell book, wand, gold, gem or rock, boulder or statue, iron ball, chain, and venom. Cannot be set with the `O' command. *************** *** 1663,1669 **** string containing the symbols for the various object types. perm_invent ! If True, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. --- 1739,1745 ---- string containing the symbols for the various object types. perm_invent ! If true, always display your current inventory in a window. This only makes sense for windowing system interfaces that implement this feature. *************** *** 1677,1682 **** --- 1753,1764 ---- Specify the object types to be picked up when autopickup is on. Default is all types. + preload_tiles + For the protected mode MSDOS version, control whether tiles + get pre-loaded into RAM at the start of the game. Doing so + enhances performance of the tile graphics, but uses more + memory. (default on). Cannot be set with the `O' command. + rawio Force raw (non-cbreak) mode for faster output and more bul- letproof input (MS-DOS sometimes treats `^P' as a printer *************** *** 1691,1696 **** --- 1773,1791 ---- Prevent you from (knowingly) attacking your pets (default on). + + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 28 + + scores Control what parts of the score list you are shown at the end (ex. ``scores:5 top scores/4 around my score/own *************** *** 1708,1725 **** silent Suppress terminal beeps (default on). - - - NetHack 3.2 April 3, 1996 - - - - - - - NetHack Guidebook 27 - - sortpack Sort the pack contents by type when displaying inventory (default on). --- 1803,1808 ---- *************** *** 1757,1762 **** --- 1840,1857 ---- to the same processing as the dungeon option. The order of the symbols is: arrow trap, dart trap, falling + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 29 + + rock trap, squeaky board, bear trap, land mine, rolling boulder trap, sleeping gas trap, rust trap, fire trap, pit, spiked pit, hole, trap door, teleportation trap, level *************** *** 1770,1791 **** videocolors Set the color palette for PC systems using NO_TERMS (default ! 4 2 6 1 5 3 15 12 10 14 9 13 11). The order of colors is red, green, brown, blue, magenta, cyan, bright.white, bright.red, bright.green, yellow, bright.blue, bright.magenta, and bright.cyan. Cannot be set with the `O' - - - NetHack 3.2 April 3, 1996 - - - - - - - NetHack Guidebook 28 - - command. videoshades --- 1865,1874 ---- videocolors Set the color palette for PC systems using NO_TERMS (default ! 4-2-6-1-5-3-15-12-10-14-9-13-11). The order of colors is red, green, brown, blue, magenta, cyan, bright.white, bright.red, bright.green, yellow, bright.blue, bright.magenta, and bright.cyan. Cannot be set with the `O' command. videoshades *************** *** 1822,1827 **** --- 1905,1923 ---- whatever you have. If you quit, you keep all your gold, but if you swing and live, you might find more. + + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 30 + + If you just want to see what the current top players/games list is, you can type nethack -s all on most versions. *************** *** 1841,1857 **** explore mode are left for the intrepid reader to discover. - - NetHack 3.2 April 3, 1996 - - - - - - - NetHack Guidebook 29 - - 11. Credits The original hack game was modeled on the Berkeley UNIX ro- --- 1937,1942 ---- *************** *** 1887,1892 **** --- 1972,1989 ---- Later, Mike coordinated a major rewrite of the game, heading a team which included Ken Arromdee, Jean-Christophe Collet, Steve + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 31 + + Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threepoint, and Janet Walz, to produce NetHack 3.0c. *************** *** 1906,1923 **** and Janet Walz, the development team which now included Ken Ar- romdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric - - - NetHack 3.2 April 3, 1996 - - - - - - - NetHack Guidebook 30 - - Raymond, and Eric Smith undertook a radical revision of 3.0. They re-structured the game's design, and re-wrote major parts of the code. They added multiple dungeons, a new display, special --- 2003,2008 ---- *************** *** 1952,1957 **** --- 2037,2055 ---- Smith; Mike Stephenson; Janet Walz; and, Paul Winner, release version 3.2 in April of 1996. + + + + NetHack 3.2 May 24, 1996 + + + + + + + NetHack Guidebook 32 + + Version 3.2 marks the tenth anniversary of the formation of the development team. In a testament to their dedication to the game, all thirteen members of the original development team *************** *** 1971,2003 **** Ken Lorber, Andy Church, and Gregg Wonderly, with help from Richard Addison, ported 3.2 for the Amiga. - NetHack 3.2 April 3, 1996 - NetHack Guidebook 31 - Dean Luick ported 3.2 to the Macintosh. - Eric Smith and Warwick Allison ported 3.2 for the Ataris. - Michael Allison ported 3.2 for the Microsoft Windows NT - platform. - Timo Hakulinen remains responsible for the OS/2 port. ! From time to time, some depraved individual out there in ! netland sends a particularly intriguing modification to help out ! with the game. The Gods of the Dungeon sometimes make note of ! the names of the worst of these miscreants in this, the list of ! Dungeoneers: Andy Church Helge Hafting Mike Gallop --- 2069,2119 ---- Ken Lorber, Andy Church, and Gregg Wonderly, with help from Richard Addison, ported 3.2 for the Amiga. + Dean Luick ported 3.2 to the Macintosh. + + Eric Smith and Warwick Allison ported 3.2 for the Ataris. + + Michael Allison ported 3.2 for the Microsoft Windows NT + platform. + + Timo Hakulinen remains responsible for the OS/2 port. + + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out + with the game. The Gods of the Dungeon sometimes make note of + the names of the worst of these miscreants in this, the list of + Dungeoneers: + + + + + + + ! ! NetHack 3.2 May 24, 1996 ! ! ! ! ! ! ! NetHack Guidebook 33 Andy Church Helge Hafting Mike Gallop *************** *** 2040,2046 **** ! NetHack 3.2 April 3, 1996 --- 2156,2178 ---- ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! NetHack 3.2 May 24, 1996 *** Old/doc/lev_comp.6 Tue May 28 17:22:17 1996 --- doc/lev_comp.6 Fri May 17 10:14:10 1996 *************** *** 1,4 **** ! .TH LEV_COMP 6 "13 Dec 1995" .UC 4 .SH NAME lev_comp \- NetHack special levels compiler --- 1,4 ---- ! .TH LEV_COMP 6 "16 May 1996" .UC 4 .SH NAME lev_comp \- NetHack special levels compiler *************** *** 261,267 **** | passwall_detail ; ! monster_detail : MONSTER_ID ':' monster_c ',' m_name ',' coordinate monster_infos ; --- 261,267 ---- | passwall_detail ; ! monster_detail : MONSTER_ID chance ':' monster_c ',' m_name ',' coordinate monster_infos ; *************** *** 276,286 **** | ',' MON_APPEARANCE string ; ! object_detail : OBJECT_ID ':' object_desc ! | COBJECT_ID ':' object_desc ; ! object_desc : object_c ',' o_name ',' object_where object_infos ; object_where : coordinate --- 276,286 ---- | ',' MON_APPEARANCE string ; ! object_detail : OBJECT_ID object_desc ! | COBJECT_ID object_desc ; ! object_desc : chance ':' object_c ',' o_name ',' object_where object_infos ; object_where : coordinate *************** *** 312,319 **** door_detail : DOOR_ID ':' door_state ',' coordinate ; ! trap_detail : TRAP_ID ':' trap_name ',' coordinate ! | TRAP_ID ':' trap_name ',' coordinate ',' trap_chance ; drawbridge_detail: DRAWBRIDGE_ID ':' coordinate ',' DIRECTION ',' door_state --- 312,318 ---- door_detail : DOOR_ID ':' door_state ',' coordinate ; ! trap_detail : TRAP_ID chance ':' trap_name ',' coordinate ; drawbridge_detail: DRAWBRIDGE_ID ':' coordinate ',' DIRECTION ',' door_state *************** *** 400,408 **** | RANDOM_TYPE ; - trap_chance : CHANCE_ID ':' INTEGER - ; - room_type : string | RANDOM_TYPE ; --- 399,404 ---- *************** *** 462,467 **** --- 458,467 ---- | RANDOM_TYPE ; + chance : /* empty */ + | PERCENT + ; + engraving_type : ENGRAVING_TYPE | RANDOM_TYPE ; *************** *** 533,546 **** MONSTER: 'd', "hell hound", place[0] # a chest on another random side OBJECT: '(', "chest", place[1] ! # a sack on a random side, with a diamond and ruby in it CONTAINER: '(', "sack", place[2] OBJECT: '*', "diamond", contained ! OBJECT: '*', "ruby", contained # a random dragon somewhere MONSTER: 'D', random, random ! # a random trap in the EAST end ! TRAP: random, (6,4) # an electric eel below the SOUTH end MONSTER: ';', "electric eel", (4,8) # make the walls non-diggable --- 533,546 ---- MONSTER: 'd', "hell hound", place[0] # a chest on another random side OBJECT: '(', "chest", place[1] ! # a sack on a random side, with a diamond and maybe a ruby in it CONTAINER: '(', "sack", place[2] OBJECT: '*', "diamond", contained ! OBJECT[50%]: '*', "ruby", contained # a random dragon somewhere MONSTER: 'D', random, random ! # 3 out of 4 chance for a random trap in the EAST end ! TRAP[75%]: random, (6,4) # an electric eel below the SOUTH end MONSTER: ';', "electric eel", (4,8) # make the walls non-diggable *** Old/doc/lev_comp.txt Tue May 28 17:22:20 1996 --- doc/lev_comp.txt Thu May 23 11:02:02 1996 *************** *** 1,7 **** ! LEV_COMP(6) 1995 LEV_COMP(6) --- 1,7 ---- ! LEV_COMP(6) 1996 LEV_COMP(6) *************** *** 60,73 **** ! Dec Last change: 13 1 ! LEV_COMP(6) 1995 LEV_COMP(6) --- 60,73 ---- ! May Last change: 16 1 ! LEV_COMP(6) 1996 LEV_COMP(6) *************** *** 126,139 **** ! Dec Last change: 13 2 ! LEV_COMP(6) 1995 LEV_COMP(6) --- 126,139 ---- ! May Last change: 16 2 ! LEV_COMP(6) 1996 LEV_COMP(6) *************** *** 192,205 **** ! Dec Last change: 13 3 ! LEV_COMP(6) 1995 LEV_COMP(6) --- 192,205 ---- ! May Last change: 16 3 ! LEV_COMP(6) 1996 LEV_COMP(6) *************** *** 258,271 **** ! Dec Last change: 13 4 ! LEV_COMP(6) 1995 LEV_COMP(6) --- 258,271 ---- ! May Last change: 16 4 ! LEV_COMP(6) 1996 LEV_COMP(6) *************** *** 310,316 **** | passwall_detail ; ! monster_detail : MONSTER_ID ':' monster_c ',' m_name ',' coordinate monster_infos ; --- 310,316 ---- | passwall_detail ; ! monster_detail : MONSTER_ID chance ':' monster_c ',' m_name ',' coordinate monster_infos ; *************** *** 324,337 **** ! Dec Last change: 13 5 ! LEV_COMP(6) 1995 LEV_COMP(6) --- 324,337 ---- ! May Last change: 16 5 ! LEV_COMP(6) 1996 LEV_COMP(6) *************** *** 339,349 **** | ',' MON_APPEARANCE string ; ! object_detail : OBJECT_ID ':' object_desc ! | COBJECT_ID ':' object_desc ; ! object_desc : object_c ',' o_name ',' object_where object_infos ; object_where : coordinate --- 339,349 ---- | ',' MON_APPEARANCE string ; ! object_detail : OBJECT_ID object_desc ! | COBJECT_ID object_desc ; ! object_desc : chance ':' object_c ',' o_name ',' object_where object_infos ; object_where : coordinate *************** *** 375,382 **** door_detail : DOOR_ID ':' door_state ',' coordinate ; ! trap_detail : TRAP_ID ':' trap_name ',' coordinate ! | TRAP_ID ':' trap_name ',' coordinate ',' trap_chance ; drawbridge_detail: DRAWBRIDGE_ID ':' coordinate ',' DIRECTION ',' door_state --- 375,381 ---- door_detail : DOOR_ID ':' door_state ',' coordinate ; ! trap_detail : TRAP_ID chance ':' trap_name ',' coordinate ; drawbridge_detail: DRAWBRIDGE_ID ':' coordinate ',' DIRECTION ',' door_state *************** *** 390,403 **** - Dec Last change: 13 6 ! LEV_COMP(6) 1995 LEV_COMP(6) --- 389,403 ---- + May Last change: 16 6 ! ! LEV_COMP(6) 1996 LEV_COMP(6) *************** *** 456,469 **** ! Dec Last change: 13 7 ! LEV_COMP(6) 1995 LEV_COMP(6) --- 456,469 ---- ! May Last change: 16 7 ! LEV_COMP(6) 1996 LEV_COMP(6) *************** *** 489,497 **** | RANDOM_TYPE ; - trap_chance : CHANCE_ID ':' INTEGER - ; - room_type : string | RANDOM_TYPE ; --- 489,494 ---- *************** *** 519,541 **** | RANDOM_TYPE ; ! Dec Last change: 13 8 ! - LEV_COMP(6) 1995 LEV_COMP(6) - altar_type : ALTAR_TYPE - | RANDOM_TYPE - ; p_register : P_REGISTER '[' INTEGER ']' ; --- 516,537 ---- | RANDOM_TYPE ; + altar_type : ALTAR_TYPE + | RANDOM_TYPE + ; ! May Last change: 16 8 + LEV_COMP(6) 1996 LEV_COMP(6) p_register : P_REGISTER '[' INTEGER ']' ; *************** *** 565,570 **** --- 561,570 ---- | RANDOM_TYPE ; + chance : /* empty */ + | PERCENT + ; + engraving_type : ENGRAVING_TYPE | RANDOM_TYPE ; *************** *** 588,601 **** ! Dec Last change: 13 9 ! LEV_COMP(6) 1995 LEV_COMP(6) --- 588,601 ---- ! May Last change: 16 9 ! LEV_COMP(6) 1996 LEV_COMP(6) *************** *** 645,672 **** MONSTER: 'd', "hell hound", place[0] # a chest on another random side OBJECT: '(', "chest", place[1] ! # a sack on a random side, with a diamond and ruby in it CONTAINER: '(', "sack", place[2] OBJECT: '*', "diamond", contained ! OBJECT: '*', "ruby", contained # a random dragon somewhere MONSTER: 'D', random, random ! Dec Last change: 13 10 ! LEV_COMP(6) 1995 LEV_COMP(6) ! # a random trap in the EAST end ! TRAP: random, (6,4) # an electric eel below the SOUTH end MONSTER: ';', "electric eel", (4,8) # make the walls non-diggable --- 645,672 ---- MONSTER: 'd', "hell hound", place[0] # a chest on another random side OBJECT: '(', "chest", place[1] ! # a sack on a random side, with a diamond and maybe a ruby in it CONTAINER: '(', "sack", place[2] OBJECT: '*', "diamond", contained ! OBJECT[50%]: '*', "ruby", contained # a random dragon somewhere MONSTER: 'D', random, random ! May Last change: 16 10 ! LEV_COMP(6) 1996 LEV_COMP(6) ! # 3 out of 4 chance for a random trap in the EAST end ! TRAP[75%]: random, (6,4) # an electric eel below the SOUTH end MONSTER: ';', "electric eel", (4,8) # make the walls non-diggable *************** *** 720,726 **** ! Dec Last change: 13 11 --- 720,726 ---- ! May Last change: 16 11 *** Old/doc/nethack.6 Tue May 28 17:22:24 1996 --- doc/nethack.6 Fri Apr 19 18:15:08 1996 *************** *** 175,180 **** --- 175,183 ---- .SH FILES .PP All files are in the playground, normally /usr/games/lib/nethackdir. + If DLB was defined during the compile, the data files and special levels + will be inside a larger file, normally nhdat, instead of being separate + files. .br .DT .ta \w'cmdhelp, opthelp, wizhelp\ \ \ 'u *** Old/doc/nethack.txt Tue May 28 17:22:26 1996 --- doc/nethack.txt Mon Apr 22 14:55:22 1996 *************** *** 146,152 **** FILES All files are in the playground, normally ! /usr/games/lib/nethackdir. nethack The program itself. data, oracles, rumors Data files used by NetHack. options, quest.dat More data files. --- 146,155 ---- FILES All files are in the playground, normally ! /usr/games/lib/nethackdir. If DLB was defined during the ! compile, the data files and special levels will be inside a ! larger file, normally nhdat, instead of being separate ! files. nethack The program itself. data, oracles, rumors Data files used by NetHack. options, quest.dat More data files. *************** *** 185,193 **** SEE ALSO dgn_comp(6), lev_comp(6), recover(6) - BUGS - Probably infinite. - --- 188,193 ---- *************** *** 203,214 **** ! Dungeons & Dragons is a Trademark of TSR Inc. ! ! --- 203,214 ---- ! BUGS ! Probably infinite. + Dungeons & Dragons is a Trademark of TSR Inc. *** Old/doc/window.doc Tue May 28 17:22:36 1996 --- doc/window.doc Fri May 17 10:14:44 1996 *************** *** 171,176 **** --- 171,177 ---- -- Do a window-port specific player type selection. If player_selection() offers a Quit option, it is its responsibility to clean up and terminate the process. + You need to fill in pl_character[0]. display_file(str, boolean complain) -- Display the file named str. Complain about missing files iff complain is TRUE. *************** *** 235,242 **** putstr() to the window. Only windows of type NHW_MENU may be used for menus. add_menu(windid window, int glyph, const anything identifier, ! char accelerator, int attr, char *str, ! boolean preselected) -- Add a text line str to the given menu window. If identifier is 0, then the line cannot be selected (e.g. a title). Otherwise, identifier is the value returned if the line is --- 236,243 ---- putstr() to the window. Only windows of type NHW_MENU may be used for menus. add_menu(windid window, int glyph, const anything identifier, ! char accelerator, char groupacc, ! int attr, char *str, boolean preselected) -- Add a text line str to the given menu window. If identifier is 0, then the line cannot be selected (e.g. a title). Otherwise, identifier is the value returned if the line is *************** *** 254,259 **** --- 255,267 ---- -- It is expected that callers do not mix accelerator choices. Either all selectable items have an accelerator or let the window system pick them. Don't do both. + -- Groupacc is a group accelerator. It may be any character + outside of the standard accelerator (see above) or a + number. If 0, the item is unaffected by any group + accelerator. If this accelerator conflicts with + the menu command (or their user defined alises), it loses. + The menu commands and aliases take care not to interfere + with the default object class symbols. -- If you want this choice to be preselected when the menu is displayed, set preselected to TRUE. *** Old/include/artifact.h Tue May 28 17:22:48 1996 --- include/artifact.h Fri Apr 19 13:34:22 1996 *************** *** 9,15 **** #define SPFX_NOGEN 0x0000001L /* item is special, bequeathed by gods */ #define SPFX_RESTR 0x0000002L /* item is restricted - can't be named */ #define SPFX_INTEL 0x0000004L /* item is self-willed - intelligent */ ! #define SPFX_SPEEK 0x0000008L /* item can speak */ #define SPFX_SEEK 0x0000010L /* item helps you search for things */ #define SPFX_WARN 0x0000020L /* item warns you of danger */ #define SPFX_ATTK 0x0000040L /* item has a special attack (attk) */ --- 9,15 ---- #define SPFX_NOGEN 0x0000001L /* item is special, bequeathed by gods */ #define SPFX_RESTR 0x0000002L /* item is restricted - can't be named */ #define SPFX_INTEL 0x0000004L /* item is self-willed - intelligent */ ! #define SPFX_SPEAK 0x0000008L /* item can speak (not implemented) */ #define SPFX_SEEK 0x0000010L /* item helps you search for things */ #define SPFX_WARN 0x0000020L /* item warns you of danger */ #define SPFX_ATTK 0x0000040L /* item has a special attack (attk) */ *** Old/include/artilist.h Tue May 28 17:22:50 1996 --- include/artilist.h Tue May 21 11:52:12 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)artilist.h 3.2 95/06/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)artilist.h 3.2 96/05/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 133,139 **** A("Sunsword", LONG_SWORD, (SPFX_RESTR|SPFX_DFLAG2), 0, M2_UNDEAD, ! PHYS(5,0), NO_DFNS, NO_CARY, 0, A_LAWFUL, 0 ), /* * The artifacts for the quest dungeon, all self-willed. --- 133,139 ---- A("Sunsword", LONG_SWORD, (SPFX_RESTR|SPFX_DFLAG2), 0, M2_UNDEAD, ! PHYS(5,0), DFNS(AD_BLND), NO_CARY, 0, A_LAWFUL, 0 ), /* * The artifacts for the quest dungeon, all self-willed. *************** *** 166,172 **** HEALING, A_NEUTRAL, 'H' ), A("The Magic Mirror of Merlin", MIRROR, ! (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEEK), SPFX_ESP, 0, NO_ATTK, NO_DFNS, CARY(AD_MAGM), 0, A_LAWFUL, 'K' ), --- 166,172 ---- HEALING, A_NEUTRAL, 'H' ), A("The Magic Mirror of Merlin", MIRROR, ! (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEAK), SPFX_ESP, 0, NO_ATTK, NO_DFNS, CARY(AD_MAGM), 0, A_LAWFUL, 'K' ), *************** *** 176,182 **** ENERGY_BOOST, A_LAWFUL, 'P' ), A("The Master Key of Thievery", SKELETON_KEY, ! (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEEK), (SPFX_WARN|SPFX_TCTRL|SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY, UNTRAP, A_CHAOTIC, 'R' ), --- 176,182 ---- ENERGY_BOOST, A_LAWFUL, 'P' ), A("The Master Key of Thievery", SKELETON_KEY, ! (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEAK), (SPFX_WARN|SPFX_TCTRL|SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY, UNTRAP, A_CHAOTIC, 'R' ), *** /dev/null Tue May 28 17:22:55 1996 --- include/beconf.h Tue May 28 16:57:16 1996 *************** *** 0 **** --- 1,61 ---- + /* SCCS Id: @(#)beconf.h 3.2 96/05/22 */ + /* Copyright (c) Dean Luick 1996. */ + /* NetHack may be freely redistributed. See license for details. */ + + /* Configuration for Be Inc.'s BeBox */ + + #ifndef BECONF_H + #define BECONF_H + + /* + * This header works for BeOS 1.1d7 + * + * We must use UNWIDENED_PROTOTYPES because we mix C++ and C. + */ + + #define index strchr + #define rindex strrchr + #define Rand rand /* Be should have a better rand function! */ + #define tgetch getchar + #define FCMASK 0666 + #define PORT_ID "BeBox" + #define TEXTCOLOR + #define POSIX_TYPES + #define SIG_RET_TYPE __signal_func_ptr + + #include /* for time_t */ + #include /* for lseek() */ + + /* could go in extern.h, under bemain.c (or something..) */ + void regularize(char *); + + + /* instead of including system.h... */ + #define Sprintf (void) sprintf + #define Strcat (void) strcat + #define Strcpy (void) strcpy + #define Vprintf (void) vprintf + #define Vfprintf (void) vfprintf + #define Vsprintf (void) vsprintf + #include + #include + + /* + * The following is copied from /boot/develop/headers/gnu/termcap.h. + * The name of this system header conflicts with a header in the NetHack + * source. Sigh... + */ + extern int tgetent (char *buffer, const char *termtype); + extern int tgetnum (const char *name); + extern int tgetflag (const char *name); + extern char *tgetstr (const char *name, char **area); + extern void tputs (const char *string, int nlines, int (*outfun) (int)); + extern char *tparam (const char *ctlstring, char *buffer, int size, ...); + extern char *tgoto (const char *cstring, int hpos, int vpos); + extern char PC; + extern short ospeed; + extern char *UP; + extern char *BC; + + + #endif /* BECONF_H */ *** Old/include/config.h Tue May 28 17:23:00 1996 --- include/config.h Tue May 28 17:19:15 1996 *************** *** 55,63 **** #endif #ifdef __MWERKS__ /* defined by Metrowerks compiler */ ! # define MAC # define NEED_VARARGS ! # define USE_STDARGS # undef UNIX #endif --- 55,65 ---- #endif #ifdef __MWERKS__ /* defined by Metrowerks compiler */ ! # ifndef __beos__ /* BeOS */ ! # define MAC ! # endif # define NEED_VARARGS ! # define USE_STDARG # undef UNIX #endif *************** *** 235,240 **** --- 237,247 ---- # define DEFAULT_WINDOW_SYS "tty" #endif + #ifdef __beos__ + /* leave at tty graphics for now */ + /* # define DEFAULT_WINDOW_SYS "be" */ + #endif + #ifndef DEFAULT_WINDOW_SYS # define DEFAULT_WINDOW_SYS "tty" #endif *************** *** 425,432 **** # define MACRO_CPATH /* use clear_path macros instead of functions */ # endif #endif - - /* * Section 4: THE FUN STUFF!!! --- 432,437 ---- *** Old/include/decl.h Tue May 28 17:23:04 1996 --- include/decl.h Tue May 28 10:48:37 1996 *************** *** 276,282 **** E struct c_common_strings { const char *const c_nothing_happens, *const c_thats_enough_tries, *const c_silly_thing_to, *const c_shudder_for_moment, ! *const c_something, *const c_Something; } c_common_strings; #define nothing_happens c_common_strings.c_nothing_happens #define thats_enough_tries c_common_strings.c_thats_enough_tries --- 276,283 ---- E struct c_common_strings { const char *const c_nothing_happens, *const c_thats_enough_tries, *const c_silly_thing_to, *const c_shudder_for_moment, ! *const c_something, *const c_Something, ! *const c_You_can_move_again; } c_common_strings; #define nothing_happens c_common_strings.c_nothing_happens #define thats_enough_tries c_common_strings.c_thats_enough_tries *************** *** 284,289 **** --- 285,291 ---- #define shudder_for_moment c_common_strings.c_shudder_for_moment #define something c_common_strings.c_something #define Something c_common_strings.c_Something + #define You_can_move_again c_common_strings.c_You_can_move_again /* Vision */ E NEARDATA boolean vision_full_recalc; /* TRUE if need vision recalc */ *** Old/include/eshk.h Tue May 28 17:23:27 1996 --- include/eshk.h Sat May 4 17:42:11 1996 *************** *** 27,32 **** --- 27,33 ---- long loan; /* shop-gold picked (part of debit) */ int shoptype; /* the value of rooms[shoproom].rtype */ schar shoproom; /* index in rooms; set by inshop() */ + schar unused; /* to force alignment for stupid compilers */ boolean following; /* following customer since he owes us sth */ boolean surcharge; /* angry shk inflates prices */ coord shk; /* usual position shopkeeper */ *** Old/include/extern.h Tue May 28 17:23:29 1996 --- include/extern.h Fri May 24 14:27:03 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)extern.h 3.2 96/02/14 */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)extern.h 3.2 96/05/05 */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 69,75 **** E boolean FDECL(exist_artifact, (int,const char *)); E void FDECL(artifact_exists, (struct obj *,const char *,BOOLEAN_P)); E int NDECL(nartifact_exist); - E void FDECL(artifact_unexist, (struct obj *)); E boolean FDECL(spec_ability, (struct obj *,unsigned long)); E boolean FDECL(restrict_name, (struct obj *,const char *)); E boolean FDECL(defends, (int,struct obj *)); --- 69,74 ---- *************** *** 324,330 **** #ifdef REINCARNATION E const char *NDECL(roguename); #endif ! /* ### do_wear.c ### */ #ifdef USE_TRAMPOLI --- 323,330 ---- #ifdef REINCARNATION E const char *NDECL(roguename); #endif ! E struct obj *FDECL(replobj, ! (struct obj *, int, genericptr_t, int, const char *)); /* ### do_wear.c ### */ #ifdef USE_TRAMPOLI *************** *** 407,413 **** E void FDECL(throwit, (struct obj *)); E int FDECL(omon_adj, (struct monst *,struct obj *,BOOLEAN_P)); E int FDECL(thitmonst, (struct monst *,struct obj *)); ! E int FDECL(breaks, (struct obj *,int,int,BOOLEAN_P)); /* ### drawing.c ### */ #endif /* !MAKEDEFS_C && !LEV_LEX_C */ --- 407,414 ---- E void FDECL(throwit, (struct obj *)); E int FDECL(omon_adj, (struct monst *,struct obj *,BOOLEAN_P)); E int FDECL(thitmonst, (struct monst *,struct obj *)); ! E int FDECL(hero_breaks, (struct obj *,XCHAR_P,XCHAR_P,BOOLEAN_P)); ! E int FDECL(breaks, (struct obj *,XCHAR_P,XCHAR_P)); /* ### drawing.c ### */ #endif /* !MAKEDEFS_C && !LEV_LEX_C */ *************** *** 532,537 **** --- 533,539 ---- E int NDECL(doengrave); E void FDECL(save_engravings, (int,int)); E void FDECL(rest_engravings, (int)); + E void FDECL(del_engr, (struct engr *)); E void FDECL(rloc_engr, (struct engr *)); /* ### exper.c ### */ *************** *** 620,625 **** --- 622,628 ---- E boolean FDECL(bad_rock, (struct permonst *,XCHAR_P,XCHAR_P)); E boolean FDECL(invocation_pos, (XCHAR_P,XCHAR_P)); E void NDECL(domove); + E void NDECL(invocation_message); E void NDECL(spoteffects); E char *FDECL(in_rooms, (XCHAR_P,XCHAR_P,int)); E void FDECL(check_special_room, (BOOLEAN_P)); *************** *** 644,649 **** --- 647,653 ---- E char FDECL(highc, (CHAR_P)); E char FDECL(lowc, (CHAR_P)); E char *FDECL(lcase, (char *)); + E char *FDECL(mungspaces, (char *)); E char *FDECL(eos, (char *)); E char *FDECL(s_suffix, (const char *)); E char *FDECL(xcrypt, (const char *,char *)); *************** *** 726,739 **** /* ### ioctl.c ### */ ! #ifdef UNIX E void NDECL(getwindowsz); E void NDECL(getioctls); E void NDECL(setioctls); # ifdef SUSPEND E int NDECL(dosuspend); # endif /* SUSPEND */ ! #endif /* UNIX */ /* ### light.c ### */ --- 730,743 ---- /* ### ioctl.c ### */ ! #if defined(UNIX) || defined(__beos__) E void NDECL(getwindowsz); E void NDECL(getioctls); E void NDECL(setioctls); # ifdef SUSPEND E int NDECL(dosuspend); # endif /* SUSPEND */ ! #endif /* UNIX || __beos__ */ /* ### light.c ### */ *************** *** 829,835 **** E int FDECL(undead_to_corpse, (int)); E boolean FDECL(is_home_elemental, (struct permonst *)); E struct monst *FDECL(clone_mon, (struct monst *)); ! E struct monst *FDECL(makemon, (struct permonst *,int,int)); E boolean FDECL(create_critters, (int,struct permonst *)); E struct permonst *NDECL(rndmonst); E void FDECL(reset_rndmonst, (int)); --- 833,839 ---- E int FDECL(undead_to_corpse, (int)); E boolean FDECL(is_home_elemental, (struct permonst *)); E struct monst *FDECL(clone_mon, (struct monst *)); ! E struct monst *FDECL(makemon, (struct permonst *,int,int,int)); E boolean FDECL(create_critters, (int,struct permonst *)); E struct permonst *NDECL(rndmonst); E void FDECL(reset_rndmonst, (int)); *************** *** 939,945 **** E int FDECL(bcsign, (struct obj *)); E int FDECL(weight, (struct obj *)); E void FDECL(mkgold, (long,int,int)); ! E struct obj *FDECL(mkcorpstat, (int,struct permonst *,int,int,BOOLEAN_P)); E struct obj *FDECL(mk_tt_object, (int,int,int)); E struct obj *FDECL(mk_named_object, (int,struct permonst *,int,int,const char *)); --- 943,954 ---- E int FDECL(bcsign, (struct obj *)); E int FDECL(weight, (struct obj *)); E void FDECL(mkgold, (long,int,int)); ! E struct obj *FDECL(mkcorpstat, ! (int,struct monst *,struct permonst *,int,int,BOOLEAN_P)); ! #ifdef OEXTRA ! E struct obj *FDECL(save_mtraits, (struct obj *, struct monst *)); ! E struct monst *FDECL(get_mtraits, (struct obj *)); ! #endif E struct obj *FDECL(mk_tt_object, (int,int,int)); E struct obj *FDECL(mk_named_object, (int,struct permonst *,int,int,const char *)); *************** *** 978,984 **** E int FDECL(somey, (struct mkroom *)); E boolean FDECL(inside_room, (struct mkroom *,XCHAR_P,XCHAR_P)); E boolean FDECL(somexy, (struct mkroom *,coord *)); ! E void FDECL(mkundead, (coord *)); E struct permonst *NDECL(courtmon); E void FDECL(save_rooms, (int)); E void FDECL(rest_rooms, (int)); --- 987,993 ---- E int FDECL(somey, (struct mkroom *)); E boolean FDECL(inside_room, (struct mkroom *,XCHAR_P,XCHAR_P)); E boolean FDECL(somexy, (struct mkroom *,coord *)); ! E void FDECL(mkundead, (coord *,BOOLEAN_P,int)); E struct permonst *NDECL(courtmon); E void FDECL(save_rooms, (int)); E void FDECL(rest_rooms, (int)); *************** *** 1038,1043 **** --- 1047,1053 ---- E boolean FDECL(poly_when_stoned, (struct permonst *)); E boolean FDECL(resists_drli, (struct monst *)); E boolean FDECL(resists_magm, (struct monst *)); + E boolean FDECL(resists_blnd, (struct monst *)); E boolean FDECL(ranged_attk, (struct permonst *)); E boolean FDECL(hates_silver, (struct permonst *)); E boolean FDECL(can_track, (struct permonst *)); *************** *** 1098,1107 **** # endif # ifndef __GO32__ E long FDECL(freediskspace, (char *)); E int FDECL(findfirst, (char *)); E int NDECL(findnext); - E char *NDECL(foundfile_buffer); E long FDECL(filesize, (char *)); # endif /* __GO32__ */ E void FDECL(chdrive, (char *)); # ifndef TOS --- 1108,1123 ---- # endif # ifndef __GO32__ E long FDECL(freediskspace, (char *)); + # ifdef MSDOS + E int FDECL(findfirst_file, (char *)); + E int NDECL(findnext_file); + E long FDECL(filesize_nh, (char *)); + # else E int FDECL(findfirst, (char *)); E int NDECL(findnext); E long FDECL(filesize, (char *)); + # endif /* MSDOS */ + E char *NDECL(foundfile_buffer); # endif /* __GO32__ */ E void FDECL(chdrive, (char *)); # ifndef TOS *************** *** 1222,1227 **** --- 1238,1245 ---- E void FDECL(next_opt, (winid,const char *)); E int FDECL(fruitadd, (char *)); E int FDECL(choose_classes_menu, (const char *,int,BOOLEAN_P,char *,char *)); + E void FDECL(add_menu_cmd_alias, (CHAR_P, CHAR_P)); + E char FDECL(map_menu_cmd, (CHAR_P)); /* ### pager.c ### */ *************** *** 1494,1500 **** E char *FDECL(getrumor, (int,char *)); E void FDECL(outrumor, (int,BOOLEAN_P)); ! E void FDECL(save_oracles, (int)); E void FDECL(restore_oracles, (int)); E int FDECL(doconsult, (struct monst *)); --- 1512,1518 ---- E char *FDECL(getrumor, (int,char *)); E void FDECL(outrumor, (int,BOOLEAN_P)); ! E void FDECL(save_oracles, (int,int)); E void FDECL(restore_oracles, (int)); E int FDECL(doconsult, (struct monst *)); *************** *** 1521,1526 **** --- 1539,1545 ---- E void FDECL(bwrite, (int,genericptr_t,unsigned int)); E void FDECL(bclose, (int)); E void FDECL(savefruitchn, (int,int)); + E void NDECL(free_dungeons); E void NDECL(freedynamicdata); /* ### shk.c ### */ *************** *** 1754,1777 **** E void FDECL(stumble_onto_mimic, (struct monst *)); E int FDECL(flash_hits_mon, (struct monst *,struct obj *)); - #ifdef UNIX - /* ### unixmain.c ### */ # ifdef PORT_HELP E void NDECL(port_help); # endif /* ### unixtty.c ### */ E void NDECL(gettty); E void FDECL(settty, (const char *)); E void NDECL(setftty); E void NDECL(intron); E void NDECL(introff); E void VDECL(error, (const char *,...)) PRINTF_F(1,2); /* ### unixunix.c ### */ E void FDECL(gethdate, (const char *)); E void NDECL(getlock); E void FDECL(regularize, (char *)); --- 1773,1801 ---- E void FDECL(stumble_onto_mimic, (struct monst *)); E int FDECL(flash_hits_mon, (struct monst *,struct obj *)); /* ### unixmain.c ### */ + + #ifdef UNIX # ifdef PORT_HELP E void NDECL(port_help); # endif + #endif /* UNIX */ + /* ### unixtty.c ### */ + #if defined(UNIX) || defined(__beos__) E void NDECL(gettty); E void FDECL(settty, (const char *)); E void NDECL(setftty); E void NDECL(intron); E void NDECL(introff); E void VDECL(error, (const char *,...)) PRINTF_F(1,2); + #endif /* UNIX || __beos__ */ /* ### unixunix.c ### */ + #ifdef UNIX E void FDECL(gethdate, (const char *)); E void NDECL(getlock); E void FDECL(regularize, (char *)); *************** *** 1781,1787 **** # if defined(SHELL) || defined(DEF_PAGER) || defined(DEF_MAILREADER) E int FDECL(child, (int)); # endif - #endif /* UNIX */ /* ### vault.c ### */ --- 1805,1810 ---- *************** *** 1796,1807 **** /* ### version.c ### */ E int NDECL(doversion); E int NDECL(doextversion); #ifdef MICRO E boolean FDECL(comp_times, (long)); #endif ! E boolean FDECL(check_version, (long *,const char *,BOOLEAN_P)); /* ### video.c ### */ --- 1819,1831 ---- /* ### version.c ### */ + E char *FDECL(getversionstring, (char *)); E int NDECL(doversion); E int NDECL(doextversion); #ifdef MICRO E boolean FDECL(comp_times, (long)); #endif ! E boolean FDECL(check_version, (unsigned long *,const char *,BOOLEAN_P)); /* ### video.c ### */ *************** *** 1919,1927 **** E int NDECL(abon); E int NDECL(dbon); #ifdef WEAPON_SKILLS ! E int NDECL(check_weapon_skills); ! E int NDECL(select_weapon_skill); E void FDECL(unrestrict_weapon_skill, (int)); E void NDECL(add_weapon_skill); E void NDECL(lose_weapon_skill); E int FDECL(weapon_type, (struct obj *)); --- 1943,1951 ---- E int NDECL(abon); E int NDECL(dbon); #ifdef WEAPON_SKILLS ! E int NDECL(enhance_weapon_skill); E void FDECL(unrestrict_weapon_skill, (int)); + E void FDECL(use_skill, (int)); E void NDECL(add_weapon_skill); E void NDECL(lose_weapon_skill); E int FDECL(weapon_type, (struct obj *)); *** Old/include/flag.h Tue May 28 17:23:35 1996 --- include/flag.h Tue May 28 10:47:41 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)flag.h 3.2 96/02/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)flag.h 3.2 96/05/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 52,60 **** boolean mon_moving; /* monsters' turn to move */ boolean move; boolean mv; - #ifdef TIMED_DELAY boolean nap; /* `timed_delay' option for display effects */ - #endif boolean news; /* print news */ boolean nopick; /* do not pickup objects (as when running) */ boolean null; /* OK to send nulls to the terminal */ --- 52,58 ---- *************** *** 134,142 **** #if defined(MSDOS) || defined(WIN32) boolean hassound; /* has a sound card */ boolean usesound; /* use the sound card */ - # ifdef PCMUSIC boolean usepcspeaker; /* use the pc speaker */ ! # endif #endif }; --- 132,139 ---- #if defined(MSDOS) || defined(WIN32) boolean hassound; /* has a sound card */ boolean usesound; /* use the sound card */ boolean usepcspeaker; /* use the pc speaker */ ! boolean preload_tiles; /* preload the tiles into RAM */ #endif }; *** Old/include/global.h Tue May 28 17:23:39 1996 --- include/global.h Fri May 24 14:27:03 1996 *************** *** 164,171 **** #include "amiconf.h" #endif ! #if defined(MAC) && ! defined(MACCONF_H) #include "macconf.h" #endif #if defined(WIN32) && !defined(NTCONF_H) --- 164,175 ---- #include "amiconf.h" #endif ! #if defined(MAC) && !defined(MACCONF_H) #include "macconf.h" + #endif + + #if defined(__beos__) && !defined(BECONF_H) + #include "beconf.h" #endif #if defined(WIN32) && !defined(NTCONF_H) *** Old/include/hack.h Tue May 28 17:23:42 1996 --- include/hack.h Tue May 28 10:48:37 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)hack.h 3.2 95/07/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)hack.h 3.2 96/05/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 63,68 **** --- 63,71 ---- #ifndef OBJCLASS_H #include "objclass.h" #endif + #ifndef YOUPROP_H + #include "youprop.h" + #endif #ifndef WINTYPE_H #include "wintype.h" #endif *************** *** 135,140 **** --- 138,147 ---- #endif /* USE_TRAMPOLI */ #define NO_SPELL 0 + + /* flags to control makemon() */ + #define NO_MM_FLAGS 0x00 /* use this rather than plain 0 */ + #define NO_MINVENT 0x01 /* suppress minvent when creating mon */ /* flags to control query_objlist() */ #define BY_NEXTHERE 0x1 /* follow objlist by nexthere field */ *** Old/include/macwin.h Tue May 28 17:23:51 1996 --- include/macwin.h Tue May 14 16:01:05 1996 *************** *** 311,317 **** E void FDECL(mac_display_file, (const char *, BOOLEAN_P)); E void FDECL(mac_start_menu, (winid)); E void FDECL(mac_add_menu, (winid,int,const anything *, ! CHAR_P,int,const char *, BOOLEAN_P)); E void FDECL(mac_end_menu, (winid, const char *)); E int FDECL(mac_select_menu, (winid, int, menu_item **)); E void NDECL(mac_update_inventory); --- 311,317 ---- E void FDECL(mac_display_file, (const char *, BOOLEAN_P)); E void FDECL(mac_start_menu, (winid)); E void FDECL(mac_add_menu, (winid,int,const anything *, ! CHAR_P,CHAR_P,int,const char *, BOOLEAN_P)); E void FDECL(mac_end_menu, (winid, const char *)); E int FDECL(mac_select_menu, (winid, int, menu_item **)); E void NDECL(mac_update_inventory); *** Old/include/monflag.h Tue May 28 17:24:06 1996 --- include/monflag.h Sun May 5 10:09:50 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)monflag.h 3.2 95/07/29 */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)monflag.h 3.2 96/05/04 */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 45,50 **** --- 45,53 ---- #define MS_SELL 34 /* demand payment, complain about shoplifters */ #define MS_ORACLE 35 /* do a consultation */ #define MS_PRIEST 36 /* ask for contribution; do cleansing */ + #define MS_SPELL 37 /* spellcaster not matching any of the above */ + #define MS_WERE 38 /* lycanthrope in human form */ + #define MS_BOAST 39 /* giants */ #define MR_FIRE 0x01 /* resists fire */ *** Old/include/obj.h Tue May 28 17:24:18 1996 --- include/obj.h Fri May 3 14:22:36 1996 *************** *** 32,38 **** schar spe; /* quality of weapon, armor or ring (+ or -) number of charges for wand ( >= -1 ) marks your eggs, spinach tins - indicates statues have spellbooks inside royal coffers for a court ( == 2) tells which fruit a fruit is special for uball and amulet %% BAH */ --- 32,37 ---- *************** *** 78,90 **** Bitfield(oinvis,1); /* not yet implemented */ Bitfield(greased,1); /* covered with grease */ ! Bitfield(onamelth,6); int corpsenm; /* type of corpse is mons[corpsenm] */ #define leashmon corpsenm /* gets m_id of attached pet */ #define spestudied corpsenm /* how many times a spellbook has been studied */ unsigned oeaten; /* nutrition left in food, if partly eaten */ long age; /* creation date */ long owornmask; /* note that TIMEOUT in you.h is defined as 07777L; no bits for items that --- 77,95 ---- Bitfield(oinvis,1); /* not yet implemented */ Bitfield(greased,1); /* covered with grease */ ! Bitfield(mtraits,1); /* obj struct has a monst struct attached */ ! /* free bits */ int corpsenm; /* type of corpse is mons[corpsenm] */ #define leashmon corpsenm /* gets m_id of attached pet */ #define spestudied corpsenm /* how many times a spellbook has been studied */ unsigned oeaten; /* nutrition left in food, if partly eaten */ long age; /* creation date */ + + uchar onamelth; /* length of name (following oxlth) */ + short oxlth; /* length of following data */ + /* in order to prevent alignment problems oextra should + be (or follow) a long int */ long owornmask; /* note that TIMEOUT in you.h is defined as 07777L; no bits for items that *************** *** 121,127 **** }; #define newobj(xl) (struct obj *)alloc((unsigned)(xl) + sizeof(struct obj)) ! #define ONAME(otmp) ((char *)(otmp)->oextra) #define carried(o) ((o)->where == OBJ_INVENT) #define Has_contents(o) (/* (Is_container(o) || (o)->otyp == STATUE) && */ \ --- 126,132 ---- }; #define newobj(xl) (struct obj *)alloc((unsigned)(xl) + sizeof(struct obj)) ! #define ONAME(otmp) (((char *)(otmp)->oextra) + (otmp)->oxlth) #define carried(o) ((o)->where == OBJ_INVENT) #define Has_contents(o) (/* (Is_container(o) || (o)->otyp == STATUE) && */ \ *** Old/include/patchlevel.h Tue May 28 17:24:25 1996 --- include/patchlevel.h Tue May 28 10:47:24 1996 *************** *** 1,19 **** ! /* SCCS Id: @(#)patchlevel.h 3.2 96/03/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ ! /* NetHack 3.2.0 */ #define VERSION_MAJOR 3 #define VERSION_MINOR 2 /* * PATCHLEVEL is updated for each release. */ ! #define PATCHLEVEL 0 /* * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ ! #define EDITLEVEL 00 #define COPYRIGHT_BANNER_A \ "NetHack, Copyright 1985-1996" --- 1,19 ---- ! /* SCCS Id: @(#)patchlevel.h 3.2 96/05/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ ! /* NetHack 3.2.1 */ #define VERSION_MAJOR 3 #define VERSION_MINOR 2 /* * PATCHLEVEL is updated for each release. */ ! #define PATCHLEVEL 1 /* * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ ! #define EDITLEVEL 0 #define COPYRIGHT_BANNER_A \ "NetHack, Copyright 1985-1996" *************** *** 34,58 **** * PP = patch level, ee = edit level, L = literal suffix "L", * with all four numbers specified as two hexadecimal digits. */ ! #define VERSION_COMPATIBILITY 0x03020000L #endif ! /* ! * NetHack 3.2.0, April 8, 1996 * * enhancements to the windowing systems including "tiles" or icons to ! * visually represent monsters and objects. ! * window based menu system introduced for inventory and selection. ! * moving light sources besides the player. ! * improved #untrap. (courtesy Helge Hafting) * spellcasting logic changes to balance spellcasting towards magic-using ! * classes. (courtesy Stephen White) ! * many, many bug fixes and abuse eliminations. */ /* Version 3.2 */ /*****************************************************************************/ /* * Patch 3, July 12, 1993 * further revise Mac windowing and extend to Think C (courtesy --- 34,89 ---- * PP = patch level, ee = edit level, L = literal suffix "L", * with all four numbers specified as two hexadecimal digits. */ ! #define VERSION_COMPATIBILITY 0x03020100L #endif ! /*****************************************************************************/ ! /* Version 3.2.1 */ ! ! /* Patch 1, May 28, 1996 ! * eliminate `#qualifications'; fix weapon proficiency handling for missiles ! * keep Medusa from continuing to move after she's been killed by reflection ! * of her own gaze (fixes relmon panic) ! * make monsters a little smarter; assorted eating and chatting changes ! * fix object amnesia for spellbooks; fix Nazgul's sleep gas attack ! * fix bullwhip usage for case of having recently been in a trap ! * egg hatching fixes, oil potion fixes, magic marker fixes ! * support object class chars as selection accelerators for some menus ! * stricter parsing of run-time options at startup time ! * interactive setting of options via menu (courtesy Per Liboriussen) * + * Selected platform- or configuration-specific changes: + * Amiga: fix panic for tiles display in Gnomish mines + * BeOS: preliminary support for new BeBox platform; initially tty only + * DLB: avoid excessive fseek calls (major performance hit for MSDOS) + * HPUX: workaround for gcc-2.6.3 bug adversely affecting monster generation + * Mac: avoid MW 68K struct copy optimization bug which caused crashes; + * fix dragging of scrollbar; boost partitions to 2MB minimum + * MSDOS: wasn't safe to enter endgame for MFLOPPY configuration; + * fix re-entry into game after "!" (shell escape) + chdir + EXIT; + * F3/F4/F5 display interface swapping improvements; + * add support for preloading all tiles in protected mode environment + * TERMINFO: colors were wrong for some systems, such as Linux + * X11: display help files properly + */ + + /* + * NetHack 3.2.0, April 11, 1996 * enhancements to the windowing systems including "tiles" or icons to ! * visually represent monsters and objects (courtesy Warwick Allison) ! * window based menu system introduced for inventory and selection ! * moving light sources besides the player ! * improved #untrap (courtesy Helge Hafting) * spellcasting logic changes to balance spellcasting towards magic-using ! * classes (courtesy Stephen White) ! * many, many bug fixes and abuse eliminations */ /* Version 3.2 */ /*****************************************************************************/ + /* Version 3.1.x */ + /* * Patch 3, July 12, 1993 * further revise Mac windowing and extend to Think C (courtesy *************** *** 219,221 **** --- 250,262 ---- * fix a handful of bugs, and do some code cleaning elsewhere * add more instructions for new environments and things commonly done wrong */ + + /* + * NetHack 3.0 baseline release, July, 1989 + */ + + /* Version 3.0 */ + + /*****************************************************************************/ + + /*patchlevel.h*/ *** Old/include/pcconf.h Tue May 28 17:24:27 1996 --- include/pcconf.h Tue May 21 11:34:16 1996 *************** *** 16,21 **** --- 16,22 ---- * __DJGPP__ is defined automatically by djgpp version 2 and above. * _MSC_VER is defined automatically by Microsoft C. * __BORLANDC__ is defined automatically by Borland C. + * __SC__ is defined automatically by Symantec C. */ /* *************** *** 96,102 **** /* The following is needed for prototypes of certain functions */ ! #if defined(_MSC_VER) || defined(__BORLANDC__) #include /* Provides prototypes of exit(), spawn() */ #endif --- 97,103 ---- /* The following is needed for prototypes of certain functions */ ! #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__SC__) #include /* Provides prototypes of exit(), spawn() */ #endif *************** *** 226,239 **** #if defined(MSDOS) && defined(NO_TERMS) # ifdef TERMLIB ! # ifdef _MSC_VER # pragma message("Warning -- TERMLIB defined with NO_TERMS in pcconf.h") # pragma message(" Forcing undef of TERMLIB") # endif #undef TERMLIB # endif # ifdef ANSI_DEFAULT ! # ifdef _MSC_VER # pragma message("Warning -- ANSI_DEFAULT defined with NO_TERMS in pcconf.h") # pragma message(" Forcing undef of ANSI_DEFAULT") # endif --- 227,240 ---- #if defined(MSDOS) && defined(NO_TERMS) # ifdef TERMLIB ! # if defined(_MSC_VER) || defined(__SC__) # pragma message("Warning -- TERMLIB defined with NO_TERMS in pcconf.h") # pragma message(" Forcing undef of TERMLIB") # endif #undef TERMLIB # endif # ifdef ANSI_DEFAULT ! # if defined(_MSC_VER) || defined(__SC__) # pragma message("Warning -- ANSI_DEFAULT defined with NO_TERMS in pcconf.h") # pragma message(" Forcing undef of ANSI_DEFAULT") # endif *************** *** 241,253 **** # endif /* only one screen package is allowed */ # if defined(SCREEN_BIOS) && defined(SCREEN_DJGPPFAST) ! # ifdef _MSC_VER ! /* Microsoft C compiler */ # pragma message("Warning -- More than one screen package defined in pcconf.h") # endif ! # if defined(_MSC_VER) || defined(__BORLANDC__) # if defined(SCREEN_DJGPPFAST) ! # ifdef _MSC_VER # pragma message(" Forcing undef of SCREEN_DJGPPFAST") # endif #undef SCREEN_DJGPPFAST /* Can't use djgpp fast with other compilers anyway */ --- 242,253 ---- # endif /* only one screen package is allowed */ # if defined(SCREEN_BIOS) && defined(SCREEN_DJGPPFAST) ! # if defined(_MSC_VER) || defined(__SC__) # pragma message("Warning -- More than one screen package defined in pcconf.h") # endif ! # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__SC__) # if defined(SCREEN_DJGPPFAST) ! # if defined(_MSC_VER) || defined(__SC__) # pragma message(" Forcing undef of SCREEN_DJGPPFAST") # endif #undef SCREEN_DJGPPFAST /* Can't use djgpp fast with other compilers anyway */ *************** *** 293,298 **** --- 293,301 ---- # endif # ifdef __BORLANDC__ # define msleep(k) delay(k) + # endif + # ifdef __SC__ + # define msleep(k) (void) usleep((long)((k)*1000)) # endif #endif *** Old/include/sp_lev.h Tue May 28 17:24:43 1996 --- include/sp_lev.h Fri May 17 10:24:55 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)sp_lev.h 3.2 95/06/12 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)sp_lev.h 3.2 96/05/08 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 36,42 **** } Str_or_Len; typedef struct { ! boolean init_present; char fg, bg; boolean smoothed, joined; xchar lit, walled; --- 36,42 ---- } Str_or_Len; typedef struct { ! boolean init_present, padding; char fg, bg; boolean smoothed, joined; xchar lit, walled; *************** *** 55,81 **** } trap; typedef struct { - xchar x, y, class, appear; - schar peaceful, asleep; - aligntyp align; - short id; Str_or_Len name, appear_as; } monster; typedef struct { - xchar x, y, class; - xchar curse_state; - short id; - short spe; - int corpsenm; - xchar containment; Str_or_Len name; } object; - #ifndef ALIGN_H - #include "align.h" - #endif - typedef struct { xchar x, y; aligntyp align; --- 55,75 ---- } trap; typedef struct { Str_or_Len name, appear_as; + short id; + aligntyp align; + xchar x, y, chance, class, appear; + schar peaceful, asleep; } monster; typedef struct { Str_or_Len name; + int corpsenm; + short id, spe; + xchar x, y, chance, class, containment; + schar curse_state; } object; typedef struct { xchar x, y; aligntyp align; *************** *** 112,118 **** struct { xchar x1, y1, x2, y2; } inarea; struct { xchar x1, y1, x2, y2; } delarea; boolean in_islev, del_islev; ! xchar rtype; Str_or_Len rname; } lev_region; --- 106,112 ---- struct { xchar x1, y1, x2, y2; } inarea; struct { xchar x1, y1, x2, y2; } delarea; boolean in_islev, del_islev; ! xchar rtype, padding; Str_or_Len rname; } lev_region; *************** *** 128,142 **** } engraving; typedef struct { ! xchar x,y; } fountain; typedef struct { ! xchar x,y; } sink; typedef struct { ! xchar x,y; } pool; typedef struct { --- 122,136 ---- } engraving; typedef struct { ! xchar x, y; } fountain; typedef struct { ! xchar x, y; } sink; typedef struct { ! xchar x, y; } pool; typedef struct { *************** *** 187,193 **** typedef struct { long flags; lev_init init_lev; ! short filling; char numpart; mazepart **parts; } specialmaze; --- 181,187 ---- typedef struct { long flags; lev_init init_lev; ! schar filling; char numpart; mazepart **parts; } specialmaze; *************** *** 234,239 **** --- 228,234 ---- } src, dest; } corridor; + /* used only by lev_comp */ typedef struct { long flags; lev_init init_lev; *** Old/include/system.h Tue May 28 17:24:47 1996 --- include/system.h Tue May 21 11:30:16 1996 *************** *** 50,56 **** * impossible to get right automatically. * This is the type of signal handling functions. */ ! #if defined(_MSC_VER) || defined(__TURBOC__) || defined(WIN32) # define SIG_RET_TYPE void (__cdecl *)(int) #endif #ifndef SIG_RET_TYPE --- 50,56 ---- * impossible to get right automatically. * This is the type of signal handling functions. */ ! #if defined(_MSC_VER) || defined(__TURBOC__) || defined(__SC__) || defined(WIN32) # define SIG_RET_TYPE void (__cdecl *)(int) #endif #ifndef SIG_RET_TYPE *************** *** 74,80 **** --- 74,82 ---- # ifdef random # undef random # endif + # if !defined(__SC__) E long NDECL(random); + # endif # if !defined(SUNOS4) || defined(RANDOM) E void FDECL(srandom, (unsigned int)); # else *************** *** 102,108 **** # endif # endif # endif ! #if !defined(__SASC_60) && !defined(_DCC) # if defined(AMIGA) && !defined(AZTEC_50) E int FDECL(perror, (const char *)); # else --- 104,110 ---- # endif # endif # endif ! #if !defined(__SASC_60) && !defined(_DCC) && !defined(__SC__) # if defined(AMIGA) && !defined(AZTEC_50) E int FDECL(perror, (const char *)); # else *************** *** 159,165 **** --- 161,169 ---- # ifdef OS2_CSET2 /* IBM CSet/2 */ E int FDECL(unlink, (char *)); # else + # ifndef __SC__ E int FDECL(unlink, (const char *)); + # endif # endif #endif /* AZTEC_50 && __GNUC__ */ *************** *** 409,415 **** /* problem with prototype mismatches */ #define SPRINTF_PROTO #endif ! #if defined(__MWERKS__) /* Metrowerks already has a prototype for sprintf() */ # define SPRINTF_PROTO #endif --- 413,419 ---- /* problem with prototype mismatches */ #define SPRINTF_PROTO #endif ! #if defined(__MWERKS__) || defined(__SC__) /* Metrowerks already has a prototype for sprintf() */ # define SPRINTF_PROTO #endif *** Old/include/tradstdc.h Tue May 28 17:24:59 1996 --- include/tradstdc.h Tue May 21 11:34:05 1996 *************** *** 105,111 **** #endif #endif /* NEED_VARARGS */ ! #if defined(NHSTDC) || defined(MSDOS) || defined(MAC) || defined(ULTRIX_PROTO) /* * Used for robust ANSI parameter forward declarations: --- 105,111 ---- #endif #endif /* NEED_VARARGS */ ! #if defined(NHSTDC) || defined(MSDOS) || defined(MAC) || defined(ULTRIX_PROTO) || defined(__beos__) /* * Used for robust ANSI parameter forward declarations: *************** *** 204,209 **** --- 204,212 ---- #define UNWIDENED_PROTOTYPES #endif #if defined(applec) + #define UNWIDENED_PROTOTYPES + #endif + #if defined(__MWERKS__) && defined(__beos__) #define UNWIDENED_PROTOTYPES #endif #if defined(WIN32) *** Old/include/trampoli.h Tue May 28 17:25:02 1996 --- include/trampoli.h Tue May 14 16:01:05 1996 *************** *** 309,315 **** #define tty_putstr(x,y,z) tty_putstr_(x,y,z) #define tty_display_file(x,y) tty_display_file_(x,y) #define tty_start_menu(x) tty_start_menu_(x) ! #define tty_add_menu(a,b,c,d,e,f,g) tty_add_menu_(a,b,c,d,e,f,g) #define tty_end_menu(a,b) tty_end_menu_(a,b) #define tty_select_menu(a,b,c) tty_select_menu_(a,b,c) #define tty_update_inventory() tty_update_inventory_() --- 309,315 ---- #define tty_putstr(x,y,z) tty_putstr_(x,y,z) #define tty_display_file(x,y) tty_display_file_(x,y) #define tty_start_menu(x) tty_start_menu_(x) ! #define tty_add_menu(a,b,c,d,e,f,g,h) tty_add_menu_(a,b,c,d,e,f,g,h) #define tty_end_menu(a,b) tty_end_menu_(a,b) #define tty_select_menu(a,b,c) tty_select_menu_(a,b,c) #define tty_update_inventory() tty_update_inventory_() *** Old/include/trap.h Tue May 28 17:25:04 1996 --- include/trap.h Sat May 4 17:50:08 1996 *************** *** 10,15 **** --- 10,17 ---- struct trap { struct trap *ntrap; xchar tx,ty; + d_level dst; /* destination for portals */ + coord launch; Bitfield(ttyp,5); Bitfield(tseen,1); Bitfield(once,1); *************** *** 20,27 **** when you untrap a monster. It would be too easy to make a monster peaceful if you could set a trap for it and then untrap it. */ - d_level dst; /* destination for portals */ - coord launch; union { short v_launch_otyp; /* type of object to be triggered */ coord v_launch2; /* secondary launch point (for boulders) */ --- 22,27 ---- *** Old/include/unixconf.h Tue May 28 17:25:06 1996 --- include/unixconf.h Tue May 28 17:19:15 1996 *************** *** 286,292 **** #endif #ifdef TIMED_DELAY ! # ifdef SUNOS4 # define msleep(k) usleep((k)*1000) # endif # ifdef ULTRIX --- 286,292 ---- #endif #ifdef TIMED_DELAY ! # if defined(SUNOS4) || defined(LINUX) # define msleep(k) usleep((k)*1000) # endif # ifdef ULTRIX *** Old/include/vault.h Tue May 28 17:25:09 1996 --- include/vault.h Sat May 4 17:54:00 1996 *************** *** 16,26 **** struct egd { int fcbeg, fcend; /* fcend: first unused pos */ xchar gdx, gdy; /* goal of guard's walk */ xchar ogx, ogy; /* guard's last position */ d_level gdlevel; /* level (& dungeon) guard was created in */ xchar warncnt; /* number of warnings to follow */ - int vroom; /* room number of the vault */ Bitfield(gddone,1); /* true iff guard has released player */ Bitfield(unused,7); struct fakecorridor fakecorr[FCSIZ]; --- 16,26 ---- struct egd { int fcbeg, fcend; /* fcend: first unused pos */ + int vroom; /* room number of the vault */ xchar gdx, gdy; /* goal of guard's walk */ xchar ogx, ogy; /* guard's last position */ d_level gdlevel; /* level (& dungeon) guard was created in */ xchar warncnt; /* number of warnings to follow */ Bitfield(gddone,1); /* true iff guard has released player */ Bitfield(unused,7); struct fakecorridor fakecorr[FCSIZ]; *** Old/include/winX.h Tue May 28 17:25:15 1996 --- include/winX.h Tue May 14 17:44:39 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)winX.h 3.2 96/02/18 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)winX.h 3.2 96/05/12 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 120,125 **** --- 120,126 ---- anything identifier; /* Opaque type to identify this selection */ boolean selected; /* Been selected? */ char selector; /* Char used to select this entry. */ + char gselector; /* Group selector. */ int attr; /* Attribute for the line. */ char *str; /* The text of the item. */ } x11_menu_item; *************** *** 127,133 **** struct menu { x11_menu_item *base; /* Starting pointer for item list. */ x11_menu_item *last; /* End pointer for item list. */ ! const char *query; /* Query string */ int count; /* Number of strings. */ String *list_pointer;/* String list. */ Boolean *sensitive; /* Active list. */ --- 128,135 ---- struct menu { x11_menu_item *base; /* Starting pointer for item list. */ x11_menu_item *last; /* End pointer for item list. */ ! const char *query; /* Query string. */ ! const char *gacc; /* Group accelerators. */ int count; /* Number of strings. */ String *list_pointer;/* String list. */ Boolean *sensitive; /* Active list. */ *************** *** 148,153 **** --- 150,156 ---- boolean is_menu; /* Has been confirmed to being a menu window. */ boolean is_active; /* TRUE when waiting for user input. */ boolean is_up; /* TRUE when window is popped-up. */ + boolean cancelled; /* Menu has been explicitly cancelled. */ }; /* *************** *** 186,191 **** --- 189,195 ---- struct menu_info_t *Menu_info; /* menu window info */ struct text_info_t *Text_info; /* menu window info */ } Win_info; + boolean keep_window; }; /* Defines to use for the window information union. */ *************** *** 363,369 **** E void FDECL(X11_display_file, (const char *, BOOLEAN_P)); E void FDECL(X11_start_menu, (winid)); E void FDECL(X11_add_menu, (winid,int,const ANY_P *, ! CHAR_P,int,const char *, BOOLEAN_P)); E void FDECL(X11_end_menu, (winid, const char *)); E int FDECL(X11_select_menu, (winid, int, MENU_ITEM_P **)); E void NDECL(X11_update_inventory); --- 367,373 ---- E void FDECL(X11_display_file, (const char *, BOOLEAN_P)); E void FDECL(X11_start_menu, (winid)); E void FDECL(X11_add_menu, (winid,int,const ANY_P *, ! CHAR_P, CHAR_P, int, const char *, BOOLEAN_P)); E void FDECL(X11_end_menu, (winid, const char *)); E int FDECL(X11_select_menu, (winid, int, MENU_ITEM_P **)); E void NDECL(X11_update_inventory); *** Old/include/winami.h Tue May 28 17:25:18 1996 --- include/winami.h Tue May 28 10:47:38 1996 *************** *** 18,23 **** --- 18,24 ---- long glyph; /* Glyph for menu item */ char selected; /* Been selected? */ char selector; /* Char used to select this entry. */ + char gselector; /* Group selector */ char canselect; /* Can user select this entry. */ char attr; /* Attribute for the line. */ char *str; /* The text of the item. */ *** Old/include/winprocs.h Tue May 28 17:25:21 1996 --- include/winprocs.h Tue May 14 16:01:06 1996 *************** *** 23,29 **** void FDECL((*win_display_file), (const char *, BOOLEAN_P)); void FDECL((*win_start_menu), (winid)); void FDECL((*win_add_menu), (winid,int,const ANY_P *, ! CHAR_P,int,const char *, BOOLEAN_P)); void FDECL((*win_end_menu), (winid, const char *)); int FDECL((*win_select_menu), (winid, int, MENU_ITEM_P **)); char FDECL((*win_message_menu), (CHAR_P,int,const char *)); --- 23,29 ---- void FDECL((*win_display_file), (const char *, BOOLEAN_P)); void FDECL((*win_start_menu), (winid)); void FDECL((*win_add_menu), (winid,int,const ANY_P *, ! CHAR_P,CHAR_P,int,const char *, BOOLEAN_P)); void FDECL((*win_end_menu), (winid, const char *)); int FDECL((*win_select_menu), (winid, int, MENU_ITEM_P **)); char FDECL((*win_message_menu), (CHAR_P,int,const char *)); *** Old/include/wintty.h Tue May 28 17:25:23 1996 --- include/wintty.h Tue May 14 16:01:07 1996 *************** *** 19,24 **** --- 19,25 ---- int attr; /* string attribute */ boolean selected; /* TRUE if selected by user */ char selector; /* keyboard accelerator */ + char gselector; /* group accelerator */ } tty_menu_item; /* descriptor for tty-based windows */ *************** *** 32,37 **** --- 33,39 ---- short maxrow, maxcol; /* the maximum size used -- for MENU wins */ /* maxcol is also used by WIN_MESSAGE for */ /* tracking the ^P command */ + short *datlen; /* allocation size for *data */ char **data; /* window data [row][column] */ char *morestr; /* string to display instead of default */ tty_menu_item *mlist; /* menu information (MENU) */ *************** *** 180,186 **** E void FDECL(tty_display_file, (const char *, BOOLEAN_P)); E void FDECL(tty_start_menu, (winid)); E void FDECL(tty_add_menu, (winid,int,const ANY_P *, ! CHAR_P,int,const char *, BOOLEAN_P)); E void FDECL(tty_end_menu, (winid, const char *)); E int FDECL(tty_select_menu, (winid, int, MENU_ITEM_P **)); E char FDECL(tty_message_menu, (CHAR_P,int,const char *)); --- 182,188 ---- E void FDECL(tty_display_file, (const char *, BOOLEAN_P)); E void FDECL(tty_start_menu, (winid)); E void FDECL(tty_add_menu, (winid,int,const ANY_P *, ! CHAR_P,CHAR_P,int,const char *, BOOLEAN_P)); E void FDECL(tty_end_menu, (winid, const char *)); E int FDECL(tty_select_menu, (winid, int, MENU_ITEM_P **)); E char FDECL(tty_message_menu, (CHAR_P,int,const char *)); *** Old/include/wintype.h Tue May 28 17:25:26 1996 --- include/wintype.h Tue May 14 16:01:07 1996 *************** *** 53,56 **** --- 53,70 ---- /* invalid winid */ #define WIN_ERR ((winid) -1) + /* menu window keyboard commands (may be mapped) */ + #define MENU_FIRST_PAGE '^' + #define MENU_LAST_PAGE '|' + #define MENU_NEXT_PAGE '>' + #define MENU_PREVIOUS_PAGE '<' + #define MENU_SELECT_ALL '.' + #define MENU_UNSELECT_ALL '-' + #define MENU_INVERT_ALL '@' + #define MENU_SELECT_PAGE ',' + #define MENU_UNSELECT_PAGE '\\' + #define MENU_INVERT_PAGE '~' + #define MENU_SEARCH ':' + + #endif /* WINTYPE_H */ *** Old/include/you.h Tue May 28 17:25:28 1996 --- include/you.h Wed May 15 08:49:02 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)you.h 3.2 95/08/13 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)you.h 3.2 96/05/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 14,21 **** #ifndef MONST_H #include "monst.h" #endif ! #ifndef YOUPROP_H ! #include "youprop.h" #endif /* --- 14,21 ---- #ifndef MONST_H #include "monst.h" #endif ! #ifndef PROP_H ! #include "prop.h" #endif /* *************** *** 53,62 **** #define P_BOOMERANG 26 #define P_WHIP 27 #define P_UNICORN_HORN 28 /* last weapon */ ! #define P_TWO_WEAPON_COMBAT 29 #define P_BARE_HANDED_COMBAT 30 ! #define P_MARTIAL_ARTS 31 /* currently unused */ ! #define P_NUM_SKILLS 32 /* should always be the last entry */ #define P_NO_TYPE P_NUM_SKILLS #define P_LAST_WEAPON P_UNICORN_HORN --- 53,62 ---- #define P_BOOMERANG 26 #define P_WHIP 27 #define P_UNICORN_HORN 28 /* last weapon */ ! #define P_TWO_WEAPON_COMBAT 29 /* currently unused */ #define P_BARE_HANDED_COMBAT 30 ! #define P_MARTIAL_ARTS P_BARE_HANDED_COMBAT /* role distinguishes */ ! #define P_NUM_SKILLS 31 /* should always be the last entry */ #define P_NO_TYPE P_NUM_SKILLS #define P_LAST_WEAPON P_UNICORN_HORN *************** *** 73,78 **** --- 73,80 ---- #define P_BASIC 2 #define P_SKILLED 3 #define P_EXPERT 4 + #define P_MASTER 5 /* unarmed combat/martial arts only */ + #define P_GRAND_MASTER 6 /* unarmed combat/martial arts only */ #define practice_needed_to_advance(level) ((level)*(level)*20) *************** *** 88,98 **** #define P_ADVANCE(type) (u.weapon_skills[type].advance) #define P_RESTRICTED(type) (u.weapon_skills[type].skill == P_ISRESTRICTED) ! #define PN_POLEARMS (NUM_OBJECTS+0) ! #define PN_TWO_WEAPON_COMBAT (NUM_OBJECTS+1) ! #define PN_BARE_HANDED_COMBAT (NUM_OBJECTS+2) ! #define PN_MARTIAL_ARTS (NUM_OBJECTS+3) ! #define PN_SABER (NUM_OBJECTS+4) #define P_SKILL_LIMIT 60 /* max number of skill advancements */ --- 90,101 ---- #define P_ADVANCE(type) (u.weapon_skills[type].advance) #define P_RESTRICTED(type) (u.weapon_skills[type].skill == P_ISRESTRICTED) ! /* categories whose names don't come from OBJ_NAME(objects[type]) */ ! #define PN_POLEARMS (-1) ! #define PN_SABER (-2) ! #define PN_TWO_WEAPONS (-3) ! #define PN_BARE_HANDED (-4) ! #define PN_MARTIAL_ARTS (-5) #define P_SKILL_LIMIT 60 /* max number of skill advancements */ *************** *** 315,319 **** --- 318,325 ---- #define Role_is(X) (u.role == X) #define human_role() (!Role_is('E')) #define Upolyd (u.mtimedone != 0) + + /* these roles qualify for a martial arts bonus */ + #define martial_bonus() (Role_is('S') || Role_is('P')) #endif /* YOU_H */ *** Old/src/allmain.c Tue May 28 17:25:33 1996 --- src/allmain.c Fri May 3 15:26:10 1996 *************** *** 108,114 **** (depth(&u.uz) > depth(&stronghold_level)) ? 50 : 70)) ! (void) makemon((struct permonst *)0, 0, 0); ++monstermoves; moverate -= 12; } --- 108,115 ---- (depth(&u.uz) > depth(&stronghold_level)) ? 50 : 70)) ! (void) makemon((struct permonst *)0, 0, 0, ! NO_MM_FLAGS); ++monstermoves; moverate -= 12; } *** Old/src/apply.c Tue May 28 17:25:38 1996 --- src/apply.c Tue May 21 11:30:04 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)apply.c 3.2 96/01/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)apply.c 3.2 96/05/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 7,14 **** #ifdef OVLB ! static const char tools[] = { TOOL_CLASS, POTION_CLASS, ! WEAPON_CLASS, WAND_CLASS, 0 }; #ifdef TOURIST static int FDECL(use_camera, (struct obj *)); --- 7,15 ---- #ifdef OVLB ! static const char tools[] = { TOOL_CLASS, WEAPON_CLASS, WAND_CLASS, 0 }; ! static const char tools_too[] = { ALL_CLASSES, TOOL_CLASS, POTION_CLASS, ! WEAPON_CLASS, WAND_CLASS, 0 }; #ifdef TOURIST static int FDECL(use_camera, (struct obj *)); *************** *** 626,631 **** --- 627,634 ---- if (vis) pline ("%s doesn't have a reflection.", Monnam(mtmp)); } else if(!mtmp->mcan && mtmp->data == &mons[PM_MEDUSA]) { + if (mon_reflects(mtmp, "The gaze is reflected away by %s %s!")) + return 1; if (vis) pline("%s is turned to stone!", Monnam(mtmp)); stoned = TRUE; *************** *** 711,719 **** !(mvitals[PM_WOOD_NYMPH].mvflags & G_GONE) && !(mvitals[PM_WATER_NYMPH].mvflags & G_GONE) && !(mvitals[PM_MOUNTAIN_NYMPH].mvflags & G_GONE) && ! (mtmp = makemon(mkclass(S_NYMPH, 0), u.ux, u.uy)) != 0) { You("summon %s!", a_monnam(mtmp)); - discard_minvent(mtmp); /* treat this like reverse genocide */ if (!obj_resists(obj, 93, 100)) { pline("%s has shattered!", The(xname(obj))); useup(obj); --- 714,722 ---- !(mvitals[PM_WOOD_NYMPH].mvflags & G_GONE) && !(mvitals[PM_WATER_NYMPH].mvflags & G_GONE) && !(mvitals[PM_MOUNTAIN_NYMPH].mvflags & G_GONE) && ! (mtmp = makemon(mkclass(S_NYMPH, 0), ! u.ux, u.uy, NO_MINVENT)) != 0) { You("summon %s!", a_monnam(mtmp)); if (!obj_resists(obj, 93, 100)) { pline("%s has shattered!", The(xname(obj))); useup(obj); *************** *** 746,752 **** mm.x = u.ux; mm.y = u.uy; ! mkundead(&mm); wakem = TRUE; } else if (invoking) { --- 749,755 ---- mm.x = u.ux; mm.y = u.uy; ! mkundead(&mm, FALSE, NO_MINVENT); wakem = TRUE; } else if (invoking) { *************** *** 1056,1061 **** --- 1059,1065 ---- obj->no_charge = 1; /* you're now obligated to pay for it */ obj->unpaid = 0; } + makeknown(obj->otyp); if (obj->quan > 1L) { (void) splitobj(obj, 1L); *************** *** 1343,1350 **** /* * Chances for number of troubles to be fixed * 0 1 2 3 4 5 6 7 ! * blessed: 16/80 16/80 15/80 13/80 10/80 6/80 3/80 1/80 ! * uncursed: 4/12 4/12 3/12 1/12 0 0 0 0 */ val_limit = rn2( d(2, (obj && obj->blessed) ? 4 : 2) ); if (val_limit > trouble_count) val_limit = trouble_count; --- 1347,1354 ---- /* * Chances for number of troubles to be fixed * 0 1 2 3 4 5 6 7 ! * blessed: 22.7% 22.7% 19.5% 15.4% 10.7% 5.7% 2.6% 0.8% ! * uncursed: 35.4% 35.4% 22.9% 6.3% 0 0 0 0 */ val_limit = rn2( d(2, (obj && obj->blessed) ? 4 : 2) ); if (val_limit > trouble_count) val_limit = trouble_count; *************** *** 1522,1531 **** what = "underwater"; else if (Levitation) what = "while levitating"; else if (On_stairs(u.ux, u.uy)) what = (u.ux == xdnladder || u.ux == xupladder) ? "on the ladder" : "on the stairs"; ! else if (IS_FURNITURE(levl[u.ux][u.uy].typ) || t_at(u.ux, u.uy)) what = "here"; if (what) { You_cant("set a trap %s!",what); --- 1526,1541 ---- what = "underwater"; else if (Levitation) what = "while levitating"; + else if (is_pool(u.ux, u.uy)) + what = "in water"; + else if (is_lava(u.ux, u.uy)) + what = "in lava"; else if (On_stairs(u.ux, u.uy)) what = (u.ux == xdnladder || u.ux == xupladder) ? "on the ladder" : "on the stairs"; ! else if (IS_FURNITURE(levl[u.ux][u.uy].typ) || ! IS_ROCK(levl[u.ux][u.uy].typ) || ! closed_door(u.ux, u.uy) || t_at(u.ux, u.uy)) what = "here"; if (what) { You_cant("set a trap %s!",what); *************** *** 1537,1542 **** --- 1547,1555 ---- ttmp->tseen = 1; ttmp->madeby_u = 1; newsym(u.ux, u.uy); /* if our hero happens to be invisible */ + if (*in_rooms(u.ux,u.uy,SHOPBASE)) { + add_damage(u.ux, u.uy, 0L); /* schedule removal */ + } You("set and arm %s.", an(defsyms[trap_to_defsym(ttyp)].explanation)); if ((otmp->cursed || Fumbling) && (rnl(10) > 5)) dotrap(ttmp); *************** *** 1635,1641 **** * - you only end up hitting. * */ ! else if(u.utraptype == TT_PIT) { const char *wrapped_what = (char *)0; if (mtmp) { --- 1648,1654 ---- * - you only end up hitting. * */ ! else if(u.utrap && u.utraptype == TT_PIT) { const char *wrapped_what = (char *)0; if (mtmp) { *************** *** 1826,1836 **** if (obj->otyp == WAN_DIGGING) { if(dig_check(BY_OBJECT, FALSE, x, y)) digactualhole(x, y, BY_OBJECT, ! (rn2(obj->spe)<3 || !Can_fall_thru(&u.uz)) ? PIT : HOLE); continue; } else if(obj->otyp == WAN_CREATE_MONSTER) { ! (void) makemon((struct permonst *)0, x, y); continue; } else { if (x == u.ux && y == u.uy) { --- 1839,1849 ---- if (obj->otyp == WAN_DIGGING) { if(dig_check(BY_OBJECT, FALSE, x, y)) digactualhole(x, y, BY_OBJECT, ! (rn2(obj->spe) < 3 || !Can_dig_down(&u.uz)) ? PIT : HOLE); continue; } else if(obj->otyp == WAN_CREATE_MONSTER) { ! (void) makemon((struct permonst *)0, x, y, NO_MM_FLAGS); continue; } else { if (x == u.ux && y == u.uy) { *************** *** 1870,1876 **** register int res = 1; if(check_capacity((char *)0)) return (0); ! obj = getobj(tools, "use or apply"); if(!obj) return 0; if (obj->oclass == WAND_CLASS) --- 1883,1889 ---- register int res = 1; if(check_capacity((char *)0)) return (0); ! obj = getobj(carrying(POT_OIL) ? tools_too : tools, "use or apply"); if(!obj) return 0; if (obj->oclass == WAND_CLASS) *************** *** 1905,1911 **** obj->spe--; if(!rn2(23)) cnt += rn2(7) + 1; while(cnt--) ! (void) makemon((struct permonst *) 0, u.ux, u.uy); makeknown(BAG_OF_TRICKS); } else pline(nothing_happens); --- 1918,1925 ---- obj->spe--; if(!rn2(23)) cnt += rn2(7) + 1; while(cnt--) ! (void) makemon((struct permonst *) 0, ! u.ux, u.uy, NO_MM_FLAGS); makeknown(BAG_OF_TRICKS); } else pline(nothing_happens); *** Old/src/artifact.c Tue May 28 17:25:43 1996 --- src/artifact.c Tue May 14 16:01:08 1996 *************** *** 214,236 **** return a; } - - /* - * This function is used to un-create an artifact. Normally, when an artifact - * is destroyed, it cannot be re-created by any means. However, if you call - * this function _before_ destroying the object, then the artifact can be - * re-created later on. Currently used only by the wish code. - */ - void - artifact_unexist(otmp) - register struct obj *otmp; - { - if (otmp->oartifact && artiexist[(int)otmp->oartifact]) - artiexist[(int)otmp->oartifact] = 0; - else - impossible("Destroying non-existing artifact?!"); - } - #endif /* OVLB */ #ifdef OVL0 --- 214,219 ---- *************** *** 1081,1087 **** for (i = num_ok_dungeons = 0; i < n_dgns; i++) { if (!dungeons[i].dunlev_ureached) continue; any.a_int = i+1; ! add_menu(tmpwin, NO_GLYPH, &any, 0, ATR_NONE, dungeons[i].dname, MENU_UNSELECTED); num_ok_dungeons++; last_ok_dungeon = i; --- 1064,1070 ---- for (i = num_ok_dungeons = 0; i < n_dgns; i++) { if (!dungeons[i].dunlev_ureached) continue; any.a_int = i+1; ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, dungeons[i].dname, MENU_UNSELECTED); num_ok_dungeons++; last_ok_dungeon = i; *** Old/src/bones.c Tue May 28 17:25:52 1996 --- src/bones.c Fri May 3 15:26:11 1996 *************** *** 240,253 **** * on your location */ in_mklev = TRUE; ! mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy); in_mklev = FALSE; if (!mtmp) return; Strcpy((char *) mtmp->mextra, plname); } else { /* give your possessions to the monster you become */ in_mklev = TRUE; ! mtmp = makemon(&mons[u.ugrave_arise], u.ux, u.uy); in_mklev = FALSE; if (!mtmp) { drop_upon_death((struct monst *)0, (struct obj *)0); --- 240,253 ---- * on your location */ in_mklev = TRUE; ! mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy, NO_MM_FLAGS); in_mklev = FALSE; if (!mtmp) return; Strcpy((char *) mtmp->mextra, plname); } else { /* give your possessions to the monster you become */ in_mklev = TRUE; ! mtmp = makemon(&mons[u.ugrave_arise], u.ux, u.uy, NO_MM_FLAGS); in_mklev = FALSE; if (!mtmp) { drop_upon_death((struct monst *)0, (struct obj *)0); *** Old/src/cmd.c Tue May 28 17:25:58 1996 --- src/cmd.c Tue May 28 10:46:47 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)cmd.c 3.2 95/08/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)cmd.c 3.2 96/05/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 679,685 **** #endif if (u.moreluck > 0) you_have("extra luck"); else if (u.moreluck < 0) you_have("reduced luck"); ! if (carrying(LUCKSTONE)) { ltmp = stone_luck(FALSE); if (ltmp <= 0) enl_msg("Bad luck ", "does", "did", " not time out for you"); --- 679,685 ---- #endif if (u.moreluck > 0) you_have("extra luck"); else if (u.moreluck < 0) you_have("reduced luck"); ! if (carrying(LUCKSTONE) || stone_luck(TRUE)) { ltmp = stone_luck(FALSE); if (ltmp <= 0) enl_msg("Bad luck ", "does", "did", " not time out for you"); *************** *** 759,764 **** --- 759,776 ---- #endif /* OVLB */ #ifdef OVL1 + #ifdef WEAPON_SKILLS + STATIC_PTR int NDECL(obsolete_qualifications); + + /* 3.2.0's "#qualifications" was eliminated in 3.2.1; remove this for 3.3 */ + STATIC_PTR int + obsolete_qualifications() + { + pline("`#qualifications' is obsolete. Use `#enhance'."); + return 0; + } + #endif /* WEAPON_SKILLS */ + #ifndef M # ifndef NHSTDC # define M(c) (0x80 | (c)) *************** *** 806,812 **** {'e', FALSE, doeat}, {'E', FALSE, doengrave}, #ifdef WEAPON_SKILLS ! {M('e'), TRUE, select_weapon_skill}, #endif /* WEAPON_SKILLS */ /* Soon to be {'f', FALSE, dofight, "fighting"}, --- 818,824 ---- {'e', FALSE, doeat}, {'E', FALSE, doengrave}, #ifdef WEAPON_SKILLS ! {M('e'), TRUE, enhance_weapon_skill}, #endif /* WEAPON_SKILLS */ /* Soon to be {'f', FALSE, dofight, "fighting"}, *************** *** 839,845 **** {'q', FALSE, dodrink}, {'Q', TRUE, done2}, #ifdef WEAPON_SKILLS ! {M('q'), TRUE, check_weapon_skills}, #endif /* WEAPON_SKILLS */ {'r', FALSE, doread}, {'R', FALSE, doremring}, --- 851,857 ---- {'q', FALSE, dodrink}, {'Q', TRUE, done2}, #ifdef WEAPON_SKILLS ! {M('Q'), TRUE, obsolete_qualifications}, #endif /* WEAPON_SKILLS */ {'r', FALSE, doread}, {'R', FALSE, doremring}, *************** *** 897,903 **** {"chat", "talk to someone", dotalk, TRUE}, /* converse? */ {"dip", "dip an object into something", dodip, FALSE}, #ifdef WEAPON_SKILLS ! {"enhance", "advance a weapon skill", select_weapon_skill, TRUE}, #endif /* WEAPON_SKILLS */ {"force", "force a lock", doforce, FALSE}, {"invoke", "invoke an object's powers", doinvoke, TRUE}, --- 909,916 ---- {"chat", "talk to someone", dotalk, TRUE}, /* converse? */ {"dip", "dip an object into something", dodip, FALSE}, #ifdef WEAPON_SKILLS ! {"enhance", "advance or check weapons skills", enhance_weapon_skill, ! TRUE}, #endif /* WEAPON_SKILLS */ {"force", "force a lock", doforce, FALSE}, {"invoke", "invoke an object's powers", doinvoke, TRUE}, *************** *** 908,914 **** {"offer", "offer a sacrifice to the gods", dosacrifice, FALSE}, {"pray", "pray to the gods for help", dopray, TRUE}, #ifdef WEAPON_SKILLS ! {"qualifications", "check your weapon skills", check_weapon_skills, TRUE}, #endif /* WEAPON_SKILLS */ {"rub", "rub a lamp", dorub, FALSE}, {"sit", "sit down", dosit, FALSE}, --- 921,928 ---- {"offer", "offer a sacrifice to the gods", dosacrifice, FALSE}, {"pray", "pray to the gods for help", dopray, TRUE}, #ifdef WEAPON_SKILLS ! {"qualifications", "(obsolete; use #enhance)", obsolete_qualifications, ! TRUE}, #endif /* WEAPON_SKILLS */ {"rub", "rub a lamp", dorub, FALSE}, {"sit", "sit down", dosit, FALSE}, *************** *** 997,1003 **** for (count = size = 0, obj = chain; obj; obj = obj->nobj) { if (top) { count++; ! size += sizeof(struct obj) + obj->onamelth; } if (recurse && obj->cobj) count_obj(obj->cobj, total_count, total_size, TRUE, TRUE); --- 1011,1017 ---- for (count = size = 0, obj = chain; obj; obj = obj->nobj) { if (top) { count++; ! size += sizeof(struct obj) + obj->oxlth + obj->onamelth; } if (recurse && obj->cobj) count_obj(obj->cobj, total_count, total_size, TRUE, TRUE); *** Old/src/dbridge.c Tue May 28 17:26:02 1996 --- src/dbridge.c Tue May 21 11:11:30 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dbridge.c 3.2 95/06/24 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dbridge.c 3.2 96/05/18 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 746,751 **** --- 746,752 ---- int x,y; { register struct rm *lev1, *lev2; + struct trap *t; int x2, y2; lev1 = &levl[x][y]; *************** *** 780,787 **** (void) revive_nasty(x,y,(char *)0); (void) revive_nasty(x2,y2,(char *)0); delallobj(x, y); - newsym(x, y); delallobj(x2, y2); newsym(x2, y2); block_point(x2,y2); /* vision */ } --- 781,790 ---- (void) revive_nasty(x,y,(char *)0); (void) revive_nasty(x2,y2,(char *)0); delallobj(x, y); delallobj(x2, y2); + if ((t = t_at(x, y)) != 0) deltrap(t); + if ((t = t_at(x2, y2)) != 0) deltrap(t); + newsym(x, y); newsym(x2, y2); block_point(x2,y2); /* vision */ } *************** *** 795,800 **** --- 798,804 ---- int x,y; { register struct rm *lev1, *lev2; + struct trap *t; int x2, y2; lev1 = &levl[x][y]; *************** *** 815,820 **** --- 819,826 ---- do_entity(&(occupants[1])); (void) revive_nasty(x,y,(char *)0); delallobj(x, y); + if ((t = t_at(x, y)) != 0) deltrap(t); + if ((t = t_at(x2, y2)) != 0) deltrap(t); newsym(x, y); newsym(x2, y2); unblock_point(x2,y2); /* vision */ *************** *** 830,835 **** --- 836,842 ---- int x,y; { register struct rm *lev1, *lev2; + struct trap *t; int x2, y2; boolean e_inview; struct entity *etmp1 = &(occupants[0]), *etmp2 = &(occupants[1]); *************** *** 876,881 **** --- 883,890 ---- wake_nearto(x, y, 500); lev2->typ = DOOR; lev2->doormask = D_NODOOR; + if ((t = t_at(x, y)) != 0) deltrap(t); + if ((t = t_at(x2, y2)) != 0) deltrap(t); newsym(x,y); newsym(x2,y2); if (!does_block(x2,y2,lev2)) unblock_point(x2,y2); /* vision */ *** Old/src/decl.c Tue May 28 17:26:05 1996 --- src/decl.c Fri Apr 26 15:50:34 1996 *************** *** 202,208 **** struct c_common_strings c_common_strings = { "Nothing happens.", "That's enough tries!", "That is a silly thing to %s.", "shudder for a moment.", ! "something", "Something" }; /* Vision */ --- 202,208 ---- struct c_common_strings c_common_strings = { "Nothing happens.", "That's enough tries!", "That is a silly thing to %s.", "shudder for a moment.", ! "something", "Something", "You can move again." }; /* Vision */ *** Old/src/detect.c Tue May 28 17:26:08 1996 --- src/detect.c Fri May 3 14:22:43 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)detect.c 3.2 96/02/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)detect.c 3.2 96/05/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 635,642 **** case 2 : pline("%s confuses you!", The(bname)); make_confused(HConfusion + rnd(100),FALSE); break; ! case 3 : pline("%s damages your vision!", The(bname)); ! make_blinded(Blinded + rnd(100),FALSE); break; case 4 : pline("%s zaps your mind!", The(bname)); make_hallucinated(HHallucination + rnd(100),FALSE,0L); --- 635,647 ---- case 2 : pline("%s confuses you!", The(bname)); make_confused(HConfusion + rnd(100),FALSE); break; ! case 3 : if (!resists_blnd(&youmonst)) { ! pline("%s damages your vision!", The(bname)); ! make_blinded(Blinded + rnd(100),FALSE); ! } else { ! pline("%s assaults your vision.", The(bname)); ! You("are unaffected!"); ! } break; case 4 : pline("%s zaps your mind!", The(bname)); make_hallucinated(HHallucination + rnd(100),FALSE,0L); *** Old/src/dig.c Tue May 28 17:26:11 1996 --- src/dig.c Fri May 3 15:26:12 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dig.c 3.2 96/03/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dig.c 3.2 96/04/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 322,331 **** switch(rn2(2)) { case 0: ! mtmp = makemon(&mons[PM_EARTH_ELEMENTAL], dpx, dpy); break; default: ! mtmp = makemon(&mons[PM_XORN], dpx, dpy); break; } if(mtmp) pline_The("debris from your digging comes to life!"); --- 322,333 ---- switch(rn2(2)) { case 0: ! mtmp = makemon(&mons[PM_EARTH_ELEMENTAL], ! dpx, dpy, NO_MM_FLAGS); break; default: ! mtmp = makemon(&mons[PM_XORN], ! dpx, dpy, NO_MM_FLAGS); break; } if(mtmp) pline_The("debris from your digging comes to life!"); *************** *** 436,441 **** --- 438,449 ---- #endif } + if (ttyp != PIT && !Can_dig_down(&u.uz)) { + impossible("digactualhole: can't dig %s on this level.", + defsyms[trap_to_defsym(ttyp)].explanation); + ttyp = PIT; + } + Strcpy(surface_type, surface(x,y)); /* maketrap() might change it */ shopdoor = IS_DOOR(lev->typ) && *in_rooms(x, y, SHOPBASE); oldobjs = level.objects[x][y]; *************** *** 475,482 **** (void) mintrap(mtmp); } } else { /* was TRAPDOOR now a HOLE*/ - if (!Can_fall_thru(&u.uz)) - panic("Holes & trapdoors cannot exist on this level."); if(madeby_u) You("dig a hole through the %s.", surface_type); --- 483,488 ---- *************** *** 918,927 **** "ladder" : "stairs", ceiling(u.ux, u.uy)); You("loosen a rock from the %s.", ceiling(u.ux, u.uy)); pline("It falls on your %s!", body_part(HEAD)); ! losehp(1, "falling rock", KILLED_BY_AN); if ((otmp = mksobj_at(ROCK, u.ux, u.uy, FALSE)) != 0) { ! (void)xname(otmp); /* set dknown, maybe bknown */ ! stackobj(otmp); } if (Invisible) newsym(u.ux, u.uy); } else { --- 924,934 ---- "ladder" : "stairs", ceiling(u.ux, u.uy)); You("loosen a rock from the %s.", ceiling(u.ux, u.uy)); pline("It falls on your %s!", body_part(HEAD)); ! losehp(rnd((uarmh && is_metallic(uarmh)) ? 2 : 6), ! "falling rock", KILLED_BY_AN); if ((otmp = mksobj_at(ROCK, u.ux, u.uy, FALSE)) != 0) { ! (void)xname(otmp); /* set dknown, maybe bknown */ ! stackobj(otmp); } if (Invisible) newsym(u.ux, u.uy); } else { *** Old/src/display.c Tue May 28 17:26:15 1996 --- src/display.c Tue May 21 11:30:11 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)display.c 3.2 95/02/27 */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)display.c 3.2 96/05/19 */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 501,506 **** --- 501,508 ---- register struct rm *lev = &(levl[x][y]); register int see_it; register xchar worm_tail; + + if (in_mklev) return; /* only permit updating the hero when swallowed */ if (u.uswallow) { *** Old/src/dlb.c Tue May 28 17:26:20 1996 --- src/dlb.c Mon May 6 17:37:47 1996 *************** *** 5,10 **** --- 5,14 ---- #include "config.h" #include "dlb.h" + #ifdef __DJGPP__ + #include + #endif + #ifdef DLB /* * Data librarian. Present a STDIO-like interface to NetHack while *************** *** 290,297 **** if (quan == 0) return 0; pos = dp->start + dp->mark; ! if (dp->lib->fmark != pos) fseek(dp->lib->fdata, pos, SEEK_SET); /* check for error??? */ nread = fread(buf, size, quan, dp->lib->fdata); nbytes = nread * size; --- 294,303 ---- if (quan == 0) return 0; pos = dp->start + dp->mark; ! if (dp->lib->fmark != pos) { fseek(dp->lib->fdata, pos, SEEK_SET); /* check for error??? */ + dp->lib->fmark = pos; + } nread = fread(buf, size, quan, dp->lib->fdata); nbytes = nread * size; *** Old/src/do_name.c Tue May 28 17:26:26 1996 --- src/do_name.c Mon May 6 17:06:23 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)do_name.c 3.2 96/03/17 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)do_name.c 3.2 96/05/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 181,187 **** coord cc; register int cx,cy; register struct monst *mtmp; - register char *curr; char qbuf[QBUFSZ]; if (Hallucination) { --- 181,186 ---- *************** *** 215,224 **** (char *)0, 1)); getlin(qbuf,buf); if(!*buf || *buf == '\033') return(0); ! ! /* strip trailing spaces; unnames monster if all spaces */ ! for (curr = eos(buf); curr > buf; ) ! if (*--curr == ' ') *curr = '\0'; else break; if (type_is_pname(mtmp->data)) pline("%s doesn't like being called names!", Monnam(mtmp)); --- 214,221 ---- (char *)0, 1)); getlin(qbuf,buf); if(!*buf || *buf == '\033') return(0); ! /* strip leading and trailing spaces; unnames monster if all spaces */ ! (void)mungspaces(buf); if (type_is_pname(mtmp->data)) pline("%s doesn't like being called names!", Monnam(mtmp)); *************** *** 237,253 **** register struct obj *obj; { char buf[BUFSZ], qbuf[QBUFSZ]; - register char *curr; const char *aname; short objtyp; Sprintf(qbuf, "What do you want to name %s?", doname(obj)); getlin(qbuf, buf); if(!*buf || *buf == '\033') return; ! ! /* strip trailing spaces; unnames item if all spaces */ ! for (curr = eos(buf); curr > buf; ) ! if (*--curr == ' ') *curr = '\0'; else break; /* relax restrictions over proper capitalization for artifacts */ if ((aname = artifact_name(buf, &objtyp)) != 0 && objtyp == obj->otyp) --- 234,247 ---- register struct obj *obj; { char buf[BUFSZ], qbuf[QBUFSZ]; const char *aname; short objtyp; Sprintf(qbuf, "What do you want to name %s?", doname(obj)); getlin(qbuf, buf); if(!*buf || *buf == '\033') return; ! /* strip leading and trailing spaces; unnames item if all spaces */ ! (void)mungspaces(buf); /* relax restrictions over proper capitalization for artifacts */ if ((aname = artifact_name(buf, &objtyp)) != 0 && objtyp == obj->otyp) *************** *** 272,307 **** update_inventory(); } struct obj * ! oname(obj, name) struct obj *obj; const char *name; { struct obj *otmp; - int lth; - char buf[PL_PSIZ]; - - lth = *name ? (int)(strlen(name) + 1) : 0; - if (lth > PL_PSIZ) { - lth = PL_PSIZ; - name = strncpy(buf, name, PL_PSIZ - 1); - buf[PL_PSIZ - 1] = '\0'; - } - /* If named artifact exists in the game, do not create another. - * Also trying to create an artifact shouldn't de-artifact - * it (e.g. Excalibur from prayer). In this case the object - * will retain its current name. */ - if (obj->oartifact || (lth && exist_artifact(obj->otyp, name))) - return obj; - if (lth == obj->onamelth) { - /* no need to replace entire object */ - if (lth) Strcpy(ONAME(obj), name); - return obj; - } ! otmp = newobj(lth); *otmp = *obj; /* the cobj pointer is copied to otmp */ ! otmp->onamelth = lth; otmp->timed = 0; /* not timed, yet */ otmp->lamplit = 0; /* ditto */ /* __GNUC__ note: if the assignment of otmp->onamelth immediately --- 266,296 ---- update_inventory(); } + /* + * Allocate a new and possibly larger storage space for an obj. + */ struct obj * ! replobj(obj, oextra_size, oextra_src, oname_size, name) struct obj *obj; + int oextra_size; /* storage to allocate for oextra */ + genericptr_t oextra_src; + int oname_size; /* size of name string + 1 (null terminator) */ const char *name; { struct obj *otmp; ! otmp = newobj(oextra_size + oname_size); *otmp = *obj; /* the cobj pointer is copied to otmp */ ! if (oextra_size) { ! if (oextra_src) ! (void) memcpy((genericptr_t)otmp->oextra, oextra_src, ! oextra_size); ! } else { ! otmp->mtraits = 0; ! } ! otmp->oxlth = oextra_size; ! ! otmp->onamelth = oname_size; otmp->timed = 0; /* not timed, yet */ otmp->lamplit = 0; /* ditto */ /* __GNUC__ note: if the assignment of otmp->onamelth immediately *************** *** 309,317 **** test on vax (`insv' instruction used to store bitfield does not set condition codes, but optimizer behaves as if it did). gcc-2.8.0 should finally fix this.... */ ! if (lth) { Strcpy(ONAME(otmp), name); - artifact_exists(otmp, name, TRUE); } if (obj->owornmask) { --- 298,306 ---- test on vax (`insv' instruction used to store bitfield does not set condition codes, but optimizer behaves as if it did). gcc-2.8.0 should finally fix this.... */ ! if (oname_size) { ! if (name) Strcpy(ONAME(otmp), name); } if (obj->owornmask) { *************** *** 369,374 **** --- 358,395 ---- return otmp; } + struct obj * + oname(obj, name) + struct obj *obj; + const char *name; + { + int lth; + char buf[PL_PSIZ]; + + lth = *name ? (int)(strlen(name) + 1) : 0; + if (lth > PL_PSIZ) { + lth = PL_PSIZ; + name = strncpy(buf, name, PL_PSIZ - 1); + buf[PL_PSIZ - 1] = '\0'; + } + /* If named artifact exists in the game, do not create another. + * Also trying to create an artifact shouldn't de-artifact + * it (e.g. Excalibur from prayer). In this case the object + * will retain its current name. */ + if (obj->oartifact || (lth && exist_artifact(obj->otyp, name))) + return obj; + + if (lth == obj->onamelth) { + /* no need to replace entire object */ + if (lth) Strcpy(ONAME(obj), name); + } else { + obj = replobj(obj, obj->oxlth, + (genericptr_t)obj->oextra, lth, name); + } + if (lth) artifact_exists(obj, name, TRUE); + return obj; + } + static NEARDATA const char callable[] = { SCROLL_CLASS, POTION_CLASS, WAND_CLASS, RING_CLASS, AMULET_CLASS, GEM_CLASS, SPBOOK_CLASS, ARMOR_CLASS, TOOL_CLASS, 0 }; *************** *** 421,432 **** char buf[BUFSZ], qbuf[QBUFSZ]; struct obj otemp; register char **str1; - register char *str; if (!obj->dknown) return; /* probably blind */ otemp = *obj; otemp.quan = 1L; otemp.onamelth = 0; if (objects[otemp.otyp].oc_class == POTION_CLASS && otemp.corpsenm) { /* kludge, meaning it's sink water */ Sprintf(qbuf,"Call a stream of %s fluid:", --- 442,455 ---- char buf[BUFSZ], qbuf[QBUFSZ]; struct obj otemp; register char **str1; if (!obj->dknown) return; /* probably blind */ otemp = *obj; otemp.quan = 1L; otemp.onamelth = 0; + #ifdef OEXTRA + otemp.oxlth = 0; + #endif if (objects[otemp.otyp].oc_class == POTION_CLASS && otemp.corpsenm) { /* kludge, meaning it's sink water */ Sprintf(qbuf,"Call a stream of %s fluid:", *************** *** 441,449 **** str1 = &(objects[obj->otyp].oc_uname); if(*str1) free((genericptr_t)*str1); ! /* strip trailing spaces; uncalls item if all spaces */ ! for (str = eos(buf); str > buf; ) ! if (*--str == ' ') *str = '\0'; else break; if (!*buf) { if (*str1) /* had name, so possibly remove from disco[] */ undiscover_object(obj->otyp), *str1 = (char *)0; --- 464,471 ---- str1 = &(objects[obj->otyp].oc_uname); if(*str1) free((genericptr_t)*str1); ! /* strip leading and trailing spaces; uncalls item if all spaces */ ! (void)mungspaces(buf); if (!*buf) { if (*str1) /* had name, so possibly remove from disco[] */ undiscover_object(obj->otyp), *str1 = (char *)0; *** Old/src/do_wear.c Tue May 28 17:26:29 1996 --- src/do_wear.c Tue May 21 17:43:07 1996 *************** *** 262,273 **** case HELM_OF_TELEPATHY: break; case HELM_OF_BRILLIANCE: ! if (uarmh->spe) { ! ABON(A_INT) += uarmh->spe; ! ABON(A_WIS) += uarmh->spe; ! flags.botl = 1; ! makeknown(uarmh->otyp); ! } break; case CORNUTHAUM: /* people think marked wizards know what they're talking --- 262,268 ---- case HELM_OF_TELEPATHY: break; case HELM_OF_BRILLIANCE: ! adj_abon(uarmh, uarmh->spe); break; case CORNUTHAUM: /* people think marked wizards know what they're talking *************** *** 300,307 **** ACURR(A_INT) <= (ABASE(A_INT) + ABON(A_INT) + ATEMP(A_INT)) ? "like sitting in a corner" : "giddy"); } else { ! Your("%s oscillates briefly.", ! mindless(uasmon) ? body_part(HEAD) : "mind"); makeknown(HELM_OF_OPPOSITE_ALIGNMENT); } break; --- 295,301 ---- ACURR(A_INT) <= (ABASE(A_INT) + ABON(A_INT) + ATEMP(A_INT)) ? "like sitting in a corner" : "giddy"); } else { ! Your("mind oscillates briefly."); makeknown(HELM_OF_OPPOSITE_ALIGNMENT); } break; *************** *** 334,344 **** see_monsters(); return 0; case HELM_OF_BRILLIANCE: ! if (uarmh->spe) { ! ABON(A_INT) -= uarmh->spe; ! ABON(A_WIS) -= uarmh->spe; ! flags.botl = 1; ! } break; case HELM_OF_OPPOSITE_ALIGNMENT: u.ualign.type = u.ualignbase[0]; --- 328,334 ---- see_monsters(); return 0; case HELM_OF_BRILLIANCE: ! adj_abon(uarmh, -uarmh->spe); break; case HELM_OF_OPPOSITE_ALIGNMENT: u.ualign.type = u.ualignbase[0]; *************** *** 370,378 **** flags.botl = 1; /* taken care of in attrib.c */ break; case GAUNTLETS_OF_DEXTERITY: ! if (uarmg->spe) makeknown(uarmg->otyp); ! ABON(A_DEX) += uarmg->spe; ! flags.botl = 1; break; default: impossible(unknown_type, c_gloves, uarmg->otyp); } --- 360,366 ---- flags.botl = 1; /* taken care of in attrib.c */ break; case GAUNTLETS_OF_DEXTERITY: ! adj_abon(uarmg, uarmg->spe); break; default: impossible(unknown_type, c_gloves, uarmg->otyp); } *************** *** 397,405 **** flags.botl = 1; /* taken care of in attrib.c */ break; case GAUNTLETS_OF_DEXTERITY: ! if (uarmg->spe) makeknown(uarmg->otyp); ! ABON(A_DEX) -= uarmg->spe; ! flags.botl = 1; break; default: impossible(unknown_type, c_gloves, uarmg->otyp); } --- 385,391 ---- flags.botl = 1; /* taken care of in attrib.c */ break; case GAUNTLETS_OF_DEXTERITY: ! adj_abon(uarmg, -uarmg->spe); break; default: impossible(unknown_type, c_gloves, uarmg->otyp); } *************** *** 1717,1729 **** register struct obj *otmp; register schar delta; { ! if (uarmg && otmp->otyp == GAUNTLETS_OF_DEXTERITY) { ! ABON(A_DEX) += (delta); flags.botl = 1; } ! if (uarmh && otmp->otyp == HELM_OF_BRILLIANCE) { ! ABON(A_INT) += (delta); ! ABON(A_WIS) += (delta); flags.botl = 1; } } --- 1703,1721 ---- register struct obj *otmp; register schar delta; { ! if (uarmg && uarmg == otmp && otmp->otyp == GAUNTLETS_OF_DEXTERITY) { ! if (delta) { ! makeknown(uarmg->otyp); ! ABON(A_DEX) += (delta); ! } flags.botl = 1; } ! if (uarmh && uarmh == otmp && otmp->otyp == HELM_OF_BRILLIANCE) { ! if (delta) { ! makeknown(uarmh->otyp); ! ABON(A_INT) += (delta); ! ABON(A_WIS) += (delta); ! } flags.botl = 1; } } *** Old/src/dog.c Tue May 28 17:26:34 1996 --- src/dog.c Fri May 3 15:26:13 1996 *************** *** 76,82 **** } pm->pxlth += sizeof (struct edog); ! mtmp = makemon(pm, x, y); pm->pxlth -= sizeof (struct edog); if (otmp && !mtmp) { /* monster was genocided or square occupied */ pline_The("figurine writhes and then shatters into pieces!"); --- 76,82 ---- } pm->pxlth += sizeof (struct edog); ! mtmp = makemon(pm, x, y, NO_MM_FLAGS); pm->pxlth -= sizeof (struct edog); if (otmp && !mtmp) { /* monster was genocided or square occupied */ pline_The("figurine writhes and then shatters into pieces!"); *************** *** 132,138 **** } mons[pettype].pxlth = sizeof(struct edog); ! mtmp = makemon(&mons[pettype], u.ux, u.uy); mons[pettype].pxlth = 0; if(!mtmp) return((struct monst *) 0); /* pets were genocided */ --- 132,138 ---- } mons[pettype].pxlth = sizeof(struct edog); ! mtmp = makemon(&mons[pettype], u.ux, u.uy, NO_MM_FLAGS); mons[pettype].pxlth = 0; if(!mtmp) return((struct monst *) 0); /* pets were genocided */ *** Old/src/dogmove.c Tue May 28 17:26:37 1996 --- src/dogmove.c Wed May 15 08:48:52 1996 *************** *** 21,29 **** { register struct obj *obj; struct obj *wep = MON_WEP(mon); ! for(obj = mon->minvent; obj; obj = obj->nobj) if (!obj->owornmask && obj != wep) return obj; return (struct obj *)0; } --- 21,43 ---- { register struct obj *obj; struct obj *wep = MON_WEP(mon); + boolean item1 = FALSE, item2 = FALSE; ! if (is_animal(mon->data) || mindless(mon->data)) ! item1 = item2 = TRUE; ! if (!tunnels(mon->data) || !needspick(mon->data)) ! item1 = TRUE; ! for(obj = mon->minvent; obj; obj = obj->nobj) { ! if (!item1 && obj->otyp == PICK_AXE) { ! item1 = TRUE; ! continue; ! } ! if (!item2 && obj->otyp == UNICORN_HORN && !obj->cursed) { ! item2 = TRUE; ! continue; ! } if (!obj->owornmask && obj != wep) return obj; + } return (struct obj *)0; } *** Old/src/dokick.c Tue May 28 17:26:40 1996 --- src/dokick.c Thu May 23 09:37:26 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dokick.c 3.2 96/03/23 */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dokick.c 3.2 96/05/04 */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 6,12 **** #include "eshk.h" #define is_bigfoot(x) ((x) == &mons[PM_SASQUATCH]) ! #define martial() (Role_is('S') || Role_is('P') || is_bigfoot(uasmon)) static NEARDATA struct rm *maploc; static NEARDATA const char *gate_str; --- 6,12 ---- #include "eshk.h" #define is_bigfoot(x) ((x) == &mons[PM_SASQUATCH]) ! #define martial() (martial_bonus() || is_bigfoot(uasmon)) static NEARDATA struct rm *maploc; static NEARDATA const char *gate_str; *************** *** 64,79 **** if (martial()) dmg += rn2(ACURR(A_DEX)/2 + 1); } dmg += u.udaminc; /* add ring(s) of increase damage */ ! if (dmg > 0) { mon->mhp -= dmg; ! if (mon->mhp < 1) { ! (void) passive(mon, TRUE, 0, TRUE); ! killed(mon); ! return; ! } ! } ! if(martial() && !bigmonst(mon->data) && !rn2(3) && mon->mcanmove ! && mon != u.ustuck) { /* see if the monster has a place to move into */ mdx = mon->mx + u.dx; mdy = mon->my + u.dy; --- 64,73 ---- if (martial()) dmg += rn2(ACURR(A_DEX)/2 + 1); } dmg += u.udaminc; /* add ring(s) of increase damage */ ! if (dmg > 0) mon->mhp -= dmg; ! if(mon->mhp > 0 && martial() && !bigmonst(mon->data) && !rn2(3) ! && mon->mcanmove && mon != u.ustuck) { /* see if the monster has a place to move into */ mdx = mon->mx + u.dx; mdy = mon->my + u.dy; *************** *** 86,93 **** set_apparxy(mon); } } - (void) passive(mon, FALSE, 1, TRUE); } static void --- 80,92 ---- set_apparxy(mon); } } + (void) passive(mon, TRUE, mon->mhp > 0, TRUE); + if (mon->mhp <= 0) killed(mon); + + /* may bring up a dialog, so put this after all messages */ + if (dmg > 1 && martial_bonus()) /* exercise proficiency */ + use_skill(P_MARTIAL_ARTS); } static void *************** *** 310,317 **** if(martial()) range += rnd(3); ! if(is_ice(x,y)) { range += rnd(3); slide = TRUE; } ! if(kickobj->greased) { range += rnd(3); slide = TRUE; } /* Mjollnir is magically too heavy to kick */ if(kickobj->oartifact == ART_MJOLLNIR) range = 1; --- 309,321 ---- if(martial()) range += rnd(3); ! if (is_pool(x, y)) { ! /* you're in the water too; significantly reduce range */ ! range = range / 3 + 1; /* {1,2}=>1, {3,4,5}=>2, {6,7,8}=>3 */ ! } else { ! if (is_ice(x, y)) range += rnd(3), slide = TRUE; ! if (kickobj->greased) range += rnd(3), slide = TRUE; ! } /* Mjollnir is magically too heavy to kick */ if(kickobj->oartifact == ART_MJOLLNIR) range = 1; *************** *** 386,392 **** } /* fragile objects should not be kicked */ ! if (breaks(kickobj, kickobj->ox, kickobj->oy, FALSE)) return 1; if(IS_ROCK(levl[x][y].typ)) { if ((!martial() && rn2(20) > ACURR(A_DEX)) --- 390,396 ---- } /* fragile objects should not be kicked */ ! if (hero_breaks(kickobj, kickobj->ox, kickobj->oy, FALSE)) return 1; if(IS_ROCK(levl[x][y].typ)) { if ((!martial() && rn2(20) > ACURR(A_DEX)) *************** *** 573,581 **** maploc = &levl[x][y]; ! /* The next four tests should stay in */ ! /* their present order: monsters, objects, */ ! /* non-doors, doors. */ if(MON_AT(x, y)) { struct permonst *mdat = m_at(x,y)->data; --- 577,585 ---- maploc = &levl[x][y]; ! /* The next five tests should stay in */ ! /* their present order: monsters, pools, */ ! /* objects, non-doors, doors. */ if(MON_AT(x, y)) { struct permonst *mdat = m_at(x,y)->data; *************** *** 593,598 **** --- 597,608 ---- return(1); } + if (is_pool(x, y) ^ !!u.uinwater) { + /* objects normally can't be removed from water by kicking */ + You("splash some water around."); + return 1; + } + kickobj = (struct obj *)0; if (OBJ_AT(x, y) && (!Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) *************** *** 712,718 **** else pline("A %s ooze gushes up from the drain!", hcolor(Black)); ! (void) makemon(&mons[PM_BLACK_PUDDING], x, y); exercise(A_DEX, TRUE); newsym(x,y); maploc->looted |= S_LPUDDING; --- 722,729 ---- else pline("A %s ooze gushes up from the drain!", hcolor(Black)); ! (void) makemon(&mons[PM_BLACK_PUDDING], ! x, y, NO_MM_FLAGS); exercise(A_DEX, TRUE); newsym(x,y); maploc->looted |= S_LPUDDING; *************** *** 724,730 **** pline("%s returns!", (Blind ? Something : "The dish washer")); if (makemon(&mons[poly_gender() == 1 ? ! PM_INCUBUS : PM_SUCCUBUS], x, y)) newsym(x,y); maploc->looted |= S_LDWASHER; exercise(A_DEX, TRUE); return(1); --- 735,742 ---- pline("%s returns!", (Blind ? Something : "The dish washer")); if (makemon(&mons[poly_gender() == 1 ? ! PM_INCUBUS : PM_SUCCUBUS], x, y, NO_MM_FLAGS)) ! newsym(x,y); maploc->looted |= S_LDWASHER; exercise(A_DEX, TRUE); return(1); *************** *** 778,784 **** exercise(A_DEX, FALSE); if (martial() || ACURR(A_DEX) >= 16 || rn2(3)) { You("kick at empty space."); ! feel_location(x,y); } else { pline("Dumb move! You strain a muscle."); exercise(A_STR, FALSE); --- 790,796 ---- exercise(A_DEX, FALSE); if (martial() || ACURR(A_DEX) >= 16 || rn2(3)) { You("kick at empty space."); ! if (Blind) feel_location(x,y); } else { pline("Dumb move! You strain a muscle."); exercise(A_STR, FALSE); *** Old/src/dothrow.c Tue May 28 17:26:44 1996 --- src/dothrow.c Sat May 18 11:50:39 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dothrow.c 3.2 96/03/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dothrow.c 3.2 96/05/17 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 9,14 **** --- 9,19 ---- static int FDECL(gem_accept, (struct monst *, struct obj *)); static int FDECL(throw_gold, (struct obj *)); static void FDECL(check_shop_obj, (struct obj *,XCHAR_P,XCHAR_P,BOOLEAN_P)); + static boolean FDECL(breaktest, (struct obj *)); + static void FDECL(breakobj, (struct obj *,XCHAR_P,XCHAR_P,BOOLEAN_P,BOOLEAN_P)); + static void FDECL(breakmsg, (struct obj *,BOOLEAN_P)); + static boolean FDECL(toss_up,(struct obj *, BOOLEAN_P)); + static NEARDATA const char toss_objs[] = { ALLOW_COUNT, GOLD_CLASS, ALL_CLASSES, WEAPON_CLASS, 0 }; *************** *** 96,102 **** pline("%s hit%s the %s.", Doname2(obj), (obj->quan == 1L) ? "s" : "", surface(u.ux,u.uy)); ! if (breaks(obj, u.ux, u.uy, TRUE)) return; if (ship_object(obj, u.ux, u.uy, FALSE)) return; dropy(obj); } --- 101,107 ---- pline("%s hit%s the %s.", Doname2(obj), (obj->quan == 1L) ? "s" : "", surface(u.ux,u.uy)); ! if (hero_breaks(obj, u.ux, u.uy, TRUE)) return; if (ship_object(obj, u.ux, u.uy, FALSE)) return; dropy(obj); } *************** *** 222,227 **** --- 227,316 ---- } } + /* + * Hero tosses an object upwards with appropriate consequences. + * + * Returns FALSE if the object is gone. + */ + static boolean + toss_up(obj, hitsroof) + struct obj *obj; + boolean hitsroof; + { + int do_death = 0; + const char *almost; + /* note: obj->quan == 1 */ + + if (hitsroof) { + if (breaktest(obj)) { + pline("%s hits the %s.", Doname2(obj), ceiling(u.ux, u.uy)); + breakmsg(obj, !Blind); + breakobj(obj, u.ux, u.uy, TRUE, TRUE); + return FALSE; + } + almost = ""; + } else { + almost = " almost"; + } + pline("%s%s hits the %s, then falls back on top of your %s.", + Doname2(obj), almost, ceiling(u.ux,u.uy), body_part(HEAD)); + + /* object now hits you */ + + if (obj->oclass != POTION_CLASS /* potions have hit handling below */ + && breaktest(obj)) { + int otyp = obj->otyp; + int blindinc; + + breakmsg(obj, !Blind); + breakobj(obj, u.ux, u.uy, TRUE, TRUE); + /* obj is now gone */ + switch (otyp) { + case EGG: + case CREAM_PIE: + case BLINDING_VENOM: + pline("You've got it all over your face!"); + blindinc = rnd(25); + if (blindinc && !Blindfolded) { + if (otyp != BLINDING_VENOM) + u.ucreamed += blindinc; + else if (!Blind) + pline("It blinds you!"); + make_blinded(Blinded + blindinc, FALSE); + } + break; + } + return FALSE; + } + if(obj->oclass == POTION_CLASS) + potionhit(&youmonst, obj); + else { + int dmg = rnd((int)(obj->owt)); + + if (uarmh) { + if(is_metallic(uarmh)) { + pline("Fortunately, you are wearing a hard helmet."); + dmg = 1; + } else if (flags.verbose) + Your("%s does not protect you.", xname(uarmh)); + } else if (obj->otyp == CORPSE && + obj->corpsenm == PM_COCKATRICE) { + if (!resists_ston(&youmonst) && + !(poly_when_stoned(uasmon) && + polymon(PM_STONE_GOLEM))) { + killer = doname(obj); + You("turn to stone."); + do_death = STONING; + } + } + hitfloor(obj); + if (do_death == STONING) + done(STONING); + else + losehp(dmg, "falling object", KILLED_BY_AN); + } + return TRUE; + } void throwit(obj) *************** *** 231,237 **** register int range, urange; boolean impaired = (Confusion || Stunned || Blind || Hallucination || Fumbling); - int do_death = 0; if ((obj->cursed || obj->greased) && (u.dx || u.dy) && !rn2(7)) { boolean slipok = TRUE; --- 320,325 ---- *************** *** 264,313 **** bhitpos.x = mon->mx; bhitpos.y = mon->my; } else if(u.dz) { ! if (u.dz < 0 && Role_is('V') && ! obj->oartifact == ART_MJOLLNIR && !impaired) { ! pline("%s hits the %s and returns to your hand!", ! The(xname(obj)), ceiling(u.ux,u.uy)); ! obj = addinv(obj); ! (void) encumber_msg(); ! setuwep(obj); ! return; ! } ! if (u.dz < 0 && !Is_airlevel(&u.uz) && !Underwater && !Is_waterlevel(&u.uz)) { ! pline("%s hits the %s, then falls back on top of your %s.", ! Doname2(obj), /* note: obj->quan == 1 */ ! ceiling(u.ux,u.uy), ! body_part(HEAD)); ! if(obj->oclass == POTION_CLASS) ! potionhit(&youmonst, obj); ! else { ! int dmg = rnd((int)(obj->owt)); ! ! if (uarmh) { ! if(is_metallic(uarmh)) { ! pline("Fortunately, you are wearing a hard helmet."); ! dmg = 1; ! } else if (flags.verbose) ! Your("%s does not protect you.", xname(uarmh)); ! } else if (obj->otyp == CORPSE && ! obj->corpsenm == PM_COCKATRICE) { ! if (!resists_ston(&youmonst) && ! !(poly_when_stoned(uasmon) && ! polymon(PM_STONE_GOLEM))) { ! killer = doname(obj); ! You("turn to stone."); ! do_death = STONING; ! } ! } ! ! hitfloor(obj); ! if (do_death == STONING) ! done(STONING); ! else ! losehp(dmg, "falling object", KILLED_BY_AN); ! } ! } else hitfloor(obj); ! return; } else if(obj->otyp == BOOMERANG && !Underwater) { if(Is_airlevel(&u.uz) || Levitation) hurtle(-u.dx, -u.dy, 1); --- 352,371 ---- bhitpos.x = mon->mx; bhitpos.y = mon->my; } else if(u.dz) { ! if (u.dz < 0 && Role_is('V') && ! obj->oartifact == ART_MJOLLNIR && !impaired) { ! pline("%s hits the %s and returns to your hand!", ! The(xname(obj)), ceiling(u.ux,u.uy)); ! obj = addinv(obj); ! (void) encumber_msg(); ! setuwep(obj); ! } else if (u.dz < 0 && !Is_airlevel(&u.uz) && ! !Underwater && !Is_waterlevel(&u.uz)) { ! (void) toss_up(obj, rn2(5)); ! } else { ! hitfloor(obj); ! } ! return; } else if(obj->otyp == BOOMERANG && !Underwater) { if(Is_airlevel(&u.uz) || Levitation) hurtle(-u.dx, -u.dy, 1); *************** *** 328,336 **** if (range < 1) range = 1; if ((obj->oclass == WEAPON_CLASS || obj->oclass == GEM_CLASS) ! && uwep && objects[obj->otyp].w_propellor) { ! if (objects[obj->otyp].w_propellor == ! -objects[uwep->otyp].w_propellor) range++; else range /= 2; --- 386,394 ---- if (range < 1) range = 1; if ((obj->oclass == WEAPON_CLASS || obj->oclass == GEM_CLASS) ! && objects[obj->otyp].w_propellor) { ! if (uwep && objects[obj->otyp].w_propellor == ! -objects[uwep->otyp].w_propellor) range++; else range /= 2; *************** *** 344,351 **** if(range < 1) range = 1; } ! if (obj->otyp == BOULDER) range = 20; ! if (obj == uball && u.utrap && u.utraptype == TT_INFLOOR) range = 1; if (Underwater) range = 1; --- 402,412 ---- if(range < 1) range = 1; } ! if (obj->otyp == BOULDER) ! range = 20; /* you must be giant */ ! else if (obj->oartifact == ART_MJOLLNIR) ! range = (range + 1) / 2; /* it's heavy */ ! else if (obj == uball && u.utrap && u.utraptype == TT_INFLOOR) range = 1; if (Underwater) range = 1; *************** *** 424,434 **** } if (!IS_SOFT(levl[bhitpos.x][bhitpos.y].typ) && ! breaks(obj, bhitpos.x, bhitpos.y, TRUE)) { tmp_at(DISP_FLASH, obj_glyph); tmp_at(bhitpos.x, bhitpos.y); delay_output(); tmp_at(DISP_END, 0); return; } if(flooreffects(obj,bhitpos.x,bhitpos.y,"fall")) return; --- 485,497 ---- } if (!IS_SOFT(levl[bhitpos.x][bhitpos.y].typ) && ! breaktest(obj)) { tmp_at(DISP_FLASH, obj_glyph); tmp_at(bhitpos.x, bhitpos.y); delay_output(); tmp_at(DISP_END, 0); + breakmsg(obj, cansee(bhitpos.x, bhitpos.y)); + breakobj(obj, bhitpos.x, bhitpos.y, TRUE, TRUE); return; } if(flooreffects(obj,bhitpos.x,bhitpos.y,"fall")) return; *************** *** 515,521 **** register int disttmp; /* distance modifier */ int otyp = obj->otyp; boolean guaranteed_hit = (u.uswallow && mon == u.ustuck); ! /* Differences from melee weapons: * * Dex still gives a bonus, but strength does not. --- 578,584 ---- register int disttmp; /* distance modifier */ int otyp = obj->otyp; boolean guaranteed_hit = (u.uswallow && mon == u.ustuck); ! /* Differences from melee weapons: * * Dex still gives a bonus, but strength does not. *************** *** 664,671 **** } else { if (guaranteed_hit) /* this assumes that guaranteed_hit is due to swallowing */ ! pline("%s vanishes into %s %s.", ! The(xname(obj)), s_suffix(mon_nam(mon)), is_animal(u.ustuck->data) ? "entrails" : "currents"); else pline("%s misses %s.", The(xname(obj)), mon_nam(mon)); --- 727,734 ---- } else { if (guaranteed_hit) /* this assumes that guaranteed_hit is due to swallowing */ ! pline("%s vanishes into %s %s.", ! The(xname(obj)), s_suffix(mon_nam(mon)), is_animal(u.ustuck->data) ? "entrails" : "currents"); else pline("%s misses %s.", The(xname(obj)), mon_nam(mon)); *************** *** 748,824 **** } /* ! * Check to see if obj breaks. This routine assumes the cause is the hero, ! * and that the break is in sight of the hero. * ! * This assumption is probably not true from the call in scatter(). ! * This routine needs to be generalized. * ! * Return 0 if the object doesn't break, 1 if the object broke. */ int ! breaks(obj, x, y, from_invent) struct obj *obj; ! int x, y; /* object location (ox, oy may not be right) */ boolean from_invent; /* thrown or dropped by player; maybe on shop bill */ { ! const char *to_pieces; ! if (obj_resists(obj, 1, 100)) return 0; ! to_pieces = ""; switch (obj->oclass == POTION_CLASS ? POT_WATER : obj->otyp) { case MIRROR: ! if (!flags.mon_moving) change_luck(-2); ! /*FALLTHRU*/ ! case CRYSTAL_BALL: ! #ifdef TOURIST ! case EXPENSIVE_CAMERA: ! #endif ! to_pieces = " into a thousand pieces"; ! /*FALLTHRU*/ case POT_WATER: /* really, all potions */ - if (Blind) - You_hear("%s shatter!", something); - else - pline("%s shatters%s!", Doname2(obj), to_pieces); - if (obj->oclass == POTION_CLASS) { if (obj->otyp == POT_OIL && obj->lamplit) splatter_burning_oil(x,y); else if (distu(x,y) <= 2) { ! You("smell a peculiar odor..."); potionbreathe(obj); } /* monster breathing isn't handled... [yet?] */ } break; case EGG: ! if (!flags.mon_moving) { if (obj->spe && obj->corpsenm >= LOW_PM) if (obj->quan < 5) change_luck((schar) -(obj->quan)); else change_luck(-5); } - pline("Splat!"); break; - case CREAM_PIE: - pline("What a mess!"); - break; - case ACID_VENOM: - case BLINDING_VENOM: - pline("Splash!"); - break; - default: - return 0; } ! ! if (from_invent) { if (*u.ushops) ! check_shop_obj(obj, x, y, TRUE); ! } else if (!flags.mon_moving && !obj->no_charge && costly_spot(x, y)) { /* it is assumed that the obj is a floor-object */ char *o_shop = in_rooms(x, y, SHOPBASE); struct monst *shkp = shop_keeper(*o_shop); --- 811,924 ---- } /* ! * Comments about the restructuring of the old breaks() routine. * ! * There are now three distinct phases to object breaking: ! * breaktest() - which makes the check/decision about whether the ! * object is going to break. ! * breakmsg() - which outputs a message about the breakage, ! * appropriate for that particular object. Should ! * only be called after a positve breaktest(). ! * on the object and, if it going to be called, ! * it must be called before calling breakobj(). ! * Calling breakmsg() is optional. ! * breakobj() - which actually does the breakage and the side-effects ! * of breaking that particular object. This should ! * only be called after a positive breaktest() on the ! * object. * ! * Each of the above routines is currently static to this source module. ! * There are two routines callable from outside this source module which ! * perform the routines above in the correct sequence. ! * ! * hero_breaks() - called when an object is to be broken as a result ! * of something that the hero has done. (throwing it, ! * kicking it, etc.) ! * breaks() - called when an object is to be broken for some ! * reason other than the hero doing something to it. ! */ ! ! /* ! * The hero causes breakage of an object (throwing, dropping it, etc.) ! * Return 0 if the object didn't break, 1 if the object broke. */ int ! hero_breaks(obj, x, y, from_invent) struct obj *obj; ! xchar x, y; /* object location (ox, oy may not be right) */ boolean from_invent; /* thrown or dropped by player; maybe on shop bill */ { ! boolean in_view = !Blind; ! if (!breaktest(obj)) return 0; ! breakmsg(obj, in_view); ! breakobj(obj, x, y, TRUE, from_invent); ! return 1; ! } ! /* ! * The object is going to break for a reason other than the hero doing ! * something to it. ! * Return 0 if the object doesn't break, 1 if the object broke. ! */ ! int ! breaks(obj, x, y) ! struct obj *obj; ! xchar x, y; /* object location (ox, oy may not be right) */ ! { ! boolean in_view = Blind ? FALSE : cansee(x, y); ! if (!breaktest(obj)) return 0; ! breakmsg(obj, in_view); ! breakobj(obj, x, y, FALSE, FALSE); ! return 1; ! } ! ! /* ! * Unconditionally break an object. Assumes all resistance checks ! * and break messages have been delivered prior to getting here. ! * This routine assumes the cause is the hero if heros_fault is TRUE. ! * ! */ ! static void ! breakobj(obj, x, y, heros_fault, from_invent) ! struct obj *obj; ! xchar x, y; /* object location (ox, oy may not be right) */ ! boolean heros_fault; ! boolean from_invent; ! { switch (obj->oclass == POTION_CLASS ? POT_WATER : obj->otyp) { case MIRROR: ! if (heros_fault) change_luck(-2); ! break; case POT_WATER: /* really, all potions */ if (obj->oclass == POTION_CLASS) { if (obj->otyp == POT_OIL && obj->lamplit) splatter_burning_oil(x,y); else if (distu(x,y) <= 2) { ! /* [what about "familiar odor" when known?] */ ! if (obj->otyp != POT_WATER) ! You("smell a peculiar odor..."); potionbreathe(obj); } /* monster breathing isn't handled... [yet?] */ } break; case EGG: ! if (heros_fault) { if (obj->spe && obj->corpsenm >= LOW_PM) if (obj->quan < 5) change_luck((schar) -(obj->quan)); else change_luck(-5); } break; } ! if (heros_fault) { ! if (from_invent) { if (*u.ushops) ! check_shop_obj(obj, x, y, TRUE); ! } else if (!obj->no_charge && costly_spot(x, y)) { /* it is assumed that the obj is a floor-object */ char *o_shop = in_rooms(x, y, SHOPBASE); struct monst *shkp = shop_keeper(*o_shop); *************** *** 826,845 **** if (shkp) { /* (implies *o_shop != '\0') */ static NEARDATA long lastmovetime = 0L; static NEARDATA boolean peaceful_shk = FALSE; ! /* We want to base shk actions on her peacefulness ! at start of this turn, so that "simultaneous" ! multiple breakage isn't drastically worse than ! single breakage. (ought to be done via ESHK) */ ! if (moves != lastmovetime) peaceful_shk = shkp->mpeaceful; if (stolen_value(obj, x, y, peaceful_shk, FALSE) > 0L && (*o_shop != u.ushops[0] || !inside_shop(u.ux, u.uy)) && moves != lastmovetime) make_angry_shk(shkp, x, y); lastmovetime = moves; } } - delobj(obj); ! return 1; } /* --- 926,1006 ---- if (shkp) { /* (implies *o_shop != '\0') */ static NEARDATA long lastmovetime = 0L; static NEARDATA boolean peaceful_shk = FALSE; ! /* We want to base shk actions on her peacefulness ! at start of this turn, so that "simultaneous" ! multiple breakage isn't drastically worse than ! single breakage. (ought to be done via ESHK) */ ! if (moves != lastmovetime) ! peaceful_shk = shkp->mpeaceful; if (stolen_value(obj, x, y, peaceful_shk, FALSE) > 0L && (*o_shop != u.ushops[0] || !inside_shop(u.ux, u.uy)) && moves != lastmovetime) make_angry_shk(shkp, x, y); lastmovetime = moves; } + } } delobj(obj); ! } ! ! /* ! * Check to see if obj is going to break, but don't actually break it. ! * Return 0 if the object isn't going to break, 1 if it is. ! */ ! static boolean ! breaktest(obj) ! struct obj *obj; ! { ! if (obj_resists(obj, 1, 100)) return 0; ! switch (obj->oclass == POTION_CLASS ? POT_WATER : obj->otyp) { ! case MIRROR: ! case CRYSTAL_BALL: ! #ifdef TOURIST ! case EXPENSIVE_CAMERA: ! #endif ! case POT_WATER: /* really, all potions */ ! case EGG: ! case CREAM_PIE: ! case ACID_VENOM: ! case BLINDING_VENOM: ! return 1; ! default: ! return 0; ! } ! } ! ! static void ! breakmsg(obj, in_view) ! struct obj *obj; ! boolean in_view; ! { ! const char *to_pieces; ! ! to_pieces = ""; ! switch (obj->oclass == POTION_CLASS ? POT_WATER : obj->otyp) { ! case MIRROR: ! case CRYSTAL_BALL: ! #ifdef TOURIST ! case EXPENSIVE_CAMERA: ! #endif ! to_pieces = " into a thousand pieces"; ! /*FALLTHRU*/ ! case POT_WATER: /* really, all potions */ ! if (!in_view) ! You_hear("%s shatter!", something); ! else ! pline("%s shatters%s!", Doname2(obj), to_pieces); ! break; ! case EGG: ! pline("Splat!"); ! break; ! case CREAM_PIE: ! if (in_view) pline("What a mess!"); ! break; ! case ACID_VENOM: ! case BLINDING_VENOM: ! pline("Splash!"); ! break; ! } } /* *** Old/src/drawing.c Tue May 28 17:26:48 1996 --- src/drawing.c Fri Apr 19 13:34:24 1996 *************** *** 155,161 **** }; /* The explanations below are also used when the user gives a string ! * for blessed genocide, so no text should wholy contain any later * text. They should also always contain obvious names (eg. cat/feline). */ const char *monexplain[MAXMCLASSES] = { --- 155,161 ---- }; /* The explanations below are also used when the user gives a string ! * for blessed genocide, so no text should wholly contain any later * text. They should also always contain obvious names (eg. cat/feline). */ const char *monexplain[MAXMCLASSES] = { *** Old/src/dungeon.c Tue May 28 17:26:51 1996 --- src/dungeon.c Sat May 18 11:50:49 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dungeon.c 3.2 96/03/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dungeon.c 3.2 96/05/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 620,626 **** register s_level *x; struct proto_dungeon pd; struct level_map *lev_map; ! long vers_info[3]; pd.n_levs = pd.n_brs = 0; --- 620,626 ---- register s_level *x; struct proto_dungeon pd; struct level_map *lev_map; ! unsigned long vers_info[4]; pd.n_levs = pd.n_brs = 0; *** Old/src/eat.c Tue May 28 17:26:55 1996 --- src/eat.c Tue May 14 15:35:37 1996 *************** *** 170,183 **** register struct obj *food; { /* only happens if you were satiated */ ! if(u.uhs != SATIATED) return; ! ! if (Role_is('K') && u.ualign.type == A_LAWFUL) ! adjalign(-1); /* gluttony is unchivalrous */ exercise(A_CON, FALSE); if (Breathless || (!Strangled && !rn2(20))) { You("stuff yourself and then vomit voluminously."); morehungry(1000); /* you just got *very* sick! */ vomit(); --- 170,191 ---- register struct obj *food; { /* only happens if you were satiated */ ! if (u.uhs != SATIATED) { ! if (food->otyp != AMULET_OF_STRANGULATION) ! return; ! } else { ! if (Role_is('K') && u.ualign.type == A_LAWFUL) ! adjalign(-1); /* gluttony is unchivalrous */ ! } exercise(A_CON, FALSE); if (Breathless || (!Strangled && !rn2(20))) { + /* choking by eating AoS doesn't involve stuffing yourself */ + if (food->otyp == AMULET_OF_STRANGULATION) { + You("choke, but recover your composure."); + return; + } You("stuff yourself and then vomit voluminously."); morehungry(1000); /* you just got *very* sick! */ vomit(); *** Old/src/end.c Tue May 28 17:27:00 1996 --- src/end.c Tue May 28 10:47:20 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)end.c 3.2 95/11/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)end.c 3.2 96/05/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 541,546 **** --- 541,554 ---- killer is declared a (const char *) */ if (u.uhave.amulet) Strcat(kilbuf, " (with the Amulet)"); + else if (how == ESCAPED) { + if (Is_astralevel(&u.uz)) /* offered Amulet to wrong deity */ + Strcat(kilbuf, " (in celestial disgrace)"); + else if (carrying(FAKE_AMULET_OF_YENDOR)) + Strcat(kilbuf, " (with a fake Amulet)"); + /* don't bother counting to see whether it should be plural */ + } + if (!done_stopprint) { Sprintf(pbuf, "%s %s the %s...", Role_is('S') ? "Sayonara" : *************** *** 711,720 **** terminate(status) int status; { #ifdef MAC getreturn("to exit"); #endif - /* don't bother to try to release memory if we're in panic mode, to avoid trouble in case that happens to be due to memory problems */ if (!program_state.panicking) { --- 719,733 ---- terminate(status) int status; { + #ifdef __beos__ + extern void nethack_exit(int); + #else + # define nethack_exit exit + #endif + #ifdef MAC getreturn("to exit"); #endif /* don't bother to try to release memory if we're in panic mode, to avoid trouble in case that happens to be due to memory problems */ if (!program_state.panicking) { *************** *** 722,728 **** dlb_cleanup(); } ! exit(status); } static void --- 735,741 ---- dlb_cleanup(); } ! nethack_exit(status); } static void *** Old/src/engrave.c Tue May 28 17:27:03 1996 --- src/engrave.c Fri May 3 14:22:43 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)engrave.c 3.2 96/03/11 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)engrave.c 3.2 96/04/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 8,15 **** STATIC_VAR NEARDATA struct engr *head_engr; - STATIC_DCL void FDECL(del_engr, (struct engr *)); - #ifdef OVLB /* random engravings */ static const char *random_mesg[] = { --- 8,13 ---- *************** *** 1018,1024 **** if (post_engr_text[0]) pline(post_engr_text); ! if (doblind) { You("are blinded by the flash!"); make_blinded((long)rnd(50),FALSE); } --- 1016,1022 ---- if (post_engr_text[0]) pline(post_engr_text); ! if (doblind && !resists_blnd(&youmonst)) { You("are blinded by the flash!"); make_blinded((long)rnd(50),FALSE); } *************** *** 1073,1079 **** } } ! STATIC_OVL void del_engr(ep) register struct engr *ep; { --- 1071,1077 ---- } } ! void del_engr(ep) register struct engr *ep; { *** Old/src/explode.c Tue May 28 17:27:09 1996 --- src/explode.c Tue May 14 15:46:03 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)explode.c 3.2 96/01/06 */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)explode.c 3.2 96/05/01 */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 355,361 **** } else if ((scflags & MAY_DESTROY) && (!rn2(10) || (objects[otmp->otyp].oc_material == GLASS || otmp->otyp == EGG))) { ! if (breaks(otmp, sx, sy, FALSE)) used_up = TRUE; } if (!used_up) { --- 355,361 ---- } else if ((scflags & MAY_DESTROY) && (!rn2(10) || (objects[otmp->otyp].oc_material == GLASS || otmp->otyp == EGG))) { ! if (breaks(otmp, (xchar)sx, (xchar)sy)) used_up = TRUE; } if (!used_up) { *************** *** 411,420 **** if (multi) nomul(0); hitvalu = 8 + stmp->obj->spe; if (bigmonst(uasmon)) hitvalu++; hitu = thitu(hitvalu, ! dmgval(stmp->obj, &youmonst), ! stmp->obj, ! xname(stmp->obj)); if (hitu) { stmp->range -= 3; stop_occupation(); --- 411,424 ---- if (multi) nomul(0); hitvalu = 8 + stmp->obj->spe; if (bigmonst(uasmon)) hitvalu++; + /* could just use doname all the time, + * except thitu adds "an" to the front + */ hitu = thitu(hitvalu, ! dmgval(stmp->obj, &youmonst), ! stmp->obj, ! (stmp->obj->quan>1) ? doname(stmp->obj) ! : xname(stmp->obj)); if (hitu) { stmp->range -= 3; stop_occupation(); *** Old/src/extralev.c Tue May 28 17:27:12 1996 --- src/extralev.c Fri May 3 15:26:14 1996 *************** *** 296,302 **** if (!nroom) return; /* Should never happen */ croom = &rooms[rn2(nroom)]; x = somex(croom); y = somey(croom); ! if (!(ghost = makemon(&mons[PM_GHOST], x, y))) return; ghost->msleep = 1; Strcpy((char *)ghost->mextra, roguename()); --- 296,302 ---- if (!nroom) return; /* Should never happen */ croom = &rooms[rn2(nroom)]; x = somex(croom); y = somey(croom); ! if (!(ghost = makemon(&mons[PM_GHOST], x, y, NO_MM_FLAGS))) return; ghost->msleep = 1; Strcpy((char *)ghost->mextra, roguename()); *** Old/src/files.c Tue May 28 17:27:15 1996 --- src/files.c Fri May 17 10:14:41 1996 *************** *** 42,48 **** # endif /* VMS */ #endif /* MFLOPPY */ ! #ifdef UNIX #define SAVESIZE (PL_NSIZ + 13) /* save/99999player.e */ #else # ifdef VMS --- 42,48 ---- # endif /* VMS */ #endif /* MFLOPPY */ ! #if defined(UNIX) || defined(__beos__) #define SAVESIZE (PL_NSIZ + 13) /* save/99999player.e */ #else # ifdef VMS *************** *** 892,899 **** #ifdef UNIX ".nethackrc"; #else ! # ifdef MAC ! "NetHack defaults"; # else "NetHack.cnf"; # endif --- 892,899 ---- #ifdef UNIX ".nethackrc"; #else ! # if defined(MAC) || defined(__beos__) ! "NetHack Defaults"; # else "NetHack.cnf"; # endif *************** *** 934,940 **** } } ! #if defined(MICRO) || defined(MAC) if ((fp = fopenp(configfile, "r")) != (FILE *)0) return(fp); #else --- 934,940 ---- } } ! #if defined(MICRO) || defined(MAC) || defined(__beos__) if ((fp = fopenp(configfile, "r")) != (FILE *)0) return(fp); #else *** Old/src/fountain.c Tue May 28 17:27:19 1996 --- src/fountain.c Fri May 3 15:26:14 1996 *************** *** 32,39 **** else You_hear("%s hissing!", something); while(num-- > 0) ! if((mtmp = makemon(&mons[PM_WATER_MOCCASIN],u.ux,u.uy)) && ! t_at(mtmp->mx, mtmp->my)) (void) mintrap(mtmp); } else pline_The("fountain bubbles furiously for a moment, then calms."); --- 32,39 ---- else You_hear("%s hissing!", something); while(num-- > 0) ! if((mtmp = makemon(&mons[PM_WATER_MOCCASIN], ! u.ux, u.uy, NO_MM_FLAGS)) && t_at(mtmp->mx, mtmp->my)) (void) mintrap(mtmp); } else pline_The("fountain bubbles furiously for a moment, then calms."); *************** *** 46,52 **** register struct monst *mtmp; if(mvitals[PM_WATER_DEMON].mvflags & G_GONE) return; ! if((mtmp = makemon(&mons[PM_WATER_DEMON],u.ux,u.uy))) { if (!Blind) You("unleash %s!", a_monnam(mtmp)); else --- 46,52 ---- register struct monst *mtmp; if(mvitals[PM_WATER_DEMON].mvflags & G_GONE) return; ! if((mtmp = makemon(&mons[PM_WATER_DEMON],u.ux,u.uy, NO_MM_FLAGS))) { if (!Blind) You("unleash %s!", a_monnam(mtmp)); else *************** *** 69,75 **** register struct monst *mtmp; if(mvitals[PM_WATER_NYMPH].mvflags & G_GONE) return; ! if((mtmp = makemon(&mons[PM_WATER_NYMPH],u.ux,u.uy))) { if (!Blind) You("attract %s!", a_monnam(mtmp)); else --- 69,75 ---- register struct monst *mtmp; if(mvitals[PM_WATER_NYMPH].mvflags & G_GONE) return; ! if((mtmp = makemon(&mons[PM_WATER_NYMPH],u.ux,u.uy, NO_MM_FLAGS))) { if (!Blind) You("attract %s!", a_monnam(mtmp)); else *************** *** 474,480 **** case 3: if (mvitals[PM_SEWER_RAT].mvflags & G_GONE) pline_The("sink seems quite dirty."); else { ! mtmp = makemon(&mons[PM_SEWER_RAT], u.ux, u.uy); pline("Eek! There's %s in the sink!", Blind ? "something squirmy" : a_monnam(mtmp)); --- 474,481 ---- case 3: if (mvitals[PM_SEWER_RAT].mvflags & G_GONE) pline_The("sink seems quite dirty."); else { ! mtmp = makemon(&mons[PM_SEWER_RAT], ! u.ux, u.uy, NO_MM_FLAGS); pline("Eek! There's %s in the sink!", Blind ? "something squirmy" : a_monnam(mtmp)); *************** *** 509,515 **** break; case 7: pline_The("water moves as though of its own will!"); if ((mvitals[PM_WATER_ELEMENTAL].mvflags & G_GONE) ! || !makemon(&mons[PM_WATER_ELEMENTAL], u.ux, u.uy)) pline("But it quiets down."); break; case 8: pline("Yuk, this water tastes awful."); --- 510,517 ---- break; case 7: pline_The("water moves as though of its own will!"); if ((mvitals[PM_WATER_ELEMENTAL].mvflags & G_GONE) ! || !makemon(&mons[PM_WATER_ELEMENTAL], ! u.ux, u.uy, NO_MM_FLAGS)) pline("But it quiets down."); break; case 8: pline("Yuk, this water tastes awful."); *** Old/src/hack.c Tue May 28 17:27:21 1996 --- src/hack.c Fri Apr 26 15:50:35 1996 *************** *** 889,906 **** newsym(u.ux0,u.uy0); /* Since the hero has moved, adjust what can be seen/unseen. */ vision_recalc(1); /* Do the work now in the recover time. */ ! ! /* a special clue-msg when on the Invocation position */ ! if(invocation_pos(u.ux, u.uy) && !On_stairs(u.ux, u.uy)) { ! struct obj *otmp = carrying(CANDELABRUM_OF_INVOCATION); ! ! You_feel("a strange vibration under your %s.", ! makeplural(body_part(FOOT))); ! if (otmp && otmp->spe == 7 && otmp->lamplit) ! pline("%s %s!", The(xname(otmp)), ! Blind ? "throbs palpably" : ! "glows with a strange light"); ! } } if (Punished) /* put back ball and chain */ --- 889,895 ---- newsym(u.ux0,u.uy0); /* Since the hero has moved, adjust what can be seen/unseen. */ vision_recalc(1); /* Do the work now in the recover time. */ ! invocation_message(); } if (Punished) /* put back ball and chain */ *************** *** 916,921 **** --- 905,925 ---- } } + void + invocation_message() + { + /* a special clue-msg when on the Invocation position */ + if(invocation_pos(u.ux, u.uy) && !On_stairs(u.ux, u.uy)) { + struct obj *otmp = carrying(CANDELABRUM_OF_INVOCATION); + + You_feel("a strange vibration under your %s.", + makeplural(body_part(FOOT))); + if (otmp && otmp->spe == 7 && otmp->lamplit) + pline("%s %s!", The(xname(otmp)), + Blind ? "throbs palpably" : "glows with a strange light"); + } + } + #endif /* OVL3 */ #ifdef OVL2 *************** *** 1262,1268 **** return(1); } if(is_pool(u.ux, u.uy)) { ! if (Wwalking || is_flyer(uasmon) || is_clinger(uasmon)) { You("cannot dive into the water to pick things up."); return(1); } else if (!Underwater) { --- 1266,1273 ---- return(1); } if(is_pool(u.ux, u.uy)) { ! if (Wwalking || is_floater(uasmon) || is_clinger(uasmon) ! || (is_flyer(uasmon) && !Breathless)) { You("cannot dive into the water to pick things up."); return(1); } else if (!Underwater) { *************** *** 1451,1457 **** { multi = 0; /* caller will usually have done this already */ if (msg_override) nomovemsg = msg_override; ! else if (!nomovemsg) nomovemsg = "You can move again."; if (*nomovemsg) pline(nomovemsg); nomovemsg = 0; u.usleep = 0; --- 1456,1462 ---- { multi = 0; /* caller will usually have done this already */ if (msg_override) nomovemsg = msg_override; ! else if (!nomovemsg) nomovemsg = You_can_move_again; if (*nomovemsg) pline(nomovemsg); nomovemsg = 0; u.usleep = 0; *** Old/src/hacklib.c Tue May 28 17:27:26 1996 --- src/hacklib.c Mon May 6 17:06:23 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)hacklib.c 3.2 95/08/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Robert Patrick Rankin, 1991 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)hacklib.c 3.2 96/05/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Robert Patrick Rankin, 1991 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 15,20 **** --- 15,21 ---- char highc (char) char lowc (char) char * lcase (char *) + char * mungspaces (char *) char * eos (char *) char * s_suffix (const char *) char * xcrypt (const char *, char *) *************** *** 88,93 **** --- 89,113 ---- if ('A' <= *p && *p <= 'Z') *p |= 040; return s; } + + /* remove excess whitespace from a string buffer (in place) */ + char * + mungspaces(bp) + char *bp; + { + register char c, *p, *p2; + boolean was_space = TRUE; + + for (p = p2 = bp; (c = *p) != '\0'; p++) { + if (c == '\t') c = ' '; + if (c != ' ' || !was_space) *p2++ = c; + was_space = (c == ' '); + } + if (was_space && p2 > bp) p2--; + *p2 = '\0'; + return bp; + } + #endif /* OVLB */ #ifdef OVL0 *** Old/src/invent.c Tue May 28 17:27:29 1996 --- src/invent.c Tue May 14 18:50:40 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)invent.c 3.2 96/03/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)invent.c 3.2 96/05/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 190,212 **** flags.botl = 1; return obj; } else if (obj->otyp == AMULET_OF_YENDOR) { ! if (u.uhave.amulet) impossible ("already have amulet?"); u.uhave.amulet = 1; } else if (obj->otyp == CANDELABRUM_OF_INVOCATION) { ! if (u.uhave.menorah) impossible ("already have candelabrum?"); u.uhave.menorah = 1; } else if (obj->otyp == BELL_OF_OPENING) { ! if (u.uhave.bell) impossible ("already have silver bell?"); u.uhave.bell = 1; } else if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { ! if (u.uhave.book) impossible ("already have the book?"); u.uhave.book = 1; ! } else if (is_quest_artifact(obj)) { ! if (u.uhave.questart) impossible ("already have the artifact?"); ! u.uhave.questart = 1; ! artitouch(); ! set_artifact_intrinsic(obj, 1, W_ART); ! } else if(obj->oartifact) { set_artifact_intrinsic(obj, 1, W_ART); } /* merge if possible; find end of chain in the process */ --- 190,213 ---- flags.botl = 1; return obj; } else if (obj->otyp == AMULET_OF_YENDOR) { ! if (u.uhave.amulet) impossible("already have amulet?"); u.uhave.amulet = 1; } else if (obj->otyp == CANDELABRUM_OF_INVOCATION) { ! if (u.uhave.menorah) impossible("already have candelabrum?"); u.uhave.menorah = 1; } else if (obj->otyp == BELL_OF_OPENING) { ! if (u.uhave.bell) impossible("already have silver bell?"); u.uhave.bell = 1; } else if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { ! if (u.uhave.book) impossible("already have the book?"); u.uhave.book = 1; ! } else if (obj->oartifact) { ! if (is_quest_artifact(obj)) { ! if (u.uhave.questart) ! impossible("already have quest artifact?"); ! u.uhave.questart = 1; ! artitouch(); ! } set_artifact_intrinsic(obj, 1, W_ART); } /* merge if possible; find end of chain in the process */ *************** *** 228,235 **** obj->where = OBJ_INVENT; added: ! if (obj->otyp == LUCKSTONE ! || (obj->oartifact && spec_ability(obj, SPFX_LUCK))) { /* new luckstone must be in inventory by this point * for correct calculation */ set_moreluck(); --- 229,236 ---- obj->where = OBJ_INVENT; added: ! if (obj->otyp == LUCKSTONE || ! (obj->oartifact && spec_ability(obj, SPFX_LUCK))) { /* new luckstone must be in inventory by this point * for correct calculation */ set_moreluck(); *************** *** 315,341 **** flags.botl = 1; return; } else if (obj->otyp == AMULET_OF_YENDOR) { ! if (!u.uhave.amulet) impossible ("don't have amulet?"); u.uhave.amulet = 0; } else if (obj->otyp == CANDELABRUM_OF_INVOCATION) { ! if (!u.uhave.menorah) impossible ("don't have candelabrum?"); u.uhave.menorah = 0; } else if (obj->otyp == BELL_OF_OPENING) { ! if (!u.uhave.bell) impossible ("don't have silver bell?"); u.uhave.bell = 0; } else if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { ! if (!u.uhave.book) impossible ("don't have the book?"); u.uhave.book = 0; - } else if (is_quest_artifact(obj)) { - if(!u.uhave.questart) impossible ("don't have the artifact?"); - u.uhave.questart = 0; - set_artifact_intrinsic(obj, 0, W_ART); } else if (obj->oartifact) { set_artifact_intrinsic(obj, 0, W_ART); ! } else if (obj->otyp == LOADSTONE) { curse(obj); ! } else if (obj->otyp == LUCKSTONE ! || (obj->oartifact && spec_ability(obj, SPFX_LUCK))) { set_moreluck(); flags.botl = 1; } --- 316,345 ---- flags.botl = 1; return; } else if (obj->otyp == AMULET_OF_YENDOR) { ! if (!u.uhave.amulet) impossible("don't have amulet?"); u.uhave.amulet = 0; } else if (obj->otyp == CANDELABRUM_OF_INVOCATION) { ! if (!u.uhave.menorah) impossible("don't have candelabrum?"); u.uhave.menorah = 0; } else if (obj->otyp == BELL_OF_OPENING) { ! if (!u.uhave.bell) impossible("don't have silver bell?"); u.uhave.bell = 0; } else if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { ! if (!u.uhave.book) impossible("don't have the book?"); u.uhave.book = 0; } else if (obj->oartifact) { + if (is_quest_artifact(obj)) { + if (!u.uhave.questart) + impossible("don't have quest artifact?"); + u.uhave.questart = 0; + } set_artifact_intrinsic(obj, 0, W_ART); ! } ! ! if (obj->otyp == LOADSTONE) { curse(obj); ! } else if (obj->otyp == LUCKSTONE || ! (obj->oartifact && spec_ability(obj, SPFX_LUCK))) { set_moreluck(); flags.botl = 1; } *************** *** 869,877 **** word, ilets); getlin(qbuf, buf); if (buf[0] == '\033') return(0); ! if (index(buf, 'i')) ! (void) display_inventory((char *)0, FALSE); ! else break; } --- 873,881 ---- word, ilets); getlin(qbuf, buf); if (buf[0] == '\033') return(0); ! if (index(buf, 'i')) { ! if (display_inventory((char *)0, TRUE) == '\033') return 0; ! } else break; } *************** *** 1311,1323 **** if (!flags.sortpack || otmp->oclass == *invlet) { if (flags.sortpack && !classcount) { any.a_void = 0; /* zero */ ! add_menu(win, NO_GLYPH, &any, 0, ATR_INVERSE, let_to_name(*invlet, FALSE), MENU_UNSELECTED); classcount++; } any.a_char = ilet; add_menu(win, obj_to_glyph(otmp), ! &any, ilet, ATR_NONE, doname(otmp), MENU_UNSELECTED); } } --- 1315,1327 ---- if (!flags.sortpack || otmp->oclass == *invlet) { if (flags.sortpack && !classcount) { any.a_void = 0; /* zero */ ! add_menu(win, NO_GLYPH, &any, 0, 0, ATR_INVERSE, let_to_name(*invlet, FALSE), MENU_UNSELECTED); classcount++; } any.a_char = ilet; add_menu(win, obj_to_glyph(otmp), ! &any, ilet, 0, ATR_NONE, doname(otmp), MENU_UNSELECTED); } } *************** *** 1745,1752 **** return(FALSE); if (obj->otyp == CORPSE || obj->otyp == EGG || obj->otyp == TIN) { ! if((obj->corpsenm != otmp->corpsenm) || ! (ONAME(obj) && strcmp(ONAME(obj), ONAME(otmp)))) return FALSE; } --- 1749,1755 ---- return(FALSE); if (obj->otyp == CORPSE || obj->otyp == EGG || obj->otyp == TIN) { ! if (obj->corpsenm != otmp->corpsenm) return FALSE; } *************** *** 1769,1775 **** if (obj->unpaid && !same_price(obj, otmp)) return FALSE; ! /* if they have names, make sure they're the same */ if ( (obj->onamelth != otmp->onamelth && ((obj->onamelth && otmp->onamelth) || obj->otyp == CORPSE) ) || --- 1772,1778 ---- if (obj->unpaid && !same_price(obj, otmp)) return FALSE; ! /* if they have names, make sure they're the same */ if ( (obj->onamelth != otmp->onamelth && ((obj->onamelth && otmp->onamelth) || obj->otyp == CORPSE) ) || *************** *** 1777,1782 **** --- 1780,1788 ---- strncmp(ONAME(obj), ONAME(otmp), (int)obj->onamelth))) return FALSE; + /* for the moment, any additional information is incompatible */ + if (obj->oxlth || otmp->oxlth) return FALSE; + if(obj->oartifact != otmp->oartifact) return FALSE; if(obj->known == otmp->known || *************** *** 2078,2086 **** any.a_void = 0; win = create_nhwindow(NHW_MENU); start_menu(win); ! add_menu(win, NO_GLYPH, &any, 0, ATR_INVERSE, hdr, MENU_UNSELECTED); ! add_menu(win, NO_GLYPH, &any, 0, ATR_NONE, "", MENU_UNSELECTED); ! add_menu(win, NO_GLYPH, &any, 0, ATR_NONE, txt, MENU_UNSELECTED); end_menu(win, (char *)0); if (select_menu(win, PICK_NONE, &selected) > 0) free((genericptr_t)selected); --- 2084,2092 ---- any.a_void = 0; win = create_nhwindow(NHW_MENU); start_menu(win); ! add_menu(win, NO_GLYPH, &any, 0, 0, ATR_INVERSE, hdr, MENU_UNSELECTED); ! add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED); ! add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, txt, MENU_UNSELECTED); end_menu(win, (char *)0); if (select_menu(win, PICK_NONE, &selected) > 0) free((genericptr_t)selected); *** Old/src/lock.c Tue May 28 17:27:39 1996 --- src/lock.c Fri May 3 10:31:45 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)lock.c 3.2 95/10/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)lock.c 3.2 96/04/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 718,731 **** const char *quickly_dissipates = "quickly dissipates"; if (door->typ == SDOOR) { ! if (otmp->otyp == WAN_OPENING || otmp->otyp == SPE_KNOCK) { door->typ = DOOR; door->doormask = D_CLOSED | (door->doormask & D_TRAPPED); - if (cansee(x,y)) pline("A door appears in the wall!"); newsym(x,y); ! return TRUE; ! } else return FALSE; } switch(otmp->otyp) { --- 718,740 ---- const char *quickly_dissipates = "quickly dissipates"; if (door->typ == SDOOR) { ! switch (otmp->otyp) { ! case WAN_OPENING: ! case SPE_KNOCK: ! case WAN_STRIKING: ! case SPE_FORCE_BOLT: door->typ = DOOR; door->doormask = D_CLOSED | (door->doormask & D_TRAPPED); newsym(x,y); ! if (cansee(x,y)) pline("A door appears in the wall!"); ! if (otmp->otyp == WAN_OPENING || otmp->otyp == SPE_KNOCK) ! return TRUE; ! break; /* striking: continue door handling below */ ! case WAN_LOCKING: ! case SPE_WIZARD_LOCK: ! default: return FALSE; + } } switch(otmp->otyp) { *** Old/src/mail.c Tue May 28 17:27:43 1996 --- src/mail.c Tue May 28 10:46:56 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mail.c 3.2 95/07/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mail.c 3.2 96/05/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 370,376 **** if (!md_start(&start) || !md_stop(&stop,&start)) goto give_up; /* Make the daemon. Have it rush towards the hero. */ ! if (!(md = makemon(&mons[PM_MAIL_DAEMON], start.x, start.y))) goto give_up; if (!md_rush(md, stop.x, stop.y)) goto go_back; message_seen = TRUE; --- 370,377 ---- if (!md_start(&start) || !md_stop(&stop,&start)) goto give_up; /* Make the daemon. Have it rush towards the hero. */ ! if (!(md = makemon(&mons[PM_MAIL_DAEMON], start.x, start.y, NO_MM_FLAGS))) ! goto give_up; if (!md_rush(md, stop.x, stop.y)) goto go_back; message_seen = TRUE; *************** *** 433,439 **** { char *junk[]={ "Please disregard previous letter.", ! "Welcome to NetHack 3.2!", #ifdef AMIGA "Only Amiga makes it possible.", "CATS have all the answers.", --- 434,440 ---- { char *junk[]={ "Please disregard previous letter.", ! "Welcome to NetHack 3.2.1!", #ifdef AMIGA "Only Amiga makes it possible.", "CATS have all the answers.", *** Old/src/makemon.c Tue May 28 17:27:46 1996 --- src/makemon.c Tue May 21 12:39:40 1996 *************** *** 77,86 **** --- 77,116 ---- coord mm; register int cnt = rnd(n); struct monst *mon; + #if defined(__GNUC__) && (defined(HPUX) || defined(DGUX)) + /* There is an unresolved problem with several people finding that + * the game hangs eating CPU; if interrupted and restored, the level + * will be filled with monsters. Of those reports giving system type, + * there were two DG/UX and two HP-UX, all using gcc as the compiler. + * hcroft@hpopb1.cern.ch, using gcc 2.6.3 on HP-UX, says that the + * problem went away for him and another reporter-to-newsgroup + * after adding this debugging code. This has almost got to be a + * compiler bug, but until somebody tracks it down and gets it fixed, + * might as well go with the "but it went away when I tried to find + * it" code. + */ + int cnttmp,cntdiv; + cnttmp = cnt; + # ifdef DEBUG + pline("init group call x=%d,y=%d,n=%d,cnt=%d.", x, y, n, cnt); + # endif + cntdiv = ((u.ulevel < 3) ? 4 : (u.ulevel < 5) ? 2 : 1); + #endif /* Tuning: cut down on swarming at low character levels [mrs] */ cnt /= (u.ulevel < 3) ? 4 : (u.ulevel < 5) ? 2 : 1; + #if defined(__GNUC__) && (defined(HPUX) || defined(DGUX)) + if (cnt != (cnttmp/cntdiv)) { + pline("cnt=%d using %d, cnttmp=%d, cntdiv=%d", cnt, + (u.ulevel < 3) ? 4 : (u.ulevel < 5) ? 2 : 1, + cnttmp, cntdiv); + } + #endif if(!cnt) cnt++; + #if defined(__GNUC__) && (defined(HPUX) || defined(DGUX)) + if (cnt < 0) cnt = 1; + if (cnt > 10) cnt = 10; + #endif mm.x = x; mm.y = y; *************** *** 92,98 **** * smaller group. */ if (enexto(&mm, mm.x, mm.y, mtmp->data)) { ! mon = makemon(mtmp->data, mm.x, mm.y); mon->mpeaceful = FALSE; set_malign(mon); /* Undo the second peace_minded() check in makemon(); if the --- 122,128 ---- * smaller group. */ if (enexto(&mm, mm.x, mm.y, mtmp->data)) { ! mon = makemon(mtmp->data, mm.x, mm.y, NO_MM_FLAGS); mon->mpeaceful = FALSE; set_malign(mon); /* Undo the second peace_minded() check in makemon(); if the *************** *** 634,648 **** * In case we make a monster group, only return the one at [x,y]. */ struct monst * ! makemon(ptr, x, y) register struct permonst *ptr; register int x, y; { register struct monst *mtmp; register int mndx, ct; boolean anymon = (!ptr); boolean byyou = (x == u.ux && y == u.uy); ! /* if caller wants random location, do it here */ if(x == 0 && y == 0) { int tryct = 0; /* careful with bigrooms */ --- 664,680 ---- * In case we make a monster group, only return the one at [x,y]. */ struct monst * ! makemon(ptr, x, y, mmflags) register struct permonst *ptr; register int x, y; + register int mmflags; { register struct monst *mtmp; register int mndx, ct; boolean anymon = (!ptr); boolean byyou = (x == u.ux && y == u.uy); ! boolean allow_minvent = ((mmflags & NO_MINVENT) == 0); ! /* if caller wants random location, do it here */ if(x == 0 && y == 0) { int tryct = 0; /* careful with bigrooms */ *************** *** 844,854 **** } } ! if(is_armed(ptr)) m_initweap(mtmp); /* equip with weapons / armor */ ! m_initinv(mtmp); /* add on a few special items incl. more armor */ ! m_dowear(mtmp, TRUE); ! if (ptr->mflags3 & M3_WAITMASK) { if (ptr->mflags3 & M3_WAITFORU) mtmp->mstrategy |= STRAT_WAITFORU; --- 876,891 ---- } } ! if (allow_minvent) { ! if(is_armed(ptr)) m_initweap(mtmp); /* equip with weapons / armor */ ! m_initinv(mtmp); /* add on a few special items incl. more armor */ ! m_dowear(mtmp, TRUE); ! } else if (mtmp->minvent) { /* sanity check */ ! impossible("makemon: non-null minvent despite NO_MINVENT flag."); ! discard_minvent(mtmp); ! mtmp->minvent = (struct obj *)0; /* caller expects this */ ! } if (ptr->mflags3 & M3_WAITMASK) { if (ptr->mflags3 & M3_WAITFORU) mtmp->mstrategy |= STRAT_WAITFORU; *************** *** 893,899 **** if (!mptr && u.uinwater && enexto(&c, x, y, &mons[PM_GIANT_EEL])) x = c.x, y = c.y; ! mon = makemon(mptr, x, y); if (mon && canspotmon(mon)) known = TRUE; } return known; --- 930,936 ---- if (!mptr && u.uinwater && enexto(&c, x, y, &mons[PM_GIANT_EEL])) x = c.x, y = c.y; ! mon = makemon(mptr, x, y, NO_MM_FLAGS); if (mon && canspotmon(mon)) known = TRUE; } return known; *************** *** 1195,1200 **** --- 1232,1238 ---- have both little and big forms */ oldtype = monsndx(ptr); newtype = little_to_big(oldtype); + if (newtype == PM_PRIEST && mtmp->female) newtype = PM_PRIESTESS; if ((int)++mtmp->m_lev >= mons[newtype].mlevel && newtype != oldtype) { ptr = &mons[newtype]; if (mvitals[newtype].mvflags & G_GENOD) { /* allow G_EXTINCT */ *** Old/src/mcastu.c Tue May 28 17:27:50 1996 --- src/mcastu.c Fri May 3 15:26:15 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mcastu.c 3.2 95/08/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mcastu.c 3.2 96/05/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 255,261 **** for (i = 0; i <= (int) mtmp->m_lev; i++) if ((pm = mkclass(let,0)) && ! (mtmp2 = makemon(pm, u.ux, u.uy))) { mtmp2->msleep = mtmp2->mpeaceful = mtmp2->mtame = 0; set_malign(mtmp2); --- 255,261 ---- for (i = 0; i <= (int) mtmp->m_lev; i++) if ((pm = mkclass(let,0)) && ! (mtmp2 = makemon(pm, u.ux, u.uy, NO_MM_FLAGS))) { mtmp2->msleep = mtmp2->mpeaceful = mtmp2->mtame = 0; set_malign(mtmp2); *************** *** 265,270 **** --- 265,271 ---- break; case 6: case 7: /* blindness */ + /* note: resists_blnd() doesn't apply here */ if (!Blinded) { pline("Scales cover your eyes!"); make_blinded(Half_spell_damage ? 100L:200L, FALSE); *** Old/src/mhitm.c Tue May 28 17:27:53 1996 --- src/mhitm.c Fri May 3 14:22:45 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mhitm.c 3.2 96/04/08 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mhitm.c 3.2 96/04/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 702,711 **** } break; case AD_BLND: ! if (!magr->mcan && haseyes(pd)) { register unsigned rnd_tmp; ! if (vis && mdef->mcansee) pline("%s is blinded.", Monnam(mdef)); rnd_tmp = d((int)mattk->damn, (int)mattk->damd); if ((rnd_tmp += mdef->mblinded) > 127) rnd_tmp = 127; --- 702,711 ---- } break; case AD_BLND: ! if (!magr->mcan && !resists_blnd(mdef)) { register unsigned rnd_tmp; ! if (vis) pline("%s is blinded.", Monnam(mdef)); rnd_tmp = d((int)mattk->damn, (int)mattk->damd); if ((rnd_tmp += mdef->mblinded) > 127) rnd_tmp = 127; *************** *** 901,908 **** shieldeff(mon->mx, mon->my); } else if (mon->mcanmove) { amt += (int) mon->mfrozen; ! mon->mcanmove = 0; ! mon->mfrozen = min(amt, 127); return 1; } return 0; --- 901,912 ---- shieldeff(mon->mx, mon->my); } else if (mon->mcanmove) { amt += (int) mon->mfrozen; ! if (amt > 0) { /* sleep for N turns */ ! mon->mcanmove = 0; ! mon->mfrozen = min(amt, 127); ! } else { /* sleep until awakened */ ! mon->msleep = 1; ! } return 1; } return 0; *** Old/src/mhitu.c Tue May 28 17:27:57 1996 --- src/mhitu.c Tue May 21 11:11:41 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mhitu.c 3.2 96/01/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mhitu.c 3.2 96/05/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 9,14 **** --- 9,15 ---- STATIC_DCL void FDECL(urustm, (struct monst *, struct obj *)); # ifdef OVL1 + static boolean FDECL(u_slip_free, (struct monst *,struct attack *)); static int FDECL(passiveum, (struct permonst *,struct monst *,struct attack *)); # endif /* OVL1 */ *************** *** 458,470 **** } /* Unlike defensive stuff, don't let them use item _and_ attack. */ - /* Exception: Medusa; her gaze is automatic. (We actually kludge - * by permitting a full attack sequence, not just a gaze attack.) - */ if(find_offensive(mtmp)) { int foo = use_offensive(mtmp); ! if (mtmp->data != &mons[PM_MEDUSA] && foo != 0) return(foo==1); } for(i = 0; i < NATTK; i++) { --- 459,468 ---- } /* Unlike defensive stuff, don't let them use item _and_ attack. */ if(find_offensive(mtmp)) { int foo = use_offensive(mtmp); ! if (foo != 0) return(foo==1); } for(i = 0; i < NATTK; i++) { *************** *** 502,508 **** break; case AT_GAZE: /* can affect you either ranged or not */ ! sum[i] = gazemu(mtmp, mattk); break; case AT_EXPL: /* automatic hit if next to, and aimed at you */ --- 500,510 ---- break; case AT_GAZE: /* can affect you either ranged or not */ ! /* Medusa gaze already operated through m_respond in ! * dochug(); don't gaze more than once per round. ! */ ! if (mdat != &mons[PM_MEDUSA]) ! sum[i] = gazemu(mtmp, mattk); break; case AT_EXPL: /* automatic hit if next to, and aimed at you */ *************** *** 706,711 **** --- 708,745 ---- } } + /* check whether slippery clothing protects from hug or wrap attack */ + static boolean + u_slip_free(mtmp, mattk) + struct monst *mtmp; + struct attack *mattk; + { + struct obj *obj = (uarmc ? uarmc : uarm); + + #ifdef TOURIST + if (!obj) obj = uarmu; + #endif + /* if your cloak/armor is greased, monster slips off */ + if (obj && (obj->greased || obj->otyp == OILSKIN_CLOAK)) { + pline("%s %s your %s %s!", + Monnam(mtmp), + (mattk->adtyp == AD_WRAP) ? + "slips off of" : "grabs you, but cannot hold onto", + obj->greased ? "greased" : "slippery", + /* avoid "slippery slippery cloak" + for undiscovered oilskin cloak */ + (obj->greased || objects[obj->otyp].oc_name_known) ? + xname(obj) : "cloak"); + + if (obj->greased && !rn2(2)) { + pline_The("grease wears off."); + obj->greased = 0; + } + return TRUE; + } + return FALSE; + } + /* * hitmu: monster hits you * returns 2 if monster dies (e.g. "yellow light"), 1 otherwise *************** *** 761,766 **** --- 795,802 ---- armpro = objects[uarm->otyp].a_can; if (uarmc && armpro < objects[uarmc->otyp].a_can) armpro = objects[uarmc->otyp].a_can; + if (uarmh && armpro < objects[uarmh->otyp].a_can) + armpro = objects[uarmh->otyp].a_can; uncancelled = !mtmp->mcan && ((rn2(3) >= armpro) || !rn2(50)); /* Now, adjust damages via resistances or specific attacks */ *************** *** 768,790 **** case AD_PHYS: if (mattk->aatyp == AT_HUGS && !sticks(uasmon)) { if(!u.ustuck && rn2(2)) { ! register struct obj *obj = (uarmc ? uarmc : uarm); ! ! /* if your cloak/armor is greased, monster slips off */ ! if (obj && obj->greased) { dmg = 0; - pline("%s grabs you, but cannot hold onto your greased %s!", - Monnam(mtmp), xname(obj)); - if (!rn2(2)) { - pline_The("grease wears off."); - obj->greased = 0; - } } else { u.ustuck = mtmp; pline("%s grabs you!", Monnam(mtmp)); } } else if(u.ustuck == mtmp) { ! exercise(A_STR, FALSE); You("are being %s.", (mtmp->data == &mons[PM_ROPE_GOLEM]) ? "choked" : "crushed"); --- 804,817 ---- case AD_PHYS: if (mattk->aatyp == AT_HUGS && !sticks(uasmon)) { if(!u.ustuck && rn2(2)) { ! if (u_slip_free(mtmp, mattk)) { dmg = 0; } else { u.ustuck = mtmp; pline("%s grabs you!", Monnam(mtmp)); } } else if(u.ustuck == mtmp) { ! exercise(A_STR, FALSE); You("are being %s.", (mtmp->data == &mons[PM_ROPE_GOLEM]) ? "choked" : "crushed"); *************** *** 797,803 **** pline("%s hits you with the cockatrice corpse.", Monnam(mtmp)); if (!Stoned) ! goto do_stone; } dmg += dmgval(otmp, &youmonst); if (dmg <= 0) dmg = 1; --- 824,830 ---- pline("%s hits you with the cockatrice corpse.", Monnam(mtmp)); if (!Stoned) ! goto do_stone; } dmg += dmgval(otmp, &youmonst); if (dmg <= 0) dmg = 1; *************** *** 1030,1048 **** case AD_WRAP: if ((!mtmp->mcan || u.ustuck == mtmp) && !sticks(uasmon)) { if (!u.ustuck && !rn2(10)) { ! register struct obj *obj = (uarmc ? uarmc : uarm); ! #ifdef TOURIST ! if (!obj) obj = uarmu; ! #endif ! /* if your cloak/armor is greased, monster slips off */ ! if (obj && obj->greased) { dmg = 0; - pline("%s slips off of your greased %s!", - Monnam(mtmp), xname(obj)); - if (!rn2(2)) { - pline_The("grease wears off."); - obj->greased = 0; - } } else { pline("%s swings itself around you!", Monnam(mtmp)); --- 1057,1064 ---- case AD_WRAP: if ((!mtmp->mcan || u.ustuck == mtmp) && !sticks(uasmon)) { if (!u.ustuck && !rn2(10)) { ! if (u_slip_free(mtmp, mattk)) { dmg = 0; } else { pline("%s swings itself around you!", Monnam(mtmp)); *************** *** 1431,1437 **** } break; case AD_BLND: ! if (!defends(AD_BLND, uwep)) { if(!Blind) { You_cant("see in here!"); make_blinded((long)tmp,FALSE); --- 1447,1453 ---- } break; case AD_BLND: ! if (!resists_blnd(&youmonst)) { if(!Blind) { You_cant("see in here!"); make_blinded((long)tmp,FALSE); *************** *** 1534,1540 **** break; case AD_BLND: ! not_affected |= (u.umonnum == PM_YELLOW_LIGHT) || Blind; if (!not_affected) { /* sometimes you're affected even if it's invisible */ if (mon_visible(mtmp) || (rnd(tmp /= 2) > u.ulevel)) { --- 1550,1556 ---- break; case AD_BLND: ! not_affected = resists_blnd(&youmonst); if (!not_affected) { /* sometimes you're affected even if it's invisible */ if (mon_visible(mtmp) || (rnd(tmp /= 2) > u.ulevel)) { *************** *** 1594,1599 **** --- 1610,1617 ---- s_suffix(Monnam(mtmp)), (Reflecting & W_AMUL) ? "medallion" : "shield"); + if (mon_reflects(mtmp, "The gaze is reflected away by %s %s!")) + break; pline("%s is turned to stone!", Monnam(mtmp)); } stoned = TRUE; *************** *** 1637,1644 **** } break; case AD_BLND: ! if(!mtmp->mcan && canseemon(mtmp) && !defends(AD_BLND, uwep) && ! distu(mtmp->mx,mtmp->my) <= BOLT_LIM*BOLT_LIM) { int blnd = d((int)mattk->damn, (int)mattk->damd); make_blinded((long)blnd,FALSE); make_stunned((long)d(1,3),TRUE); --- 1655,1662 ---- } break; case AD_BLND: ! if (!mtmp->mcan && canseemon(mtmp) && !resists_blnd(&youmonst) ! && distu(mtmp->mx,mtmp->my) <= BOLT_LIM*BOLT_LIM) { int blnd = d((int)mattk->damn, (int)mattk->damd); make_blinded((long)blnd,FALSE); make_stunned((long)d(1,3),TRUE); *************** *** 2199,2205 **** if (u.mh <= 1) return(struct monst *)0; if (mvitals[mndx].mvflags & G_EXTINCT) return(struct monst *)0; uasmon->pxlth += sizeof(struct edog); ! mon = makemon(uasmon, u.ux, u.uy); uasmon->pxlth -= sizeof(struct edog); mon = christen_monst(mon, plname); initedog(mon); --- 2217,2223 ---- if (u.mh <= 1) return(struct monst *)0; if (mvitals[mndx].mvflags & G_EXTINCT) return(struct monst *)0; uasmon->pxlth += sizeof(struct edog); ! mon = makemon(uasmon, u.ux, u.uy, NO_MM_FLAGS); uasmon->pxlth -= sizeof(struct edog); mon = christen_monst(mon, plname); initedog(mon); *** Old/src/minion.c Tue May 28 17:28:04 1996 --- src/minion.c Fri May 3 15:26:17 1996 *************** *** 45,51 **** } while (cnt > 0) { ! (void)makemon(&mons[dtype], u.ux, u.uy); cnt--; } return; --- 45,51 ---- } while (cnt > 0) { ! (void)makemon(&mons[dtype], u.ux, u.uy, NO_MM_FLAGS); cnt--; } return; *************** *** 78,97 **** if (mons[mnum].pxlth == 0) { struct permonst *pm = &mons[mnum]; pm->pxlth = sizeof(struct emin); ! mon = makemon(pm, u.ux, u.uy); pm->pxlth = 0; if (mon) { mon->isminion = TRUE; EMIN(mon)->min_align = alignment; } } else if (mnum == PM_ANGEL) { ! mon = makemon(&mons[mnum], u.ux, u.uy); if (mon) { mon->isminion = TRUE; EPRI(mon)->shralign = alignment; /* always A_LAWFUL here */ } } else ! mon = makemon(&mons[mnum], u.ux, u.uy); if (mon) { if (talk) { pline_The("voice of %s booms:", align_gname(alignment)); --- 78,97 ---- if (mons[mnum].pxlth == 0) { struct permonst *pm = &mons[mnum]; pm->pxlth = sizeof(struct emin); ! mon = makemon(pm, u.ux, u.uy, NO_MM_FLAGS); pm->pxlth = 0; if (mon) { mon->isminion = TRUE; EMIN(mon)->min_align = alignment; } } else if (mnum == PM_ANGEL) { ! mon = makemon(&mons[mnum], u.ux, u.uy, NO_MM_FLAGS); if (mon) { mon->isminion = TRUE; EPRI(mon)->shralign = alignment; /* always A_LAWFUL here */ } } else ! mon = makemon(&mons[mnum], u.ux, u.uy, NO_MM_FLAGS); if (mon) { if (talk) { pline_The("voice of %s booms:", align_gname(alignment)); *** Old/src/mklev.c Tue May 28 17:28:06 1996 --- src/mklev.c Fri May 24 08:52:23 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mklev.c 3.2 96/01/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mklev.c 3.2 96/05/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 405,411 **** (mvitals[PM_GIANT_MIMIC].mvflags & G_GONE))) { /* make a mimic instead */ levl[x][y].doormask = D_NODOOR; ! mtmp = makemon(mkclass(S_MIMIC,0), x, y); if (mtmp) set_mimic_sym(mtmp); } --- 405,411 ---- (mvitals[PM_GIANT_MIMIC].mvflags & G_GONE))) { /* make a mimic instead */ levl[x][y].doormask = D_NODOOR; ! mtmp = makemon(mkclass(S_MIMIC,0), x, y, NO_MM_FLAGS); if (mtmp) set_mimic_sym(mtmp); } *************** *** 750,756 **** if(u.uhave.amulet || !rn2(3)) { x = somex(croom); y = somey(croom); ! tmonst = makemon((struct permonst *) 0, x,y); if (tmonst && tmonst->data == &mons[PM_GIANT_SPIDER] && !is_pool(x,y)) (void) maketrap (x,y,WEB); --- 750,756 ---- if(u.uhave.amulet || !rn2(3)) { x = somex(croom); y = somey(croom); ! tmonst = makemon((struct permonst *) 0, x,y,NO_MM_FLAGS); if (tmonst && tmonst->data == &mons[PM_GIANT_SPIDER] && !is_pool(x,y)) (void) maketrap (x,y,WEB); *************** *** 772,780 **** if(!rn2(60)) mkaltar(croom); /* put statues inside */ if(!rn2(20)) ! (void) mkcorpstat(STATUE, (struct permonst *)0, somex(croom), somey(croom), TRUE); - /* put box/chest inside; * 40% chance for at least 1 box, regardless of number * of rooms; about 5 - 7.5% for 2 boxes, least likely --- 772,780 ---- if(!rn2(60)) mkaltar(croom); /* put statues inside */ if(!rn2(20)) ! (void) mkcorpstat(STATUE, (struct monst *)0, ! (struct permonst *)0, somex(croom), somey(croom), TRUE); /* put box/chest inside; * 40% chance for at least 1 box, regardless of number * of rooms; about 5 - 7.5% for 2 boxes, least likely *************** *** 933,939 **** /* skip the room if already done; i.e. a shop handled out of order */ /* also skip if this is non-rectangular (it _must_ be done already) */ ! if (levl[lowx][lowy].roomno == roomno || croom->irregular) return; #ifdef SPECIALIZATION # ifdef REINCARNATION --- 933,939 ---- /* skip the room if already done; i.e. a shop handled out of order */ /* also skip if this is non-rectangular (it _must_ be done already) */ ! if ((int) levl[lowx][lowy].roomno == roomno || croom->irregular) return; #ifdef SPECIALIZATION # ifdef REINCARNATION *************** *** 1232,1238 **** } (void) maketrap(m.x, m.y, kind); ! if (kind == WEB) (void) makemon(&mons[PM_GIANT_SPIDER], m.x, m.y); } void --- 1232,1239 ---- } (void) maketrap(m.x, m.y, kind); ! if (kind == WEB) (void) makemon(&mons[PM_GIANT_SPIDER], ! m.x, m.y, NO_MM_FLAGS); } void *** Old/src/mkmap.c Tue May 28 17:28:11 1996 --- src/mkmap.c Fri May 24 08:52:24 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mkmap.c 3.2 92/07/15 */ /* Copyright (c) J. C. Collet, M. Stephenson and D. Cohrs, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mkmap.c 3.2 96/05/23 */ /* Copyright (c) J. C. Collet, M. Stephenson and D. Cohrs, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 169,177 **** schar fg_typ = levl[sx][sy].typ; /* back up to find leftmost uninitialized location */ ! while(sx > 0 ! && (anyroom ? IS_ROOM(levl[sx][sy].typ) : levl[sx][sy].typ == fg_typ) ! && levl[sx][sy].roomno != rmno) sx--; sx++; /* compensate for extra decrement */ --- 169,177 ---- schar fg_typ = levl[sx][sy].typ; /* back up to find leftmost uninitialized location */ ! while (sx > 0 && ! (anyroom ? IS_ROOM(levl[sx][sy].typ) : levl[sx][sy].typ == fg_typ) && ! (int) levl[sx][sy].roomno != rmno) sx--; sx++; /* compensate for extra decrement */ *************** *** 192,201 **** IS_DOOR(levl[ii][jj].typ))) { levl[ii][jj].edge = 1; if(lit) levl[ii][jj].lit = lit; ! if (levl[ii][jj].roomno != rmno) levl[ii][jj].roomno = SHARED; - else - levl[ii][jj].roomno = rmno; } } n_loc_filled++; --- 192,199 ---- IS_DOOR(levl[ii][jj].typ))) { levl[ii][jj].edge = 1; if(lit) levl[ii][jj].lit = lit; ! if ((int) levl[ii][jj].roomno != rmno) levl[ii][jj].roomno = SHARED; } } n_loc_filled++; *************** *** 205,238 **** if(isok(sx,sy-1)) for(i=sx; isx || isok(i-1,sy-1)) && levl[i-1][sy-1].typ == fg_typ) { ! if(levl[i-1][sy-1].roomno != rmno) flood_fill_rm(i-1,sy-1,rmno,lit,anyroom); } if((isx || isok(i-1,sy+1)) && levl[i-1][sy+1].typ == fg_typ) { ! if(levl[i-1][sy+1].roomno != rmno) flood_fill_rm(i-1,sy+1,rmno,lit,anyroom); } if((isx || isok(i-1,sy-1)) && levl[i-1][sy-1].typ == fg_typ) { ! if ((int) levl[i-1][sy-1].roomno != rmno) flood_fill_rm(i-1,sy-1,rmno,lit,anyroom); } if((isx || isok(i-1,sy+1)) && levl[i-1][sy+1].typ == fg_typ) { ! if ((int) levl[i-1][sy+1].roomno != rmno) flood_fill_rm(i-1,sy+1,rmno,lit,anyroom); } if((icorpsenm],MR_STONE) --- 420,426 ---- if (rn2(2)) otmp = mk_tt_object(STATUE, somex(croom), somey(croom)); else /* Medusa statues don't contain books */ ! otmp = mkcorpstat(STATUE, (struct monst *)0, (struct permonst *)0, somex(croom), somey(croom), FALSE); if (otmp) { while (pm_resistance(&mons[otmp->corpsenm],MR_STONE) *************** *** 601,611 **** } for (x = rn2(3); x; x--) { mazexy(&mm); ! (void) makemon(&mons[PM_MINOTAUR], mm.x, mm.y); } for(x = rn1(5,7); x; x--) { mazexy(&mm); ! (void) makemon((struct permonst *) 0, mm.x, mm.y); } for(x = rn1(6,7); x; x--) { mazexy(&mm); --- 601,611 ---- } for (x = rn2(3); x; x--) { mazexy(&mm); ! (void) makemon(&mons[PM_MINOTAUR], mm.x, mm.y, NO_MM_FLAGS); } for(x = rn1(5,7); x; x--) { mazexy(&mm); ! (void) makemon((struct permonst *) 0, mm.x, mm.y, NO_MM_FLAGS); } for(x = rn1(6,7); x; x--) { mazexy(&mm); *** Old/src/mkobj.c Tue May 28 17:28:17 1996 --- src/mkobj.c Wed May 15 08:48:58 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mkobj.c 3.2 96/02/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mkobj.c 3.2 96/05/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 238,244 **** if (obj->cobj || num <= 0L || obj->quan < num) panic("splitobj"); /* can't split containers */ ! otmp = newobj(obj->onamelth); *otmp = *obj; /* copies whole structure */ otmp->o_id = flags.ident++; if (!otmp->o_id) otmp->o_id = flags.ident++; /* ident overflowed */ --- 238,244 ---- if (obj->cobj || num <= 0L || obj->quan < num) panic("splitobj"); /* can't split containers */ ! otmp = newobj(obj->oxlth + obj->onamelth); *otmp = *obj; /* copies whole structure */ otmp->o_id = flags.ident++; if (!otmp->o_id) otmp->o_id = flags.ident++; /* ident overflowed */ *************** *** 253,258 **** --- 253,261 ---- /* as a back pointer to the container object when contained. */ if (obj->where == OBJ_FLOOR) obj->nexthere = otmp; + if (obj->oxlth) + (void)memcpy((genericptr_t)otmp->oextra, (genericptr_t)obj->oextra, + obj->oxlth); if (obj->onamelth) (void)strncpy(ONAME(otmp), ONAME(obj), (int)obj->onamelth); if (obj->unpaid) splitbill(obj,otmp); *************** *** 277,288 **** if (otmp->unpaid) subfrombill(otmp, shop_keeper(*u.ushops)); ! dummy = newobj(otmp->onamelth); *dummy = *otmp; dummy->where = OBJ_FREE; dummy->o_id = flags.ident++; if (!dummy->o_id) dummy->o_id = flags.ident++; /* ident overflowed */ dummy->timed = 0; if (otmp->onamelth) (void)strncpy(ONAME(dummy), ONAME(otmp), (int)otmp->onamelth); if (Is_candle(dummy)) dummy->lamplit = 0; --- 280,294 ---- if (otmp->unpaid) subfrombill(otmp, shop_keeper(*u.ushops)); ! dummy = newobj(otmp->oxlth + otmp->onamelth); *dummy = *otmp; dummy->where = OBJ_FREE; dummy->o_id = flags.ident++; if (!dummy->o_id) dummy->o_id = flags.ident++; /* ident overflowed */ dummy->timed = 0; + if (otmp->oxlth) + (void)memcpy((genericptr_t)dummy->oextra, + (genericptr_t)otmp->oextra, otmp->oxlth); if (otmp->onamelth) (void)strncpy(ONAME(dummy), ONAME(otmp), (int)otmp->onamelth); if (Is_candle(dummy)) dummy->lamplit = 0; *************** *** 340,346 **** otmp->oeaten = 0; switch(otmp->otyp) { case CORPSE: ! /* overridden by mkcorpstat() */ tryct = 50; do otmp->corpsenm = undead_to_corpse(rndmonnum()); while ((mvitals[otmp->corpsenm].mvflags & G_NOCORPSE) && (--tryct > 0)); --- 346,352 ---- otmp->oeaten = 0; switch(otmp->otyp) { case CORPSE: ! /* possibly overridden by mkcorpstat() */ tryct = 50; do otmp->corpsenm = undead_to_corpse(rndmonnum()); while ((mvitals[otmp->corpsenm].mvflags & G_NOCORPSE) && (--tryct > 0)); *************** *** 524,534 **** case ROCK_CLASS: switch (otmp->otyp) { case STATUE: ! if (rn2(level_difficulty()/2 + 10) > 10) { ! add_to_container(otmp, mkobj(SPBOOK_CLASS,FALSE)); ! } ! /* overridden by mkcorpstat() */ otmp->corpsenm = rndmonnum(); } break; case GOLD_CLASS: --- 530,540 ---- case ROCK_CLASS: switch (otmp->otyp) { case STATUE: ! /* possibly overridden by mkcorpstat() */ otmp->corpsenm = rndmonnum(); + if (!verysmall(&mons[otmp->corpsenm]) && + rn2(level_difficulty()/2 + 10) > 10) + add_to_container(otmp, mkobj(SPBOOK_CLASS,FALSE)); } break; case GOLD_CLASS: *************** *** 554,559 **** --- 560,566 ---- struct obj *body; { long when; + int rot_adjust; short action; #define TAINT_AGE (50L) /* age when corpses go bad */ *************** *** 565,570 **** --- 572,580 ---- action = ROT_CORPSE; /* default action: rot away */ when = ROT_AGE; /* rot away when this old */ + rot_adjust = in_mklev ? 25 : 10; /* give some variation */ + when += (long)(rnz(rot_adjust) - rot_adjust); + if (is_rider(&mons[body->corpsenm])) { /* * Riders always revive. They have a 1/3 chance per turn *************** *** 754,792 **** #endif /* OVLB */ #ifdef OVL1 struct obj * ! mkcorpstat(objtype, ptr, x, y, init) int objtype; /* CORPSE or STATUE */ struct permonst *ptr; int x, y; boolean init; { register struct obj *otmp; ! if(objtype != CORPSE && objtype != STATUE) ! impossible("making corpstat type %d", objtype); otmp = mksobj_at(objtype, x, y, init); ! if(otmp) { ! int old_corpsenm = otmp->corpsenm; ! if(ptr) otmp->corpsenm = monsndx(ptr); ! else otmp->corpsenm = rndmonnum(); ! otmp->owt = weight(otmp); ! /* return TRUE if the corpse has special timing */ ! #define special_corpse(num) (((num) == PM_LIZARD) \ ! || (is_rider(&mons[num])) \ ! || (mons[num].mlet == S_TROLL)) if (otmp->otyp == CORPSE && (special_corpse(old_corpsenm) || special_corpse(otmp->corpsenm))) { obj_stop_timers(otmp); start_corpse_timeout(otmp); } } return(otmp); } #endif /* OVL1 */ #ifdef OVLB --- 764,864 ---- #endif /* OVLB */ #ifdef OVL1 + /* return TRUE if the corpse has special timing */ + #define special_corpse(num) (((num) == PM_LIZARD) \ + || (is_rider(&mons[num])) \ + || (mons[num].mlet == S_TROLL)) + + /* + * OEXTRA note: Passing mtmp causes mtraits to be saved + * even if ptr passed as well, but ptr is always used for + * the corpse type (corpsenm). That allows the corpse type + * to be different from the original monster, + * i.e. vampire -> human corpse + * yet still allow restoration of the original monster upon + * resurrection. + */ struct obj * ! mkcorpstat(objtype, mtmp, ptr, x, y, init) int objtype; /* CORPSE or STATUE */ + struct monst *mtmp; struct permonst *ptr; int x, y; boolean init; { register struct obj *otmp; ! if (objtype != CORPSE && objtype != STATUE) ! impossible("making corpstat type %d", objtype); otmp = mksobj_at(objtype, x, y, init); ! if (otmp) { ! #ifdef OEXTRA ! if (mtmp) { ! struct obj *otmp2; ! ! if (!ptr) ptr = mtmp->data; ! /* save_mtraits frees original data pointed to by otmp */ ! otmp2 = save_mtraits(otmp, mtmp); ! if (otmp2) otmp = otmp2; ! } ! #endif /* OEXTRA */ ! /* use the corpse or statue produced by mksobj() as-is ! unless `ptr' is non-null */ ! if (ptr) { ! int old_corpsenm = otmp->corpsenm; + otmp->corpsenm = monsndx(ptr); + otmp->owt = weight(otmp); if (otmp->otyp == CORPSE && (special_corpse(old_corpsenm) || special_corpse(otmp->corpsenm))) { obj_stop_timers(otmp); start_corpse_timeout(otmp); } + } } return(otmp); } + #ifdef OEXTRA + struct obj * + save_mtraits(obj, mtmp) + struct obj *obj; + struct monst *mtmp; + { + struct obj *otmp; + int lth, namelth; + + lth = sizeof(struct monst) + mtmp->mxlth + mtmp->mnamelth; + namelth = obj->onamelth ? strlen(ONAME(obj)) + 1 : 0; + otmp = replobj(obj, lth, (genericptr_t) mtmp, namelth, ONAME(obj)); + if (otmp && otmp->oxlth) { + struct monst *mtmp2 = (struct monst *)otmp->oextra; + mtmp2->mnum = otmp->corpsenm; + otmp->mtraits = 1; /* mark it */ + } + return otmp; + } + + /* returns a pointer to the monst structure within the obj. + * Do not use the return value in any monst chains directly! + */ + struct monst * + get_mtraits(obj) + struct obj *obj; + { + struct monst *mtmp = (struct monst *)0; + + if (obj->oxlth && obj->mtraits == 1) { + mtmp = (struct monst *)obj->oextra; + /* save_mtraits() validated mtmp->mnum */ + mtmp->data = &mons[mtmp->mnum]; + } + return mtmp; + } + #endif /* OEXTRA */ + #endif /* OVL1 */ #ifdef OVLB *************** *** 818,824 **** { struct obj *otmp; ! otmp = mkcorpstat(objtype, ptr, x, y, (boolean)(objtype != STATUE)); if (nm) otmp = oname(otmp, nm); return(otmp); --- 890,897 ---- { struct obj *otmp; ! otmp = mkcorpstat(objtype, (struct monst *)0, ptr, ! x, y, (boolean)(objtype != STATUE)); if (nm) otmp = oname(otmp, nm); return(otmp); *** Old/src/mkroom.c Tue May 28 17:28:22 1996 --- src/mkroom.c Fri May 24 08:52:25 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mkroom.c 3.2 93/04/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mkroom.c 3.2 96/05/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 67,77 **** register struct mkroom *sroom; int i = -1; #ifdef WIZARD ! # ifdef GCC_WARN ! register char *ep = (char *)0; ! # else ! register char *ep; ! # endif /* first determine shoptype */ if(wizard){ --- 67,73 ---- register struct mkroom *sroom; int i = -1; #ifdef WIZARD ! char *ep = (char *)0; /* (init == lint suppression) */ /* first determine shoptype */ if(wizard){ *************** *** 243,249 **** ty = sroom->ly + (sroom->hy - sroom->ly + 1)/2; if(sroom->irregular) { /* center might not be valid, so put queen elsewhere */ ! if(levl[tx][ty].roomno != rmno || levl[tx][ty].edge) { (void) somexy(sroom, &mm); tx = mm.x; ty = mm.y; } --- 239,246 ---- ty = sroom->ly + (sroom->hy - sroom->ly + 1)/2; if(sroom->irregular) { /* center might not be valid, so put queen elsewhere */ ! if ((int) levl[tx][ty].roomno != rmno || ! levl[tx][ty].edge) { (void) somexy(sroom, &mm); tx = mm.x; ty = mm.y; } *************** *** 256,263 **** for(sx = sroom->lx; sx <= sroom->hx; sx++) for(sy = sroom->ly; sy <= sroom->hy; sy++) { if(sroom->irregular) { ! if(levl[sx][sy].roomno != rmno || ! levl[sx][sy].edge || (sroom->doorct && distmin(sx, sy, doors[sh].x, doors[sh].y) <= 1)) continue; --- 253,260 ---- for(sx = sroom->lx; sx <= sroom->hx; sx++) for(sy = sroom->ly; sy <= sroom->hy; sy++) { if(sroom->irregular) { ! if ((int) levl[sx][sy].roomno != rmno || ! levl[sx][sy].edge || (sroom->doorct && distmin(sx, sy, doors[sh].x, doors[sh].y) <= 1)) continue; *************** *** 279,285 **** (sx == tx && sy == ty ? &mons[PM_QUEEN_BEE] : &mons[PM_KILLER_BEE]) : (struct permonst *) 0, ! sx, sy); if(mon) { mon->msleep = 1; if (type==COURT && mon->mpeaceful) { --- 276,282 ---- (sx == tx && sy == ty ? &mons[PM_QUEEN_BEE] : &mons[PM_KILLER_BEE]) : (struct permonst *) 0, ! sx, sy, NO_MM_FLAGS); if(mon) { mon->msleep = 1; if (type==COURT && mon->mpeaceful) { *************** *** 348,364 **** } } void ! mkundead(mm) /* make a swarm of undead around mm */ coord *mm; { ! register int cnt = (level_difficulty() + 1)/10 + rnd(5); ! register struct permonst *mdat; ! ! while(cnt--) { ! mdat = morguemon(); ! if(enexto(mm, mm->x, mm->y, mdat)) ! (void) makemon(mdat, mm->x, mm->y); } level.flags.graveyard = TRUE; /* reduced chance for undead corpse */ } --- 345,369 ---- } } + /* make a swarm of undead around mm */ void ! mkundead(mm, revive_corpses, mm_flags) coord *mm; + boolean revive_corpses; + int mm_flags; { ! int cnt = (level_difficulty() + 1)/10 + rnd(5); ! struct permonst *mdat; ! struct obj *otmp; ! coord cc; ! ! while (cnt--) { ! mdat = morguemon(); ! if (enexto(&cc, mm->x, mm->y, mdat) && ! (!revive_corpses || ! !(otmp = sobj_at(CORPSE, cc.x, cc.y)) || ! !revive(otmp))) ! (void) makemon(mdat, cc.x, cc.y, mm_flags); } level.flags.graveyard = TRUE; /* reduced chance for undead corpse */ } *************** *** 402,413 **** /* mkclass() won't do, as we might get kraken */ (void) makemon(rn2(5) ? &mons[PM_GIANT_EEL] : &mons[PM_ELECTRIC_EEL], ! sx, sy); eelct++; } } else if(!rn2(4)) /* swamps tend to be moldy */ ! (void) makemon(mkclass(S_FUNGUS,0), sx, sy); } level.flags.has_swamp = 1; } --- 407,419 ---- /* mkclass() won't do, as we might get kraken */ (void) makemon(rn2(5) ? &mons[PM_GIANT_EEL] : &mons[PM_ELECTRIC_EEL], ! sx, sy, NO_MM_FLAGS); eelct++; } } else if(!rn2(4)) /* swamps tend to be moldy */ ! (void) makemon(mkclass(S_FUNGUS,0), ! sx, sy, NO_MM_FLAGS); } level.flags.has_swamp = 1; } *************** *** 526,538 **** while(try_cnt++ < 100) { c->x = somex(croom); c->y = somey(croom); ! if(!levl[c->x][c->y].edge && levl[c->x][c->y].roomno == i) return TRUE; } /* try harder; exhaustively search until one is found */ for(c->x = croom->lx; c->x <= croom->hx; c->x++) for(c->y = croom->ly; c->y <= croom->hy; c->y++) ! if(!levl[c->x][c->y].edge && levl[c->x][c->y].roomno == i) return TRUE; return FALSE; } --- 532,546 ---- while(try_cnt++ < 100) { c->x = somex(croom); c->y = somey(croom); ! if (!levl[c->x][c->y].edge && ! (int) levl[c->x][c->y].roomno == i) return TRUE; } /* try harder; exhaustively search until one is found */ for(c->x = croom->lx; c->x <= croom->hx; c->x++) for(c->y = croom->ly; c->y <= croom->hy; c->y++) ! if (!levl[c->x][c->y].edge && ! (int) levl[c->x][c->y].roomno == i) return TRUE; return FALSE; } *************** *** 647,653 **** { short i; /* ! * Well, I really should write only useful informations instead * of writing the whole structure. That is I should not write * the subrooms pointers, but who cares ? */ --- 655,661 ---- { short i; /* ! * Well, I really should write only useful information instead * of writing the whole structure. That is I should not write * the subrooms pointers, but who cares ? */ *************** *** 687,693 **** } /* ! * rest_rooms : That's for restore rooms. Read the rooms structure from * the disk. */ --- 695,701 ---- } /* ! * rest_rooms : That's for restoring rooms. Read the rooms structure from * the disk. */ *** Old/src/mon.c Tue May 28 17:28:26 1996 --- src/mon.c Fri May 3 15:26:20 1996 *************** *** 111,122 **** case PM_LONG_WORM: (void) mksobj_at(WORM_TOOTH, x, y, TRUE); goto default_1; case PM_KOBOLD_MUMMY: case PM_GNOME_MUMMY: case PM_ORC_MUMMY: case PM_ELF_MUMMY: - case PM_VAMPIRE: - case PM_VAMPIRE_LORD: case PM_HUMAN_MUMMY: case PM_GIANT_MUMMY: case PM_ETTIN_MUMMY: --- 111,127 ---- case PM_LONG_WORM: (void) mksobj_at(WORM_TOOTH, x, y, TRUE); goto default_1; + case PM_VAMPIRE: + case PM_VAMPIRE_LORD: + /* include mtmp in the mkcorpstat() call */ + num = undead_to_corpse(mndx); + obj = mkcorpstat(CORPSE, mtmp, &mons[num], x, y, TRUE); + obj->age -= 100; /* this is an *OLD* corpse */ + break; case PM_KOBOLD_MUMMY: case PM_GNOME_MUMMY: case PM_ORC_MUMMY: case PM_ELF_MUMMY: case PM_HUMAN_MUMMY: case PM_GIANT_MUMMY: case PM_ETTIN_MUMMY: *************** *** 128,134 **** case PM_GIANT_ZOMBIE: case PM_ETTIN_ZOMBIE: num = undead_to_corpse(mndx); ! obj = mkcorpstat(CORPSE, &mons[num], x, y, TRUE); obj->age -= 100; /* this is an *OLD* corpse */ break; case PM_IRON_GOLEM: --- 133,140 ---- case PM_GIANT_ZOMBIE: case PM_ETTIN_ZOMBIE: num = undead_to_corpse(mndx); ! obj = mkcorpstat(CORPSE, (struct monst *)0, ! &mons[num], x, y, TRUE); obj->age -= 100; /* this is an *OLD* corpse */ break; case PM_IRON_GOLEM: *************** *** 144,150 **** mtmp->mnamelth = 0; break; case PM_STONE_GOLEM: ! obj = mkcorpstat(STATUE, mdat, x, y, FALSE); break; case PM_WOOD_GOLEM: num = d(2,4); --- 150,156 ---- mtmp->mnamelth = 0; break; case PM_STONE_GOLEM: ! obj = mkcorpstat(STATUE, (struct monst *)0, mdat, x, y, FALSE); break; case PM_WOOD_GOLEM: num = d(2,4); *************** *** 167,173 **** default: if (mvitals[mndx].mvflags & G_NOCORPSE) return (struct obj *)0; ! else obj = mkcorpstat(CORPSE, mdat, x, y, TRUE); break; } /* All special cases should precede the G_NOCORPSE check */ --- 173,179 ---- default: if (mvitals[mndx].mvflags & G_NOCORPSE) return (struct obj *)0; ! else obj = mkcorpstat(CORPSE, mtmp, mdat, x, y, TRUE); break; } /* All special cases should precede the G_NOCORPSE check */ *************** *** 1080,1089 **** /* Dead Kops may come back. */ switch(rnd(5)) { case 1: /* returns near the stairs */ ! (void) makemon(mtmp->data,xdnstair,ydnstair); break; case 2: /* randomly */ ! (void) makemon(mtmp->data,0,0); break; default: break; --- 1086,1095 ---- /* Dead Kops may come back. */ switch(rnd(5)) { case 1: /* returns near the stairs */ ! (void) makemon(mtmp->data,xdnstair,ydnstair,NO_MM_FLAGS); break; case 2: /* randomly */ ! (void) makemon(mtmp->data,0,0,NO_MM_FLAGS); break; default: break; *************** *** 1558,1566 **** } if (!rn2(10)) { if (!rn2(13)) ! (void) makemon(&mons[PM_PURPLE_WORM], 0, 0); else ! (void) makemon((struct permonst *)0, 0, 0); } aggravate(); --- 1564,1572 ---- } if (!rn2(10)) { if (!rn2(13)) ! (void) makemon(&mons[PM_PURPLE_WORM], 0, 0, NO_MM_FLAGS); else ! (void) makemon((struct permonst *)0, 0, 0, NO_MM_FLAGS); } aggravate(); *** Old/src/mondata.c Tue May 28 17:28:31 1996 --- src/mondata.c Sat May 4 17:08:49 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mondata.c 3.2 95/07/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mondata.c 3.2 96/05/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 89,94 **** --- 89,119 ---- return FALSE; } + /* TRUE iff monster is resistant to light-induced blindness */ + boolean + resists_blnd(mon) + struct monst *mon; + { + struct permonst *ptr = mon->data; + boolean is_you = (mon == &youmonst); + struct obj *o; + + if (is_you ? Blind : (mon->mblinded || !mon->mcansee || !haseyes(ptr))) + return TRUE; + /* AD_BLND => yellow light, dust vortex, ki-rin (?), Archon */ + if (dmgtype(ptr, AD_BLND) && !attacktype(ptr, AT_SPIT)) + return TRUE; + o = is_you ? uwep : MON_WEP(mon); + if (o && o->oartifact && defends(AD_BLND, o)) + return TRUE; + o = is_you ? invent : mon->minvent; + for ( ; o; o = o->nobj) + if ((o->owornmask && objects[o->otyp].oc_oprop == BLINDED) || + (o->oartifact && protects(AD_BLND, o))) + return TRUE; + return FALSE; + } + #endif /* OVLB */ #ifdef OVL0 *************** *** 153,161 **** return((boolean)((bigmonst(ptr) || (ptr->msize > MZ_SMALL && !humanoid(ptr)) || ptr == &mons[PM_MARILITH]) && !sliparm(ptr))); /* Marilith is about the only case of a monster which is otherwise ! * humanoid but cannot wear armor (too many arms). Centaurs would ! * be another except that they are already accounted for by ! * bigmonst. */ } #endif /* OVLB */ --- 178,184 ---- return((boolean)((bigmonst(ptr) || (ptr->msize > MZ_SMALL && !humanoid(ptr)) || ptr == &mons[PM_MARILITH]) && !sliparm(ptr))); /* Marilith is about the only case of a monster which is otherwise ! * humanoid but cannot wear armor (too many arms). */ } #endif /* OVLB */ *************** *** 410,415 **** --- 433,441 ---- {PM_GNOME, PM_GNOME_LORD}, {PM_GNOME_LORD, PM_GNOME_KING}, {PM_DWARF, PM_DWARF_LORD}, {PM_DWARF_LORD, PM_DWARF_KING}, {PM_OGRE, PM_OGRE_LORD}, {PM_OGRE_LORD, PM_OGRE_KING}, + {PM_ELF, PM_ELF_LORD}, {PM_WOODLAND_ELF, PM_ELF_LORD}, + {PM_GREEN_ELF, PM_ELF_LORD}, {PM_GREY_ELF, PM_ELF_LORD}, + {PM_ELF_LORD, PM_ELVENKING}, {PM_LICH, PM_DEMILICH}, {PM_DEMILICH, PM_MASTER_LICH}, {PM_VAMPIRE, PM_VAMPIRE_LORD}, {PM_BAT, PM_GIANT_BAT}, {PM_BABY_GRAY_DRAGON, PM_GRAY_DRAGON}, *************** *** 424,429 **** --- 450,456 ---- {PM_BLACK_NAGA_HATCHLING, PM_BLACK_NAGA}, {PM_GOLDEN_NAGA_HATCHLING, PM_GOLDEN_NAGA}, {PM_GUARDIAN_NAGA_HATCHLING, PM_GUARDIAN_NAGA}, + {PM_SMALL_MIMIC, PM_LARGE_MIMIC}, {PM_LARGE_MIMIC, PM_GIANT_MIMIC}, {PM_BABY_LONG_WORM, PM_LONG_WORM}, {PM_BABY_PURPLE_WORM, PM_PURPLE_WORM}, {PM_BABY_CROCODILE, PM_CROCODILE}, *************** *** 431,437 **** {PM_SERGEANT, PM_LIEUTENANT}, {PM_LIEUTENANT, PM_CAPTAIN}, {PM_WATCHMAN, PM_WATCH_CAPTAIN}, ! {PM_SMALL_MIMIC, PM_LARGE_MIMIC}, {PM_LARGE_MIMIC, PM_GIANT_MIMIC}, {NON_PM,NON_PM} }; --- 458,474 ---- {PM_SERGEANT, PM_LIEUTENANT}, {PM_LIEUTENANT, PM_CAPTAIN}, {PM_WATCHMAN, PM_WATCH_CAPTAIN}, ! {PM_ALIGNED_PRIEST, PM_HIGH_PRIEST}, ! {PM_STUDENT, PM_ARCHEOLOGIST}, ! {PM_ATTENDANT, PM_HEALER}, ! {PM_PAGE, PM_KNIGHT}, ! {PM_ACOLYTE, PM_PRIEST}, ! {PM_APPRENTICE, PM_WIZARD}, ! #ifdef KOPS ! {PM_KEYSTONE_KOP, PM_KOP_SERGEANT}, ! {PM_KOP_SERGEANT, PM_KOP_LIEUTENANT}, ! {PM_KOP_LIEUTENANT, PM_KOP_KAPTAIN}, ! #endif {NON_PM,NON_PM} }; *** Old/src/monmove.c Tue May 28 17:28:35 1996 --- src/monmove.c Mon May 6 17:06:02 1996 *************** *** 317,322 **** --- 317,323 ---- m_respond(mtmp); if (mdat == &mons[PM_MEDUSA] && cansee(mtmp->mx, mtmp->my)) m_respond(mtmp); + if (mtmp->mhp <= 0) return(1); /* m_respond gaze can kill medusa */ if (mdat->mmove < rnd(6)) return(0); /* fleeing monsters might regain courage */ *** Old/src/monst.c Tue May 28 17:28:38 1996 --- src/monst.c Sun May 5 10:09:53 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)monst.c 3.2 95/09/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)monst.c 3.2 96/04/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 290,296 **** #if 0 /* not yet implemented */ MON("beholder", S_EYE, LVL(6, 3, 4, 0, -10), (G_GENO|2), ! A(ATTK(AT_GAZE, AD_SLOW, 0, 0), ATTK(AT_GAZE, AD_SLEE, 0, 0), ATTK(AT_GAZE, AD_DISN, 0, 0), ATTK(AT_GAZE, AD_STON, 0, 0), ATTK(AT_GAZE, AD_CNCL, 2, 4), ATTK(AT_BITE, AD_PHYS, 2, 4)), SIZ(10, 10, 0, MS_SILENT, MZ_SMALL), MR_COLD, 0, --- 290,296 ---- #if 0 /* not yet implemented */ MON("beholder", S_EYE, LVL(6, 3, 4, 0, -10), (G_GENO|2), ! A(ATTK(AT_GAZE, AD_SLOW, 0, 0), ATTK(AT_GAZE, AD_SLEE, 2,25), ATTK(AT_GAZE, AD_DISN, 0, 0), ATTK(AT_GAZE, AD_STON, 0, 0), ATTK(AT_GAZE, AD_CNCL, 2, 4), ATTK(AT_BITE, AD_PHYS, 2, 4)), SIZ(10, 10, 0, MS_SILENT, MZ_SMALL), MR_COLD, 0, *************** *** 364,389 **** A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(500, 200, 0, MS_HUMANOID, MZ_SMALL), 0, 0, ! M1_HUMANOID, M2_COLLECT, 0, CLR_GREEN), MON("dwarf", S_HUMANOID, LVL(2, 6, 10, 10, 4), (G_GENO|3), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(900, 300, 0, MS_HUMANOID, MZ_HUMAN), 0, 0, ! M1_TUNNEL|M1_NEEDPICK|M1_HUMANOID, M2_DWARF|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_RED), MON("bugbear", S_HUMANOID, LVL(3, 9, 5, 0, -6), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(1250, 250, 0, MS_GROWL, MZ_LARGE), 0, 0, ! M1_HUMANOID, M2_STRONG|M2_COLLECT, 0, CLR_BROWN), MON("dwarf lord", S_HUMANOID, LVL(4, 6, 10, 10, 5), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(900, 300, 0, MS_HUMANOID, MZ_HUMAN), 0, 0, ! M1_TUNNEL|M1_NEEDPICK|M1_HUMANOID, M2_DWARF|M2_STRONG|M2_LORD|M2_MALE|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_BLUE), MON("dwarf king", S_HUMANOID, --- 364,389 ---- A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(500, 200, 0, MS_HUMANOID, MZ_SMALL), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_COLLECT, 0, CLR_GREEN), MON("dwarf", S_HUMANOID, LVL(2, 6, 10, 10, 4), (G_GENO|3), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(900, 300, 0, MS_HUMANOID, MZ_HUMAN), 0, 0, ! M1_TUNNEL|M1_NEEDPICK|M1_HUMANOID|M1_OMNIVORE, M2_DWARF|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_RED), MON("bugbear", S_HUMANOID, LVL(3, 9, 5, 0, -6), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(1250, 250, 0, MS_GROWL, MZ_LARGE), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_STRONG|M2_COLLECT, 0, CLR_BROWN), MON("dwarf lord", S_HUMANOID, LVL(4, 6, 10, 10, 5), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(900, 300, 0, MS_HUMANOID, MZ_HUMAN), 0, 0, ! M1_TUNNEL|M1_NEEDPICK|M1_HUMANOID|M1_OMNIVORE, M2_DWARF|M2_STRONG|M2_LORD|M2_MALE|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_BLUE), MON("dwarf king", S_HUMANOID, *************** *** 391,397 **** A(ATTK(AT_WEAP, AD_PHYS, 2, 6), ATTK(AT_WEAP, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(900, 300, 0, MS_HUMANOID, MZ_HUMAN), 0, 0, ! M1_TUNNEL|M1_NEEDPICK|M1_HUMANOID, M2_DWARF|M2_STRONG|M2_PRINCE|M2_MALE|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, HI_LORD), MON("mind flayer", S_HUMANOID, --- 391,397 ---- A(ATTK(AT_WEAP, AD_PHYS, 2, 6), ATTK(AT_WEAP, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(900, 300, 0, MS_HUMANOID, MZ_HUMAN), 0, 0, ! M1_TUNNEL|M1_NEEDPICK|M1_HUMANOID|M1_OMNIVORE, M2_DWARF|M2_STRONG|M2_PRINCE|M2_MALE|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, HI_LORD), MON("mind flayer", S_HUMANOID, *************** *** 452,459 **** NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 20, 0, MS_SILENT, MZ_MEDIUM), MR_COLD|MR_POISON, MR_COLD|MR_POISON, ! M1_BREATHLESS|M1_AMORPHOUS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD| ! M1_MINDLESS|M1_OMNIVORE, M2_HOSTILE|M2_NEUTER, 0, CLR_BLUE), MON("spotted jelly", S_JELLY, LVL(5, 0, 8, 10, 0), (G_GENO|1), --- 452,458 ---- NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 20, 0, MS_SILENT, MZ_MEDIUM), MR_COLD|MR_POISON, MR_COLD|MR_POISON, ! M1_BREATHLESS|M1_AMORPHOUS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS, M2_HOSTILE|M2_NEUTER, 0, CLR_BLUE), MON("spotted jelly", S_JELLY, LVL(5, 0, 8, 10, 0), (G_GENO|1), *************** *** 461,467 **** NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 20, 0, MS_SILENT, MZ_MEDIUM), MR_ACID|MR_STONE, 0, M1_BREATHLESS|M1_AMORPHOUS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD| ! M1_MINDLESS|M1_ACID|M1_OMNIVORE, M2_HOSTILE|M2_NEUTER, 0, CLR_GREEN), MON("ochre jelly", S_JELLY, LVL(6, 3, 8, 20, 0), (G_GENO|2), --- 460,466 ---- NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 20, 0, MS_SILENT, MZ_MEDIUM), MR_ACID|MR_STONE, 0, M1_BREATHLESS|M1_AMORPHOUS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD| ! M1_MINDLESS|M1_ACID, M2_HOSTILE|M2_NEUTER, 0, CLR_GREEN), MON("ochre jelly", S_JELLY, LVL(6, 3, 8, 20, 0), (G_GENO|2), *************** *** 469,475 **** NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 20, 0, MS_SILENT, MZ_MEDIUM), MR_ACID|MR_STONE, 0, M1_BREATHLESS|M1_AMORPHOUS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD| ! M1_MINDLESS|M1_ACID|M1_OMNIVORE, M2_HOSTILE|M2_NEUTER, 0, CLR_BROWN), /* * kobolds --- 468,474 ---- NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 20, 0, MS_SILENT, MZ_MEDIUM), MR_ACID|MR_STONE, 0, M1_BREATHLESS|M1_AMORPHOUS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD| ! M1_MINDLESS|M1_ACID, M2_HOSTILE|M2_NEUTER, 0, CLR_BROWN), /* * kobolds *************** *** 479,504 **** A(ATTK(AT_WEAP, AD_PHYS, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(400, 100, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, ! M1_HUMANOID|M1_POIS, M2_HOSTILE|M2_COLLECT, 0, CLR_BROWN), MON("large kobold", S_KOBOLD, LVL(1, 6, 10, 0, -3), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(450, 150, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, ! M1_HUMANOID|M1_POIS, M2_HOSTILE|M2_COLLECT, 0, CLR_RED), MON("kobold lord", S_KOBOLD, LVL(2, 6, 10, 0, -4), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(500, 200, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, ! M1_HUMANOID|M1_POIS, M2_HOSTILE|M2_LORD|M2_MALE|M2_COLLECT, 0, HI_LORD), MON("kobold shaman", S_KOBOLD, LVL(1, 6, 6, 10, -4), (G_GENO|1), A(ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(450, 150, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, ! M1_HUMANOID|M1_POIS, M2_HOSTILE|M2_MAGIC, 0, HI_ZAP), /* * leprechauns */ --- 478,503 ---- A(ATTK(AT_WEAP, AD_PHYS, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(400, 100, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, ! M1_HUMANOID|M1_POIS|M1_OMNIVORE, M2_HOSTILE|M2_COLLECT, 0, CLR_BROWN), MON("large kobold", S_KOBOLD, LVL(1, 6, 10, 0, -3), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(450, 150, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, ! M1_HUMANOID|M1_POIS|M1_OMNIVORE, M2_HOSTILE|M2_COLLECT, 0, CLR_RED), MON("kobold lord", S_KOBOLD, LVL(2, 6, 10, 0, -4), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(500, 200, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, ! M1_HUMANOID|M1_POIS|M1_OMNIVORE, M2_HOSTILE|M2_LORD|M2_MALE|M2_COLLECT, 0, HI_LORD), MON("kobold shaman", S_KOBOLD, LVL(1, 6, 6, 10, -4), (G_GENO|1), A(ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(450, 150, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, ! M1_HUMANOID|M1_POIS|M1_OMNIVORE, M2_HOSTILE|M2_MAGIC, 0, HI_ZAP), /* * leprechauns */ *************** *** 565,616 **** A(ATTK(AT_WEAP, AD_PHYS, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(400, 100, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID, M2_ORC|M2_COLLECT, 0, CLR_GRAY), MON("hobgoblin", S_ORC, LVL(1, 9, 10, 0, -4), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(1000, 200, 0, MS_ORC, MZ_HUMAN), 0, 0, ! M1_HUMANOID, M2_ORC|M2_STRONG|M2_COLLECT, 0, CLR_BROWN), /* plain "orc" for zombie corpses only; not created at random */ MON("orc", S_ORC, LVL(1, 9, 10, 0, -3), (G_GENO|G_NOGEN|G_LGROUP), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(850, 150, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_RED), MON("hill orc", S_ORC, LVL(2, 9, 10, 0, -4), (G_GENO|G_LGROUP|2), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1000, 200, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_YELLOW), MON("Mordor orc", S_ORC, LVL(3, 5, 10, 0, -5), (G_GENO|G_LGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1200, 200, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_BLUE), MON("Uruk-hai", S_ORC, LVL(3, 7, 10, 0, -4), (G_GENO|G_LGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1300, 300, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_BLACK), MON("orc shaman", S_ORC, LVL(3, 9, 5, 10, -5), (G_GENO|1), A(ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1000, 300, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_MAGIC, 0, HI_ZAP), MON("orc-captain", S_ORC, LVL(5, 5, 10, 0, -5), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1350, 350, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, HI_LORD), /* --- 564,615 ---- A(ATTK(AT_WEAP, AD_PHYS, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(400, 100, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_ORC|M2_COLLECT, 0, CLR_GRAY), MON("hobgoblin", S_ORC, LVL(1, 9, 10, 0, -4), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(1000, 200, 0, MS_ORC, MZ_HUMAN), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_ORC|M2_STRONG|M2_COLLECT, 0, CLR_BROWN), /* plain "orc" for zombie corpses only; not created at random */ MON("orc", S_ORC, LVL(1, 9, 10, 0, -3), (G_GENO|G_NOGEN|G_LGROUP), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(850, 150, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_RED), MON("hill orc", S_ORC, LVL(2, 9, 10, 0, -4), (G_GENO|G_LGROUP|2), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1000, 200, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_YELLOW), MON("Mordor orc", S_ORC, LVL(3, 5, 10, 0, -5), (G_GENO|G_LGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1200, 200, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_BLUE), MON("Uruk-hai", S_ORC, LVL(3, 7, 10, 0, -4), (G_GENO|G_LGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1300, 300, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_BLACK), MON("orc shaman", S_ORC, LVL(3, 9, 5, 10, -5), (G_GENO|1), A(ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1000, 300, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_MAGIC, 0, HI_ZAP), MON("orc-captain", S_ORC, LVL(5, 5, 10, 0, -5), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1350, 350, 0, MS_ORC, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_ORC|M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, HI_LORD), /* *************** *** 638,670 **** A(ATTK(AT_CLAW, AD_PHYS, 1, 3), ATTK(AT_BITE, AD_PHYS, 1, 3), ATTK(AT_BITE, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK), SIZ(400, 100, 0, MS_SILENT, MZ_LARGE), 0, 0, ! M1_ANIMAL|M1_NOHANDS|M1_CARNIVORE, M2_HOSTILE, 0, CLR_GRAY), MON("mumak", S_QUADRUPED, LVL(5, 9, 0, 0, -2), (G_GENO|1), A(ATTK(AT_BUTT, AD_PHYS, 4,12), ATTK(AT_BITE, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2500, 500, 0, MS_SILENT, MZ_LARGE), 0, 0, ! M1_ANIMAL|M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE, M2_HOSTILE|M2_STRONG, 0, CLR_GRAY), MON("leocrotta", S_QUADRUPED, LVL(6, 18, 4, 10, 0), (G_GENO|2), A(ATTK(AT_CLAW, AD_PHYS, 2, 6), ATTK(AT_BITE, AD_PHYS, 2, 6), ATTK(AT_CLAW, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK), SIZ(1200, 500, 0, MS_IMITATE, MZ_LARGE), 0, 0, ! M1_ANIMAL|M1_NOHANDS|M1_CARNIVORE, M2_HOSTILE|M2_STRONG, 0, CLR_RED), MON("wumpus", S_QUADRUPED, LVL(8, 3, 2, 10, 0), (G_GENO|1), A(ATTK(AT_BITE, AD_PHYS, 3, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2500, 500, 0, MS_SILENT, MZ_LARGE), 0, 0, ! M1_CLING|M1_ANIMAL|M1_NOHANDS|M1_CARNIVORE, M2_HOSTILE|M2_STRONG, 0, CLR_CYAN), MON("titanothere", S_QUADRUPED, LVL(12, 12, 6, 0, 0), (G_GENO|2), A(ATTK(AT_CLAW, AD_PHYS, 2, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(2650, 650, 0, MS_SILENT, MZ_LARGE), 0, 0, ! M1_ANIMAL|M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE, M2_HOSTILE|M2_STRONG, 0, CLR_GRAY), MON("baluchitherium", S_QUADRUPED, LVL(14, 12, 5, 0, 0), (G_GENO|2), --- 637,669 ---- A(ATTK(AT_CLAW, AD_PHYS, 1, 3), ATTK(AT_BITE, AD_PHYS, 1, 3), ATTK(AT_BITE, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK), SIZ(400, 100, 0, MS_SILENT, MZ_LARGE), 0, 0, ! M1_ANIMAL|M1_NOHANDS|M1_OMNIVORE, M2_HOSTILE, 0, CLR_GRAY), MON("mumak", S_QUADRUPED, LVL(5, 9, 0, 0, -2), (G_GENO|1), A(ATTK(AT_BUTT, AD_PHYS, 4,12), ATTK(AT_BITE, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2500, 500, 0, MS_ROAR, MZ_LARGE), 0, 0, ! M1_ANIMAL|M1_THICK_HIDE|M1_NOHANDS|M1_HERBIVORE, M2_HOSTILE|M2_STRONG, 0, CLR_GRAY), MON("leocrotta", S_QUADRUPED, LVL(6, 18, 4, 10, 0), (G_GENO|2), A(ATTK(AT_CLAW, AD_PHYS, 2, 6), ATTK(AT_BITE, AD_PHYS, 2, 6), ATTK(AT_CLAW, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK), SIZ(1200, 500, 0, MS_IMITATE, MZ_LARGE), 0, 0, ! M1_ANIMAL|M1_NOHANDS|M1_OMNIVORE, M2_HOSTILE|M2_STRONG, 0, CLR_RED), MON("wumpus", S_QUADRUPED, LVL(8, 3, 2, 10, 0), (G_GENO|1), A(ATTK(AT_BITE, AD_PHYS, 3, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2500, 500, 0, MS_BURBLE, MZ_LARGE), 0, 0, ! M1_CLING|M1_ANIMAL|M1_NOHANDS|M1_OMNIVORE, M2_HOSTILE|M2_STRONG, 0, CLR_CYAN), MON("titanothere", S_QUADRUPED, LVL(12, 12, 6, 0, 0), (G_GENO|2), A(ATTK(AT_CLAW, AD_PHYS, 2, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(2650, 650, 0, MS_SILENT, MZ_LARGE), 0, 0, ! M1_ANIMAL|M1_THICK_HIDE|M1_NOHANDS|M1_HERBIVORE, M2_HOSTILE|M2_STRONG, 0, CLR_GRAY), MON("baluchitherium", S_QUADRUPED, LVL(14, 12, 5, 0, 0), (G_GENO|2), *************** *** 907,920 **** LVL(8, 10, 5, 30, 7), (G_NOHELL|G_SGROUP|G_NOCORPSE|1), A(ATTK(AT_BITE, AD_DRST, 2, 4), ATTK(AT_BITE, AD_PHYS, 1, 3), ATTK(AT_HUGS, AD_WRAP, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(900, 400, 0, MS_SILENT, MZ_LARGE), MR_POISON, 0, M1_FLY|M1_POIS, M2_MINION|M2_STALK|M2_STRONG|M2_NASTY, 0, CLR_GREEN), MON("Aleax", S_ANGEL, LVL(10, 8, 0, 30, 7), (G_NOHELL|G_NOCORPSE|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_KICK, AD_PHYS, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_SILENT, MZ_HUMAN), MR_COLD|MR_ELEC|MR_SLEEP|MR_POISON, 0, M1_HUMANOID|M1_SEE_INVIS, M2_MINION|M2_STALK|M2_NASTY|M2_COLLECT, 0, CLR_YELLOW), --- 906,919 ---- LVL(8, 10, 5, 30, 7), (G_NOHELL|G_SGROUP|G_NOCORPSE|1), A(ATTK(AT_BITE, AD_DRST, 2, 4), ATTK(AT_BITE, AD_PHYS, 1, 3), ATTK(AT_HUGS, AD_WRAP, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(900, 400, 0, MS_HISS, MZ_LARGE), MR_POISON, 0, M1_FLY|M1_POIS, M2_MINION|M2_STALK|M2_STRONG|M2_NASTY, 0, CLR_GREEN), MON("Aleax", S_ANGEL, LVL(10, 8, 0, 30, 7), (G_NOHELL|G_NOCORPSE|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_KICK, AD_PHYS, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_IMITATE, MZ_HUMAN), MR_COLD|MR_ELEC|MR_SLEEP|MR_POISON, 0, M1_HUMANOID|M1_SEE_INVIS, M2_MINION|M2_STALK|M2_NASTY|M2_COLLECT, 0, CLR_YELLOW), *************** *** 975,994 **** LVL(4, 18, 4, 0, 0), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_KICK, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2500, 500, 0, MS_SILENT, MZ_LARGE), 0, 0, ! M1_HUMANOID, M2_STRONG|M2_GREEDY|M2_COLLECT, 0, CLR_BROWN), MON("forest centaur", S_CENTAUR, LVL(5, 18, 3, 10, -1), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), ATTK(AT_KICK, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2550, 600, 0, MS_SILENT, MZ_LARGE), 0, 0, ! M1_HUMANOID, M2_STRONG|M2_GREEDY|M2_COLLECT, 0, CLR_GREEN), MON("mountain centaur", S_CENTAUR, LVL(6, 20, 2, 10, -3), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 1,10), ATTK(AT_KICK, AD_PHYS, 1, 6), ATTK(AT_KICK, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2550, 500, 0, MS_SILENT, MZ_LARGE), 0, 0, ! M1_HUMANOID, M2_STRONG|M2_GREEDY|M2_COLLECT, 0, CLR_CYAN), /* * Dragons */ --- 974,993 ---- LVL(4, 18, 4, 0, 0), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_KICK, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2500, 500, 0, MS_HUMANOID, MZ_LARGE), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_STRONG|M2_GREEDY|M2_COLLECT, 0, CLR_BROWN), MON("forest centaur", S_CENTAUR, LVL(5, 18, 3, 10, -1), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), ATTK(AT_KICK, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2550, 600, 0, MS_HUMANOID, MZ_LARGE), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_STRONG|M2_GREEDY|M2_COLLECT, 0, CLR_GREEN), MON("mountain centaur", S_CENTAUR, LVL(6, 20, 2, 10, -3), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 1,10), ATTK(AT_KICK, AD_PHYS, 1, 6), ATTK(AT_KICK, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2550, 500, 0, MS_HUMANOID, MZ_LARGE), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_STRONG|M2_GREEDY|M2_COLLECT, 0, CLR_CYAN), /* * Dragons */ *************** *** 1171,1193 **** NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 30, 0, MS_SILENT, MZ_SMALL), MR_COLD|MR_POISON, MR_COLD|MR_POISON, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS|M1_OMNIVORE, M2_HOSTILE|M2_NEUTER, 0, CLR_BROWN), MON("yellow mold", S_FUNGUS, LVL(1, 0, 9, 0, 0), (G_GENO|2), A(ATTK(AT_NONE, AD_STUN, 0, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 30, 0, MS_SILENT, MZ_SMALL), MR_POISON, MR_POISON, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS| ! M1_OMNIVORE|M1_POIS, M2_HOSTILE|M2_NEUTER, 0, CLR_YELLOW), MON("green mold", S_FUNGUS, LVL(1, 0, 9, 0, 0), (G_GENO|1), A(ATTK(AT_NONE, AD_ACID, 0, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 30, 0, MS_SILENT, MZ_SMALL), MR_ACID|MR_STONE, MR_STONE, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS| ! M1_OMNIVORE|M1_ACID, M2_HOSTILE|M2_NEUTER, 0, CLR_GREEN), MON("red mold", S_FUNGUS, LVL(1, 0, 9, 0, 0), (G_GENO|1), --- 1170,1190 ---- NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 30, 0, MS_SILENT, MZ_SMALL), MR_COLD|MR_POISON, MR_COLD|MR_POISON, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS, M2_HOSTILE|M2_NEUTER, 0, CLR_BROWN), MON("yellow mold", S_FUNGUS, LVL(1, 0, 9, 0, 0), (G_GENO|2), A(ATTK(AT_NONE, AD_STUN, 0, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 30, 0, MS_SILENT, MZ_SMALL), MR_POISON, MR_POISON, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS|M1_POIS, M2_HOSTILE|M2_NEUTER, 0, CLR_YELLOW), MON("green mold", S_FUNGUS, LVL(1, 0, 9, 0, 0), (G_GENO|1), A(ATTK(AT_NONE, AD_ACID, 0, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 30, 0, MS_SILENT, MZ_SMALL), MR_ACID|MR_STONE, MR_STONE, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS|M1_ACID, M2_HOSTILE|M2_NEUTER, 0, CLR_GREEN), MON("red mold", S_FUNGUS, LVL(1, 0, 9, 0, 0), (G_GENO|1), *************** *** 1195,1201 **** NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 30, 0, MS_SILENT, MZ_SMALL), MR_FIRE|MR_POISON, MR_FIRE|MR_POISON, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS|M1_OMNIVORE, M2_HOSTILE|M2_NEUTER, 0, CLR_RED), MON("shrieker", S_FUNGUS, LVL(3, 1, 7, 0, 0), (G_GENO|1), --- 1192,1198 ---- NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(50, 30, 0, MS_SILENT, MZ_SMALL), MR_FIRE|MR_POISON, MR_FIRE|MR_POISON, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS, M2_HOSTILE|M2_NEUTER, 0, CLR_RED), MON("shrieker", S_FUNGUS, LVL(3, 1, 7, 0, 0), (G_GENO|1), *************** *** 1208,1214 **** A(ATTK(AT_TUCH, AD_PHYS, 1, 4), ATTK(AT_TUCH, AD_STCK, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(100, 100, 0, MS_SILENT, MZ_SMALL), MR_POISON, MR_POISON, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS|M1_OMNIVORE, M2_HOSTILE|M2_NEUTER, 0, CLR_MAGENTA), /* * Gnomes --- 1205,1211 ---- A(ATTK(AT_TUCH, AD_PHYS, 1, 4), ATTK(AT_TUCH, AD_STCK, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(100, 100, 0, MS_SILENT, MZ_SMALL), MR_POISON, MR_POISON, ! M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS, M2_HOSTILE|M2_NEUTER, 0, CLR_MAGENTA), /* * Gnomes *************** *** 1218,1242 **** A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(650, 100, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID, M2_COLLECT, 0, CLR_BROWN), MON("gnome lord", S_GNOME, LVL(3, 8, 10, 4, 0), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(700, 120, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID, M2_LORD|M2_MALE|M2_COLLECT, 0, CLR_BLUE), MON("gnomish wizard", S_GNOME, LVL(3, 10, 4, 10, 0), (G_GENO|1), A(ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(700, 120, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID, M2_MAGIC, 0, HI_ZAP), MON("gnome king", S_GNOME, LVL(5, 10, 10, 20, 0), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(750, 150, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID, M2_PRINCE|M2_MALE|M2_COLLECT, 0, HI_LORD), #ifdef SPLITMON_1 }; #endif --- 1215,1239 ---- A(ATTK(AT_WEAP, AD_PHYS, 1, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(650, 100, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_COLLECT, 0, CLR_BROWN), MON("gnome lord", S_GNOME, LVL(3, 8, 10, 4, 0), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(700, 120, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_LORD|M2_MALE|M2_COLLECT, 0, CLR_BLUE), MON("gnomish wizard", S_GNOME, LVL(3, 10, 4, 10, 0), (G_GENO|1), A(ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(700, 120, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_MAGIC, 0, HI_ZAP), MON("gnome king", S_GNOME, LVL(5, 10, 10, 20, 0), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(750, 150, 0, MS_ORC, MZ_SMALL), 0, 0, ! M1_HUMANOID|M1_OMNIVORE, M2_PRINCE|M2_MALE|M2_COLLECT, 0, HI_LORD), #ifdef SPLITMON_1 }; #endif *************** *** 1263,1302 **** LVL(6, 6, 0, 0, 2), (G_GENO|G_NOGEN|1), A(ATTK(AT_WEAP, AD_PHYS, 2,10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2250, 750, 0, MS_SILENT, MZ_HUGE), 0, 0, ! M1_HUMANOID, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_RED), MON("stone giant", S_GIANT, LVL(6, 6, 0, 0, 2), (G_GENO|G_SGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 2,10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2250, 750, 0, MS_SILENT, MZ_HUGE), 0, 0, ! M1_HUMANOID, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_GRAY), MON("hill giant", S_GIANT, LVL(8, 10, 6, 0, -2), (G_GENO|G_SGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2200, 700, 0, MS_SILENT, MZ_HUGE), 0, 0, ! M1_HUMANOID, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_CYAN), MON("fire giant", S_GIANT, LVL(9, 12, 4, 5, 2), (G_GENO|G_SGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 2,10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2250, 750, 0, MS_SILENT, MZ_HUGE), MR_FIRE, MR_FIRE, ! M1_HUMANOID, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_YELLOW), MON("frost giant", S_GIANT, LVL(10, 12, 3, 10, -3), (G_GENO|G_SGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 2,12), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2250, 750, 0, MS_SILENT, MZ_HUGE), MR_COLD, MR_COLD, ! M1_HUMANOID, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_WHITE), MON("ettin", S_GIANT, --- 1260,1299 ---- LVL(6, 6, 0, 0, 2), (G_GENO|G_NOGEN|1), A(ATTK(AT_WEAP, AD_PHYS, 2,10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2250, 750, 0, MS_BOAST, MZ_HUGE), 0, 0, ! M1_HUMANOID|M1_CARNIVORE, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_RED), MON("stone giant", S_GIANT, LVL(6, 6, 0, 0, 2), (G_GENO|G_SGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 2,10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2250, 750, 0, MS_BOAST, MZ_HUGE), 0, 0, ! M1_HUMANOID|M1_CARNIVORE, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_GRAY), MON("hill giant", S_GIANT, LVL(8, 10, 6, 0, -2), (G_GENO|G_SGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2200, 700, 0, MS_BOAST, MZ_HUGE), 0, 0, ! M1_HUMANOID|M1_CARNIVORE, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_CYAN), MON("fire giant", S_GIANT, LVL(9, 12, 4, 5, 2), (G_GENO|G_SGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 2,10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2250, 750, 0, MS_BOAST, MZ_HUGE), MR_FIRE, MR_FIRE, ! M1_HUMANOID|M1_CARNIVORE, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_YELLOW), MON("frost giant", S_GIANT, LVL(10, 12, 3, 10, -3), (G_GENO|G_SGROUP|1), A(ATTK(AT_WEAP, AD_PHYS, 2,12), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2250, 750, 0, MS_BOAST, MZ_HUGE), MR_COLD, MR_COLD, ! M1_HUMANOID|M1_CARNIVORE, M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS, 0, CLR_WHITE), MON("ettin", S_GIANT, *************** *** 1310,1317 **** LVL(16, 18, -3, 70, 9), (1), A(ATTK(AT_WEAP, AD_PHYS, 2, 8), ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2300, 900, 0, MS_SILENT, MZ_HUGE), 0, 0, ! M1_FLY|M1_HUMANOID, M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_MAGIC, 0, CLR_MAGENTA), MON("minotaur", S_GIANT, LVL(15, 15, 6, 0, 0), (G_GENO|G_NOGEN), --- 1307,1314 ---- LVL(16, 18, -3, 70, 9), (1), A(ATTK(AT_WEAP, AD_PHYS, 2, 8), ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(2300, 900, 0, MS_SPELL, MZ_HUGE), 0, 0, ! M1_FLY|M1_HUMANOID|M1_OMNIVORE, M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_MAGIC, 0, CLR_MAGENTA), MON("minotaur", S_GIANT, LVL(15, 15, 6, 0, 0), (G_GENO|G_NOGEN), *************** *** 1519,1537 **** LVL(5, 10, 5, 0, -3), (G_SGROUP|G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 5), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1600, 500, 0, MS_GRUNT, MZ_LARGE), 0, 0, M1_HUMANOID, M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_BROWN), MON("ogre lord", S_OGRE, LVL(7, 12, 3, 30, -5), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1700, 700, 0, MS_GRUNT, MZ_LARGE), 0, 0, M1_HUMANOID, M2_STRONG|M2_LORD|M2_MALE|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_RED), MON("ogre king", S_OGRE, LVL(7, 14, 4, 60, -7), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 3, 5), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1700, 750, 0, MS_GRUNT, MZ_LARGE), 0, 0, M1_HUMANOID, M2_STRONG|M2_PRINCE|M2_MALE|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, HI_LORD), /* --- 1516,1534 ---- LVL(5, 10, 5, 0, -3), (G_SGROUP|G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 5), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1600, 500, 0, MS_GRUNT, MZ_LARGE), 0, 0, M1_HUMANOID|M1_CARNIVORE, M2_STRONG|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_BROWN), MON("ogre lord", S_OGRE, LVL(7, 12, 3, 30, -5), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1700, 700, 0, MS_GRUNT, MZ_LARGE), 0, 0, M1_HUMANOID|M1_CARNIVORE, M2_STRONG|M2_LORD|M2_MALE|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, CLR_RED), MON("ogre king", S_OGRE, LVL(7, 14, 4, 60, -7), (G_GENO|2), A(ATTK(AT_WEAP, AD_PHYS, 3, 5), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1700, 750, 0, MS_GRUNT, MZ_LARGE), 0, 0, M1_HUMANOID|M1_CARNIVORE, M2_STRONG|M2_PRINCE|M2_MALE|M2_GREEDY|M2_JEWELS|M2_COLLECT, 0, HI_LORD), /* *************** *** 1572,1578 **** A(ATTK(AT_CLAW, AD_TLPT, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(WT_HUMAN, 20, 0, MS_HUMANOID, MZ_HUMAN), MR_POISON, 0, ! M1_HUMANOID|M1_POIS|M1_TPORT, M2_HOSTILE, 0, CLR_CYAN), /* * Rust monster */ --- 1569,1575 ---- A(ATTK(AT_CLAW, AD_TLPT, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(WT_HUMAN, 20, 0, MS_HUMANOID, MZ_HUMAN), MR_POISON, 0, ! M1_HUMANOID|M1_OMNIVORE|M1_POIS|M1_TPORT, M2_HOSTILE, 0, CLR_CYAN), /* * Rust monster */ *************** *** 1717,1723 **** LVL(3, 12, 5, 5, -3), (G_GENO|G_NOCORPSE|1), A(ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_MAGC, AD_SPEL, 0, 0), ATTK(AT_WEAP, AD_DRLI, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1200, 0, 0, MS_SILENT, MZ_HUMAN), MR_COLD|MR_SLEEP|MR_POISON, 0, M1_BREATHLESS|M1_HUMANOID, M2_UNDEAD|M2_STALK|M2_HOSTILE|M2_COLLECT, 0, CLR_GRAY), MON("wraith", S_WRAITH, --- 1714,1720 ---- LVL(3, 12, 5, 5, -3), (G_GENO|G_NOCORPSE|1), A(ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_MAGC, AD_SPEL, 0, 0), ATTK(AT_WEAP, AD_DRLI, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1200, 0, 0, MS_SPELL, MZ_HUMAN), MR_COLD|MR_SLEEP|MR_POISON, 0, M1_BREATHLESS|M1_HUMANOID, M2_UNDEAD|M2_STALK|M2_HOSTILE|M2_COLLECT, 0, CLR_GRAY), MON("wraith", S_WRAITH, *************** *** 1730,1738 **** M2_UNDEAD|M2_STALK|M2_HOSTILE, 0, CLR_BLACK), MON("Nazgul", S_WRAITH, LVL(13, 12, 0, 25, -17), (G_GENO|G_NOCORPSE|1), ! A(ATTK(AT_WEAP, AD_DRLI, 1, 4), ATTK(AT_BREA, AD_SLEE, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 0, 0, MS_SILENT, MZ_HUMAN), MR_COLD|MR_SLEEP|MR_POISON, 0, M1_BREATHLESS|M1_HUMANOID, M2_UNDEAD|M2_STALK|M2_STRONG|M2_HOSTILE|M2_MALE|M2_COLLECT, 0, HI_LORD), --- 1727,1735 ---- M2_UNDEAD|M2_STALK|M2_HOSTILE, 0, CLR_BLACK), MON("Nazgul", S_WRAITH, LVL(13, 12, 0, 25, -17), (G_GENO|G_NOCORPSE|1), ! A(ATTK(AT_WEAP, AD_DRLI, 1, 4), ATTK(AT_BREA, AD_SLEE, 2,25), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 0, 0, MS_SPELL, MZ_HUMAN), MR_COLD|MR_SLEEP|MR_POISON, 0, M1_BREATHLESS|M1_HUMANOID, M2_UNDEAD|M2_STALK|M2_STRONG|M2_HOSTILE|M2_MALE|M2_COLLECT, 0, HI_LORD), *************** *** 1761,1767 **** LVL(5, 12, 5, 0, 0), (G_GENO|3), A(ATTK(AT_CLAW, AD_PHYS, 1, 6), ATTK(AT_CLAW, AD_PHYS, 1, 6), ATTK(AT_HUGS, AD_PHYS, 2, 8), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1700, 700, 0, MS_SILENT, MZ_LARGE), 0, 0, M1_ANIMAL|M1_HUMANOID|M1_CARNIVORE, M2_HOSTILE|M2_STRONG|M2_NASTY, 0, CLR_BROWN), MON("yeti", S_YETI, --- 1758,1764 ---- LVL(5, 12, 5, 0, 0), (G_GENO|3), A(ATTK(AT_CLAW, AD_PHYS, 1, 6), ATTK(AT_CLAW, AD_PHYS, 1, 6), ATTK(AT_HUGS, AD_PHYS, 2, 8), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(1700, 700, 0, MS_ROAR, MZ_LARGE), 0, 0, M1_ANIMAL|M1_HUMANOID|M1_CARNIVORE, M2_HOSTILE|M2_STRONG|M2_NASTY, 0, CLR_BROWN), MON("yeti", S_YETI, *************** *** 1924,1944 **** LVL(2, 12, 10, 10, -7), (1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_SILENT, MZ_HUMAN), MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_REGEN|M1_OMNIVORE, M2_NOPOLY|M2_WERE|M2_HOSTILE|M2_HUMAN|M2_COLLECT, 0, CLR_BROWN), MON("werejackal", S_HUMAN, LVL(2, 12, 10, 10, -7), (1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_BARK, MZ_HUMAN), MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_REGEN|M1_OMNIVORE, M2_NOPOLY|M2_WERE|M2_HOSTILE|M2_HUMAN|M2_COLLECT, 0, CLR_RED), MON("werewolf", S_HUMAN, LVL(5, 12, 10, 20, -7), (1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_BARK, MZ_HUMAN), MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_REGEN|M1_OMNIVORE, M2_NOPOLY|M2_WERE|M2_HOSTILE|M2_HUMAN|M2_COLLECT, 0, CLR_ORANGE), --- 1921,1941 ---- LVL(2, 12, 10, 10, -7), (1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_WERE, MZ_HUMAN), MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_REGEN|M1_OMNIVORE, M2_NOPOLY|M2_WERE|M2_HOSTILE|M2_HUMAN|M2_COLLECT, 0, CLR_BROWN), MON("werejackal", S_HUMAN, LVL(2, 12, 10, 10, -7), (1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_WERE, MZ_HUMAN), MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_REGEN|M1_OMNIVORE, M2_NOPOLY|M2_WERE|M2_HOSTILE|M2_HUMAN|M2_COLLECT, 0, CLR_RED), MON("werewolf", S_HUMAN, LVL(5, 12, 10, 20, -7), (1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_WERE, MZ_HUMAN), MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_REGEN|M1_OMNIVORE, M2_NOPOLY|M2_WERE|M2_HOSTILE|M2_HUMAN|M2_COLLECT, 0, CLR_ORANGE), *************** *** 2145,2151 **** LVL(8, 12,-4, 30, -7), (G_NOCORPSE|G_NOGEN), A(ATTK(AT_WEAP, AD_PHYS, 1, 3), ATTK(AT_CLAW, AD_PHYS, 1, 3), ATTK(AT_BITE, AD_PHYS, 1, 3), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_SILENT, MZ_HUMAN), MR_FIRE|MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_SWIM, M2_DEMON|M2_STALK|M2_HOSTILE|M2_NASTY|M2_COLLECT, 0, CLR_BLUE), /* standard demons & devils --- 2142,2148 ---- LVL(8, 12,-4, 30, -7), (G_NOCORPSE|G_NOGEN), A(ATTK(AT_WEAP, AD_PHYS, 1, 3), ATTK(AT_CLAW, AD_PHYS, 1, 3), ATTK(AT_BITE, AD_PHYS, 1, 3), NO_ATTK, NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_DJINNI, MZ_HUMAN), MR_FIRE|MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_SWIM, M2_DEMON|M2_STALK|M2_HOSTILE|M2_NASTY|M2_COLLECT, 0, CLR_BLUE), /* standard demons & devils *************** *** 2236,2242 **** A(ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_BITE, AD_PHYS, 2, 4), ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_SILENT, MZ_LARGE), MR_FIRE|MR_POISON, 0, M1_HUMANOID|M1_POIS, M2_DEMON|M2_STALK|M2_HOSTILE|M2_NASTY, 0, CLR_RED), MON("pit fiend", S_DEMON, LVL(13, 6, -3, 65, -13), (G_HELL|G_NOCORPSE|2), --- 2233,2239 ---- A(ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_BITE, AD_PHYS, 2, 4), ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK), ! SIZ(WT_HUMAN, 400, 0, MS_SPELL, MZ_LARGE), MR_FIRE|MR_POISON, 0, M1_HUMANOID|M1_POIS, M2_DEMON|M2_STALK|M2_HOSTILE|M2_NASTY, 0, CLR_RED), MON("pit fiend", S_DEMON, LVL(13, 6, -3, 65, -13), (G_HELL|G_NOCORPSE|2), *** Old/src/mplayer.c Tue May 28 17:28:48 1996 --- src/mplayer.c Fri May 3 15:26:20 1996 *************** *** 123,129 **** if(!In_endgame(&u.uz)) special = FALSE; ! if ((mtmp = makemon(ptr, x, y)) != 0) { int weapon, quan; struct obj *otmp; --- 123,129 ---- if(!In_endgame(&u.uz)) special = FALSE; ! if ((mtmp = makemon(ptr, x, y, NO_MM_FLAGS)) != 0) { int weapon, quan; struct obj *otmp; *** Old/src/mthrowu.c Tue May 28 17:28:51 1996 --- src/mthrowu.c Tue May 14 15:46:04 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mthrowu.c 3.2 96/03/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mthrowu.c 3.2 96/05/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 36,42 **** struct obj *obj; register const char *name; { ! const char *onm = (obj && obj_is_pname(obj)) ? the(name) : an(name); boolean is_acid = (obj && obj->otyp == ACID_VENOM); if(u.uac + tlev <= rnd(20)) { --- 36,43 ---- struct obj *obj; register const char *name; { ! const char *onm = (obj && obj_is_pname(obj)) ? the(name) : ! (obj->quan > 1) ? name : an(name); boolean is_acid = (obj && obj->otyp == ACID_VENOM); if(u.uac + tlev <= rnd(20)) { *************** *** 148,154 **** return 1; } else { damage = dmgval(otmp, mtmp); - if (damage < 1) damage = 1; if (otmp->otyp == ACID_VENOM && resists_acid(mtmp)) damage = 0; if (ismimic) seemimic(mtmp); --- 149,154 ---- *************** *** 196,201 **** --- 196,202 ---- if ((otmp->otyp == CREAM_PIE || otmp->otyp == BLINDING_VENOM) && haseyes(mtmp->data)) { + /* note: resists_blnd() doesn't apply here */ if (vis) pline("%s is blinded by %s.", Monnam(mtmp), the(xname(otmp))); mtmp->mcansee = 0; *** Old/src/muse.c Tue May 28 17:28:53 1996 --- src/muse.c Fri May 3 15:26:21 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)muse.c 3.2 96/02/14 */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)muse.c 3.2 96/04/29 */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 74,80 **** if (!enexto(&cc, mon->mx, mon->my, &mons[PM_GHOST])) return 0; mquaffmsg(mon, obj); m_useup(mon, obj); ! mtmp = makemon(&mons[PM_GHOST], cc.x, cc.y); if (!mtmp) { if (vis) pline(empty); } else { --- 74,80 ---- if (!enexto(&cc, mon->mx, mon->my, &mons[PM_GHOST])) return 0; mquaffmsg(mon, obj); m_useup(mon, obj); ! mtmp = makemon(&mons[PM_GHOST], cc.x, cc.y, NO_MM_FLAGS); if (!mtmp) { if (vis) pline(empty); } else { *************** *** 96,102 **** if (!enexto(&cc, mon->mx, mon->my, &mons[PM_DJINNI])) return 0; mquaffmsg(mon, obj); m_useup(mon, obj); ! mtmp = makemon(&mons[PM_DJINNI], cc.x, cc.y); if (!mtmp) { if (vis) pline(empty); } else { --- 96,102 ---- if (!enexto(&cc, mon->mx, mon->my, &mons[PM_DJINNI])) return 0; mquaffmsg(mon, obj); m_useup(mon, obj); ! mtmp = makemon(&mons[PM_DJINNI], cc.x, cc.y, NO_MM_FLAGS); if (!mtmp) { if (vis) pline(empty); } else { *************** *** 162,179 **** struct monst *mtmp; struct obj *otmp; { ! boolean vismon = (canseemon(mtmp)); ! if (flags.soundok) ! otmp->dknown = 1; if (!vismon) { ! if (flags.soundok) ! You_hear("%s reading %s.", ! an(Hallucination ? rndmonnam() : mtmp->data->mname), ! singular(otmp, doname)); ! } else pline("%s reads %s!", Monnam(mtmp), singular(otmp,doname)); ! if (mtmp->mconf && (vismon || flags.soundok)) ! pline("Being confused, %s mispronounces the magic words...", ! vismon ? mon_nam(mtmp) : he[pronoun_gender(mtmp)]); } static void --- 162,197 ---- struct monst *mtmp; struct obj *otmp; { ! boolean vismon = canseemon(mtmp); ! char saverole, onambuf[BUFSZ]; ! unsigned savebknown; ! ! if (!vismon && !flags.soundok) ! return; /* no feedback */ ! ! otmp->dknown = 1; /* seeing or hearing it read reveals its label */ ! /* shouldn't be able to hear curse/bless status of unseen scrolls; ! for priest characters, bknown will always be set during naming */ ! savebknown = otmp->bknown; ! saverole = u.role; if (!vismon) { ! otmp->bknown = 0; ! if (Role_is('P')) u.role = '@'; /* '@' => not 'P' */ ! } ! Strcpy(onambuf, singular(otmp, doname)); ! otmp->bknown = savebknown; ! u.role = saverole; ! ! if (vismon) ! pline("%s reads %s!", Monnam(mtmp), onambuf); ! else ! You_hear("%s reading %s.", ! an(Hallucination ? rndmonnam() : mtmp->data->mname), ! onambuf); ! ! if (mtmp->mconf) ! pline("Being confused, %s mispronounces the magic words...", ! vismon ? mon_nam(mtmp) : he[pronoun_gender(mtmp)]); } static void *************** *** 592,598 **** if (!enexto(&cc, mtmp->mx, mtmp->my, pm)) return 0; mzapmsg(mtmp, otmp, FALSE); otmp->spe--; ! mon = makemon((struct permonst *)0, cc.x, cc.y); if (mon && canspotmon(mon) && oseen) makeknown(WAN_CREATE_MONSTER); return 2; --- 610,616 ---- if (!enexto(&cc, mtmp->mx, mtmp->my, pm)) return 0; mzapmsg(mtmp, otmp, FALSE); otmp->spe--; ! mon = makemon((struct permonst *)0, cc.x, cc.y, NO_MM_FLAGS); if (mon && canspotmon(mon) && oseen) makeknown(WAN_CREATE_MONSTER); return 2; *************** *** 614,620 **** /* `fish' potentially gives bias towards water locations; `pm' is what to actually create (0 => random) */ if (!enexto(&cc, mtmp->mx, mtmp->my, fish)) break; ! mon = makemon(pm, cc.x, cc.y); if (mon && canspotmon(mon)) known = TRUE; } /* The only case where we don't use oseen. For wands, you --- 632,638 ---- /* `fish' potentially gives bias towards water locations; `pm' is what to actually create (0 => random) */ if (!enexto(&cc, mtmp->mx, mtmp->my, fish)) break; ! mon = makemon(pm, cc.x, cc.y, NO_MM_FLAGS); if (mon && canspotmon(mon)) known = TRUE; } /* The only case where we don't use oseen. For wands, you *************** *** 826,831 **** --- 844,851 ---- #define MUSE_POT_PARALYSIS 9 #define MUSE_POT_BLINDNESS 10 #define MUSE_POT_CONFUSION 11 + #define MUSE_FROST_HORN 12 + #define MUSE_FIRE_HORN 13 /* Select an offensive item/action for a monster. Returns TRUE iff one is * found. *************** *** 871,881 **** --- 891,911 ---- m.offensive = obj; m.has_offense = MUSE_WAN_FIRE; } + nomore(MUSE_FIRE_HORN); + if(obj->otyp == FIRE_HORN && obj->spe > 0) { + m.offensive = obj; + m.has_offense = MUSE_FIRE_HORN; + } nomore(MUSE_WAN_COLD); if(obj->otyp == WAN_COLD && obj->spe > 0) { m.offensive = obj; m.has_offense = MUSE_WAN_COLD; } + nomore(MUSE_FROST_HORN); + if(obj->otyp == FROST_HORN && obj->spe > 0) { + m.offensive = obj; + m.has_offense = MUSE_FROST_HORN; + } nomore(MUSE_WAN_LIGHTNING); if(obj->otyp == WAN_LIGHTNING && obj->spe > 0) { m.offensive = obj; *************** *** 1107,1112 **** --- 1137,1156 ---- sgn(mtmp->mux-mtmp->mx), sgn(mtmp->muy-mtmp->my)); m_using = FALSE; return (mtmp->mhp <= 0) ? 1 : 2; + case MUSE_FIRE_HORN: + case MUSE_FROST_HORN: + if (oseen) { + makeknown(otmp->otyp); + pline("%s plays a %s!", Monnam(mtmp), xname(otmp)); + } else + You_hear("a horn being played."); + otmp->spe--; + m_using = TRUE; + buzz(-30 - ((otmp->otyp==FROST_HORN) ? AD_COLD-1 : AD_FIRE-1), + rn1(6,6), mtmp->mx, mtmp->my, + sgn(mtmp->mux-mtmp->mx), sgn(mtmp->muy-mtmp->my)); + m_using = FALSE; + return (mtmp->mhp <= 0) ? 1 : 2; case MUSE_WAN_TELEPORTATION: case MUSE_WAN_STRIKING: zap_oseen = oseen; *************** *** 1599,1604 **** --- 1643,1650 ---- acidic(&mons[obj->corpsenm]))) || (typ == UNICORN_HORN && !obj->cursed && mon->data->mlet != S_UNICORN) + || typ == FROST_HORN + || typ == FIRE_HORN )); } *** Old/src/objects.c Tue May 28 17:29:05 1996 --- src/objects.c Fri May 24 08:52:02 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)objects.c 3.2 96/03/28 */ /* Copyright (c) Mike Threepoint, 1989. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)objects.c 3.2 96/05/23 */ /* Copyright (c) Mike Threepoint, 1989. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 45,50 **** --- 45,55 ---- # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \ {0, 0, (char *)0, bits, prp, sym, dly, COLOR_FIELD(color) \ prob, wt, cost, sdam, ldam, oc1, oc2, nut} + # ifndef lint + # define HARDGEM(n) (n >= 8) + # else + # define HARDGEM(n) (0) + # endif NEARDATA struct objclass objects[] = { #endif *************** *** 464,470 **** /* rings ... */ #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \ OBJ(name,stone), \ ! BITS(0,0,spec,0,mgc,spec,0,0,0,mohs>=8,0,0,metal), \ power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color ) RING("adornment", ADORNED, "wooden", 100, 1, 1, 2, WOOD, HI_WOOD), RING("gain strength", 0, "granite", 150, 1, 1, 7, MINERAL, HI_MINERAL), --- 469,475 ---- /* rings ... */ #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \ OBJ(name,stone), \ ! BITS(0,0,spec,0,mgc,spec,0,0,0,HARDGEM(mohs),0,0,metal), \ power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color ) RING("adornment", ADORNED, "wooden", 100, 1, 1, 2, WOOD, HI_WOOD), RING("gain strength", 0, "granite", 150, 1, 1, 7, MINERAL, HI_MINERAL), *************** *** 818,828 **** /* gems ... - includes stones and rocks but not boulders */ #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \ OBJ(name,desc), \ ! BITS(0,1,0,0,0,0,0,0,0,mohs>=8,0,WEP_AMMO,glass), 0, \ GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, WP_SLING, nutr, color ) #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \ OBJ(name,desc), \ ! BITS(kn,1,0,0,mgc,0,0,0,0,mohs>=8,0,WEP_AMMO,glass), 0, \ GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, WP_SLING, nutr, color ) GEM("dilithium crystal", "white", 3, 1, 4500, 15, 5, GEMSTONE, CLR_WHITE), GEM("diamond", "white", 4, 1, 4000, 15, 10, GEMSTONE, CLR_WHITE), --- 823,833 ---- /* gems ... - includes stones and rocks but not boulders */ #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \ OBJ(name,desc), \ ! BITS(0,1,0,0,0,0,0,0,0,HARDGEM(mohs),0,WEP_AMMO,glass), 0, \ GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, WP_SLING, nutr, color ) #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \ OBJ(name,desc), \ ! BITS(kn,1,0,0,mgc,0,0,0,0,HARDGEM(mohs),0,WEP_AMMO,glass), 0, \ GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, WP_SLING, nutr, color ) GEM("dilithium crystal", "white", 3, 1, 4500, 15, 5, GEMSTONE, CLR_WHITE), GEM("diamond", "white", 4, 1, 4000, 15, 10, GEMSTONE, CLR_WHITE), *** Old/src/objnam.c Tue May 28 17:29:09 1996 --- src/objnam.c Tue May 14 16:57:22 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)objnam.c 3.2 96/03/17 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)objnam.c 3.2 96/05/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 1292,1309 **** actualn = dn = un = 0; /* first, remove extra whitespace they may have typed */ ! if (bp) { ! char c, *p2; ! boolean was_space = TRUE; ! ! for (p = p2 = bp; (c = *p) != '\0'; p++) { ! /* if (c == '\t') c = ' '; */ ! if (c != ' ' || !was_space) *p2++ = c; ! was_space = (c == ' '); ! } ! if (was_space && p2 > bp) p2--; ! *p2 = '\0'; ! } for(;;) { register int l; --- 1292,1298 ---- actualn = dn = un = 0; /* first, remove extra whitespace they may have typed */ ! if (bp) (void)mungspaces(bp); for(;;) { register int l; *************** *** 1959,1964 **** --- 1948,1955 ---- } break; case STATUE: otmp->corpsenm = mntmp; + if (Has_contents(otmp) && verysmall(&mons[mntmp])) + delete_contents(otmp); /* no spellbook */ break; case SCALE_MAIL: /* Dragon mail - depends on the order of objects */ *************** *** 2054,2060 **** && !wizard #endif ) { ! artifact_unexist(otmp); obfree(otmp, (struct obj *) 0); otmp = &zeroobj; pline( --- 2045,2051 ---- && !wizard #endif ) { ! artifact_exists(otmp, ONAME(otmp), FALSE); obfree(otmp, (struct obj *) 0); otmp = &zeroobj; pline( *** Old/src/options.c Tue May 28 17:29:15 1996 --- src/options.c Tue May 28 10:48:04 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)options.c 3.2 96/02/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)options.c 3.2 96/05/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 123,128 **** --- 123,133 ---- #else {"popup_dialog", (boolean *)0, FALSE}, #endif + #if defined(MSDOS) && defined(USE_TILES) + {"preload_tiles", &flags.preload_tiles, TRUE}, + #else + {"preload_tiles", (boolean *)0, FALSE}, + #endif #if defined(MICRO) && !defined(AMIGA) {"rawio", &flags.rawio, FALSE}, #else *************** *** 172,218 **** * typing when game maintains information in * a different format */ } compopt[] = { ! { "catname", "the name of your (first) cat (e.g., catname:Tabby),", PL_PSIZ }, ! { "disclose", "the kinds of information to disclose at end of game,", sizeof(flags.end_disclose) }, ! { "dogname", "the name of your (first) dog (e.g., dogname:Fang),", PL_PSIZ }, ! { "dungeon", "the symbols to use in drawing the dungeon map,", MAXDCHARS+1 }, ! { "effects", "the symbols to use in drawing special effects,", MAXECHARS+1 }, ! { "fruit", "the name of a fruit you enjoy eating,", PL_FSIZ }, ! { "menustyle", "user interface for object selection,", MENUTYPELEN }, ! { "monsters", "the symbols to use for monsters,", MAXMCLASSES }, ! { "msghistory", "number of top line messages to save,", 5 }, ! { "name", "your character's name (e.g., name:Merlin-W),", PL_NSIZ }, ! { "objects", "the symbols to use for objects,", MAXOCLASSES }, ! { "packorder", "the inventory order of the items in your pack,", MAXOCLASSES }, #ifdef CHANGE_COLOR ! { "palette", "palette (00c/880/-fff is blue/yellow/reverse white),", 15 }, # if defined(MAC) ! { "hicolor", "same as palette, only order is reversed,", 15 }, # endif #endif ! { "pettype", "your preferred initial pet type,", 4 }, ! { "pickup_types", "types of objects to pick up automatically,", MAXOCLASSES }, ! { "scores", "the parts of the score list you wish to see,", 32 }, #ifdef MSDOS ! { "soundcard", "type of sound card to use,", 20 }, #endif ! { "traps", "the symbols to use in drawing traps,", MAXTCHARS+1 }, #ifdef MSDOS ! { "video", "method of video updating,", 20 }, #endif #ifdef VIDEOSHADES ! { "videocolors", "color mappings for internal screen routines,", 40 }, ! { "videoshades", "gray shades to map to black/gray/white,", 32 }, #endif ! { "windowtype", "windowing system to use.", WINTYPELEN }, { (char *)0, (char *)0, 0 } }; --- 177,234 ---- * typing when game maintains information in * a different format */ } compopt[] = { ! { "catname", "the name of your (first) cat (e.g., catname:Tabby)", PL_PSIZ }, ! { "disclose", "the kinds of information to disclose at end of game", sizeof(flags.end_disclose) }, ! { "dogname", "the name of your (first) dog (e.g., dogname:Fang)", PL_PSIZ }, ! { "dungeon", "the symbols to use in drawing the dungeon map", MAXDCHARS+1 }, ! { "effects", "the symbols to use in drawing special effects", MAXECHARS+1 }, ! { "fruit", "the name of a fruit you enjoy eating", PL_FSIZ }, ! { "menustyle", "user interface for object selection", MENUTYPELEN }, ! { "menu_deselect_all", "deselect all items in a menu", 4}, ! { "menu_deselect_page", "deselect all items on this page of a menu", 4}, ! { "menu_first_page", "jump to the first page in a menu", 4}, ! { "menu_invert_all", "invert all items in a menu", 4}, ! { "menu_invert_page", "invert all items on this page of a menu", 4}, ! { "menu_last_page", "jump to the last page in a menu", 4}, ! { "menu_next_page", "goto the next menu page", 4}, ! { "menu_previous_page", "goto the previous menu page", 4}, ! { "menu_search", "search for a menu item", 4}, ! { "menu_select_all", "select all items in a menu", 4}, ! { "menu_select_page", "select all items on this page of a menu", 4}, ! { "monsters", "the symbols to use for monsters", MAXMCLASSES }, ! { "msghistory", "number of top line messages to save", 5 }, ! { "name", "your character's name (e.g., name:Merlin-W)", PL_NSIZ }, ! { "objects", "the symbols to use for objects", MAXOCLASSES }, ! { "packorder", "the inventory order of the items in your pack", MAXOCLASSES }, #ifdef CHANGE_COLOR ! { "palette", "palette (00c/880/-fff is blue/yellow/reverse white)", 15 }, # if defined(MAC) ! { "hicolor", "same as palette, only order is reversed", 15 }, # endif #endif ! { "pettype", "your preferred initial pet type", 4 }, ! { "pickup_types", "types of objects to pick up automatically", MAXOCLASSES }, ! { "scores", "the parts of the score list you wish to see", 32 }, #ifdef MSDOS ! { "soundcard", "type of sound card to use", 20 }, #endif ! { "traps", "the symbols to use in drawing traps", MAXTCHARS+1 }, #ifdef MSDOS ! { "video", "method of video updating", 20 }, #endif #ifdef VIDEOSHADES ! { "videocolors", "color mappings for internal screen routines", 40 }, ! { "videoshades", "gray shades to map to black/gray/white", 32 }, #endif ! { "windowtype", "windowing system to use", WINTYPELEN }, { (char *)0, (char *)0, 0 } }; *************** *** 240,249 **** --- 256,324 ---- TOOL_CLASS, GEM_CLASS, ROCK_CLASS, BALL_CLASS, CHAIN_CLASS, 0, }; + /* + * Default menu manipulation command accelerators. These may _not_ be: + * + * + a number - reserved for counts + * + an upper or lower case US ASCII letter - used for accelerators + * + ESC - reserved for escaping the menu + * + NULL, CR or LF - reserved for commiting the selection(s). NULL + * is kind of odd, but the tty's xwaitforspace() will return it if + * someone hits a . + * + a default object class symbol - used for object class accelerators + * + * Standard letters (for now) are: + * + * < back 1 page + * > forward 1 page + * ^ first page + * | last page + * : search + * + * page all + * , select . + * \ deselect - + * ~ invert @ + * + * The command name list is duplicated in the compopt array. + */ + typedef struct { + const char *name; + char cmd; + } menu_cmd_t; + + #define NUM_MENU_CMDS 11 + static const menu_cmd_t default_menu_cmd_info[NUM_MENU_CMDS] = { + /* 0*/ { "menu_first_page", MENU_FIRST_PAGE }, + { "menu_last_page", MENU_LAST_PAGE }, + { "menu_next_page", MENU_NEXT_PAGE }, + { "menu_previous_page", MENU_PREVIOUS_PAGE }, + { "menu_select_all", MENU_SELECT_ALL }, + /* 5*/ { "menu_deselect_all", MENU_UNSELECT_ALL }, + { "menu_invert_all", MENU_INVERT_ALL }, + { "menu_select_page", MENU_SELECT_PAGE }, + { "menu_deselect_page", MENU_UNSELECT_PAGE }, + { "menu_invert_page", MENU_INVERT_PAGE }, + /*10*/ { "menu_search", MENU_SEARCH }, + }; + + /* + * Allow the user to map incoming characters to various menu commands. + * The accelerator list must be a valid C string. + */ + #define MAX_MENU_MAPPED_CMDS 32 /* some number */ + char mapped_menu_cmds[MAX_MENU_MAPPED_CMDS+1]; /* exported */ + static char mapped_menu_op[MAX_MENU_MAPPED_CMDS+1]; + static short n_menu_mapped = 0; + + static boolean initial, from_file; + static void FDECL(doset_add_menu, (winid,const char *,const char *,int)); + static boolean FDECL(match_optname, (const char *,const char *,int,BOOLEAN_P)); static void FDECL(nmcpy, (char *, const char *, int)); static void FDECL(escapes, (const char *, char *)); + static int FDECL(boolopt_only_initial, (int)); static void FDECL(rejectoption, (const char *)); static void FDECL(badoption, (const char *)); static char *FDECL(string_for_opt, (char *,BOOLEAN_P)); *************** *** 253,262 **** static void FDECL(oc_to_str, (char *, char *)); static void FDECL(graphics_opts, (char *,const char *,int,int)); void initoptions() { ! register char *opts; int i; for (i = 0; boolopt[i].name; i++) { --- 328,357 ---- static void FDECL(oc_to_str, (char *, char *)); static void FDECL(graphics_opts, (char *,const char *,int,int)); + /* check whether a user-supplied option string is a proper leading + substring of a particular option name; option string might have + a colon and arbitrary value appended to it */ + static boolean + match_optname(user_string, opt_name, min_length, val_allowed) + const char *user_string, *opt_name; + int min_length; + boolean val_allowed; + { + int len = (int)strlen(user_string); + + if (val_allowed) { + const char *p = index(user_string, ':'); + + if (p) len = (int)(p - user_string); + } + + return (len >= min_length) && !strncmpi(opt_name, user_string, len); + } + void initoptions() { ! char *opts; int i; for (i = 0; boolopt[i].name; i++) { *************** *** 423,428 **** --- 518,540 ---- *tp = '\0'; } + /* some boolean options can only be set on start-up */ + static int + boolopt_only_initial(i) + int i; + { + return (boolopt[i].addr == &flags.female + || boolopt[i].addr == &flags.legacy + #if defined(MICRO) && !defined(AMIGA) + || boolopt[i].addr == &flags.rawio + || boolopt[i].addr == &flags.BIOS + #endif + #if defined(MSDOS) && defined(USE_TILES) + || boolopt[i].addr == &flags.preload_tiles + #endif + ); + } + static void rejectoption(optname) const char *optname; *************** *** 576,582 **** unsigned num; boolean negated; int i; - char tbuf[MAXOCLASSES + 1]; const char *fullname; initial = tinitial; --- 688,693 ---- *************** *** 600,611 **** /* variant spelling */ ! if (!strcmpi(opts, "colour")) ! Strcpy(opts, "color"); /* fortunately this is shorter */ /* special boolean options */ ! if (!strncmpi(opts, "female", 3)) { if(!initial && flags.female == negated) pline("That is not anatomically possible."); else --- 711,722 ---- /* variant spelling */ ! if (match_optname(opts, "colour", 5, FALSE)) ! Strcpy(opts, "color"); /* fortunately this isn't longer */ /* special boolean options */ ! if (match_optname(opts, "female", 3, FALSE)) { if(!initial && flags.female == negated) pline("That is not anatomically possible."); else *************** *** 613,619 **** return; } ! if (!strncmpi(opts, "male", 4)) { if(!initial && flags.female != negated) pline("That is not anatomically possible."); else --- 724,730 ---- return; } ! if (match_optname(opts, "male", 4, FALSE)) { if(!initial && flags.female != negated) pline("That is not anatomically possible."); else *************** *** 623,638 **** #if defined(MICRO) && !defined(AMIGA) /* included for compatibility with old NetHack.cnf files */ ! if (!strncmp(opts, "IBM_", 4)) { flags.BIOS = !negated; return; } #endif /* MICRO */ /* compound options */ ! fullname = "pettype"; ! if (!strncmpi(opts, fullname, 3)) { if ((op = string_for_env_opt(fullname, opts, negated)) != 0) { if (negated) bad_negation(fullname, TRUE); else switch (*op) { --- 734,749 ---- #if defined(MICRO) && !defined(AMIGA) /* included for compatibility with old NetHack.cnf files */ ! if (match_optname(opts, "IBM_", 4, FALSE)) { flags.BIOS = !negated; return; } #endif /* MICRO */ /* compound options */ ! fullname = "pettype"; ! if (match_optname(opts, fullname, 3, TRUE)) { if ((op = string_for_env_opt(fullname, opts, negated)) != 0) { if (negated) bad_negation(fullname, TRUE); else switch (*op) { *************** *** 655,661 **** } fullname = "catname"; ! if (!strncmpi(opts, fullname, 3)) { if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) nmcpy(catname, op, PL_PSIZ); --- 766,772 ---- } fullname = "catname"; ! if (match_optname(opts, fullname, 3, TRUE)) { if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) nmcpy(catname, op, PL_PSIZ); *************** *** 663,669 **** } fullname = "dogname"; ! if (!strncmpi(opts, fullname, 3)) { if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) nmcpy(dogname, op, PL_PSIZ); --- 774,780 ---- } fullname = "dogname"; ! if (match_optname(opts, fullname, 3, TRUE)) { if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) nmcpy(dogname, op, PL_PSIZ); *************** *** 671,677 **** } fullname = "msghistory"; ! if (!strncmpi(opts, fullname, 3)) { op = string_for_env_opt(fullname, opts, negated); if ((negated && !op) || (!negated && op)) { flags.msg_history = negated ? 0 : atoi(op); --- 782,788 ---- } fullname = "msghistory"; ! if (match_optname(opts, fullname, 3, TRUE)) { op = string_for_env_opt(fullname, opts, negated); if ((negated && !op) || (!negated && op)) { flags.msg_history = negated ? 0 : atoi(op); *************** *** 680,694 **** } #ifdef CHANGE_COLOR ! if (!strncmpi(opts, "palette", 3) # ifdef MAC ! || !strncmpi(opts, "hicolor", 3) # endif ) { int color_number, color_incr; # ifdef MAC ! if (!strncmpi(opts, "hicolor", 3)) { if (negated) { bad_negation("hicolor", FALSE); return; --- 791,805 ---- } #ifdef CHANGE_COLOR ! if (match_optname(opts, "palette", 3, TRUE) # ifdef MAC ! || match_optname(opts, "hicolor", 3, TRUE) # endif ) { int color_number, color_incr; # ifdef MAC ! if (match_optname(opts, "hicolor", 3, TRUE)) { if (negated) { bad_negation("hicolor", FALSE); return; *************** *** 754,760 **** } #endif ! if (!strncmpi(opts, "fruit", 2)) { char empty_str = '\0'; op = string_for_opt(opts, negated); if (negated) { --- 865,871 ---- } #endif ! if (match_optname(opts, "fruit", 2, TRUE)) { char empty_str = '\0'; op = string_for_opt(opts, negated); if (negated) { *************** *** 796,820 **** /* graphics:string */ fullname = "graphics"; ! if (!strncmpi(opts, fullname, 2)) { if (negated) bad_negation(fullname, FALSE); else graphics_opts(opts, fullname, MAXPCHARS, 0); return; } fullname = "dungeon"; ! if (!strncmpi(opts, fullname, 2)) { if (negated) bad_negation(fullname, FALSE); else graphics_opts(opts, fullname, MAXDCHARS, 0); return; } fullname = "traps"; ! if (!strncmpi(opts, fullname, 2)) { if (negated) bad_negation(fullname, FALSE); else graphics_opts(opts, fullname, MAXTCHARS, MAXDCHARS); return; } fullname = "effects"; ! if (!strncmpi(opts, fullname, 2)) { if (negated) bad_negation(fullname, FALSE); else graphics_opts(opts, fullname, MAXECHARS, MAXDCHARS+MAXTCHARS); --- 907,931 ---- /* graphics:string */ fullname = "graphics"; ! if (match_optname(opts, fullname, 2, TRUE)) { if (negated) bad_negation(fullname, FALSE); else graphics_opts(opts, fullname, MAXPCHARS, 0); return; } fullname = "dungeon"; ! if (match_optname(opts, fullname, 2, TRUE)) { if (negated) bad_negation(fullname, FALSE); else graphics_opts(opts, fullname, MAXDCHARS, 0); return; } fullname = "traps"; ! if (match_optname(opts, fullname, 2, TRUE)) { if (negated) bad_negation(fullname, FALSE); else graphics_opts(opts, fullname, MAXTCHARS, MAXDCHARS); return; } fullname = "effects"; ! if (match_optname(opts, fullname, 2, TRUE)) { if (negated) bad_negation(fullname, FALSE); else graphics_opts(opts, fullname, MAXECHARS, MAXDCHARS+MAXTCHARS); *************** *** 823,829 **** /* objects:string */ fullname = "objects"; ! if (!strncmpi(opts, fullname, 7)) { int length; if (negated) { --- 934,940 ---- /* objects:string */ fullname = "objects"; ! if (match_optname(opts, fullname, 7, TRUE)) { int length; if (negated) { *************** *** 854,860 **** /* monsters:string */ fullname = "monsters"; ! if (!strncmpi(opts, fullname, 8)) { int length; if (negated) { --- 965,971 ---- /* monsters:string */ fullname = "monsters"; ! if (match_optname(opts, fullname, 8, TRUE)) { int length; if (negated) { *************** *** 877,883 **** /* name:string */ fullname = "name"; ! if (!strncmpi(opts, fullname, 4)) { if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) nmcpy(plname, op, PL_NSIZ); --- 988,994 ---- /* name:string */ fullname = "name"; ! if (match_optname(opts, fullname, 4, TRUE)) { if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) nmcpy(plname, op, PL_NSIZ); *************** *** 886,892 **** /* the order to list the pack */ fullname = "packorder"; ! if (!strncmpi(opts, fullname, 4)) { if (negated) { bad_negation(fullname, FALSE); return; --- 997,1003 ---- /* the order to list the pack */ fullname = "packorder"; ! if (match_optname(opts, fullname, 4, TRUE)) { if (negated) { bad_negation(fullname, FALSE); return; *************** *** 898,933 **** } /* types of objects to pick up automatically */ ! if (!strncmpi(opts, "pickup_types", 4)) { int oc_sym; ! boolean badopt = FALSE, compat = (strlen(opts) <= 6); oc_to_str(flags.pickup_types, tbuf); flags.pickup_types[0] = '\0'; /* all */ ! op = string_for_opt(opts, TRUE); if (!op) { ! if (!compat && !negated) { ! char ocl[MAXOCLASSES + 1]; ! ! oc_to_str(flags.inv_order, ocl); ! if (choose_classes_menu("Auto-Pickup what?", 1, ! TRUE, ocl, tbuf)) ! op = tbuf; ! else ! return; ! } else if (!compat) { ! /* !pickup_types means no pickup types, but we can't do ! that by just emptying pickup_types, because that's a ! special case which means all types rather than none */ ! flags.pickup = 0; return; ! } else { ! /* for backwards compatibility, "pickup" without a value ! (as opposed to "pickup_types" without a value) ! is a synonym for boolean autopickup, and pickup_types ! gets reset to "all" */ ! flags.pickup = !negated; ! return; } } if (negated) { --- 1009,1049 ---- } /* types of objects to pick up automatically */ ! if (match_optname(opts, "pickup_types", 4, TRUE)) { ! char ocl[MAXOCLASSES + 1], tbuf[MAXOCLASSES + 1], ! qbuf[QBUFSZ], abuf[BUFSZ]; int oc_sym; ! boolean badopt = FALSE, compat = (strlen(opts) <= 6), use_menu; oc_to_str(flags.pickup_types, tbuf); flags.pickup_types[0] = '\0'; /* all */ ! op = string_for_opt(opts, (compat || !initial)); if (!op) { ! if (compat || negated || initial) { ! /* for backwards compatibility, "pickup" without a ! value is a synonym for autopickup of all types ! (and during initialization, we can't prompt yet) */ ! flags.pickup = !negated; return; ! } ! oc_to_str(flags.inv_order, ocl); ! use_menu = TRUE; ! if (flags.menu_style == MENU_TRADITIONAL || ! flags.menu_style == MENU_COMBINATION) { ! use_menu = FALSE; ! Sprintf(qbuf, "New pickup_types: [%s am] (%s)", ! ocl, *tbuf ? tbuf : "all"); ! getlin(qbuf, abuf); ! op = mungspaces(abuf); ! if (abuf[0] == '\0' || abuf[0] == '\033') ! op = tbuf; /* restore */ ! else if (abuf[0] == 'm') ! use_menu = TRUE; ! } ! if (use_menu) { ! (void) choose_classes_menu("Auto-Pickup what?", 1, ! TRUE, ocl, tbuf); ! op = tbuf; } } if (negated) { *************** *** 954,960 **** } /* things to disclose at end of game */ ! if (!strncmpi(opts, "disclose", 4)) { flags.end_disclose[0] = '\0'; /* all */ if (!(op = string_for_opt(opts, TRUE))) { /* for backwards compatibility, "disclose" without a --- 1070,1076 ---- } /* things to disclose at end of game */ ! if (match_optname(opts, "disclose", 4, TRUE)) { flags.end_disclose[0] = '\0'; /* all */ if (!(op = string_for_opt(opts, TRUE))) { /* for backwards compatibility, "disclose" without a *************** *** 985,991 **** } /* scores:5t[op] 5a[round] o[wn] */ ! if (!strncmpi(opts, "scores", 6)) { if (negated) { bad_negation("scores", FALSE); return; --- 1101,1107 ---- } /* scores:5t[op] 5a[round] o[wn] */ ! if (match_optname(opts, "scores", 4, TRUE)) { if (negated) { bad_negation("scores", FALSE); return; *************** *** 1026,1032 **** #ifdef VIDEOSHADES /* videocolors:string */ fullname = "videocolors"; ! if (!strncmpi(opts, fullname, 6)) { if (negated) { bad_negation(fullname, FALSE); return; --- 1142,1149 ---- #ifdef VIDEOSHADES /* videocolors:string */ fullname = "videocolors"; ! if (match_optname(opts, fullname, 6, TRUE) || ! match_optname(opts, "videocolours", 10, TRUE)) { if (negated) { bad_negation(fullname, FALSE); return; *************** *** 1040,1046 **** } /* videoshades:string */ fullname = "videoshades"; ! if (!strncmpi(opts, fullname, 6)) { if (negated) { bad_negation(fullname, FALSE); return; --- 1157,1163 ---- } /* videoshades:string */ fullname = "videoshades"; ! if (match_optname(opts, fullname, 6, TRUE)) { if (negated) { bad_negation(fullname, FALSE); return; *************** *** 1057,1063 **** # ifdef NO_TERMS /* video:string -- must be after longer tests */ fullname = "video"; ! if (!strncmpi(opts, fullname, 5)) { if (negated) { bad_negation(fullname, FALSE); return; --- 1174,1180 ---- # ifdef NO_TERMS /* video:string -- must be after longer tests */ fullname = "video"; ! if (match_optname(opts, fullname, 5, TRUE)) { if (negated) { bad_negation(fullname, FALSE); return; *************** *** 1069,1078 **** badoption(opts); return; } ! # endif /* soundcard:string -- careful not to match boolean 'sound' */ fullname = "soundcard"; ! if (!strncmpi(opts, fullname, 6)) { if (negated) { bad_negation(fullname, FALSE); return; --- 1186,1195 ---- badoption(opts); return; } ! # endif /* NO_TERMS */ /* soundcard:string -- careful not to match boolean 'sound' */ fullname = "soundcard"; ! if (match_optname(opts, fullname, 6, TRUE)) { if (negated) { bad_negation(fullname, FALSE); return; *************** *** 1084,1092 **** badoption(opts); return; } ! #endif fullname = "windowtype"; ! if (!strncmpi(opts, fullname, 3)) { if (negated) { bad_negation(fullname, FALSE); return; --- 1201,1210 ---- badoption(opts); return; } ! #endif /* MSDOS */ ! fullname = "windowtype"; ! if (match_optname(opts, fullname, 3, TRUE)) { if (negated) { bad_negation(fullname, FALSE); return; *************** *** 1099,1105 **** } /* menustyle:traditional or combo or full or partial */ ! if (!strncmpi(opts, "menustyle", 4)) { int tmp; boolean val_required = (strlen(opts) > 5 && !negated); --- 1217,1223 ---- } /* menustyle:traditional or combo or full or partial */ ! if (match_optname(opts, "menustyle", 4, TRUE)) { int tmp; boolean val_required = (strlen(opts) > 5 && !negated); *************** *** 1128,1139 **** } return; } /* OK, if we still haven't recognized the option, check the boolean * options list */ for (i = 0; boolopt[i].name; i++) { ! if (strlen(opts) >= 3 && ! !strncmpi(boolopt[i].name, opts, strlen(opts))) { /* options that don't exist */ if (!boolopt[i].addr) { if (!initial && !negated) --- 1246,1290 ---- } return; } + + /* check for menu command mapping */ + for (i = 0; i < NUM_MENU_CMDS; i++) { + fullname = default_menu_cmd_info[i].name; + if (match_optname(opts, fullname, (int)strlen(fullname), TRUE)) { + if (negated) + bad_negation(fullname, FALSE); + else if ((op = string_for_opt(opts, FALSE)) != 0) { + int j; + char c, op_buf[BUFSZ]; + boolean isbad = FALSE; + + escapes(op, op_buf); + c = *op_buf; + + if (c == 0 || c == '\r' || c == '\n' || c == '\033' || + c == ' ' || digit(c) || (letter(c) && c != '@')) + isbad = TRUE; + else /* reject default object class symbols */ + for (j = 1; j < MAXOCLASSES; j++) + if (c == def_oc_syms[i]) { + isbad = TRUE; + break; + } + + if (isbad) + badoption(opts); + else + add_menu_cmd_alias(c, default_menu_cmd_info[i].cmd); + } + return; + } + } + /* OK, if we still haven't recognized the option, check the boolean * options list */ for (i = 0; boolopt[i].name; i++) { ! if (match_optname(opts, boolopt[i].name, 3, FALSE)) { /* options that don't exist */ if (!boolopt[i].addr) { if (!initial && !negated) *************** *** 1142,1153 **** return; } /* options that must come from config file */ ! if (!initial && ! ((boolopt[i].addr) == &flags.legacy ! #if defined(MICRO) && !defined(AMIGA) ! || (boolopt[i].addr) == &flags.rawio ! #endif ! )) { rejectoption(boolopt[i].name); return; } --- 1293,1299 ---- return; } /* options that must come from config file */ ! if (!initial && boolopt_only_initial(i)) { rejectoption(boolopt[i].name); return; } *************** *** 1272,1379 **** *dest = '\0'; } #if defined(MICRO) || defined(MAC) # define OPTIONS_HEADING "OPTIONS" #else # define OPTIONS_HEADING "NETHACKOPTIONS" #endif int doset() { ! char buf[BUFSZ], ocl[MAXOCLASSES+1], on_off; ! const char *opt_name; ! int i; winid tmpwin; ! switch (yn_function("Show the current settings [c], or set options [s]?", ! "csq", 'q')) { ! default: ! case 'q': ! clear_nhwindow(WIN_MESSAGE); ! return 0; ! case 'c': ! tmpwin = create_nhwindow(NHW_MENU); ! putstr(tmpwin, 0, OPTIONS_HEADING); ! putstr(tmpwin, 0, ""); ! /* print the booleans */ ! for (i = 0; boolopt[i].name; i++) { ! if (!boolopt[i].addr) continue; ! opt_name = boolopt[i].name; ! if (*(boolopt[i].addr)) { ! on_off = ' '; /* on */ ! } else { ! if (!strcmp(opt_name, "female")) ! opt_name = "male", on_off = ' '; ! else ! on_off = '!'; /* off */ ! } ! Sprintf(buf, "%c%s", on_off, opt_name); ! putstr(tmpwin, 0, buf); ! } ! /* print the compounds */ ! Sprintf(buf, " catname: %s", ! (catname[0] != 0) ? catname : "(null)"); ! putstr(tmpwin, 0, buf); ! Sprintf(buf, " disclose: %s", ! (flags.end_disclose[0]) ? flags.end_disclose : "all"); ! putstr(tmpwin, 0, buf); ! Sprintf(buf, " dogname: %s", ! (dogname[0] != 0) ? dogname : "(null)"); ! putstr(tmpwin, 0, buf); ! Sprintf(buf, " fruit: %s", pl_fruit); ! putstr(tmpwin, 0, buf); ! Sprintf(buf, " menustyle: %s", menutype[(int)flags.menu_style]); ! putstr(tmpwin, 0, buf); ! Sprintf(buf, " msghistory: %u", flags.msg_history); ! putstr(tmpwin, 0, buf); ! Sprintf(buf, " name: %s", plname); ! putstr(tmpwin, 0, buf); ! oc_to_str(flags.inv_order, ocl); ! Sprintf(buf, " packorder: %s", ocl); ! putstr(tmpwin, 0, buf); ! #ifdef CHANGE_COLOR ! Sprintf(buf, " palette: %s", get_color_string()); ! putstr(tmpwin, 0, buf); #endif ! Sprintf(buf, " pettype: %s", preferred_pet == 'c' ? "cat" : ! preferred_pet == 'd' ? "dog" : "random"); ! putstr(tmpwin, 0, buf); ! oc_to_str(flags.pickup_types, ocl); ! Sprintf(buf, " pickup_types: %s", (ocl[0]) ? ocl : "all"); ! putstr(tmpwin, 0, buf); ! Sprintf(buf, " scores: %d top/%d around%s", ! flags.end_top, flags.end_around, ! (flags.end_own ? "/own" : "")); ! putstr(tmpwin, 0, buf); #ifdef VIDEOSHADES ! Sprintf(buf, " videoshades: %s-%s-%s", ! shade[0],shade[1],shade[2]); ! putstr(tmpwin, 0, buf); ! Sprintf(buf, " videocolors: %d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d", ! ttycolors[CLR_RED],ttycolors[CLR_GREEN],ttycolors[CLR_BROWN], ! ttycolors[CLR_BLUE],ttycolors[CLR_MAGENTA],ttycolors[CLR_CYAN], ! ttycolors[CLR_ORANGE],ttycolors[CLR_BRIGHT_GREEN], ! ttycolors[CLR_YELLOW],ttycolors[CLR_BRIGHT_BLUE], ! ttycolors[CLR_BRIGHT_MAGENTA],ttycolors[CLR_BRIGHT_CYAN]); ! putstr(tmpwin, 0, buf); #endif /* VIDEOSHADES */ ! Sprintf(buf, " windowtype: %s", windowprocs.name); ! putstr(tmpwin, 0, buf); ! display_nhwindow(tmpwin, TRUE); ! destroy_nhwindow(tmpwin); ! break; ! case 's': ! clear_nhwindow(WIN_MESSAGE); ! getlin("What options do you want to set?", buf); ! if(buf[0] == '\033') return 0; ! need_redraw = FALSE; ! parseoptions(buf, FALSE, FALSE); ! if(need_redraw) ! (void) doredraw(); ! break; } return 0; } --- 1418,1643 ---- *dest = '\0'; } + /* + * Add the given mapping to the menu command map list. Always keep the + * maps valid C strings. + */ + void + add_menu_cmd_alias(from_ch, to_ch) + char from_ch, to_ch; + { + if (n_menu_mapped >= MAX_MENU_MAPPED_CMDS) + pline("out of menu map space"); + else { + mapped_menu_cmds[n_menu_mapped] = from_ch; + mapped_menu_op[n_menu_mapped] = to_ch; + n_menu_mapped++; + mapped_menu_cmds[n_menu_mapped] = 0; + mapped_menu_op[n_menu_mapped] = 0; + } + } + + /* + * Map the given character to its corresponding menu command. If it + * doesn't match anything, just return the original. + */ + char + map_menu_cmd(ch) + char ch; + { + char *found = index(mapped_menu_cmds, ch); + if (found) { + int idx = found - mapped_menu_cmds; + ch = mapped_menu_op[idx]; + } + return ch; + } + + #if defined(MICRO) || defined(MAC) # define OPTIONS_HEADING "OPTIONS" #else # define OPTIONS_HEADING "NETHACKOPTIONS" #endif + static void + doset_add_menu(win, option, value, indexoffset) + winid win; /* window to add to */ + const char *option; /* option name */ + const char *value; /* current value */ + int indexoffset; /* value to add to index in compopt[], or zero + if option cannot be changed */ + { + char buf[BUFSZ]; + anything any; + int i; + + any.a_void = 0; + if (indexoffset == 0) { + any.a_int = 0; + } else { + for (i=0; compopt[i].name; i++) + if (strcmp(option, compopt[i].name) == 0) break; + + if (compopt[i].name) { + any.a_int = i + 1 + indexoffset; + } else { + /* We are trying to add an option not found in compopt[]. + This is almost certainly bad, but we'll let it through anyway + (with a zero value, so it can't be selected). */ + any.a_int = 0; + } + } + + /* " " replaces "a - " -- assumes menus follow that style */ + Sprintf(buf, "%s%-13s [%s]", (any.a_int ? "" : " "), option, value); + add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); + } + + /* Changing options via menu by Per Liboriussen */ int doset() { ! char ocl[MAXOCLASSES+1], buf[BUFSZ], buf2[BUFSZ]; ! int i, pass, boolcount, pick_cnt, pick_idx, opt_indx; ! boolean *bool_p; winid tmpwin; + anything any; + menu_item *pick_list; ! tmpwin = create_nhwindow(NHW_MENU); ! start_menu(tmpwin); ! ! any.a_void = 0; ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, ! "Booleans (selecting will toggle value):", MENU_UNSELECTED); ! any.a_int = 0; ! /* list male/female first, since it's formatted uniquely */ ! Sprintf(buf, "%s%-13s", " ", flags.female ? "female" : "male"); ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); ! /* next list any other non-modifiable booleans, then modifiable ones */ ! for (pass = 0; pass <= 1; pass++) ! for (i = 0; boolopt[i].name; i++) ! if ((bool_p = boolopt[i].addr) != 0 && ! (boolopt_only_initial(i) ^ pass)) { ! if (bool_p == &flags.female) continue; /* already done */ ! #ifdef WIZARD ! if (bool_p == &flags.sanity_check && !wizard) continue; #endif ! any.a_int = (pass == 0) ? 0 : i + 1; ! Sprintf(buf, "%s%-13s [%s]", pass == 0 ? " " : "", ! boolopt[i].name, *bool_p ? "true" : "false"); ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ! ATR_NONE, buf, MENU_UNSELECTED); ! } ! ! /* This is ugly. We have all the option names in the compopt[] array, ! but we need to look at each option individually to get the value. */ ! boolcount = i; ! any.a_void = 0; ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED); ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, ! "Compounds (selecting will prompt for new value):", ! MENU_UNSELECTED); ! /* non-modifiable compounds; deliberately put `name' first */ ! doset_add_menu(tmpwin, "name", plname, 0); ! doset_add_menu(tmpwin, "catname", catname[0] ? catname : "(null)", 0); ! doset_add_menu(tmpwin, "dogname", dogname[0] ? dogname : "(null)", 0); ! Sprintf(buf, "%u", flags.msg_history); ! doset_add_menu(tmpwin, "msghistory", buf, 0); ! doset_add_menu(tmpwin, "pettype", ! (preferred_pet == 'c') ? "cat" : ! (preferred_pet == 'd') ? "dog" : "random", 0); #ifdef VIDEOSHADES ! Sprintf(buf, "%s-%s-%s", shade[0],shade[1],shade[2]); ! doset_add_menu(tmpwin, "videoshades", buf, 0); ! Sprintf(buf, "%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d", ! ttycolors[CLR_RED], ttycolors[CLR_GREEN], ttycolors[CLR_BROWN], ! ttycolors[CLR_BLUE], ttycolors[CLR_MAGENTA], ttycolors[CLR_CYAN], ! ttycolors[CLR_ORANGE], ttycolors[CLR_BRIGHT_GREEN], ! ttycolors[CLR_YELLOW], ttycolors[CLR_BRIGHT_BLUE], ! ttycolors[CLR_BRIGHT_MAGENTA], ttycolors[CLR_BRIGHT_CYAN]); ! doset_add_menu(tmpwin, "videocolors", buf, 0); #endif /* VIDEOSHADES */ ! doset_add_menu(tmpwin, "windowtype", windowprocs.name, 0); ! /* modifiable compounds */ ! doset_add_menu(tmpwin, "disclose", ! flags.end_disclose[0] ? flags.end_disclose : "all", ! boolcount); ! doset_add_menu(tmpwin, "fruit", pl_fruit, boolcount); ! doset_add_menu(tmpwin, "menustyle", menutype[(int)flags.menu_style], ! boolcount); ! oc_to_str(flags.inv_order, ocl); ! doset_add_menu(tmpwin, "packorder", ocl, boolcount); ! #ifdef CHANGE_COLOR ! doset_add_menu(tmpwin, "palette", get_color_string(), boolcount); ! #endif ! oc_to_str(flags.pickup_types, ocl); ! doset_add_menu(tmpwin, "pickup_types", ocl[0] ? ocl : "all", ! boolcount); ! Sprintf(buf, "%d top/%d around%s", flags.end_top, flags.end_around, ! flags.end_own ? "/own" : ""); ! doset_add_menu(tmpwin, "scores", buf, boolcount); ! end_menu(tmpwin, "Set what options?"); ! ! need_redraw = FALSE; ! if ((pick_cnt = select_menu(tmpwin, PICK_ANY, &pick_list)) > 0) { ! /* ! * Walk down the selection list and either invert the booleans ! * or prompt for new values. In most cases, call parseoptions() ! * to take care of options that require special attention, like ! * redraws. ! */ ! for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx) { ! opt_indx = pick_list[pick_idx].item.a_int - 1; ! if (opt_indx < boolcount) { ! /* boolean option */ ! Sprintf(buf, "%s%s", *boolopt[opt_indx].addr ? "!" : "", ! boolopt[opt_indx].name); ! parseoptions(buf, FALSE, FALSE); ! } else { ! /* compound option */ ! opt_indx -= boolcount; ! ! /* Special handling of menustyle and pickup_types. */ ! if (!strcmp("menustyle", compopt[opt_indx].name)) { ! const char *style_name; ! menu_item *style_pick = (menu_item *)0; ! ! start_menu(tmpwin); ! for (i = 0; i < SIZE(menutype); i++) { ! style_name = menutype[i]; ! /* note: separate `style_name' variable used ! to avoid an optimizer bug in VAX C V2.3 */ ! any.a_int = i + 1; ! add_menu(tmpwin, NO_GLYPH, &any, *style_name, 0, ! ATR_NONE, style_name, MENU_UNSELECTED); ! } ! end_menu(tmpwin, "Select menustyle:"); ! if (select_menu(tmpwin, PICK_ONE, &style_pick) > 0) { ! flags.menu_style = style_pick->item.a_int - 1; ! free((genericptr_t)style_pick); ! } ! } else if (!strcmp("pickup_types", compopt[opt_indx].name)) { ! /* parseoptions will prompt for the list of types */ ! parseoptions(strcpy(buf, "pickup_types"), FALSE, FALSE); ! } else { ! Sprintf(buf, "Set %s to what?", compopt[opt_indx].name); ! getlin(buf, buf2); ! Sprintf(buf, "%s:%s", compopt[opt_indx].name, buf2); ! /* pass the buck */ ! parseoptions(buf, FALSE, FALSE); ! } ! } ! } ! ! free((genericptr_t)pick_list); ! pick_list = (menu_item *)0; } + destroy_nhwindow(tmpwin); + if (need_redraw) + (void) doredraw(); return 0; } *************** *** 1449,1455 **** putstr(datawin, 0, "Compound options:"); for (i = 0; compopt[i].name; i++) { Sprintf(buf2, "`%s'", compopt[i].name); ! Sprintf(buf, "%-14s - %s", buf2, compopt[i].descr); putstr(datawin, 0, buf); } --- 1713,1720 ---- putstr(datawin, 0, "Compound options:"); for (i = 0; compopt[i].name; i++) { Sprintf(buf2, "`%s'", compopt[i].name); ! Sprintf(buf, "%-20s - %s%c", buf2, compopt[i].descr, ! compopt[i+1].name ? ',' : '.'); putstr(datawin, 0, buf); } *************** *** 1587,1593 **** * class_selection * a null terminated string containing the selected characters. * ! * Returns number selected (or ESC if aborted). */ int choose_classes_menu(prompt, category, way, class_list, class_select) --- 1852,1858 ---- * class_selection * a null terminated string containing the selected characters. * ! * Returns number selected. */ int choose_classes_menu(prompt, category, way, class_list, class_select) *************** *** 1612,1623 **** win = create_nhwindow(NHW_MENU); start_menu(win); while (*class_list) { ! const char *text; ! boolean selected; text = (char *)0; selected = FALSE; ! switch (category) { case 0: text = monexplain[def_char_to_monclass(*class_list)]; accelerator = *class_list; --- 1877,1888 ---- win = create_nhwindow(NHW_MENU); start_menu(win); while (*class_list) { ! const char *text; ! boolean selected; text = (char *)0; selected = FALSE; ! switch (category) { case 0: text = monexplain[def_char_to_monclass(*class_list)]; accelerator = *class_list; *************** *** 1638,1644 **** } } any.a_int = *class_list; ! add_menu(win, NO_GLYPH, &any, accelerator, ATR_NONE, buf, selected); ++class_list; if (category > 0) { ++next_accelerator; --- 1903,1911 ---- } } any.a_int = *class_list; ! add_menu(win, NO_GLYPH, &any, accelerator, ! category ? *class_list : 0, ! ATR_NONE, buf, selected); ++class_list; if (category > 0) { ++next_accelerator; *************** *** 1650,1665 **** n = select_menu(win, way ? PICK_ANY : PICK_ONE, &pick_list); destroy_nhwindow(win); if (n > 0) { ! for (i = 0; i < n; ++i) { ! *class_select++ = (char)pick_list[i].item.a_int; ! } ! free((genericptr_t)pick_list); ret = n; } else if (n == -1) { class_select = eos(class_select); ret = -1; } else ! ret = 0; *class_select = '\0'; return ret; } --- 1917,1931 ---- n = select_menu(win, way ? PICK_ANY : PICK_ONE, &pick_list); destroy_nhwindow(win); if (n > 0) { ! for (i = 0; i < n; ++i) ! *class_select++ = (char)pick_list[i].item.a_int; ! free((genericptr_t)pick_list); ret = n; } else if (n == -1) { class_select = eos(class_select); ret = -1; } else ! ret = 0; *class_select = '\0'; return ret; } *** Old/src/pager.c Tue May 28 17:29:21 1996 --- src/pager.c Tue May 14 16:01:10 1996 *************** *** 668,680 **** if (help_menu_items[i][0] == '%') { Sprintf(helpbuf, help_menu_items[i], PORT_ID); any.a_int = PORT_HELP_ID + 1; ! add_menu(tmpwin, NO_GLYPH, &any, 0, ATR_NONE, helpbuf, MENU_UNSELECTED); } else #endif { any.a_int = (*help_menu_items[i]) ? i+1 : 0; ! add_menu(tmpwin, NO_GLYPH, &any, 0, ATR_NONE, help_menu_items[i], MENU_UNSELECTED); } end_menu(tmpwin, "Select one item:"); --- 668,680 ---- if (help_menu_items[i][0] == '%') { Sprintf(helpbuf, help_menu_items[i], PORT_ID); any.a_int = PORT_HELP_ID + 1; ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, helpbuf, MENU_UNSELECTED); } else #endif { any.a_int = (*help_menu_items[i]) ? i+1 : 0; ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, help_menu_items[i], MENU_UNSELECTED); } end_menu(tmpwin, "Select one item:"); *** Old/src/pickup.c Tue May 28 17:29:24 1996 --- src/pickup.c Sat May 18 11:50:43 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)pickup.c 3.2 96/03/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)pickup.c 3.2 96/05/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 595,601 **** /* if sorting, print type name (once only) */ if (qflags & INVORDER_SORT && !printed_type_name) { any.a_obj = (struct obj *) 0; ! add_menu(win, NO_GLYPH, &any, 0, ATR_INVERSE, let_to_name(*pack, FALSE), MENU_UNSELECTED); printed_type_name = TRUE; } --- 595,601 ---- /* if sorting, print type name (once only) */ if (qflags & INVORDER_SORT && !printed_type_name) { any.a_obj = (struct obj *) 0; ! add_menu(win, NO_GLYPH, &any, 0, 0, ATR_INVERSE, let_to_name(*pack, FALSE), MENU_UNSELECTED); printed_type_name = TRUE; } *************** *** 603,608 **** --- 603,609 ---- any.a_obj = curr; add_menu(win, obj_to_glyph(curr), &any, qflags & USE_INVLET ? curr->invlet : 0, + def_oc_syms[(int)objects[curr->otyp].oc_class], ATR_NONE, doname(curr), MENU_UNSELECTED); } pack++; *************** *** 680,686 **** invlet = 'a'; any.a_void = 0; any.a_int = ALL_TYPES_SELECTED; ! add_menu(win, NO_GLYPH, &any, invlet, ATR_NONE, (qflags & WORN_TYPES) ? "All worn types" : "All types", MENU_UNSELECTED); invlet = 'b'; --- 681,687 ---- invlet = 'a'; any.a_void = 0; any.a_int = ALL_TYPES_SELECTED; ! add_menu(win, NO_GLYPH, &any, invlet, 0, ATR_NONE, (qflags & WORN_TYPES) ? "All worn types" : "All types", MENU_UNSELECTED); invlet = 'b'; *************** *** 696,704 **** if (!collected_type_name) { any.a_void = 0; any.a_int = curr->oclass; ! add_menu(win, NO_GLYPH, &any, invlet++, ATR_NONE, ! let_to_name(*pack, FALSE), ! MENU_UNSELECTED); collected_type_name = TRUE; } } --- 697,706 ---- if (!collected_type_name) { any.a_void = 0; any.a_int = curr->oclass; ! add_menu(win, NO_GLYPH, &any, invlet++, ! def_oc_syms[(int)objects[curr->otyp].oc_class], ! ATR_NONE, let_to_name(*pack, FALSE), ! MENU_UNSELECTED); collected_type_name = TRUE; } } *************** *** 714,720 **** invlet = 'u'; any.a_void = 0; any.a_int = 'u'; ! add_menu(win, NO_GLYPH, &any, invlet, ATR_NONE, "Unpaid items", MENU_UNSELECTED); } /* billed items: checked by caller, so always include if BILLED_TYPES */ --- 716,722 ---- invlet = 'u'; any.a_void = 0; any.a_int = 'u'; ! add_menu(win, NO_GLYPH, &any, invlet, 0, ATR_NONE, "Unpaid items", MENU_UNSELECTED); } /* billed items: checked by caller, so always include if BILLED_TYPES */ *************** *** 722,735 **** invlet = 'x'; any.a_void = 0; any.a_int = 'x'; ! add_menu(win, NO_GLYPH, &any, invlet, ATR_NONE, "Unpaid items already used up", MENU_UNSELECTED); } if (qflags & CHOOSE_ALL) { invlet = 'A'; any.a_void = 0; any.a_int = 'A'; ! add_menu(win, NO_GLYPH, &any, invlet, ATR_NONE, (qflags & WORN_TYPES) ? "Auto-select every item being worn" : "Auto-select every item", MENU_UNSELECTED); --- 724,737 ---- invlet = 'x'; any.a_void = 0; any.a_int = 'x'; ! add_menu(win, NO_GLYPH, &any, invlet, 0, ATR_NONE, "Unpaid items already used up", MENU_UNSELECTED); } if (qflags & CHOOSE_ALL) { invlet = 'A'; any.a_void = 0; any.a_int = 'A'; ! add_menu(win, NO_GLYPH, &any, invlet, 0, ATR_NONE, (qflags & WORN_TYPES) ? "Auto-select every item being worn" : "Auto-select every item", MENU_UNSELECTED); *************** *** 1177,1189 **** } You("carefully open %s...", the(xname(cobj))); - if (cobj->otrapped && chest_trap(cobj, FINGER, FALSE)) { - timepassed = 1; - continue; /* explosion destroyed cobj */ - } - if(multi < 0) return (1); /* a paralysis trap */ - timepassed |= use_container(cobj, 0); } } if(c == -1){ --- 1179,1186 ---- } You("carefully open %s...", the(xname(cobj))); timepassed |= use_container(cobj, 0); + if (multi < 0) return 1; /* chest trap */ } } if(c == -1){ *************** *** 1213,1219 **** add_to_container(coffers, goldob); } } else { ! struct monst *mon = makemon(courtmon(), u.ux, u.uy); if (mon) { mon->mgold += goldob->quan; delobj(goldob); --- 1210,1217 ---- add_to_container(coffers, goldob); } } else { ! struct monst *mon = makemon(courtmon(), ! u.ux, u.uy, NO_MM_FLAGS); if (mon) { mon->mgold += goldob->quan; delobj(goldob); *************** *** 1477,1488 **** int cnt = 0, used = 0, lcnt = 0, menu_on_request; - current_container = obj; /* for use by in/out_container */ if (obj->olocked) { pline("%s seems to be locked.", The(xname(obj))); if (held) You("must put it down to unlock."); return 0; } if (obj->spe == 1) { static NEARDATA const char sc[] = "Schroedinger's Cat"; struct obj *ocat; --- 1475,1496 ---- int cnt = 0, used = 0, lcnt = 0, menu_on_request; if (obj->olocked) { pline("%s seems to be locked.", The(xname(obj))); if (held) You("must put it down to unlock."); return 0; + } else if (obj->otrapped) { + if (held) You("open %s...", the(xname(obj))); + (void) chest_trap(obj, HAND, FALSE); + /* even if the trap fails, you've used up this turn */ + if (multi >= 0) { /* in case we didn't become paralyzed */ + nomul(-1); + nomovemsg = ""; + } + return 1; } + current_container = obj; /* for use by in/out_container */ + if (obj->spe == 1) { static NEARDATA const char sc[] = "Schroedinger's Cat"; struct obj *ocat; *************** *** 1493,1499 **** (telepathic or monster/object/food detection) ought to force the determination of alive vs dead state; but basing it just on opening the box is much simpler to cope with */ ! cat = rn2(2) ? makemon(&mons[PM_HOUSECAT], obj->ox, obj->oy) : 0; if (cat) { cat->mpeaceful = 1; set_malign(cat); --- 1501,1508 ---- (telepathic or monster/object/food detection) ought to force the determination of alive vs dead state; but basing it just on opening the box is much simpler to cope with */ ! cat = rn2(2) ? makemon(&mons[PM_HOUSECAT], ! obj->ox, obj->oy, NO_MINVENT) : 0; if (cat) { cat->mpeaceful = 1; set_malign(cat); *************** *** 1739,1750 **** start_menu(win); any.a_int = 1; Sprintf(buf,"Take something out of %s", the(xname(obj))); ! add_menu(win, NO_GLYPH, &any, 'a', ATR_NONE, buf, MENU_UNSELECTED); any.a_int = 2; Sprintf(buf,"Put something into %s",the(xname(obj))); ! add_menu(win, NO_GLYPH, &any, 'b', ATR_NONE, buf, MENU_UNSELECTED); any.a_int = 3; ! add_menu(win, NO_GLYPH, &any, 'c', ATR_NONE, "Both of the above", MENU_UNSELECTED); end_menu(win, prompt); n = select_menu(win, PICK_ONE, &pick_list); --- 1748,1759 ---- start_menu(win); any.a_int = 1; Sprintf(buf,"Take something out of %s", the(xname(obj))); ! add_menu(win, NO_GLYPH, &any, 'a', 0, ATR_NONE, buf, MENU_UNSELECTED); any.a_int = 2; Sprintf(buf,"Put something into %s",the(xname(obj))); ! add_menu(win, NO_GLYPH, &any, 'b', 0, ATR_NONE, buf, MENU_UNSELECTED); any.a_int = 3; ! add_menu(win, NO_GLYPH, &any, 'c', 0, ATR_NONE, "Both of the above", MENU_UNSELECTED); end_menu(win, prompt); n = select_menu(win, PICK_ONE, &pick_list); *** Old/src/potion.c Tue May 28 17:29:36 1996 --- src/potion.c Fri May 3 15:26:25 1996 *************** *** 234,240 **** static void ghost_from_bottle() { ! struct monst *mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy); if (!mtmp) { pline("This bottle turns out to be empty."); --- 234,240 ---- static void ghost_from_bottle() { ! struct monst *mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy, NO_MM_FLAGS); if (!mtmp) { pline("This bottle turns out to be empty."); *************** *** 515,520 **** --- 515,521 ---- Your("%s are frozen to the %s!", makeplural(body_part(FOOT)), surface(u.ux, u.uy)); nomul(-(rn1(10, 25 - 12*bcsign(otmp)))); + nomovemsg = You_can_move_again; exercise(A_DEX, FALSE); break; case POT_MONSTER_DETECTION: *************** *** 984,989 **** --- 985,991 ---- kn++; pline("%s seems to be holding you.", Something); nomul(-rnd(5)); + nomovemsg = You_can_move_again; exercise(A_DEX, FALSE); break; case POT_SPEED: *************** *** 1473,1479 **** struct monst *mtmp; int chance; ! if(!(mtmp = makemon(&mons[PM_DJINNI], u.ux, u.uy))){ pline("It turns out to be empty."); return; } --- 1475,1481 ---- struct monst *mtmp; int chance; ! if(!(mtmp = makemon(&mons[PM_DJINNI], u.ux, u.uy, NO_MM_FLAGS))){ pline("It turns out to be empty."); return; } *** Old/src/pray.c Tue May 28 17:29:40 1996 --- src/pray.c Fri May 24 22:21:48 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)pray.c 3.2 96/03/22 */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)pray.c 3.2 96/05/24 */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 12,17 **** --- 12,18 ---- static void FDECL(pleased,(ALIGNTYP_P)); static void FDECL(godvoice,(ALIGNTYP_P,const char*)); static void FDECL(god_zaps_you,(ALIGNTYP_P)); + static void FDECL(fry_by_god,(ALIGNTYP_P)); static void FDECL(gods_angry,(ALIGNTYP_P)); static void FDECL(gods_upset,(ALIGNTYP_P)); static void FDECL(consume_offering,(struct obj *)); *************** *** 358,387 **** } } static void god_zaps_you(resp_god) aligntyp resp_god; { ! pline("Suddenly, a bolt of lightning strikes you!"); ! if (Reflecting) { ! shieldeff(u.ux, u.uy); ! if (Blind) ! pline("For some reason you're unaffected."); ! else { ! if (Reflecting & W_AMUL) { ! pline("It reflects from your medallion."); ! makeknown(AMULET_OF_REFLECTION); ! } else { ! pline("It reflects from your shield."); ! makeknown(SHIELD_OF_REFLECTION); } ! } ! goto ohno; ! } else if (Shock_resistance) { ! shieldeff(u.ux, u.uy); ! pline("It seems not to affect you."); ! ohno: ! pline("%s is not deterred...", align_gname(resp_god)); pline("A wide-angle disintegration beam hits you!"); /* disintegrate shield and body armor before disintegrating --- 359,418 ---- } } + /* "I am sometimes shocked by... the nuns who never take a bath without + * wearing a bathrobe all the time. When asked why, since no man can see them, + * they reply 'Oh, but you forget the good God'. Apparently they conceive of + * the Deity as a Peeping Tom, whose omnipotence enables Him to see through + * bathroom walls, but who is foiled by bathrobes." --Bertrand Russell, 1943 + * Divine wrath, dungeon walls, and armor follow the same principle. + */ static void god_zaps_you(resp_god) aligntyp resp_god; { ! if (u.uswallow) { ! pline("Suddenly a bolt of lightning comes down at you from the heavens!"); ! pline("It strikes %s!", mon_nam(u.ustuck)); ! if (!resists_elec(u.ustuck)) { ! pline("%s fries to a crisp!", Monnam(u.ustuck)); ! /* Yup, you get experience. It takes guts to successfully ! * pull off this trick on your god, anyway. ! */ ! xkilled(u.ustuck, 0); ! } else ! pline("%s seems unaffected.", Monnam(u.ustuck)); ! } else { ! pline("Suddenly, a bolt of lightning strikes you!"); ! if (Reflecting) { ! shieldeff(u.ux, u.uy); ! if (Blind) ! pline("For some reason you're unaffected."); ! else { ! if (Reflecting & W_AMUL) { ! pline("It reflects from your medallion."); ! makeknown(AMULET_OF_REFLECTION); ! } else { ! pline("It reflects from your shield."); ! makeknown(SHIELD_OF_REFLECTION); ! } } ! } else if (Shock_resistance) { ! shieldeff(u.ux, u.uy); ! pline("It seems not to affect you."); ! } else ! fry_by_god(resp_god); ! } ! ! pline("%s is not deterred...", align_gname(resp_god)); ! if (u.uswallow) { ! pline("A wide-angle disintegration beam aimed at you hits %s!", ! mon_nam(u.ustuck)); ! if (!resists_disint(u.ustuck)) { ! pline("%s fries to a crisp!", Monnam(u.ustuck)); ! xkilled(u.ustuck, 2); /* no corpse */ ! } else ! pline("%s seems unaffected.", Monnam(u.ustuck)); ! } else { pline("A wide-angle disintegration beam hits you!"); /* disintegrate shield and body armor before disintegrating *************** *** 396,427 **** #ifdef TOURIST if (uarmu && !uarm && !uarmc) (void) destroy_arm(uarmu); #endif ! ! if (Disint_resistance) { You("bask in its %s glow for a minute...", Black); godvoice(resp_god, "I believe it not!"); - if (Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) { - /* one more try for high altars */ - verbalize("Thou cannot escape my wrath, mortal!"); - summon_minion(resp_god, FALSE); - summon_minion(resp_god, FALSE); - summon_minion(resp_god, FALSE); - verbalize("Destroy %s, my servants!", him[flags.female]); - } - return; } ! } ! { ! char killerbuf[64]; ! You("fry to a crisp."); ! killer_format = KILLED_BY; ! Sprintf(killerbuf, "the wrath of %s", align_gname(resp_god)); ! killer = killerbuf; ! done(DIED); } } static void angrygods(resp_god) aligntyp resp_god; { --- 427,463 ---- #ifdef TOURIST if (uarmu && !uarm && !uarmc) (void) destroy_arm(uarmu); #endif ! if (!Disint_resistance) ! fry_by_god(resp_god); ! else { You("bask in its %s glow for a minute...", Black); godvoice(resp_god, "I believe it not!"); } ! if (Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) { ! /* one more try for high altars */ ! verbalize("Thou cannot escape my wrath, mortal!"); ! summon_minion(resp_god, FALSE); ! summon_minion(resp_god, FALSE); ! summon_minion(resp_god, FALSE); ! verbalize("Destroy %s, my servants!", him[flags.female]); ! } } } static void + fry_by_god(resp_god) + aligntyp resp_god; + { + char killerbuf[64]; + + You("fry to a crisp."); + killer_format = KILLED_BY; + Sprintf(killerbuf, "the wrath of %s", align_gname(resp_god)); + killer = killerbuf; + done(DIED); + } + + static void angrygods(resp_god) aligntyp resp_god; { *************** *** 449,455 **** case 3: godvoice(resp_god,(char *)0); pline("\"Thou %s, %s.\"", ! ugod_is_angry() ? "hast strayed from the path" : "art arrogant", u.usym == S_HUMAN ? "mortal" : "creature"); verbalize("Thou must relearn thy lessons!"); --- 485,492 ---- case 3: godvoice(resp_god,(char *)0); pline("\"Thou %s, %s.\"", ! (ugod_is_angry() && resp_god == u.ualign.type) ! ? "hast strayed from the path" : "art arrogant", u.usym == S_HUMAN ? "mortal" : "creature"); verbalize("Thou must relearn thy lessons!"); *************** *** 668,677 **** verbalize("I crown thee... The Hand of Elbereth!"); if (obj && (obj->otyp == LONG_SWORD) && !obj->oartifact) { obj = oname(obj, artiname(ART_EXCALIBUR)); #ifdef WEAPON_SKILLS ! unrestrict_weapon_skill(P_LONG_SWORD); #endif /* WEAPON_SKILLS */ - } break; case A_NEUTRAL: u.uevent.uhand_of_elbereth = 2; --- 705,714 ---- verbalize("I crown thee... The Hand of Elbereth!"); if (obj && (obj->otyp == LONG_SWORD) && !obj->oartifact) { obj = oname(obj, artiname(ART_EXCALIBUR)); + } #ifdef WEAPON_SKILLS ! unrestrict_weapon_skill(P_LONG_SWORD); #endif /* WEAPON_SKILLS */ break; case A_NEUTRAL: u.uevent.uhand_of_elbereth = 2; *************** *** 952,958 **** change_luck(altaralign == A_NONE ? -2 : 2); demonless_msg = "blood coagulates"; } ! if ((dmon = makemon(&mons[dlord(altaralign)], u.ux, u.uy))) { You("have summoned %s!", a_monnam(dmon)); if (sgn(u.ualign.type) == sgn(dmon->data->maligntyp)) dmon->mpeaceful = TRUE; --- 989,996 ---- change_luck(altaralign == A_NONE ? -2 : 2); demonless_msg = "blood coagulates"; } ! if ((dmon = makemon(&mons[dlord(altaralign)], ! u.ux, u.uy, NO_MM_FLAGS ))) { You("have summoned %s!", a_monnam(dmon)); if (sgn(u.ualign.type) == sgn(dmon->data->maligntyp)) dmon->mpeaceful = TRUE; *************** *** 1449,1456 **** if(u.ualign.type == A_CHAOTIC) { mtmp->mpeaceful = TRUE; } else { /* damn them */ ! You("destroy %s!", mon_nam(mtmp)); ! mondied(mtmp); } } break; --- 1487,1493 ---- if(u.ualign.type == A_CHAOTIC) { mtmp->mpeaceful = TRUE; } else { /* damn them */ ! killed(mtmp); } } break; *** Old/src/priest.c Tue May 28 17:29:45 1996 --- src/priest.c Sat May 4 17:08:50 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)priest.c 3.2 96/03/28 */ /* Copyright (c) Izchak Miller, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)priest.c 3.2 96/05/03 */ /* Copyright (c) Izchak Miller, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 196,203 **** if(MON_AT(sx+1, sy)) rloc(m_at(sx+1, sy)); /* insurance */ ! priest = (sanctum ? makemon(&mons[PM_HIGH_PRIEST], sx+1, sy) ! : makemon(&mons[PM_ALIGNED_PRIEST], sx+1, sy)); if (priest) { EPRI(priest)->shroom = (sroom - rooms) + ROOMOFFSET; EPRI(priest)->shralign = Amask2align(levl[sx][sy].altarmask); --- 196,203 ---- if(MON_AT(sx+1, sy)) rloc(m_at(sx+1, sy)); /* insurance */ ! priest = makemon(&mons[sanctum ? PM_HIGH_PRIEST : PM_ALIGNED_PRIEST], ! sx + 1, sy, NO_MM_FLAGS); if (priest) { EPRI(priest)->shroom = (sroom - rooms) + ROOMOFFSET; EPRI(priest)->shralign = Amask2align(levl[sx][sy].altarmask); *************** *** 378,384 **** if(!rn2(5)) { struct monst *mtmp; ! if(!(mtmp = makemon(&mons[PM_GHOST],u.ux,u.uy))) return; pline("An enormous ghost appears next to you!"); mtmp->mpeaceful = 0; set_malign(mtmp); --- 378,385 ---- if(!rn2(5)) { struct monst *mtmp; ! if(!(mtmp = makemon(&mons[PM_GHOST],u.ux,u.uy,NO_MM_FLAGS))) ! return; pline("An enormous ghost appears next to you!"); mtmp->mpeaceful = 0; set_malign(mtmp); *************** *** 510,516 **** if (MON_AT(x, y)) rloc(m_at(x, y)); /* insurance */ ! if (!(roamer = makemon(ptr, x, y))) return((struct monst *)0); EPRI(roamer)->shralign = alignment; --- 511,517 ---- if (MON_AT(x, y)) rloc(m_at(x, y)); /* insurance */ ! if (!(roamer = makemon(ptr, x, y, NO_MM_FLAGS))) return((struct monst *)0); EPRI(roamer)->shralign = alignment; *** Old/src/read.c Tue May 28 17:29:53 1996 --- src/read.c Tue May 28 10:47:56 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)read.c 3.2 96/03/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)read.c 3.2 96/05/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 430,436 **** } for (count = 0, i = 1; i < NUM_OBJECTS; i++) ! if (objects[i].oc_name_known && OBJ_DESCR(objects[i])) indices[count++] = i; randomize(indices, count); --- 430,437 ---- } for (count = 0, i = 1; i < NUM_OBJECTS; i++) ! if (OBJ_DESCR(objects[i]) && ! (objects[i].oc_name_known || objects[i].oc_uname)) indices[count++] = i; randomize(indices, count); *************** *** 1330,1345 **** reset_rndmonst(mndx); kill_genocided_monsters(); update_inventory(); /* in case identified eggs were affected */ ! } else if (!(mons[mndx].geno & G_UNIQ) && ! !(mvitals[mndx].mvflags & (G_GENOD | G_EXTINCT))) { ! pline("Sent in some %s.", makeplural(buf)); ! for (i = rn1(3, 4); i > 0; i--) { ! struct monst *mmon = makemon(ptr, u.ux, u.uy); ! if (mmon) discard_minvent(mmon); ! if (mvitals[mndx].mvflags & G_EXTINCT) break; /* just made last one */ ! } } } --- 1331,1352 ---- reset_rndmonst(mndx); kill_genocided_monsters(); update_inventory(); /* in case identified eggs were affected */ ! } else { ! int cnt = 0; ! if (!(mons[mndx].geno & G_UNIQ) && ! !(mvitals[mndx].mvflags & (G_GENOD | G_EXTINCT))) ! for (i = rn1(3, 4); i > 0; i--) { ! if (!makemon(ptr, u.ux, u.uy, NO_MINVENT)) ! break; /* couldn't make one */ ! ++cnt; ! if (mvitals[mndx].mvflags & G_EXTINCT) break; /* just made last one */ ! } ! if (cnt) ! pline("Sent in some %s.", makeplural(buf)); ! else ! pline(nothing_happens); } } *************** *** 1423,1429 **** if (tries == 5) pline(thats_enough_tries); else { (void) cant_create(&which); ! return((boolean)(makemon(&mons[which], u.ux, u.uy) != 0)); } return FALSE; } --- 1430,1437 ---- if (tries == 5) pline(thats_enough_tries); else { (void) cant_create(&which); ! return((boolean)(makemon(&mons[which], ! u.ux, u.uy, NO_MM_FLAGS) != 0)); } return FALSE; } *** Old/src/restore.c Tue May 28 17:30:00 1996 --- src/restore.c Tue May 28 10:47:28 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)restore.c 3.2 96/02/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)restore.c 3.2 96/05/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 399,404 **** --- 399,405 ---- flags.has8514 = oldflags.has8514; flags.use8514 = oldflags.use8514; flags.grmode = oldflags.grmode; + flags.preload_tiles = oldflags.preload_tiles; #endif /* these come from the current environment; ignore saved values */ flags.window_inited = oldflags.window_inited; *** Old/src/rip.c Tue May 28 17:30:04 1996 --- src/rip.c Fri May 17 10:14:42 1996 *************** *** 8,14 **** extern const char *killed_by_prefix[]; ! #if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(mac) static const char *rip_txt[] = { " ---------- ----------", --- 8,14 ---- extern const char *killed_by_prefix[]; ! #if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(mac) || defined(__beos__) static const char *rip_txt[] = { " ---------- ----------", *** Old/src/rumors.c Tue May 28 17:30:09 1996 --- src/rumors.c Sun Apr 21 13:21:58 1996 *************** *** 1,8 **** ! /* SCCS Id: @(#)rumors.c 3.2 95/08/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" #include "dlb.h" /* [note: this comment is fairly old, but still accurate for 3.1] --- 1,9 ---- ! /* SCCS Id: @(#)rumors.c 3.2 96/04/20 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" + #include "lev.h" #include "dlb.h" /* [note: this comment is fairly old, but still accurate for 3.1] *************** *** 173,184 **** } void ! save_oracles(fd) ! int fd; { ! bwrite(fd, (genericptr_t) &oracle_cnt, sizeof oracle_cnt); ! if (oracle_cnt) ! bwrite(fd, (genericptr_t) oracle_loc, oracle_cnt * sizeof (long)); } void --- 174,193 ---- } void ! save_oracles(fd, mode) ! int fd, mode; { ! if (perform_bwrite(mode)) { ! bwrite(fd, (genericptr_t) &oracle_cnt, sizeof oracle_cnt); ! if (oracle_cnt) ! bwrite(fd, (genericptr_t)oracle_loc, oracle_cnt*sizeof (long)); ! } ! if (release_data(mode)) { ! if (oracle_cnt) { ! free((genericptr_t)oracle_loc); ! oracle_loc = 0, oracle_cnt = 0, oracle_flg = 0; ! } ! } } void *** Old/src/save.c Tue May 28 17:30:11 1996 --- src/save.c Fri May 24 08:52:25 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)save.c 3.2 96/01/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)save.c 3.2 96/05/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 271,277 **** bwrite(fd, (genericptr_t) spl_book, sizeof(struct spell) * (MAXSPELL + 1)); save_artifacts(fd); ! save_oracles(fd); if(u.ustuck) bwrite(fd, (genericptr_t) &(u.ustuck->m_id), sizeof u.ustuck->m_id); bwrite(fd, (genericptr_t) pl_character, sizeof pl_character); --- 271,277 ---- bwrite(fd, (genericptr_t) spl_book, sizeof(struct spell) * (MAXSPELL + 1)); save_artifacts(fd); ! save_oracles(fd, mode); if(u.ustuck) bwrite(fd, (genericptr_t) &(u.ustuck->m_id), sizeof u.ustuck->m_id); bwrite(fd, (genericptr_t) pl_character, sizeof pl_character); *************** *** 358,366 **** if (!swapout_oldest()) return FALSE; } ! if (mode & WRITE_SAVE) { bytes_counted = 0; - /* mode is WRITE_SAVE and possibly FREE_SAVE */ savelev0(fd, lev, mode); } level_info[lev].where = ACTIVE; --- 358,365 ---- if (!swapout_oldest()) return FALSE; } ! if (mode & (WRITE_SAVE | FREE_SAVE)) { bytes_counted = 0; savelev0(fd, lev, mode); } level_info[lev].where = ACTIVE; *************** *** 581,587 **** bytes_counted += num; if (count_only) return; #endif ! if (write(fd, loc, num) != num) { #if defined(UNIX) || defined(VMS) if (program_state.done_hup) terminate(EXIT_FAILURE); --- 580,586 ---- bytes_counted += num; if (count_only) return; #endif ! if ((unsigned) write(fd, loc, num) != num) { #if defined(UNIX) || defined(VMS) if (program_state.done_hup) terminate(EXIT_FAILURE); *************** *** 772,778 **** while(otmp) { otmp2 = otmp->nobj; if (perform_bwrite(mode)) { ! xl = otmp->onamelth; bwrite(fd, (genericptr_t) &xl, sizeof(int)); bwrite(fd, (genericptr_t) otmp, xl + sizeof(struct obj)); } --- 771,777 ---- while(otmp) { otmp2 = otmp->nobj; if (perform_bwrite(mode)) { ! xl = otmp->oxlth + otmp->onamelth; bwrite(fd, (genericptr_t) &xl, sizeof(int)); bwrite(fd, (genericptr_t) otmp, xl + sizeof(struct obj)); } *************** *** 866,871 **** --- 865,881 ---- ffruit = 0; } + /* also called by prscore(); this probably belongs in dungeon.c... */ + void + free_dungeons() + { + #ifdef FREE_ALL_MEMORY + savelevchn(0, FREE_SAVE); + save_dungeon(0, FALSE, TRUE); + #endif + return; + } + void freedynamicdata() { *************** *** 874,884 **** # define freeobjchn(X) (saveobjchn(0, X, FREE_SAVE), X = 0) # define freemonchn(X) (savemonchn(0, X, FREE_SAVE), X = 0) # define freetrapchn(X) (savetrapchn(0, X, FREE_SAVE), X = 0) - # define freelevchn() savelevchn(0, FREE_SAVE) # define freefruitchn() savefruitchn(0, FREE_SAVE) # define freenames() savenames(0, FREE_SAVE) # define free_waterlevel() save_waterlevel(0, FREE_SAVE) - # define free_dungeon() save_dungeon(0, FALSE, TRUE) # define free_worm() save_worm(0, FREE_SAVE) # define free_timers(R) save_timers(0, FREE_SAVE, R) # define free_light_sources(R) save_light_sources(0, FREE_SAVE, R); --- 884,893 ---- # define freeobjchn(X) (saveobjchn(0, X, FREE_SAVE), X = 0) # define freemonchn(X) (savemonchn(0, X, FREE_SAVE), X = 0) # define freetrapchn(X) (savetrapchn(0, X, FREE_SAVE), X = 0) # define freefruitchn() savefruitchn(0, FREE_SAVE) # define freenames() savenames(0, FREE_SAVE) + # define free_oracles() save_oracles(0, FREE_SAVE) # define free_waterlevel() save_waterlevel(0, FREE_SAVE) # define free_worm() save_worm(0, FREE_SAVE) # define free_timers(R) save_timers(0, FREE_SAVE, R) # define free_light_sources(R) save_light_sources(0, FREE_SAVE, R); *************** *** 907,917 **** freeobjchn(migrating_objs); freemonchn(migrating_mons); freemonchn(mydogs); /* ascension or dungeon escape */ ! freelevchn(); freefruitchn(); freenames(); free_waterlevel(); ! free_dungeon(); #endif /* FREE_ALL_MEMORY */ return; --- 916,927 ---- freeobjchn(migrating_objs); freemonchn(migrating_mons); freemonchn(mydogs); /* ascension or dungeon escape */ ! /* freelevchn(); [folded into free_dungeons()] */ ! free_oracles(); freefruitchn(); freenames(); free_waterlevel(); ! free_dungeons(); #endif /* FREE_ALL_MEMORY */ return; *** Old/src/shk.c Tue May 28 17:30:15 1996 --- src/shk.c Tue May 21 11:11:35 1996 *************** *** 1982,1987 **** --- 1982,1989 ---- otmp->quan = (bp->bquan -= obj->quan); otmp->owt = 0; /* superfluous */ otmp->onamelth = 0; + otmp->oxlth = 0; + otmp->mtraits = 0; bp->useup = 1; add_to_billobjs(otmp); return; *************** *** 2566,2571 **** --- 2568,2574 ---- register struct damage *tmp_dam, *tmp2_dam; register boolean did_repair = FALSE, saw_door = FALSE; register boolean saw_floor = FALSE, stop_picking = FALSE; + register boolean saw_untrap = FALSE; uchar saw_walls = 0; tmp_dam = level.damagelist; *************** *** 2605,2610 **** --- 2608,2615 ---- saw_walls++; else if (IS_DOOR(levl[x][y].typ)) saw_door = TRUE; + else if (disposition == 3) /* untrapped */ + saw_untrap = TRUE; else saw_floor = TRUE; } *************** *** 2635,2640 **** --- 2640,2647 ---- pline("Suddenly, the shop door reappears!"); else if (saw_floor) pline("Suddenly, the floor damage is gone!"); + else if (saw_untrap) + pline("Suddenly, the trap is removed from the floor!"); else if (inside_shop(u.ux, u.uy) == ESHK(shkp)->shoproom) You_feel("more claustrophobic than before."); else if (flags.soundok && !rn2(10)) *************** *** 2646,2651 **** --- 2653,2659 ---- /* * 0: repair postponed, 1: silent repair (no messages), 2: normal repair + * 3: untrap */ int repair_damage(shkp, tmp_dam, catchup) *************** *** 2674,2681 **** if ((mtmp = m_at(x, y)) && (!passes_walls(mtmp->data))) return(0); } ! if ((ttmp = t_at(x, y)) != 0) deltrap(ttmp); if (IS_ROOM(tmp_dam->typ)) { /* No messages if player already filled trapdoor */ if (catchup || !ttmp) --- 2682,2703 ---- if ((mtmp = m_at(x, y)) && (!passes_walls(mtmp->data))) return(0); } ! if ((ttmp = t_at(x, y)) != 0) { ! if (x == u.ux && y == u.uy) ! if (!passes_walls(uasmon)) ! return(0); ! if (ttmp->ttyp == LANDMINE || ttmp->ttyp == BEAR_TRAP) { ! /* convert to an object */ ! otmp = mksobj((ttmp->ttyp == LANDMINE) ? LAND_MINE : ! BEARTRAP, TRUE, FALSE); ! otmp->quan= 1; ! otmp->owt = weight(otmp); ! mpickobj(shkp, otmp); ! } deltrap(ttmp); + newsym(x, y); + return(3); + } if (IS_ROOM(tmp_dam->typ)) { /* No messages if player already filled trapdoor */ if (catchup || !ttmp) *************** *** 2940,2946 **** while (cnt--) if (enexto(mm, mm->x, mm->y, &mons[mndx])) ! (void) makemon(&mons[mndx], mm->x, mm->y); } } #endif /* KOPS */ --- 2962,2968 ---- while (cnt--) if (enexto(mm, mm->x, mm->y, &mons[mndx])) ! (void) makemon(&mons[mndx], mm->x, mm->y, NO_MM_FLAGS); } } #endif /* KOPS */ *** Old/src/shknam.c Tue May 28 17:30:22 1996 --- src/shknam.c Fri May 24 08:52:26 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)shknam.c 3.2 96/02/27 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)shknam.c 3.2 96/05/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 248,254 **** if (rn2(100) < depth(&u.uz) && !MON_AT(sx, sy) && (ptr = mkclass(S_MIMIC,0)) && ! (mtmp=makemon(ptr,sx,sy))) { /* note: makemon will set the mimic symbol to a shop item */ if (rn2(10) >= depth(&u.uz)) { mtmp->m_ap_type = M_AP_OBJECT; --- 248,254 ---- if (rn2(100) < depth(&u.uz) && !MON_AT(sx, sy) && (ptr = mkclass(S_MIMIC,0)) && ! (mtmp=makemon(ptr,sx,sy,NO_MM_FLAGS))) { /* note: makemon will set the mimic symbol to a shop item */ if (rn2(10) >= depth(&u.uz)) { mtmp->m_ap_type = M_AP_OBJECT; *************** *** 338,351 **** /* check that the shopkeeper placement is sane */ if(sroom->irregular) { int rmno = (sroom - rooms) + ROOMOFFSET; ! if(isok(sx-1,sy) && ! levl[sx-1][sy].roomno == rmno && !levl[sx-1][sy].edge) sx--; ! else if(isok(sx+1,sy) && ! levl[sx+1][sy].roomno == rmno && !levl[sx+1][sy].edge) sx++; ! else if(isok(sx,sy-1) && ! levl[sx][sy-1].roomno == rmno && !levl[sx][sy-1].edge) sy--; ! else if(isok(sx,sy+1) && ! levl[sx][sy+1].roomno == rmno && !levl[sx][sy+1].edge) sx++; else goto shk_failed; } else if(sx == sroom->lx-1) sx++; --- 338,351 ---- /* check that the shopkeeper placement is sane */ if(sroom->irregular) { int rmno = (sroom - rooms) + ROOMOFFSET; ! if (isok(sx-1,sy) && !levl[sx-1][sy].edge && ! (int) levl[sx-1][sy].roomno == rmno) sx--; ! else if (isok(sx+1,sy) && !levl[sx+1][sy].edge && ! (int) levl[sx+1][sy].roomno == rmno) sx++; ! else if (isok(sx,sy-1) && !levl[sx][sy-1].edge && ! (int) levl[sx][sy-1].roomno == rmno) sy--; ! else if (isok(sx,sy+1) && !levl[sx][sy+1].edge && ! (int) levl[sx][sy+1].roomno == rmno) sx++; else goto shk_failed; } else if(sx == sroom->lx-1) sx++; *************** *** 379,385 **** if(MON_AT(sx, sy)) rloc(m_at(sx, sy)); /* insurance */ /* now initialize the shopkeeper monster structure */ ! if(!(shk = makemon(&mons[PM_SHOPKEEPER], sx, sy))) return(-1); shk->isshk = shk->mpeaceful = TRUE; set_malign(shk); shk->msleep = FALSE; --- 379,386 ---- if(MON_AT(sx, sy)) rloc(m_at(sx, sy)); /* insurance */ /* now initialize the shopkeeper monster structure */ ! if(!(shk = makemon(&mons[PM_SHOPKEEPER], sx, sy, NO_MM_FLAGS))) ! return(-1); shk->isshk = shk->mpeaceful = TRUE; set_malign(shk); shk->msleep = FALSE; *************** *** 456,462 **** for(sx = sroom->lx; sx <= sroom->hx; sx++) for(sy = sroom->ly; sy <= sroom->hy; sy++) { if(sroom->irregular) { ! if(levl[sx][sy].edge || levl[sx][sy].roomno != rmno || distmin(sx, sy, doors[sh].x, doors[sh].y) <= 1) continue; } else if((sx == sroom->lx && doors[sh].x == sx-1) || --- 457,463 ---- for(sx = sroom->lx; sx <= sroom->hx; sx++) for(sy = sroom->ly; sy <= sroom->hy; sy++) { if(sroom->irregular) { ! if (levl[sx][sy].edge || (int) levl[sx][sy].roomno != rmno || distmin(sx, sy, doors[sh].x, doors[sh].y) <= 1) continue; } else if((sx == sroom->lx && doors[sh].x == sx-1) || *** Old/src/sit.c Tue May 28 17:30:25 1996 --- src/sit.c Fri May 3 15:26:30 1996 *************** *** 164,170 **** verbalize("Thy audience hath been summoned, %s!", flags.female ? "Dame" : "Sire"); while(cnt--) ! (void) makemon(courtmon(), u.ux, u.uy); break; } case 8: --- 164,170 ---- verbalize("Thy audience hath been summoned, %s!", flags.female ? "Dame" : "Sire"); while(cnt--) ! (void) makemon(courtmon(), u.ux, u.uy, NO_MM_FLAGS); break; } case 8: *** Old/src/sounds.c Tue May 28 17:30:28 1996 --- src/sounds.c Fri May 24 08:52:26 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)sounds.c 3.2 95/10/20 */ /* Copyright (c) 1989 Janet Walz, Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)sounds.c 3.2 96/05/04 */ /* Copyright (c) 1989 Janet Walz, Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 403,414 **** domonnoise(mtmp) register struct monst *mtmp; { ! register const char *pline_msg = 0; /* Monnam(mtmp) will be prepended */ /* presumably nearness and sleep checks have already been made */ if (!flags.soundok) return(0); ! switch (mtmp->data->msound) { case MS_ORACLE: return doconsult(mtmp); case MS_PRIEST: --- 403,416 ---- domonnoise(mtmp) register struct monst *mtmp; { ! register const char *pline_msg = 0, /* Monnam(mtmp) will be prepended */ ! *verbl_msg = 0; /* verbalize() */ ! struct permonst *ptr = mtmp->data; /* presumably nearness and sleep checks have already been made */ if (!flags.soundok) return(0); ! switch (ptr->msound) { case MS_ORACLE: return doconsult(mtmp); case MS_PRIEST: *************** *** 422,427 **** --- 424,442 ---- case MS_SELL: /* pitch, pay, total */ shk_chat(mtmp); break; + case MS_VAMPIRE: + /* [bug: vampire case missing here] */ + break; + case MS_WERE: + if (flags.moonphase == FULL_MOON && (night() ^ !rn2(13))) { + pline("%s throws back %s head and lets out a blood curdling %s!", + Monnam(mtmp), his[pronoun_gender(mtmp)], + ptr == &mons[PM_HUMAN_WERERAT] ? "shriek" : "howl"); + wake_nearto(mtmp->mx, mtmp->my, 11*11); + } else + pline_msg = + "whispers inaudibly. All you can make out is \"moon\"."; + break; case MS_SILENT: break; case MS_BARK: *************** *** 429,438 **** pline_msg = "howls."; } else if (mtmp->mpeaceful) { if (mtmp->mtame && ! (mtmp->mconf || mtmp->mflee || mtmp->mtrapped || ! moves > EDOG(mtmp)->hungrytime || mtmp->mtame < 5)) pline_msg = "whines."; ! else if (EDOG(mtmp)->hungrytime > moves + 1000) pline_msg = "yips."; else pline_msg = "barks."; --- 444,453 ---- pline_msg = "howls."; } else if (mtmp->mpeaceful) { if (mtmp->mtame && ! (mtmp->mconf || mtmp->mflee || mtmp->mtrapped || ! moves > EDOG(mtmp)->hungrytime || mtmp->mtame < 5)) pline_msg = "whines."; ! else if (mtmp->mtame && EDOG(mtmp)->hungrytime > moves + 1000) pline_msg = "yips."; else pline_msg = "barks."; *************** *** 443,449 **** case MS_MEW: if (mtmp->mtame) { if (mtmp->mconf || mtmp->mflee || mtmp->mtrapped || ! mtmp->mtame < 5) pline_msg = "yowls."; else if (moves > EDOG(mtmp)->hungrytime) pline_msg = "miaos."; --- 458,464 ---- case MS_MEW: if (mtmp->mtame) { if (mtmp->mconf || mtmp->mflee || mtmp->mtrapped || ! mtmp->mtame < 5) pline_msg = "yowls."; else if (moves > EDOG(mtmp)->hungrytime) pline_msg = "miaos."; *************** *** 517,529 **** pline_msg = "mumbles incomprehensibly."; break; case MS_DJINNI: ! if (mtmp->mtame) verbalize("Thank you for freeing me!"); ! else if (mtmp->mpeaceful) verbalize("I'm free!"); ! else verbalize("This will teach you not to disturb me!"); break; case MS_HUMANOID: if (!mtmp->mpeaceful) { ! if (In_endgame(&u.uz) && is_mplayer(mtmp->data)) { mplayer_talk(mtmp); break; } else { --- 532,559 ---- pline_msg = "mumbles incomprehensibly."; break; case MS_DJINNI: ! if (mtmp->mtame) verbl_msg = "Thank you for freeing me!"; ! else if (mtmp->mpeaceful) verbl_msg = "I'm free!"; ! else verbl_msg = "This will teach you not to disturb me!"; break; + case MS_BOAST: /* giants */ + if (!mtmp->mpeaceful) { + switch (rn2(4)) { + case 0: pline("%s boasts about %s gem collection.", + Monnam(mtmp), his[pronoun_gender(mtmp)]); + break; + case 1: pline_msg = "complains about a diet of mutton."; + break; + default: pline_msg = "shouts \"Fee Fie Foe Foo!\" and guffaws."; + wake_nearto(mtmp->mx, mtmp->my, 7*7); + break; + } + break; + } + /* else FALLTHRU */ case MS_HUMANOID: if (!mtmp->mpeaceful) { ! if (In_endgame(&u.uz) && is_mplayer(ptr)) { mplayer_talk(mtmp); break; } else { *************** *** 536,560 **** else if (mtmp->mhp < mtmp->mhpmax/4) pline_msg = "moans."; else if (mtmp->mconf || mtmp->mstun) ! verbalize(!rn2(3) ? "Huh?" : rn2(2) ? "What?" : "Eh?"); else if (!mtmp->mcansee) ! verbalize("I can't see!"); else if (mtmp->mtrapped) ! verbalize("I'm trapped!"); else if (mtmp->mhp < mtmp->mhpmax/2) pline_msg = "asks for a potion of healing."; else if (mtmp->mtame && moves > EDOG(mtmp)->hungrytime) ! verbalize("I'm hungry."); ! /* Specific monster's interests */ ! else if (is_elf(mtmp->data)) pline_msg = "curses orcs."; ! else if (is_dwarf(mtmp->data)) pline_msg = "talks about mining."; ! else if (likes_magic(mtmp->data)) pline_msg = "talks about spellcraft."; ! else if (carnivorous(mtmp->data)) pline_msg = "discusses hunting."; ! else switch (monsndx(mtmp->data)) { case PM_HOBBIT: pline_msg = (mtmp->mhpmax - mtmp->mhp >= 10) ? "complains about unpleasant dungeon conditions." --- 566,590 ---- else if (mtmp->mhp < mtmp->mhpmax/4) pline_msg = "moans."; else if (mtmp->mconf || mtmp->mstun) ! verbl_msg = !rn2(3) ? "Huh?" : rn2(2) ? "What?" : "Eh?"; else if (!mtmp->mcansee) ! verbl_msg = "I can't see!"; else if (mtmp->mtrapped) ! verbl_msg = "I'm trapped!"; else if (mtmp->mhp < mtmp->mhpmax/2) pline_msg = "asks for a potion of healing."; else if (mtmp->mtame && moves > EDOG(mtmp)->hungrytime) ! verbl_msg = "I'm hungry."; ! /* Specific monsters' interests */ ! else if (is_elf(ptr)) pline_msg = "curses orcs."; ! else if (is_dwarf(ptr)) pline_msg = "talks about mining."; ! else if (likes_magic(ptr)) pline_msg = "talks about spellcraft."; ! else if (ptr->mlet == S_CENTAUR) pline_msg = "discusses hunting."; ! else switch (monsndx(ptr)) { case PM_HOBBIT: pline_msg = (mtmp->mhpmax - mtmp->mhp >= 10) ? "complains about unpleasant dungeon conditions." *************** *** 565,590 **** break; #ifdef TOURIST case PM_TOURIST: ! verbalize("Aloha."); break; #endif default: pline_msg = "discusses dungeon exploration."; } break; case MS_SEDUCE: #ifdef SEDUCE ! if (mtmp->data->mlet != S_NYMPH && could_seduce(mtmp, &youmonst, (struct attack *)0) == 1) { (void) doseduce(mtmp); break; } ! switch ((poly_gender() != mtmp->female) ? rn2(3) : 0) { #else switch ((poly_gender() == 0) ? rn2(3) : 0) { #endif case 2: ! verbalize("Hello, sailor."); break; case 1: pline_msg = "comes on to you."; --- 595,621 ---- break; #ifdef TOURIST case PM_TOURIST: ! verbl_msg = "Aloha."; break; #endif default: pline_msg = "discusses dungeon exploration."; + break; } break; case MS_SEDUCE: #ifdef SEDUCE ! if (ptr->mlet != S_NYMPH && could_seduce(mtmp, &youmonst, (struct attack *)0) == 1) { (void) doseduce(mtmp); break; } ! switch ((poly_gender() != (int) mtmp->female) ? rn2(3) : 0) { #else switch ((poly_gender() == 0) ? rn2(3) : 0) { #endif case 2: ! verbl_msg = "Hello, sailor."; break; case 1: pline_msg = "comes on to you."; *************** *** 604,610 **** "You're under arrest!", "Stop in the name of the Law!", }; ! verbalize(arrest_msg[rn2(3)]); } break; #endif --- 635,641 ---- "You're under arrest!", "Stop in the name of the Law!", }; ! verbl_msg = arrest_msg[rn2(3)]; } break; #endif *************** *** 618,641 **** if (!mtmp->mpeaceful) cuss(mtmp); break; case MS_NURSE: if (uwep && (uwep->oclass == WEAPON_CLASS || is_weptool(uwep))) ! verbalize("Put that weapon away before you hurt someone!"); else if (uarmc || uarm || uarmh || uarms || uarmg || uarmf) ! verbalize(Role_is('H') ? "Doc, I can't help you unless you cooperate." : ! "Please undress so I can examine you."); #ifdef TOURIST else if (uarmu) ! verbalize("Take off your shirt, please."); #endif ! else verbalize("Relax, this won't hurt a bit."); break; case MS_GUARD: if (u.ugold) ! verbalize("Please drop that gold and follow me."); else ! verbalize("Please follow me."); break; case MS_SOLDIER: { --- 649,676 ---- if (!mtmp->mpeaceful) cuss(mtmp); break; + case MS_SPELL: + /* deliberately vague, since it's not actually casting any spell */ + pline_msg = "seems to mutter a cantrip."; + break; case MS_NURSE: if (uwep && (uwep->oclass == WEAPON_CLASS || is_weptool(uwep))) ! verbl_msg = "Put that weapon away before you hurt someone!"; else if (uarmc || uarm || uarmh || uarms || uarmg || uarmf) ! verbl_msg = Role_is('H') ? "Doc, I can't help you unless you cooperate." : ! "Please undress so I can examine you."; #ifdef TOURIST else if (uarmu) ! verbl_msg = "Take off your shirt, please."; #endif ! else verbl_msg = "Relax, this won't hurt a bit."; break; case MS_GUARD: if (u.ugold) ! verbl_msg = "Please drop that gold and follow me."; else ! verbl_msg = "Please follow me."; break; case MS_SOLDIER: { *************** *** 648,665 **** "The food's not fit for Orcs!", "My feet hurt, I've been on them all day!", }; ! verbalize(mtmp->mpeaceful ? soldier_pax_msg[rn2(3)] ! : soldier_foe_msg[rn2(3)]); } break; case MS_RIDER: ! if (mtmp->data == &mons[PM_DEATH] && mtmp->mpeaceful) pline_msg = "is busy reading a copy of Sandman #9."; ! else verbalize("Who do you think you are, War?"); break; } if (pline_msg) pline("%s %s", Monnam(mtmp), pline_msg); return(1); } --- 683,701 ---- "The food's not fit for Orcs!", "My feet hurt, I've been on them all day!", }; ! verbl_msg = mtmp->mpeaceful ? soldier_pax_msg[rn2(3)] ! : soldier_foe_msg[rn2(3)]; } break; case MS_RIDER: ! if (ptr == &mons[PM_DEATH] && mtmp->mpeaceful) pline_msg = "is busy reading a copy of Sandman #9."; ! else verbl_msg = "Who do you think you are, War?"; break; } if (pline_msg) pline("%s %s", Monnam(mtmp), pline_msg); + else if (verbl_msg) verbalize(verbl_msg); return(1); } *** Old/src/sp_lev.c Tue May 28 17:30:31 1996 --- src/sp_lev.c Tue May 21 12:08:27 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)sp_lev.c 3.2 96/03/13 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)sp_lev.c 3.2 96/05/08 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 735,745 **** monster *m; struct mkroom *croom; { ! struct monst *mtmp; ! schar x,y; ! char class; ! aligntyp amask; ! struct permonst *pm; if (m->class >= 0) class = (char) def_char_to_monclass((char)m->class); --- 735,747 ---- monster *m; struct mkroom *croom; { ! struct monst *mtmp; ! schar x, y; ! char class; ! aligntyp amask; ! struct permonst *pm; ! ! if (rn2(100) < m->chance) { if (m->class >= 0) class = (char) def_char_to_monclass((char)m->class); *************** *** 789,795 **** mtmp = mk_roamer(pm, Amask2align(amask), x, y, m->peaceful); else if(PM_ARCHEOLOGIST <= m->id && m->id <= PM_WIZARD) mtmp = mk_mplayer(pm, x, y, FALSE); ! else mtmp = makemon(pm, x, y); if (mtmp) { /* handle specific attributes for some special monsters */ --- 791,797 ---- mtmp = mk_roamer(pm, Amask2align(amask), x, y, m->peaceful); else if(PM_ARCHEOLOGIST <= m->id && m->id <= PM_WIZARD) mtmp = mk_mplayer(pm, x, y, FALSE); ! else mtmp = makemon(pm, x, y, NO_MM_FLAGS); if (mtmp) { /* handle specific attributes for some special monsters */ *************** *** 870,878 **** } } m_done: ! Free(m->name.str); ! Free(m->appear_as.str); } /* --- 872,881 ---- } } + } /* if (rn2(100) < m->chance) */ m_done: ! Free(m->name.str); ! Free(m->appear_as.str); } /* *************** *** 884,892 **** object *o; struct mkroom *croom; { ! struct obj *otmp; ! schar x,y; ! char c; x = o->x; y = o->y; if (croom) --- 887,897 ---- object *o; struct mkroom *croom; { ! struct obj *otmp; ! schar x, y; ! char c; ! ! if (rn2(100) < o->chance) { x = o->x; y = o->y; if (croom) *************** *** 942,948 **** if (o->name.str) { /* Give a name to that object */ otmp = oname(otmp, o->name.str); - free((genericptr_t) o->name.str); } switch(o->containment) { --- 947,952 ---- *************** *** 956,973 **** } remove_object(otmp); add_to_container(container, otmp); ! return; /* container */ case 2: delete_contents(otmp); container = otmp; ! return; /* nothing */ case 0: break; default: impossible("containment type %d?", (int) o->containment); } stackobj(otmp); } /* --- 960,1012 ---- } remove_object(otmp); add_to_container(container, otmp); ! goto o_done; /* don't stack, but do other cleanup */ /* container */ case 2: delete_contents(otmp); container = otmp; ! break; /* nothing */ case 0: break; default: impossible("containment type %d?", (int) o->containment); } + + /* Medusa level special case: statues are petrified monsters, so they + * are not stone-resistant and have monster inventory. They also lack + * other contents, but that can be specified as an empty container. + */ + if (o->id == STATUE && Is_medusa_level(&u.uz) && + o->corpsenm == NON_PM) { + struct monst *was; + struct obj *obj; + int wastyp; + + /* Named random statues are of player types, and aren't stone- + * resistant (if they were, we'd have to reset the name as well as + * setting corpsenm). + */ + for (wastyp = otmp->corpsenm; ; wastyp = rndmonnum()) { + /* makemon without rndmonst() might create a group */ + was = makemon(&mons[wastyp], 0, 0, NO_MM_FLAGS); + if (!resists_ston(was)) break; + mongone(was); + } + otmp->corpsenm = wastyp; + while(was->minvent) { + obj = was->minvent; + obj->owornmask = 0; + obj_extract_self(obj); + add_to_container(otmp, obj); + } + mongone(was); + } + stackobj(otmp); + + } /* if (rn2(100) < o->chance) */ + o_done: + Free(o->name.str); } /* *************** *** 1970,1976 **** char n, numpart = 0; xchar nwalk = 0, nwalk_sav; ! short filling; char halign, valign; int xi, dir, size; --- 2009,2015 ---- char n, numpart = 0; xchar nwalk = 0, nwalk_sav; ! schar filling; char halign, valign; int xi, dir, size; *************** *** 2492,2502 **** } for (x = rn2(2); x; x--) { maze1xy(&mm, DRY); ! (void) makemon(&mons[PM_MINOTAUR], mm.x, mm.y); } for(x = rnd((int) (12 * mapfact) / 100); x; x--) { maze1xy(&mm, WET|DRY); ! (void) makemon((struct permonst *) 0, mm.x, mm.y); } for(x = rn2((int) (15 * mapfact) / 100); x; x--) { maze1xy(&mm, DRY); --- 2531,2541 ---- } for (x = rn2(2); x; x--) { maze1xy(&mm, DRY); ! (void) makemon(&mons[PM_MINOTAUR], mm.x, mm.y, NO_MM_FLAGS); } for(x = rnd((int) (12 * mapfact) / 100); x; x--) { maze1xy(&mm, WET|DRY); ! (void) makemon((struct permonst *) 0, mm.x, mm.y, NO_MM_FLAGS); } for(x = rn2((int) (15 * mapfact) / 100); x; x--) { maze1xy(&mm, DRY); *************** *** 2528,2534 **** dlb *fd; boolean result = FALSE; char c; ! long vers_info[3]; fd = dlb_fopen(name, RDBMODE); if (!fd) return FALSE; --- 2567,2573 ---- dlb *fd; boolean result = FALSE; char c; ! unsigned long vers_info[4]; fd = dlb_fopen(name, RDBMODE); if (!fd) return FALSE; *** Old/src/spell.c Tue May 28 17:30:38 1996 --- src/spell.c Tue May 21 16:28:28 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)spell.c 3.2 96/03/16 */ /* Copyright (c) M. Stephenson 1988 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)spell.c 3.2 96/05/19 */ /* Copyright (c) M. Stephenson 1988 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 169,174 **** --- 169,177 ---- deadbook(book2) struct obj *book2; { + struct monst *mtmp, *mtmp2; + coord mm; + You("turn the pages of the Book of the Dead..."); makeknown(SPE_BOOK_OF_THE_DEAD); if(invocation_pos(u.ux, u.uy) && !On_stairs(u.ux, u.uy)) { *************** *** 215,238 **** } /* when not an invocation situation */ ! if(book2->cursed) raise_dead: - { - register struct monst *mtmp; - coord mm; You("raised the dead!"); mm.x = u.ux; mm.y = u.uy; ! mkundead(&mm); ! if(!rn2(4)) ! if ((mtmp = makemon(&mons[PM_MASTER_LICH],u.ux,u.uy)) != 0) { ! mtmp->mpeaceful = 0; ! set_malign(mtmp); ! } } else if(book2->blessed) { - register struct monst *mtmp, *mtmp2; - for(mtmp = fmon; mtmp; mtmp = mtmp2) { mtmp2 = mtmp->nmon; /* tamedog() changes chain */ if(is_undead(mtmp->data) && cansee(mtmp->mx, mtmp->my)) { --- 218,242 ---- } /* when not an invocation situation */ ! if (book2->cursed) { raise_dead: You("raised the dead!"); + /* first maybe place a dangerous adversary */ + if (!rn2(3) && ((mtmp = makemon(&mons[PM_MASTER_LICH], + u.ux, u.uy, NO_MINVENT)) != 0 || + (mtmp = makemon(&mons[PM_NALFESHNEE], + u.ux, u.uy, NO_MINVENT)) != 0)) { + mtmp->mpeaceful = 0; + set_malign(mtmp); + } + /* next handle the affect on things you're carrying */ + (void) unturn_dead(&youmonst); + /* last place some monsters around you */ mm.x = u.ux; mm.y = u.uy; ! mkundead(&mm, TRUE, NO_MINVENT); } else if(book2->blessed) { for(mtmp = fmon; mtmp; mtmp = mtmp2) { mtmp2 = mtmp->nmon; /* tamedog() changes chain */ if(is_undead(mtmp->data) && cansee(mtmp->mx, mtmp->my)) { *************** *** 283,297 **** if (book->spestudied >= rnd(30 - spellev(i))) { pline("This spellbook is too faint to be read anymore."); book->otyp = booktype = SPE_BLANK_PAPER; ! makeknown((int)booktype); ! } ! else if (spelluses(i) < 20 - spellev(i)) { Your("knowledge of that spell is keener."); spl_book[i].sp_uses += 10 - spellev(i); book->spestudied++; exercise(A_WIS, TRUE); /* extra study */ } else You("know that spell quite well already."); break; } else if (spellid(i) == NO_SPELL) { spl_book[i].sp_id = booktype; --- 287,302 ---- if (book->spestudied >= rnd(30 - spellev(i))) { pline("This spellbook is too faint to be read anymore."); book->otyp = booktype = SPE_BLANK_PAPER; ! } else if (spelluses(i) < 20 - spellev(i)) { Your("knowledge of that spell is keener."); spl_book[i].sp_uses += 10 - spellev(i); book->spestudied++; exercise(A_WIS, TRUE); /* extra study */ } else You("know that spell quite well already."); + /* make book become known even when spell is already + known, in case amnesia made you forget the book */ + makeknown((int)booktype); break; } else if (spellid(i) == NO_SPELL) { spl_book[i].sp_id = booktype; *************** *** 389,394 **** --- 394,402 ---- } /* Books are often wiser than their readers (Rus.) */ + #ifndef NO_SIGNAL + spellbook->in_use = TRUE; + #endif if(!spellbook->blessed && spellbook->otyp != SPE_BOOK_OF_THE_DEAD && (spellbook->cursed || *************** *** 398,422 **** nomul(delay); /* study time */ delay = 0; if(!rn2(3)) { ! useup(spellbook); ! pline_The("spellbook crumbles to dust!"); } return(1); ! } ! else if(confused) { ! if(!rn2(3) && ! spellbook->otyp != SPE_BOOK_OF_THE_DEAD) { ! useup(spellbook); ! pline("Being confused you have difficulties in controlling your actions."); ! display_nhwindow(WIN_MESSAGE, FALSE); ! You("accidentally tear the spellbook to pieces."); } - else - You("find yourself reading the first line over and over again."); nomul(delay); delay = 0; return(1); } You("begin to %s the runes.", spellbook->otyp == SPE_BOOK_OF_THE_DEAD ? "recite" : --- 406,447 ---- nomul(delay); /* study time */ delay = 0; if(!rn2(3)) { ! pline_The("spellbook crumbles to dust!"); ! if (!objects[spellbook->otyp].oc_name_known && ! !objects[spellbook->otyp].oc_uname) ! docall(spellbook); ! useup(spellbook); } + #ifndef NO_SIGNAL + else + spellbook->in_use = FALSE; + #endif return(1); ! } else if (confused) { ! if (!rn2(3) && ! spellbook->otyp != SPE_BOOK_OF_THE_DEAD) { ! pline( ! "Being confused you have difficulties in controlling your actions."); ! display_nhwindow(WIN_MESSAGE, FALSE); ! You("accidentally tear the spellbook to pieces."); ! if (!objects[spellbook->otyp].oc_name_known && ! !objects[spellbook->otyp].oc_uname) ! docall(spellbook); ! useup(spellbook); ! } else { ! You( ! "find yourself reading the first line over and over again."); ! #ifndef NO_SIGNAL ! spellbook->in_use = FALSE; ! #endif } nomul(delay); delay = 0; return(1); } + #ifndef NO_SIGNAL + spellbook->in_use = FALSE; + #endif You("begin to %s the runes.", spellbook->otyp == SPE_BOOK_OF_THE_DEAD ? "recite" : *************** *** 715,721 **** * in the window-ports (say via a tab character). */ Sprintf(buf, "%-20s Level Fail", "Name"); ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, buf, MENU_UNSELECTED); for (i = 0; i < MAXSPELL && spellid(i) != NO_SPELL; i++) { Sprintf(buf, "%-20s %2d%s %3d%%", spellname(i), spellev(i), --- 740,746 ---- * in the window-ports (say via a tab character). */ Sprintf(buf, "%-20s Level Fail", "Name"); ! add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); for (i = 0; i < MAXSPELL && spellid(i) != NO_SPELL; i++) { Sprintf(buf, "%-20s %2d%s %3d%%", spellname(i), spellev(i), *************** *** 723,729 **** any.a_int = i+1; /* must be non-zero */ add_menu(tmpwin, NO_GLYPH, &any, ! spellet(i), 0,buf, MENU_UNSELECTED); } end_menu(tmpwin, how == PICK_ONE ? "Choose a spell" : "Currently known spells"); --- 748,754 ---- any.a_int = i+1; /* must be non-zero */ add_menu(tmpwin, NO_GLYPH, &any, ! spellet(i), 0, ATR_NONE, buf, MENU_UNSELECTED); } end_menu(tmpwin, how == PICK_ONE ? "Choose a spell" : "Currently known spells"); *** Old/src/steal.c Tue May 28 17:30:41 1996 --- src/steal.c Wed May 15 08:48:53 1996 *************** *** 351,361 **** register int omx = mtmp->mx, omy = mtmp->my; struct obj *keepobj = 0; struct obj *wep = MON_WEP(mtmp); while ((otmp = mtmp->minvent) != 0) { obj_extract_self(otmp); ! if (otmp->owornmask || otmp == wep) { if (is_pet) { /* dont drop worn/wielded item */ otmp->nobj = keepobj; keepobj = otmp; continue; --- 351,375 ---- register int omx = mtmp->mx, omy = mtmp->my; struct obj *keepobj = 0; struct obj *wep = MON_WEP(mtmp); + boolean item1 = FALSE, item2 = FALSE; + if (!is_pet || mindless(mtmp->data) || is_animal(mtmp->data)) + item1 = item2 = TRUE; + if (!tunnels(mtmp->data) || !needspick(mtmp->data)) + item1 = TRUE; while ((otmp = mtmp->minvent) != 0) { obj_extract_self(otmp); ! /* special case: pick-axe and unicorn horn are non-worn */ ! /* items that we also want pets to keep 1 of */ ! /* (It is a coincidence that these can also be wielded. */ ! if (otmp->owornmask || otmp == wep || ! ((!item1 && otmp->otyp == PICK_AXE) || ! (!item2 && otmp->otyp == UNICORN_HORN && !otmp->cursed))) { if (is_pet) { /* dont drop worn/wielded item */ + if (otmp->otyp == PICK_AXE) + item1 = TRUE; + if (otmp->otyp == UNICORN_HORN && !otmp->cursed) + item2 = TRUE; otmp->nobj = keepobj; keepobj = otmp; continue; *** Old/src/teleport.c Tue May 28 17:30:44 1996 --- src/teleport.c Sat May 18 11:50:44 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)teleport.c 3.2 96/03/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)teleport.c 3.2 96/05/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 215,220 **** --- 215,221 ---- vision_full_recalc = 1; nomul(0); spoteffects(); + invocation_message(); } boolean *************** *** 937,955 **** register struct obj *obj; { register xchar tx, ty, otx, oty; obj_extract_self(obj); - otx = obj->ox; oty = obj->oy; do { ! tx = rn1(COLNO-3,2); ! ty = rn2(ROWNO); ! } while (!goodpos(tx, ty, (struct monst *)0, (struct permonst *)0)); ! if (flooreffects(obj, tx, ty, "fall")) ! return; ! if (otx == 0 && oty == 0) { ; /* fell through a trapdoor; no update of old loc needed */ } else { if (costly_spot(otx, oty) --- 938,966 ---- register struct obj *obj; { register xchar tx, ty, otx, oty; + boolean restricted_fall; + int try_limit = 4000; obj_extract_self(obj); otx = obj->ox; oty = obj->oy; + restricted_fall = (otx == 0 && dndest.lx); do { ! tx = rn1(COLNO-3,2); ! ty = rn2(ROWNO); ! if (!--try_limit) break; ! } while (!goodpos(tx, ty, (struct monst *)0, (struct permonst *)0) || ! /* bug: this lacks provision for handling the Wizard's tower */ ! (restricted_fall && ! (!within_bounded_area(tx, ty, dndest.lx, dndest.ly, ! dndest.hx, dndest.hy) || ! (dndest.nlx && ! within_bounded_area(tx, ty, dndest.nlx, dndest.nly, ! dndest.nhx, dndest.nhy))))); ! if (flooreffects(obj, tx, ty, "fall")) { ! return; ! } else if (otx == 0 && oty == 0) { ; /* fell through a trapdoor; no update of old loc needed */ } else { if (costly_spot(otx, oty) *************** *** 998,1004 **** * --KAA */ min_depth = 1; ! max_depth = dunlevs_in_dungeon(&u.uz) + (dungeons[u.uz.dnum].depth_start - 1); if (nlev > max_depth) { --- 1009,1015 ---- * --KAA */ min_depth = 1; ! max_depth = dunlevs_in_dungeon(&u.uz) + (dungeons[u.uz.dnum].depth_start - 1); if (nlev > max_depth) { *** Old/src/timeout.c Tue May 28 17:30:47 1996 --- src/timeout.c Tue May 14 16:29:10 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)timeout.c 3.2 95/08/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)timeout.c 3.2 96/04/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 270,277 **** nomul(how_long); /* early wakeup from combat won't be possible until next monster turn */ u.usleep = monstermoves; ! if (wakeup_msg) nomovemsg = "You wake up."; ! /* otherwise defaults to "You can move again." */ } /* Attach an egg hatch timeout to the given egg. */ --- 270,276 ---- nomul(how_long); /* early wakeup from combat won't be possible until next monster turn */ u.usleep = monstermoves; ! nomovemsg = wakeup_msg ? "You wake up." : You_can_move_again; } /* Attach an egg hatch timeout to the given egg. */ *************** *** 314,339 **** genericptr_t arg; long timeout; { - xchar x, y; - boolean silent, canseeit; struct obj *egg; ! struct monst *mon = (struct monst *) 0; ! int yours; egg = (struct obj *) arg; - /* sterilized while waiting */ if (egg->corpsenm == NON_PM) return; ! yours = egg->spe; silent = (timeout != monstermoves); /* hatched while away */ /* only can hatch when in INVENT, FLOOR, MINVENT */ if (get_obj_location(egg, &x, &y, 0)) { canseeit = cansee(x, y) && !silent; ! mon = makemon(&mons[big_to_little(egg->corpsenm)], x, y); ! } else { ! canseeit = 0; } #if 0 /* --- 313,365 ---- genericptr_t arg; long timeout; { struct obj *egg; ! struct monst *mon, *mon2; ! coord cc; ! xchar x, y; ! boolean yours, silent, canseeit = FALSE; ! int i, mnum, hatchcount = 0; egg = (struct obj *) arg; /* sterilized while waiting */ if (egg->corpsenm == NON_PM) return; ! mon = mon2 = (struct monst *)0; ! mnum = big_to_little(egg->corpsenm); ! yours = egg->spe != 0; silent = (timeout != monstermoves); /* hatched while away */ /* only can hatch when in INVENT, FLOOR, MINVENT */ if (get_obj_location(egg, &x, &y, 0)) { + hatchcount = rnd((int)egg->quan); canseeit = cansee(x, y) && !silent; ! if (!(mons[mnum].geno & G_UNIQ) && ! !(mvitals[mnum].mvflags & (G_GENOD | G_EXTINCT))) { ! for (i = hatchcount; i > 0; i--) { ! if (!enexto(&cc, x, y, &mons[mnum]) || ! !(mon = makemon(&mons[mnum], cc.x, cc.y, NO_MINVENT))) ! break; ! /* tame if your own egg hatches while you're on the ! same dungeon level, or any dragon egg which hatches ! while it's in your inventory */ ! if ((yours && !silent) || ! (mon->data->mlet == S_DRAGON && ! egg->where == OBJ_INVENT)) { ! if ((mon2 = tamedog(mon, (struct obj *)0)) != 0) { ! mon = mon2; ! if (egg->where == OBJ_INVENT && ! mon->data->mlet != S_DRAGON) ! mon->mtame = 20; ! } ! } ! if (mvitals[mnum].mvflags & G_EXTINCT) ! break; /* just made last one */ ! mon2 = mon; /* in case makemon() fails on 2nd egg */ ! } ! if (!mon) mon = mon2; ! hatchcount -= i; ! egg->quan -= (long)hatchcount; ! } } #if 0 /* *************** *** 353,358 **** --- 379,387 ---- + Mark the egg as hatched, then place the monster when we place the migrating objects. + + + Or just kill any egg which gets sent to another level. + Falling is the usual reason such transportation occurs. */ canseeit = FALSE; mon = ??? *************** *** 360,419 **** #endif if (mon) { ! struct monst *mon2; ! boolean learn_type = canseeit; ! int mnum = egg->corpsenm; ! discard_minvent(mon); /* no initial inventory */ switch (egg->where) { case OBJ_INVENT: - learn_type = TRUE; /* always know type if in invent */ if (Blind) You_feel("%s %s from your pack!", something, locomotion(mon->data, "drop")); else You("see %s %s out of your pack!", ! a_monnam(mon), ! locomotion(mon->data, "drop")); ! if (yours) { ! pline("Its cries sound like \"%s.\"", flags.female ? "mommy" : "daddy"); - if ((mon2 = tamedog(mon, (struct obj *)0)) != 0) - mon = mon2; - mon->mtame = 20; } else if (mon->data->mlet == S_DRAGON) { verbalize("Gleep!"); /* Mything eggs :-) */ - if ((mon2 = tamedog(mon, (struct obj *)0)) != 0) - mon = mon2; } break; case OBJ_FLOOR: ! if (canseeit) ! You("see %s hatch.", a_monnam(mon)); break; case OBJ_MINVENT: if (canseeit) { ! char buf[BUFSZ]; /* avoid conflict */ ! Strcpy(buf,a_monnam(mon)); ! You("see %s %s out of %s pack!", ! buf, locomotion(mon->data, "drop"), ! s_suffix(a_monnam(egg->ocarry))); } break; #if 0 case OBJ_MIGRATING: break; #endif } ! /* free egg here because we use it above */ ! obj_extract_self(egg); ! obfree(egg, (struct obj *)0); ! ! if (learn_type) ! learn_egg_type(mnum); } } --- 389,462 ---- #endif if (mon) { ! char monnambuf[BUFSZ], carriedby[BUFSZ]; ! boolean siblings = (hatchcount > 1), redraw = FALSE; ! if (canseeit) { ! Sprintf(monnambuf, "%s%s", ! siblings ? "some " : "", ! siblings ? makeplural(m_monnam(mon)) : a_monnam(mon)); ! learn_egg_type(mnum); ! } switch (egg->where) { case OBJ_INVENT: if (Blind) You_feel("%s %s from your pack!", something, locomotion(mon->data, "drop")); else You("see %s %s out of your pack!", ! monnambuf, locomotion(mon->data, "drop")); if (yours) { ! pline("%s cries sound like \"%s.\"", ! siblings ? "Their" : "Its", flags.female ? "mommy" : "daddy"); } else if (mon->data->mlet == S_DRAGON) { verbalize("Gleep!"); /* Mything eggs :-) */ } break; case OBJ_FLOOR: ! if (canseeit) { ! You("see %s hatch.", monnambuf); ! redraw = TRUE; /* update egg's map location */ ! } break; case OBJ_MINVENT: if (canseeit) { ! /* egg carring monster might be invisible */ ! if (canseemon(egg->ocarry)) ! Sprintf(carriedby, "%s pack", ! s_suffix(a_monnam(egg->ocarry))); ! else ! Strcpy(carriedby, "thin air"); ! You("see %s %s out of %s!", monnambuf, ! locomotion(mon->data, "drop"), carriedby); } break; #if 0 case OBJ_MIGRATING: break; #endif + default: + impossible("egg hatched where? (%d)", (int)egg->where); + break; } ! if (egg->quan > 0) { ! /* still some eggs left */ ! attach_egg_hatch_timeout(egg); ! if (egg->timed) { ! /* replace ordinary egg timeout with a short one */ ! (void) stop_timer(HATCH_EGG, (genericptr_t)egg); ! (void) start_timer((long)rnd(12), TIMER_OBJECT, ! HATCH_EGG, (genericptr_t)egg); ! } ! } else { ! /* free egg here because we use it above */ ! obj_extract_self(egg); ! obfree(egg, (struct obj *)0); ! } ! if (redraw) newsym(x, y); } } *************** *** 422,440 **** learn_egg_type(mnum) int mnum; { ! boolean knew_egg = mvitals[mnum].mvflags & MV_KNOWS_EGG; ! mvitals[mnum].mvflags |= MV_KNOWS_EGG; ! if (!knew_egg) { ! struct obj *obj; ! ! /* update inventory if we find an egg of this type in there */ ! for (obj = invent; obj; obj = obj->nobj) ! if (obj->otyp == EGG && obj->corpsenm == mnum) { ! update_inventory(); ! break; ! } ! } } /* give a fumble message */ --- 465,475 ---- learn_egg_type(mnum) int mnum; { ! /* baby monsters hatch from grown-up eggs */ ! mnum = little_to_big(mnum); mvitals[mnum].mvflags |= MV_KNOWS_EGG; ! /* we might have just learned about other eggs being carried */ ! update_inventory(); } /* give a fumble message */ *** Old/src/topten.c Tue May 28 17:30:52 1996 --- src/topten.c Tue May 28 10:47:21 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)topten.c 3.2 96/03/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)topten.c 3.2 96/05/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 229,234 **** --- 229,235 ---- restore_colors(); /* make sure the screen is black on white */ #endif /* create a new 'topten' entry */ + t0_used = FALSE; t0 = newttentry(); /* deepest_lev_reached() is in terms of depth(), and reporting the * deepest level reached in the dungeon death occurred in doesn't *************** *** 296,302 **** wizard ? "wizard" : "discover"); topten_print(pbuf); } - dealloc_ttentry(t0); goto showwin; } --- 297,302 ---- *************** *** 312,318 **** if (!rfile) { HUP raw_print("Cannot open record file!"); unlock_file(RECORD); - dealloc_ttentry(t0); goto destroywin; } --- 312,317 ---- *************** *** 323,329 **** t1 = tt_head = newttentry(); tprev = 0; - t0_used = FALSE; /* rank0: -1 undefined, 0 not_on_list, n n_th on list */ for(rank = 1; ; ) { readentry(rfile, t1); --- 322,327 ---- *************** *** 369,375 **** } } if(rank <= ENTRYMAX) { ! t1 = t1->tt_next = newttentry(); rank++; } if(rank > ENTRYMAX) { --- 367,374 ---- } } if(rank <= ENTRYMAX) { ! t1->tt_next = newttentry(); ! t1 = t1->tt_next; rank++; } if(rank > ENTRYMAX) { *************** *** 387,393 **** HUP raw_print("Cannot write record file"); unlock_file(RECORD); free_ttlist(tt_head); - if (!t0_used) dealloc_ttentry(t0); goto destroywin; } #endif /* UPDATE_RECORD_IN_PLACE */ --- 386,391 ---- *************** *** 443,473 **** #ifdef UPDATE_RECORD_IN_PLACE if (flg) { # ifdef TRUNCATE_FILE ! /* if a reasonable way to truncate a file exists, use it */ ! truncate_file(rfile); # else ! /* use sentinel record rather than relying on truncation */ ! t0->points = 0L; /* terminates file when read back in */ ! t0->ver_major = t0->ver_minor = t0->patchlevel = 0; ! t0->uid = t0->deathdnum = t0->deathlev = 0; ! t0->maxlvl = t0->hp = t0->maxhp = t0->deaths = 0; ! t0->plchar = t0->sex = '-'; ! Strcpy(t0->birthdate, strcpy(t0->deathdate, yymmdd(0L))); ! Strcpy(t0->name, "@"); ! Strcpy(t0->death, "\n"); ! writeentry(rfile, t0); ! (void) fflush(rfile); # endif /* TRUNCATE_FILE */ } #endif /* UPDATE_RECORD_IN_PLACE */ (void) fclose(rfile); unlock_file(RECORD); free_ttlist(tt_head); - if (!t0_used) dealloc_ttentry(t0); showwin: if (flags.toptenwin && !done_stopprint) display_nhwindow(toptenwin, 1); destroywin: if (flags.toptenwin) { destroy_nhwindow(toptenwin); toptenwin=WIN_ERR; --- 441,471 ---- #ifdef UPDATE_RECORD_IN_PLACE if (flg) { # ifdef TRUNCATE_FILE ! /* if a reasonable way to truncate a file exists, use it */ ! truncate_file(rfile); # else ! /* use sentinel record rather than relying on truncation */ ! t1->points = 0L; /* terminates file when read back in */ ! t1->ver_major = t1->ver_minor = t1->patchlevel = 0; ! t1->uid = t1->deathdnum = t1->deathlev = 0; ! t1->maxlvl = t1->hp = t1->maxhp = t1->deaths = 0; ! t1->plchar = t1->sex = '-'; ! Strcpy(t1->birthdate, strcpy(t1->deathdate, yymmdd(0L))); ! Strcpy(t1->name, "@"); ! Strcpy(t1->death, "\n"); ! writeentry(rfile, t1); ! (void) fflush(rfile); # endif /* TRUNCATE_FILE */ } #endif /* UPDATE_RECORD_IN_PLACE */ (void) fclose(rfile); unlock_file(RECORD); free_ttlist(tt_head); showwin: if (flags.toptenwin && !done_stopprint) display_nhwindow(toptenwin, 1); destroywin: + if (!t0_used) dealloc_ttentry(t0); if (flags.toptenwin) { destroy_nhwindow(toptenwin); toptenwin=WIN_ERR; *************** *** 507,518 **** Sprintf(eos(linebuf), " %10ld %.10s", t1->points, t1->name); Sprintf(eos(linebuf), "-%c ", t1->plchar); if (!strncmp("escaped", t1->death, 7)) { second_line = FALSE; - if (!strcmp(" (with the Amulet)", t1->death + 7)) - Strcat(linebuf, "escaped the dungeon with the Amulet"); - else - Sprintf(eos(linebuf), "escaped the dungeon [max level %d]", - t1->maxlvl); } else if (!strncmp("ascended", t1->death, 8)) { Sprintf(eos(linebuf), "ascended to demigod%s-hood", (t1->sex == 'F') ? "dess" : ""); --- 505,517 ---- Sprintf(eos(linebuf), " %10ld %.10s", t1->points, t1->name); Sprintf(eos(linebuf), "-%c ", t1->plchar); if (!strncmp("escaped", t1->death, 7)) { + Sprintf(eos(linebuf), "escaped the dungeon %s[max level %d]", + !strncmp(" (", t1->death + 7, 2) ? t1->death + 7 + 2 : "", + t1->maxlvl); + /* fixup for closing paren in "escaped... with...Amulet)[max..." */ + if ((bp = index(linebuf, ')')) != 0) + *bp = (t1->deathdnum == astral_level.dnum) ? '\0' : ' '; second_line = FALSE; } else if (!strncmp("ascended", t1->death, 8)) { Sprintf(eos(linebuf), "ascended to demigod%s-hood", (t1->sex == 'F') ? "dess" : ""); *************** *** 581,586 **** --- 580,588 ---- !(*bp == ' ' && (bp-linebuf < hppos)); bp--) ; + /* special case: if about to wrap in the middle of maximum + dungeon depth reached, wrap in front of it instead */ + if (bp > linebuf + 5 && !strncmp(bp - 5, " [max", 5)) bp -= 5; Strcpy(linebuf3, bp+1); *bp = 0; if (so) { *************** *** 660,666 **** { const char **players; int playerct, rank; ! boolean current_ver = TRUE; register struct toptenentry *t1; FILE *rfile; boolean match_found = FALSE; --- 662,668 ---- { const char **players; int playerct, rank; ! boolean current_ver = TRUE, init_done = FALSE; register struct toptenentry *t1; FILE *rfile; boolean match_found = FALSE; *************** *** 670,675 **** --- 672,678 ---- #ifndef PERS_IS_UID const char *player0; #endif + if (argc < 2 || strncmp(argv[1], "-s", 2)) { raw_printf("prscore: bad arguments (%d)", argc); return; *************** *** 694,699 **** --- 697,703 ---- if (wiz1_level.dlevel == 0) { dlb_init(); init_dungeons(); + init_done = TRUE; } if (!argv[1][2]){ /* plain "-s" */ *************** *** 742,778 **** if (!match_found && score_wanted(current_ver, rank, t1, playerct, players, uid)) match_found = TRUE; ! t1 = t1->tt_next = newttentry(); } (void) fclose(rfile); ! if (!match_found) { Sprintf(pbuf, "Cannot find any %sentries for ", current_ver ? "current " : ""); if (playerct < 1) Strcat(pbuf, "you."); else { ! if (playerct > 1) Strcat(pbuf, "any of "); ! for (i = 0; i < playerct; i++) { ! Strcat(pbuf, players[i]); ! if (i < playerct-1) Strcat(pbuf, ":"); ! } } raw_print(pbuf); raw_printf("Call is: %s -s [-v] [-role] [maxrank] [playernames]", hname); - #ifdef AMIGA - display_nhwindow(amii_rawprwin, 1); - destroy_nhwindow(amii_rawprwin); - amii_rawprwin = WIN_ERR; - #endif - free_ttlist(tt_head); - return; - } - - outheader(); - t1 = tt_head; - for (rank = 1; t1->points != 0; rank++, t1 = t1->tt_next) { - if (score_wanted(current_ver, rank, t1, playerct, players, uid)) - (void) outentry(rank, t1, 0); } free_ttlist(tt_head); #ifdef AMIGA --- 746,782 ---- if (!match_found && score_wanted(current_ver, rank, t1, playerct, players, uid)) match_found = TRUE; ! t1->tt_next = newttentry(); ! t1 = t1->tt_next; } + (void) fclose(rfile); ! if (init_done) { ! free_dungeons(); ! dlb_cleanup(); ! } ! ! if (match_found) { ! outheader(); ! t1 = tt_head; ! for (rank = 1; t1->points != 0; rank++, t1 = t1->tt_next) { ! if (score_wanted(current_ver, rank, t1, playerct, players, uid)) ! (void) outentry(rank, t1, 0); ! } ! } else { Sprintf(pbuf, "Cannot find any %sentries for ", current_ver ? "current " : ""); if (playerct < 1) Strcat(pbuf, "you."); else { ! if (playerct > 1) Strcat(pbuf, "any of "); ! for (i = 0; i < playerct; i++) { ! Strcat(pbuf, players[i]); ! if (i < playerct-1) Strcat(pbuf, ":"); ! } } raw_print(pbuf); raw_printf("Call is: %s -s [-v] [-role] [maxrank] [playernames]", hname); } free_ttlist(tt_head); #ifdef AMIGA *************** *** 823,837 **** register int i; register struct toptenentry *tt; FILE *rfile; if (!otmp) return((struct obj *) 0); rfile = fopen_datafile(RECORD, "r"); if (!rfile) { ! panic("Cannot open record file!"); } ! tt = newttentry(); rank = rnd(10); pickentry: for(i = rank; i; i--) { --- 827,843 ---- register int i; register struct toptenentry *tt; FILE *rfile; + struct toptenentry tt_buf; if (!otmp) return((struct obj *) 0); rfile = fopen_datafile(RECORD, "r"); if (!rfile) { ! impossible("Cannot open record file!"); ! return (struct obj *)0; } ! tt = &tt_buf; rank = rnd(10); pickentry: for(i = rank; i; i--) { *************** *** 854,860 **** otmp = oname(otmp, tt->name); if (otmp->otyp == CORPSE) start_corpse_timeout(otmp); } - dealloc_ttentry(tt); (void) fclose(rfile); return otmp; --- 860,865 ---- *** Old/src/trap.c Tue May 28 17:30:58 1996 --- src/trap.c Tue May 21 11:11:31 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)trap.c 3.2 96/04/08 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)trap.c 3.2 96/05/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 22,27 **** --- 22,28 ---- STATIC_DCL int FDECL(mkroll_launch, (struct trap *,XCHAR_P,XCHAR_P,SHORT_P,long)); STATIC_DCL boolean FDECL(isclearpath,(coord *, int, SCHAR_P, SCHAR_P)); + STATIC_DCL void FDECL(blow_up_landmine, (struct trap *)); #ifndef OVLB STATIC_VAR const char *a_your[2]; *************** *** 180,187 **** ttmp->ttyp = typ; switch(typ) { case STATUE_TRAP: /* create a "living" statue */ ! (void) mkcorpstat(STATUE, &mons[rndmonnum()], x, y, FALSE); break; case ROLLING_BOULDER_TRAP: /* boulder will roll towards trigger */ (void) mkroll_launch(ttmp, x, y, BOULDER, 1L); break; --- 181,202 ---- ttmp->ttyp = typ; switch(typ) { case STATUE_TRAP: /* create a "living" statue */ ! { struct monst *mtmp; ! struct obj *otmp, *statue; ! ! statue = mkcorpstat(STATUE, (struct monst *)0, ! &mons[rndmonnum()], x, y, FALSE); ! mtmp = makemon(&mons[statue->corpsenm], 0, 0, NO_MM_FLAGS); ! if (!mtmp) break; /* should never happen */ ! while(mtmp->minvent) { ! otmp = mtmp->minvent; ! otmp->owornmask = 0; ! obj_extract_self(otmp); ! add_to_container(statue, otmp); ! } ! mongone(mtmp); break; + } case ROLLING_BOULDER_TRAP: /* boulder will roll towards trigger */ (void) mkroll_launch(ttmp, x, y, BOULDER, 1L); break; *************** *** 294,300 **** struct obj *otmp = sobj_at(STATUE, x, y); deltrap(trap); ! if (otmp && (mtmp = makemon(&mons[otmp->corpsenm], x, y)) != 0) { delobj(otmp); /* mimic statue becomes seen mimic; other hiders won't be hidden */ if (mtmp->m_ap_type) seemimic(mtmp); --- 309,324 ---- struct obj *otmp = sobj_at(STATUE, x, y); deltrap(trap); ! if (otmp && (mtmp = makemon(&mons[otmp->corpsenm], ! x, y, NO_MINVENT)) != 0) { ! struct obj *obj; ! ! while(otmp->cobj) { ! obj = otmp->cobj; ! obj_extract_self(obj); ! add_to_minv(mtmp, obj); ! } ! m_dowear(mtmp, TRUE); delobj(otmp); /* mimic statue becomes seen mimic; other hiders won't be hidden */ if (mtmp->m_ap_type) seemimic(mtmp); *************** *** 564,571 **** case HOLE: case TRAPDOOR: seetrap(trap); ! if(!Can_fall_thru(&u.uz)) ! panic("Holes & trapdoors cannot exist on this level."); fall_through(TRUE); break; --- 588,598 ---- case HOLE: case TRAPDOOR: seetrap(trap); ! if (!Can_fall_thru(&u.uz)) { ! impossible("dotrap: %ss cannot exist on this level.", ! defsyms[trap_to_defsym(ttype)].explanation); ! break; /* don't activate it after all */ ! } fall_through(TRUE); break; *************** *** 687,703 **** set_wounded_legs(RIGHT_SIDE, rn1(35, 41)); exercise(A_DEX, FALSE); } ! scatter(u.ux, u.uy, 4, ! MAY_DESTROY | MAY_HIT | MAY_FRACTURE | VIS_EFFECTS); ! del_engr_at(u.ux, u.uy); ! wake_nearto(u.ux, u.uy, 500); ! trap->ttyp = PIT; /* turn the mine into a pit */ ! trap->madeby_u = FALSE; /* resulting pit isn't yours */ ! if (IS_DOOR(levl[u.ux][u.uy].typ)) ! levl[u.ux][u.uy].doormask = D_BROKEN; newsym(u.ux,u.uy); /* update trap symbol */ losehp(rnd(16), "land mine", KILLED_BY_AN); ! dotrap(trap); /* fall recursively into the pit... */ break; case ROLLING_BOULDER_TRAP: --- 714,724 ---- set_wounded_legs(RIGHT_SIDE, rn1(35, 41)); exercise(A_DEX, FALSE); } ! blow_up_landmine(trap); newsym(u.ux,u.uy); /* update trap symbol */ losehp(rnd(16), "land mine", KILLED_BY_AN); ! /* fall recursively into the pit... */ ! if ((trap = t_at(u.ux, u.uy)) != 0) dotrap(trap); break; case ROLLING_BOULDER_TRAP: *************** *** 721,726 **** --- 742,765 ---- impossible("You hit a trap of type %u", trap->ttyp); } } + + /* some actions common to both player and monsters for triggered landmine */ + STATIC_OVL void + blow_up_landmine(trap) + struct trap *trap; + { + scatter(trap->tx, trap->ty, 4, + MAY_DESTROY | MAY_HIT | MAY_FRACTURE | VIS_EFFECTS); + del_engr_at(trap->tx, trap->ty); + wake_nearto(trap->tx, trap->ty, 400); + if (IS_DOOR(levl[trap->tx][trap->ty].typ)) + levl[trap->tx][trap->ty].doormask = D_BROKEN; + /* TODO: destroy drawbridge if present; + sometimes delete trap instead of always leaving a pit */ + trap->ttyp = PIT; /* explosion creates a pit */ + trap->madeby_u = FALSE; /* resulting pit isn't yours */ + } + #endif /* OVLB */ #ifdef OVL3 *************** *** 1023,1038 **** otmp->quan = 1L; otmp->owt = weight(otmp); if (in_sight) seetrap(trap); ! if (is_whirly(mptr) || passes_walls(mptr)) { ! if (in_sight) ! pline("A rock falls harmlessly through %s.", ! mon_nam(mtmp)); ! else if (cansee(mtmp->mx, mtmp->my)) ! pline("A rock falls to the %s.", ! surface(mtmp->mx, mtmp->my)); ! place_object(otmp, mtmp->mx, mtmp->my); ! stackobj(otmp); ! } else if (thitm(0, mtmp, otmp, d(2, 6))) trapkilled = TRUE; break; --- 1062,1068 ---- otmp->quan = 1L; otmp->owt = weight(otmp); if (in_sight) seetrap(trap); ! if (thitm(0, mtmp, otmp, d(2, 6))) trapkilled = TRUE; break; *************** *** 1166,1174 **** break; case HOLE: case TRAPDOOR: ! if(!Can_fall_thru(&u.uz)) ! panic("Holes & trapdoors cannot exist on this level."); ! if (is_flyer(mptr) || mptr == &mons[PM_WUMPUS] || (mtmp->wormno && count_wsegs(mtmp) > 5) || mptr->msize >= MZ_HUGE) break; --- 1196,1206 ---- break; case HOLE: case TRAPDOOR: ! if (!Can_fall_thru(&u.uz)) { ! impossible("mintrap: %ss cannot exist on this level.", ! defsyms[trap_to_defsym(tt)].explanation); ! break; /* don't activate it after all */ ! } if (is_flyer(mptr) || mptr == &mons[PM_WUMPUS] || (mtmp->wormno && count_wsegs(mtmp) > 5) || mptr->msize >= MZ_HUGE) break; *************** *** 1288,1308 **** } if (!in_sight) pline("Kaablamm! You hear an explosion in the distance!"); ! scatter(mtmp->mx, mtmp->my, 4, ! MAY_DESTROY | MAY_HIT | MAY_FRACTURE | VIS_EFFECTS); ! del_engr_at(mtmp->mx, mtmp->my); ! if (IS_DOOR(levl[mtmp->mx][mtmp->my].typ)) ! levl[mtmp->mx][mtmp->my].doormask = D_BROKEN; ! ! trap->ttyp = PIT; /* explosion creates a pit */ ! trap->madeby_u = FALSE; /* resulting pit isn't yours */ if(thitm(0, mtmp, (struct obj *)0, rnd(16))) trapkilled = TRUE; else { /* monsters recursively fall into new pit */ if (mintrap(mtmp) == 2) trapkilled=TRUE; } - wake_nearto(mtmp->mx, mtmp->my, 500); if (unconscious()) { multi = -1; nomovemsg="The explosion awakens you!"; --- 1320,1332 ---- } if (!in_sight) pline("Kaablamm! You hear an explosion in the distance!"); ! blow_up_landmine(trap); if(thitm(0, mtmp, (struct obj *)0, rnd(16))) trapkilled = TRUE; else { /* monsters recursively fall into new pit */ if (mintrap(mtmp) == 2) trapkilled=TRUE; } if (unconscious()) { multi = -1; nomovemsg="The explosion awakens you!"; *************** *** 1551,1556 **** --- 1575,1584 ---- boolean see_it = !Blind; int num; + /* Bug: for box case, the equivalent of burn_floor_paper() ought + * to be done upon its contents. + */ + if ((box && !carried(box)) ? is_pool(box->ox, box->oy) : Underwater) { pline("A cascade of steamy bubbles erupts from %s!", the(box ? xname(box) : surface(u.ux,u.uy))); *************** *** 1593,1610 **** /* What happened to the poor sucker? */ if (fate < 10) { - /* Most of the time, it creates some monsters. */ register int cnt = rnd(4); ! /* below checks for blindness added by GAN 10/30/86 */ ! if (!Blind) { You("are momentarily blinded by a flash of light!"); make_blinded((long)rn1(5,10),FALSE); } else You_hear("a deafening roar!"); while(cnt--) ! (void) makemon((struct permonst *) 0, u.ux, u.uy); } else switch (fate) { --- 1621,1638 ---- /* What happened to the poor sucker? */ if (fate < 10) { /* Most of the time, it creates some monsters. */ register int cnt = rnd(4); ! if (!resists_blnd(&youmonst)) { You("are momentarily blinded by a flash of light!"); make_blinded((long)rn1(5,10),FALSE); + } else if (!Blind) { + You("see a flash of light!"); } else You_hear("a deafening roar!"); while(cnt--) ! (void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS); } else switch (fate) { *************** *** 1719,1726 **** obj->otyp = POT_WATER; obj->blessed = obj->cursed = 0; obj->odiluted = 0; ! } else if (obj->otyp != POT_WATER || ! obj->blessed || obj->cursed) obj->odiluted++; } else if (is_rustprone(obj) && obj->oeroded < MAX_ERODE && !(obj->oerodeproof || (obj->blessed && !rnl(4)))) { --- 1747,1753 ---- obj->otyp = POT_WATER; obj->blessed = obj->cursed = 0; obj->odiluted = 0; ! } else if (obj->otyp != POT_WATER) obj->odiluted++; } else if (is_rustprone(obj) && obj->oeroded < MAX_ERODE && !(obj->oerodeproof || (obj->blessed && !rnl(4)))) { *************** *** 2166,2172 **** int fails = try_disarm(ttmp, FALSE); if (fails < 2) return fails; ! You("disarm %s trap", the_your[ttmp->madeby_u]); cnv_trap_obj(otyp, 50-rnl(50), ttmp); return 1; } --- 2193,2199 ---- int fails = try_disarm(ttmp, FALSE); if (fails < 2) return fails; ! You("disarm %s trap.", the_your[ttmp->madeby_u]); cnv_trap_obj(otyp, 50-rnl(50), ttmp); return 1; } *************** *** 2396,2406 **** exercise(A_DEX, TRUE); if(!force && (confused || Fumbling || rnd(75+level_difficulty()/2) > ch)) { ! You("set it off!"); ! b_trapped("door", FINGER); ! } else ! You("disarm it!"); ! levl[x][y].doormask &= ~D_TRAPPED; } else pline("This door was not trapped."); return(1); } else { --- 2423,2439 ---- exercise(A_DEX, TRUE); if(!force && (confused || Fumbling || rnd(75+level_difficulty()/2) > ch)) { ! You("set it off!"); ! b_trapped("door", FINGER); ! levl[x][y].doormask = D_NODOOR; ! unblock_point(x, y); ! newsym(x, y); ! /* (probably ought to charge for this damage...) */ ! if (*in_rooms(x, y, SHOPBASE)) add_damage(x, y, 0L); ! } else { ! You("disarm it!"); ! levl[x][y].doormask &= ~D_TRAPPED; ! } } else pline("This door was not trapped."); return(1); } else { *************** *** 2421,2426 **** --- 2454,2463 ---- register struct obj *otmp = obj, *otmp2; char buf[80]; const char *msg; + coord cc; + + if (get_obj_location(obj, &cc.x, &cc.y, 0)) /* might be carried */ + obj->ox = cc.x, obj->oy = cc.y; You(disarm ? "set it off!" : "trigger a trap!"); display_nhwindow(WIN_MESSAGE, FALSE); *************** *** 2540,2546 **** pline("Suddenly you are frozen in place!"); nomul(-d(5, 6)); exercise(A_DEX, FALSE); ! nomovemsg = "You can move again."; break; case 2: case 1: --- 2577,2583 ---- pline("Suddenly you are frozen in place!"); nomul(-d(5, 6)); exercise(A_DEX, FALSE); ! nomovemsg = You_can_move_again; break; case 2: case 1: *** Old/src/u_init.c Tue May 28 17:31:05 1996 --- src/u_init.c Fri May 24 08:51:58 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)u_init.c 3.2 95/12/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)u_init.c 3.2 96/05/13 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 251,257 **** { P_SPEAR, P_EXPERT }, { P_JAVELIN, P_BASIC }, { P_BOW, P_EXPERT }, { P_SLING, P_BASIC }, { P_CROSSBOW, P_BASIC }, { P_SHURIKEN, P_BASIC }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_MARTIAL_ARTS, 2 }, { P_NO_TYPE, 0 } }; --- 251,257 ---- { P_SPEAR, P_EXPERT }, { P_JAVELIN, P_BASIC }, { P_BOW, P_EXPERT }, { P_SLING, P_BASIC }, { P_CROSSBOW, P_BASIC }, { P_SHURIKEN, P_BASIC }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_MARTIAL_ARTS, 3 }, { P_NO_TYPE, 0 } }; *************** *** 294,299 **** --- 294,300 ---- { P_SLING, P_BASIC }, { P_CROSSBOW, P_BASIC }, { P_DART, P_BASIC }, { P_SHURIKEN, P_BASIC }, { P_BOOMERANG, P_BASIC }, { P_UNICORN_HORN, P_SKILLED }, + { P_BARE_HANDED_COMBAT, 2 }, { P_NO_TYPE, 0 } }; *************** *** 307,313 **** { P_HAMMER, P_BASIC }, { P_POLEARMS, P_BASIC }, { P_SPEAR, P_BASIC }, { P_CROSSBOW, P_EXPERT }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_BARE_HANDED_COMBAT, 2 }, { P_NO_TYPE, 0 } }; --- 308,314 ---- { P_HAMMER, P_BASIC }, { P_POLEARMS, P_BASIC }, { P_SPEAR, P_BASIC }, { P_CROSSBOW, P_EXPERT }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_BARE_HANDED_COMBAT, 4 }, { P_NO_TYPE, 0 } }; *************** *** 340,346 **** { P_CROSSBOW, P_BASIC }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_BASIC }, { P_BOOMERANG, P_BASIC }, { P_WHIP, P_BASIC }, { P_UNICORN_HORN, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, 4 }, { P_NO_TYPE, 0 } }; #endif /* TOURIST */ --- 341,347 ---- { P_CROSSBOW, P_BASIC }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_BASIC }, { P_BOOMERANG, P_BASIC }, { P_WHIP, P_BASIC }, { P_UNICORN_HORN, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, 3 }, { P_NO_TYPE, 0 } }; #endif /* TOURIST */ *************** *** 784,790 **** if (OBJ_DESCR(objects[obj->otyp]) && obj->known) makeknown(obj->otyp); if (obj->otyp == OIL_LAMP) ! knows_object(POT_OIL); if(obj->oclass == ARMOR_CLASS){ if (is_shield(obj) && !uarms) --- 785,791 ---- if (OBJ_DESCR(objects[obj->otyp]) && obj->known) makeknown(obj->otyp); if (obj->otyp == OIL_LAMP) ! makeknown(POT_OIL); if(obj->oclass == ARMOR_CLASS){ if (is_shield(obj) && !uarms) *************** *** 801,813 **** setworn(obj, W_ARMC); else if (is_boots(obj) && !uarmf) setworn(obj, W_ARMF); ! else if (!uarm) setworn(obj, W_ARM); } /* below changed by GAN 01/09/87 to allow wielding of * pick-axe or can-opener if there is no weapon */ ! if(obj->oclass == WEAPON_CLASS || obj->otyp == PICK_AXE || obj->otyp == TIN_OPENER) if(!uwep) setuwep(obj); #if !defined(PYRAMID_BUG) && !defined(MAC) --- 802,814 ---- setworn(obj, W_ARMC); else if (is_boots(obj) && !uarmf) setworn(obj, W_ARMF); ! else if (is_suit(obj) && !uarm) setworn(obj, W_ARM); } /* below changed by GAN 01/09/87 to allow wielding of * pick-axe or can-opener if there is no weapon */ ! if(obj->oclass == WEAPON_CLASS || is_weptool(obj) || obj->otyp == TIN_OPENER) if(!uwep) setuwep(obj); #if !defined(PYRAMID_BUG) && !defined(MAC) *** Old/src/uhitm.c Tue May 28 17:31:08 1996 --- src/uhitm.c Fri May 24 14:27:04 1996 *************** *** 1,11 **** ! /* SCCS Id: @(#)uhitm.c 3.2 96/02/07 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" static boolean FDECL(known_hitum, (struct monst *,int *,struct attack *)); static boolean FDECL(hitum, (struct monst *,int,struct attack *)); static int FDECL(explum, (struct monst *,struct attack *)); static void FDECL(start_engulf, (struct monst *)); static void NDECL(end_engulf); --- 1,13 ---- ! /* SCCS Id: @(#)uhitm.c 3.2 96/05/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" static boolean FDECL(known_hitum, (struct monst *,int *,struct attack *)); + static void FDECL(steal_it, (struct monst *, struct attack *)); static boolean FDECL(hitum, (struct monst *,int,struct attack *)); + static boolean FDECL(m_slips_free, (struct monst *mtmp,struct attack *mattk)); static int FDECL(explum, (struct monst *,struct attack *)); static void FDECL(start_engulf, (struct monst *)); static void NDECL(end_engulf); *************** *** 21,27 **** #ifdef WEAPON_SKILLS ! #define PROJECTILE(obj) ((obj) && objects[(obj)->otyp].oc_wepcat==WEP_MISSILE) #endif boolean --- 23,29 ---- #ifdef WEAPON_SKILLS ! #define PROJECTILE(obj) ((obj) && objects[(obj)->otyp].oc_wepcat == WEP_AMMO) #endif boolean *************** *** 210,217 **** return(FALSE); tmp = find_roll_to_hit(mtmp); ! (void) maybe_polyd( hmonas(mtmp,tmp), ! hitum(mtmp,tmp,playermon.mattk) ); mtmp->mstrategy &= ~STRAT_WAITMASK; return(TRUE); } --- 212,221 ---- return(FALSE); tmp = find_roll_to_hit(mtmp); ! if (Upolyd) ! (void) hmonas(mtmp, tmp); ! else ! (void) hitum(mtmp, tmp, playermon.mattk); mtmp->mstrategy &= ~STRAT_WAITMASK; return(TRUE); } *************** *** 319,325 **** #ifdef WEAPON_SKILLS boolean valid_weapon_attack = FALSE; int type; ! struct obj *monwep, *wep; #endif /* WEAPON_SKILLS */ wakeup(mon); --- 323,329 ---- #ifdef WEAPON_SKILLS boolean valid_weapon_attack = FALSE; int type; ! struct obj *monwep; #endif /* WEAPON_SKILLS */ wakeup(mon); *************** *** 327,336 **** if (mdat == &mons[PM_SHADE]) tmp = 0; #ifdef WEAPON_SKILLS ! else if (P_RESTRICTED(P_MARTIAL_ARTS)) tmp = rnd(2); - else /* knowing Martial Arts will increase base damage */ - tmp = rnd(4); valid_weapon_attack = (tmp > 1); #else else --- 331,340 ---- if (mdat == &mons[PM_SHADE]) tmp = 0; #ifdef WEAPON_SKILLS ! else if (martial_bonus()) ! tmp = rnd(4); /* bonus for martial arts */ ! else tmp = rnd(2); valid_weapon_attack = (tmp > 1); #else else *************** *** 510,519 **** change_luck(-5); if (obj->corpsenm == PM_COCKATRICE) { ! /* minor bug: this identifies the type of egg, ! but if it is being thrown, any others it was ! grouped with can't be marked as known because ! it has already been split away from them... */ You("hit %s with %s cockatrice egg%s. Splat!", mon_nam(mon), obj->known ? "the" : cnt > 1L ? "some" : "a", --- 514,520 ---- change_luck(-5); if (obj->corpsenm == PM_COCKATRICE) { ! learn_egg_type(PM_COCKATRICE); You("hit %s with %s cockatrice egg%s. Splat!", mon_nam(mon), obj->known ? "the" : cnt > 1L ? "some" : "a", *************** *** 561,566 **** --- 562,568 ---- break; case CREAM_PIE: case BLINDING_VENOM: + /* note: resists_blnd() does not apply here */ if (Blind || !haseyes(mdat)) pline(obj->otyp==CREAM_PIE ? "Splat!" : "Splash!"); else if (obj->otyp == BLINDING_VENOM) *************** *** 634,645 **** #ifdef WEAPON_SKILLS if (valid_weapon_attack) { ! /* to be valid a projectile must have the correct projector */ wep = PROJECTILE(obj) ? uwep : obj; tmp += weapon_dam_bonus(wep); ! type = weapon_type(wep); ! if (type != P_NO_TYPE) ! P_ADVANCE(type)++; } #endif /* WEAPON_SKILLS */ --- 636,647 ---- #ifdef WEAPON_SKILLS if (valid_weapon_attack) { ! struct obj *wep; ! ! /* to be valid a projectile must have had the correct projector */ wep = PROJECTILE(obj) ? uwep : obj; tmp += weapon_dam_bonus(wep); ! use_skill(weapon_type(wep)); } #endif /* WEAPON_SKILLS */ *************** *** 774,779 **** --- 776,815 ---- return((boolean)(destroyed ? FALSE : TRUE)); } + /* check whether slippery clothing protects from hug or wrap attack */ + /* [currently assumes that you are the attacker] */ + static boolean + m_slips_free(mdef, mattk) + struct monst *mdef; + struct attack *mattk; + { + struct obj *obj = which_armor(mdef, W_ARMC); + + if (!obj) obj = which_armor(mdef, W_ARM); + #ifdef TOURIST + if (!obj) obj = which_armor(mdef, W_ARMU); + #endif + /* if defender's cloak/armor is greased, attacker slips off */ + if (obj && (obj->greased || obj->otyp == OILSKIN_CLOAK)) { + You("%s %s %s %s!", + mattk->adtyp == AD_WRAP ? + "slip off of" : "grab, but cannot hold onto", + s_suffix(mon_nam(mdef)), + obj->greased ? "greased" : "slippery", + /* avoid "slippery slippery cloak" + for undiscovered oilskin cloak */ + (obj->greased || objects[obj->otyp].oc_name_known) ? + xname(obj) : "cloak"); + + if (obj->greased && !rn2(2)) { + pline_The("grease wears off."); + obj->greased = 0; + } + return TRUE; + } + return FALSE; + } + static void NDECL(demonpet); /* * Send in a demon pet for the hero. Exercise wisdom. *************** *** 790,800 **** pline("Some hell-p has arrived!"); pm = !rn2(6) ? &mons[ndemon(u.ualign.type)] : uasmon; ! if ((dtmp = makemon(pm, u.ux, u.uy)) != 0) (void)tamedog(dtmp, (struct obj *)0); exercise(A_WIS, TRUE); } int damageum(mdef, mattk) register struct monst *mdef; --- 826,916 ---- pline("Some hell-p has arrived!"); pm = !rn2(6) ? &mons[ndemon(u.ualign.type)] : uasmon; ! if ((dtmp = makemon(pm, u.ux, u.uy, NO_MM_FLAGS)) != 0) (void)tamedog(dtmp, (struct obj *)0); exercise(A_WIS, TRUE); } + static void + steal_it(mdef, mattk) + struct monst *mdef; + struct attack *mattk; + { + + if(mdef->minvent) { + struct obj *otmp, *stealoid; + + stealoid = (struct obj *)0; + if (could_seduce(&youmonst,mdef,mattk)){ + for(otmp = mdef->minvent; otmp; otmp=otmp->nobj) + if (otmp->owornmask & W_ARM) { + stealoid = otmp; + /* unwear even if not stolen */ + mdef->misc_worn_check &= ~W_ARM; + stealoid->owornmask = 0L; + update_mon_intrinsics(mdef, stealoid, FALSE); + } + } + if (stealoid) { + boolean whoops = FALSE, stolen = FALSE; + + if (gender(mdef) == (int) u.mfemale && + uasmon->mlet == S_NYMPH) + You( + "charm %s. She gladly hands over her possessions.", + mon_nam(mdef)); + else + You( + "seduce %s and %s starts to take off %s clothes.", + mon_nam(mdef), he[pronoun_gender(mdef)], + his[pronoun_gender(mdef)]); + while ((otmp = mdef->minvent) != 0) { + obj_extract_self(otmp); + if (otmp->owornmask) { + mdef->misc_worn_check &= ~otmp->owornmask; + otmp->owornmask = 0L; + update_mon_intrinsics(mdef, otmp, FALSE); + } + if (!stolen && otmp==stealoid) { + otmp = hold_another_object(otmp, + (const char *)0, (const char *)0, + (const char *)0); + stealoid = otmp; + stolen = TRUE; + } else { + otmp = hold_another_object(otmp, + "You steal %s.", doname(otmp), + "You steal: "); + } + if (otmp->otyp == CORPSE && + otmp->corpsenm == PM_COCKATRICE && + !uarmg) { + whoops = TRUE; + break; + } + } + pline("%s finishes taking off %s suit.", + Monnam(mdef), his[pronoun_gender(mdef)]); + if (stolen) You("steal %s!", doname(stealoid)); + if (whoops) instapetrify("cockatrice corpse"); + possibly_unwield(mdef); + } else { + otmp = mdef->minvent; + obj_extract_self(otmp); + if (otmp->owornmask) { + mdef->misc_worn_check &= !otmp->owornmask; + otmp->owornmask = 0L; + update_mon_intrinsics(mdef, otmp, FALSE); + } + otmp = hold_another_object(otmp, "You steal %s.", + doname(otmp), "You steal: "); + if (!(mdef->misc_worn_check & W_ARMG)) + mselftouch(mdef, (const char *)0, TRUE); + possibly_unwield(mdef); + } + } + } + int damageum(mdef, mattk) register struct monst *mdef; *************** *** 878,955 **** #endif case AD_SEDU: case AD_SITM: ! if(mdef->minvent) { ! struct obj *otmp, *stealoid; ! ! stealoid = (struct obj *)0; ! if (could_seduce(&youmonst,mdef,mattk)){ ! for(otmp = mdef->minvent; otmp; otmp=otmp->nobj) ! if (otmp->owornmask & W_ARM) { ! stealoid = otmp; ! /* unwear even if not stolen */ ! mdef->misc_worn_check &= ~W_ARM; ! stealoid->owornmask = 0L; ! update_mon_intrinsics(mdef, stealoid, FALSE); ! } ! } ! if (stealoid) { ! boolean whoops = FALSE, stolen = FALSE; ! ! if (gender(mdef) == u.mfemale && ! uasmon->mlet == S_NYMPH) ! You( ! "charm %s. She gladly hands over her possessions.", ! mon_nam(mdef)); ! else ! You( ! "seduce %s and %s starts to take off %s clothes.", ! mon_nam(mdef), he[pronoun_gender(mdef)], ! his[pronoun_gender(mdef)]); ! while ((otmp = mdef->minvent) != 0) { ! obj_extract_self(otmp); ! if (otmp->owornmask) { ! mdef->misc_worn_check &= ~otmp->owornmask; ! otmp->owornmask = 0L; ! update_mon_intrinsics(mdef, otmp, FALSE); ! } ! if (!stolen && otmp==stealoid) { ! otmp = hold_another_object(otmp, ! (const char *)0, (const char *)0, ! (const char *)0); ! stealoid = otmp; ! stolen = TRUE; ! } else { ! otmp = hold_another_object(otmp, ! "You steal %s.", doname(otmp), ! "You steal: "); ! } ! if (otmp->otyp == CORPSE && ! otmp->corpsenm == PM_COCKATRICE && ! !uarmg) { ! whoops = TRUE; ! break; ! } ! } ! pline("%s finishes taking off %s suit.", ! Monnam(mdef), his[pronoun_gender(mdef)]); ! if (stolen) You("steal %s!", doname(stealoid)); ! if (whoops) instapetrify("cockatrice corpse"); ! possibly_unwield(mdef); ! } else { ! otmp = mdef->minvent; ! obj_extract_self(otmp); ! if (otmp->owornmask) { ! mdef->misc_worn_check &= !otmp->owornmask; ! otmp->owornmask = 0L; ! update_mon_intrinsics(mdef, otmp, FALSE); ! } ! otmp = hold_another_object(otmp, "You steal %s.", ! doname(otmp), "You steal: "); ! if (!(mdef->misc_worn_check & W_ARMG)) ! mselftouch(mdef, (const char *)0, TRUE); ! possibly_unwield(mdef); ! } ! } tmp = 0; break; case AD_SGLD: --- 994,1000 ---- #endif case AD_SEDU: case AD_SITM: ! steal_it(mdef, mattk); tmp = 0; break; case AD_SGLD: *************** *** 969,976 **** } break; case AD_BLND: ! if(haseyes(pd)) { ! if(!Blind) pline("%s is blinded.", Monnam(mdef)); mdef->mcansee = 0; mdef->mblinded += tmp; --- 1014,1020 ---- } break; case AD_BLND: ! if (!resists_blnd(mdef)) { if(!Blind) pline("%s is blinded.", Monnam(mdef)); mdef->mcansee = 0; mdef->mblinded += tmp; *************** *** 1069,1090 **** break; case AD_WRAP: if (!sticks(mdef->data)) { - struct obj *obj = which_armor(mdef, W_ARMC); - if (!obj) obj = which_armor(mdef, W_ARM); - #ifdef TOURIST - if (!obj) obj = which_armor(mdef, W_ARMU); - #endif if (!u.ustuck && !rn2(10)) { ! if (obj && obj->greased) { tmp = 0; - You("slip off of %s%ss greased %s!", - mon_nam(mdef), - canspotmon(mdef) ? "'" : "", - xname(obj)); - if (!rn2(2)) { - pline_The("grease wears off."); - obj->greased = 0; - } } else { You("swing yourself around %s!", mon_nam(mdef)); --- 1113,1121 ---- break; case AD_WRAP: if (!sticks(mdef->data)) { if (!u.ustuck && !rn2(10)) { ! if (m_slips_free(mdef, mattk)) { tmp = 0; } else { You("swing yourself around %s!", mon_nam(mdef)); *************** *** 1154,1160 **** You("explode!"); switch(mattk->adtyp) { case AD_BLND: ! if (haseyes(mdef->data) && mdef->mcansee) { pline("%s is blinded by your flash of light!", Monnam(mdef)); mdef->mblinded = min((int)mdef->mblinded + tmp, 127); mdef->mcansee = 0; --- 1185,1191 ---- You("explode!"); switch(mattk->adtyp) { case AD_BLND: ! if (!resists_blnd(mdef)) { pline("%s is blinded by your flash of light!", Monnam(mdef)); mdef->mblinded = min((int)mdef->mblinded + tmp, 127); mdef->mcansee = 0; *************** *** 1284,1290 **** } break; case AD_BLND: ! if(haseyes(mdef->data)) { if (mdef->mcansee) pline("%s can't see in there!", Monnam(mdef)); mdef->mcansee = 0; --- 1315,1321 ---- } break; case AD_BLND: ! if (!resists_blnd(mdef)) { if (mdef->mcansee) pline("%s can't see in there!", Monnam(mdef)); mdef->mcansee = 0; *************** *** 1391,1397 **** if(uwep) tmp += hitval(uwep, mon); dhit = (tmp > (dieroll = rnd(20)) || u.uswallow); /* Enemy dead, before any special abilities used */ ! if (!known_hitum(mon,&dhit,mattk)) return 0; /* might be a worm that gets cut in half */ if (m_at(u.ux+u.dx, u.uy+u.dy) != mon) return((boolean)(nsum != 0)); /* Do not print "You hit" message, since known_hitum --- 1422,1428 ---- if(uwep) tmp += hitval(uwep, mon); dhit = (tmp > (dieroll = rnd(20)) || u.uswallow); /* Enemy dead, before any special abilities used */ ! if (!known_hitum(mon,&dhit,mattk)) return FALSE; /* might be a worm that gets cut in half */ if (m_at(u.ux+u.dx, u.uy+u.dy) != mon) return((boolean)(nsum != 0)); /* Do not print "You hit" message, since known_hitum *************** *** 1768,1774 **** res = 1; } } else if (mtmp->data->mlet != S_LIGHT) { ! if (mtmp->mcansee && haseyes(mtmp->data)) { tmp = dist2(otmp->ox, otmp->oy, mtmp->mx, mtmp->my); if (useeit) { pline("%s is blinded by the flash!", Monnam(mtmp)); --- 1799,1805 ---- res = 1; } } else if (mtmp->data->mlet != S_LIGHT) { ! if (!resists_blnd(mtmp)) { tmp = dist2(otmp->ox, otmp->oy, mtmp->mx, mtmp->my); if (useeit) { pline("%s is blinded by the flash!", Monnam(mtmp)); *** Old/src/vault.c Tue May 28 17:31:13 1996 --- src/vault.c Fri May 3 15:26:36 1996 *************** *** 216,222 **** } /* make something interesting happen */ ! if(!(guard = makemon(&mons[PM_GUARD], x, y))) return; guard->isgd = 1; guard->mpeaceful = 1; set_malign(guard); --- 216,222 ---- } /* make something interesting happen */ ! if(!(guard = makemon(&mons[PM_GUARD], x, y, NO_MM_FLAGS))) return; guard->isgd = 1; guard->mpeaceful = 1; set_malign(guard); *** Old/src/version.c Tue May 28 17:31:17 1996 --- src/version.c Sat May 18 11:50:48 1996 *************** *** 1,40 **** ! /* SCCS Id: @(#)version.c 3.2 95/09/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" #include "date.h" #ifdef SHORT_FILENAMES #include "patchlev.h" #else #include "patchlevel.h" #endif int doversion() { ! #ifdef BETA ! # ifndef PORT_SUB_ID ! pline("%s NetHack Beta Version %d.%d.%d-%d - last build %s.", ! # else ! pline("%s NetHack %s Beta Version %d.%d.%d-%d - last build %s.", ! # endif ! #else ! # ifndef PORT_SUB_ID ! pline("%s NetHack Version %d.%d.%d - last build %s.", ! # else ! pline("%s NetHack %s Version %d.%d.%d - last build %s.", ! # endif ! #endif ! #ifndef PORT_SUB_ID ! PORT_ID, VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, ! #else ! PORT_ID, PORT_SUB_ID, VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, ! #endif ! #ifdef BETA ! EDITLEVEL, ! #endif ! BUILD_DATE); /* from date.h, generated by 'makedefs' */ return 0; } --- 1,33 ---- ! /* SCCS Id: @(#)version.c 3.2 96/05/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" #include "date.h" + /* + * All the references to the contents of patchlevel.h have been moved + * into makedefs.... + */ #ifdef SHORT_FILENAMES #include "patchlev.h" #else #include "patchlevel.h" #endif + /* fill and return the given buffer with the nethack version string */ + char * + getversionstring(buf) + char *buf; + { + return strcpy(buf, VERSION_ID); + } + int doversion() { ! char buf[BUFSZ]; ! ! pline(getversionstring(buf)); return 0; } *************** *** 56,62 **** boolean check_version(version_info, filename, complain) ! long *version_info; const char *filename; boolean complain; { --- 49,55 ---- boolean check_version(version_info, filename, complain) ! unsigned long *version_info; const char *filename; boolean complain; { *************** *** 72,78 **** pline("Version mismatch for file \"%s\".", filename); return FALSE; } else if (version_info[1] != VERSION_FEATURES || ! version_info[2] != VERSION_SANITY) { if (complain) pline("Configuration incompatability for file \"%s\".", filename); --- 65,72 ---- pline("Version mismatch for file \"%s\".", filename); return FALSE; } else if (version_info[1] != VERSION_FEATURES || ! version_info[2] != VERSION_SANITY1 || ! version_info[3] != VERSION_SANITY2) { if (complain) pline("Configuration incompatability for file \"%s\".", filename); *************** *** 88,94 **** int fd; const char *name; { ! long vers_info[3]; boolean verbose = name ? TRUE : FALSE; (void) read(fd, (genericptr_t) vers_info, sizeof vers_info); --- 82,88 ---- int fd; const char *name; { ! unsigned long vers_info[4]; boolean verbose = name ? TRUE : FALSE; (void) read(fd, (genericptr_t) vers_info, sizeof vers_info); *************** *** 104,111 **** store_version(fd) int fd; { ! static long version_info[3] = { ! VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY }; bufoff(fd); --- 98,106 ---- store_version(fd) int fd; { ! static unsigned long version_info[4] = { ! VERSION_NUMBER, VERSION_FEATURES, ! VERSION_SANITY1, VERSION_SANITY2 }; bufoff(fd); *** Old/src/weapon.c Tue May 28 17:31:23 1996 --- src/weapon.c Thu May 23 09:37:15 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)weapon.c 3.2 96/03/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)weapon.c 3.2 96/05/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 25,52 **** PN_POLEARMS, SPEAR, JAVELIN, TRIDENT, LANCE, BOW, SLING, CROSSBOW, DART, SHURIKEN, BOOMERANG, BULLWHIP, ! UNICORN_HORN, PN_TWO_WEAPON_COMBAT, ! PN_BARE_HANDED_COMBAT, PN_MARTIAL_ARTS }; STATIC_OVL NEARDATA const char *odd_skill_names[] = { ! "polearms", "two weapon combat", "bare handed combat", ! "martial arts", "saber" }; #endif /* OVLB */ #ifdef OVL1 static char *FDECL(skill_level_name, (int,char *)); static int FDECL(slots_required, (int)); - static boolean FDECL(can_advance, (int)); static void FDECL(skill_advance, (int)); #endif /* OVL1 */ ! #define P_NAME(type) (skill_names_indices[type] < NUM_OBJECTS ? \ OBJ_NAME(objects[skill_names_indices[type]]) : \ ! odd_skill_names[skill_names_indices[type] - NUM_OBJECTS]) #endif /* WEAPON_SKILLS */ #ifdef OVLB --- 25,60 ---- PN_POLEARMS, SPEAR, JAVELIN, TRIDENT, LANCE, BOW, SLING, CROSSBOW, DART, SHURIKEN, BOOMERANG, BULLWHIP, ! UNICORN_HORN, PN_TWO_WEAPONS, PN_BARE_HANDED, }; + /* note: entry [0] isn't used */ STATIC_OVL NEARDATA const char *odd_skill_names[] = { ! 0, "polearms", "saber", "two weapon combat", ! "bare handed combat", "martial arts", }; + static NEARDATA const char may_advance_msg[] = + "feel more confident in your fighting skills."; + #endif /* OVLB */ + + STATIC_DCL boolean FDECL(can_advance, (int)); + #ifdef OVL1 static char *FDECL(skill_level_name, (int,char *)); static int FDECL(slots_required, (int)); static void FDECL(skill_advance, (int)); #endif /* OVL1 */ ! #define P_NAME(type) (skill_names_indices[type] >= 0 ? \ OBJ_NAME(objects[skill_names_indices[type]]) : \ ! (type == P_BARE_HANDED_COMBAT ? \ ! (martial_bonus() ? odd_skill_names[-PN_MARTIAL_ARTS] \ ! : odd_skill_names[-PN_BARE_HANDED]) : \ ! odd_skill_names[-skill_names_indices[type]])) #endif /* WEAPON_SKILLS */ #ifdef OVLB *************** *** 564,581 **** { const char *ptr; ! if (skill <= P_LAST_WEAPON || skill == P_TWO_WEAPON_COMBAT) { ! switch (P_SKILL(skill)) { ! case P_UNSKILLED: ptr = "Unskilled"; break; ! case P_BASIC: ptr = "Basic"; break; ! case P_SKILLED: ptr = "Skilled"; break; ! case P_EXPERT: ptr = "Expert"; break; ! default: ptr = "Unknown?"; break; ! } ! Strcpy(buf, ptr); ! } else { ! Sprintf(buf, "%d", P_SKILL(skill)); } return buf; } --- 572,588 ---- { const char *ptr; ! switch (P_SKILL(skill)) { ! case P_UNSKILLED: ptr = "Unskilled"; break; ! case P_BASIC: ptr = "Basic"; break; ! case P_SKILLED: ptr = "Skilled"; break; ! case P_EXPERT: ptr = "Expert"; break; ! /* these are for unarmed combat/martial arts only */ ! case P_MASTER: ptr = "Master"; break; ! case P_GRAND_MASTER: ptr = "Grand Master"; break; ! default: ptr = "Unknown"; break; } + Strcpy(buf, ptr); return buf; } *************** *** 592,598 **** } /* return true if this skill can be advanced */ ! static boolean can_advance(skill) int skill; { --- 599,605 ---- } /* return true if this skill can be advanced */ ! STATIC_OVL boolean can_advance(skill) int skill; { *************** *** 604,716 **** && u.weapon_slots >= slots_required(skill); } - /* `#qualifications' extended command */ - int - check_weapon_skills() - { - int i, len, name_length; - char buf[BUFSIZ], buf2[BUFSIZ]; - winid tmpwin; - - tmpwin = create_nhwindow(NHW_MENU); - putstr(tmpwin, 0, "Current Skills:"); - putstr(tmpwin, 0, ""); - - /* Find longest available skill name. */ - for (name_length = 0, i = 0; i < P_NUM_SKILLS; i++) - if (!P_RESTRICTED(i) && (len = strlen(P_NAME(i))) > name_length) - name_length = len; - - /* list the skills, indicating which ones could be advanced */ - for (i = 0; i < P_NUM_SKILLS; i++) { - if (P_RESTRICTED(i)) continue; - #if 1 - if (i == P_TWO_WEAPON_COMBAT) continue; - #endif - - /* sigh, this assumes a monospaced font */ - if (wizard) - Sprintf(buf2, "%-*s %c%-9s %4d(%4d)", name_length, P_NAME(i), - can_advance(i) ? '*' : ' ', - skill_level_name(i, buf), - P_ADVANCE(i), practice_needed_to_advance(P_SKILL(i))); - else - Sprintf(buf2, "%-*s %c[%s]", name_length, P_NAME(i), - can_advance(i) ? '*' : ' ', - skill_level_name(i, buf)); - putstr(tmpwin, 0, buf2); - } - - display_nhwindow(tmpwin, TRUE); - destroy_nhwindow(tmpwin); - return 0; - } - static void skill_advance(skill) int skill; { - You("are now more skilled in %s.", P_NAME(skill)); u.weapon_slots -= slots_required(skill); P_SKILL(skill)++; u.skill_record[u.skills_advanced++] = skill; } ! /* `#enhance' extended command */ int ! select_weapon_skill() { ! int i, n, mark, len, longest; char buf[BUFSIZ], buf2[BUFSIZ]; menu_item *selected; anything any; winid win; ! /* count # of skills we can advance */ ! for (longest = mark = n = i = 0; i < P_NUM_SKILLS; i++) ! if (can_advance(i)) { ! if ((len = strlen(P_NAME(i))) > longest) longest = len; ! mark = i; /* in case we can only advance one */ ! n++; ! } ! ! if (n == 0) { ! You("are not able to advance any skill right now."); ! return 0; } ! if (n != 1) { ! /* ask which skill to advance */ ! win = create_nhwindow(NHW_MENU); ! start_menu(win); ! any.a_void = 0; ! for (i = 0; i < P_NUM_SKILLS; i++) { ! if (!can_advance(i)) continue; ! if (i <= P_LAST_WEAPON || i == P_TWO_WEAPON_COMBAT) ! (void) skill_level_name(i, buf2); ! else ! Sprintf(buf2, "%d", slots_required(i)); ! ! /* assume monospaced font */ ! Sprintf(buf, "%-*s [%s]", longest, P_NAME(i), buf2); ! any.a_int = i + 1; /* must be non-zero */ ! #if 1 ! if (i == P_TWO_WEAPON_COMBAT) continue; #endif ! add_menu(win, NO_GLYPH, &any, 0, 0, buf, MENU_UNSELECTED); ! } ! end_menu(win, "Pick a skill to advance:"); ! n = select_menu(win, PICK_ONE, &selected); ! destroy_nhwindow(win); ! if (n <= 0) return 0; /* cancelled dialog */ ! mark = selected[0].item.a_int - 1; /* get item selected */ free((genericptr_t)selected); } - - skill_advance(mark); return 0; } --- 611,699 ---- && u.weapon_slots >= slots_required(skill); } static void skill_advance(skill) int skill; { u.weapon_slots -= slots_required(skill); P_SKILL(skill)++; u.skill_record[u.skills_advanced++] = skill; + /* subtly change the adavnce message to indicate no more advancement */ + You("are now %s skilled in %s.", + P_SKILL(skill) >= P_MAX_SKILL(skill) ? "most" : "more", + P_NAME(skill)); } ! /* ! * The `#enhance' extended command. What we _really_ would like is ! * to keep being able to pick things to advance until we couldn't any ! * more. This is currently not possible -- the menu code has no way ! * to call us back for instant action. Even if it did, we would also need ! * to be able to update the menu since selecting one item could make ! * others unselectable. ! */ int ! enhance_weapon_skill() { ! int i, n, len, longest, to_advance; char buf[BUFSIZ], buf2[BUFSIZ]; menu_item *selected; anything any; winid win; ! /* find longest available skill name, count those that can advance */ ! for (longest = 0, to_advance = 0, i = 0; i < P_NUM_SKILLS; i++) { ! if (!P_RESTRICTED(i) && (len = strlen(P_NAME(i))) > longest) ! longest = len; ! if (can_advance(i)) to_advance++; } ! win = create_nhwindow(NHW_MENU); ! start_menu(win); ! /* list the skills, making ones that could be advanced selectable */ ! for (any.a_void = 0, i = 0; i < P_NUM_SKILLS; i++) { ! if (P_RESTRICTED(i)) continue; ! if (i == P_TWO_WEAPON_COMBAT) continue; /* skip for now */ ! /* ! * Sigh, this assumes a monospaced font. ! * The 12 is the longest skill level name. ! * The " " is room for a selection letter and dash, "a - ". ! */ ! #ifdef WIZARD ! if (wizard) ! Sprintf(buf2, "%s%-*s %-12s %4d(%4d)", ! to_advance == 0 || can_advance(i) ? "" : " " , ! longest, P_NAME(i), ! skill_level_name(i, buf), ! P_ADVANCE(i), practice_needed_to_advance(P_SKILL(i))); ! else #endif ! Sprintf(buf2, "%s %-*s [%s]", ! to_advance == 0 || can_advance(i) ? "" : " ", ! longest, P_NAME(i), ! skill_level_name(i, buf)); ! any.a_int = can_advance(i) ? i+1 : 0; ! add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf2, MENU_UNSELECTED); ! } ! end_menu(win, to_advance ? "Pick a skill to advance:" : ! "Current skills:"); ! n = select_menu(win, to_advance ? PICK_ONE : PICK_NONE, &selected); ! destroy_nhwindow(win); ! if (n > 0) { ! n = selected[0].item.a_int - 1; /* get item selected */ free((genericptr_t)selected); + skill_advance(n); + /* check for more skills able to advance, if so then .. */ + for (i = 0; i < P_NUM_SKILLS; i++) { + if (can_advance(i)) { + You("feel you could be more dangerous!"); + break; + } + } } return 0; } *************** *** 737,745 **** --- 720,750 ---- #ifdef WEAPON_SKILLS void + use_skill(skill) + int skill; + { + boolean advance_before; + + if (skill != P_NO_TYPE && !P_RESTRICTED(skill)) { + advance_before = can_advance(skill); + P_ADVANCE(skill)++; + if (!advance_before && can_advance(skill)) + You(may_advance_msg); + } + } + + void add_weapon_skill() { + int i, before, after; + + for (i = 0, before = 0; i < P_NUM_SKILLS; i++) + if (can_advance(i)) before++; u.weapon_slots++; + for (i = 0, after = 0; i < P_NUM_SKILLS; i++) + if (can_advance(i)) after++; + if (before < after) + You(may_advance_msg); } void *************** *** 823,828 **** --- 828,835 ---- type = P_SPEAR; break; case JAVELIN: type = P_JAVELIN; break; + case TRIDENT: + type = P_TRIDENT; break; case LANCE: type = P_LANCE; break; case BOW: case ELVEN_BOW: *************** *** 851,859 **** return type; } ! /* No object is one of these. */ ! return P_RESTRICTED(P_BARE_HANDED_COMBAT) ? P_MARTIAL_ARTS : ! P_BARE_HANDED_COMBAT; } /* --- 858,865 ---- return type; } ! /* no object => */ ! return P_BARE_HANDED_COMBAT; } /* *************** *** 889,897 **** case P_EXPERT: bonus = -3; break; } } else if (type == P_BARE_HANDED_COMBAT) { ! bonus = (P_SKILL(type) + 1) / 2; /* restricted == 0 */ ! } else if (type == P_MARTIAL_ARTS) { ! bonus = (P_SKILL(type) + 1) * 2 / 3; /* restricted == 0 */ } return bonus; } --- 895,902 ---- case P_EXPERT: bonus = -3; break; } } else if (type == P_BARE_HANDED_COMBAT) { ! /* restricted == 0 */ ! bonus = ((P_SKILL(type) + 1) * (martial_bonus() ? 2 : 1)) / 2; } return bonus; } *************** *** 920,928 **** case P_EXPERT: bonus = 2; break; } } else if (type == P_BARE_HANDED_COMBAT && P_SKILL(type)) { ! bonus = P_SKILL(type) / 2; ! } else if (type == P_MARTIAL_ARTS && P_SKILL(type)) { ! bonus = P_SKILL(type) * 2 / 3; } return bonus; } --- 925,931 ---- case P_EXPERT: bonus = 2; break; } } else if (type == P_BARE_HANDED_COMBAT && P_SKILL(type)) { ! bonus = (P_SKILL(type) * (martial_bonus() ? 2 : 1)) / 2; } return bonus; } *************** *** 963,968 **** --- 966,975 ---- if (P_SKILL(skill) == P_ISRESTRICTED) /* skill pre-set */ P_SKILL(skill) = P_UNSKILLED; } + + /* High potential fighters already know how to use their hands. */ + if (P_MAX_SKILL(P_BARE_HANDED_COMBAT) > P_EXPERT) + P_SKILL(P_BARE_HANDED_COMBAT) = P_BASIC; /* * Make sure we haven't missed setting the max on a skill *** Old/src/were.c Tue May 28 17:31:27 1996 --- src/were.c Sun May 5 10:09:54 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)were.c 3.2 95/07/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)were.c 3.2 96/05/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 10,27 **** were_change(mon) register struct monst *mon; { ! register int pm = monsndx(mon->data); ! if(is_were(mon->data)) ! if(is_human(mon->data)) { ! if(Protection_from_shape_changers) return; ! if(!rn2(50-(night()*20)) || flags.moonphase == FULL_MOON) { ! new_were(mon); ! if(mons[pm].msound == MS_BARK && flags.soundok) ! You_hear("a %s howling at the moon.", ! pm == PM_HUMAN_WEREJACKAL ? "jackal" : "wolf"); } ! } else if(!rn2(30) || Protection_from_shape_changers) new_were(mon); } #endif /* OVL0 */ --- 10,38 ---- were_change(mon) register struct monst *mon; { ! if (!is_were(mon->data)) ! return; ! if (is_human(mon->data)) { ! if (!Protection_from_shape_changers && ! !rn2(night() ? (flags.moonphase == FULL_MOON ? 3 : 30) ! : (flags.moonphase == FULL_MOON ? 10 : 50))) { ! new_were(mon); /* change into animal form */ ! if (flags.soundok) { ! const char *howler; ! ! switch (monsndx(mon->data)) { ! case PM_HUMAN_WEREWOLF: howler = "wolf"; break; ! case PM_HUMAN_WEREJACKAL: howler = "jackal"; break; ! default: howler = (char *)0; break; ! } ! if (howler) ! You_hear("a %s howling at the moon.", howler); } ! } ! } else if (!rn2(30) || Protection_from_shape_changers) { ! new_were(mon); /* change back into human form */ ! } } #endif /* OVL0 */ *************** *** 105,111 **** default: continue; } ! mtmp = makemon(&mons[typ], u.ux, u.uy); if (mtmp) success = TRUE; if (yours && mtmp) (void) tamedog(mtmp, (struct obj *) 0); --- 116,122 ---- default: continue; } ! mtmp = makemon(&mons[typ], u.ux, u.uy, NO_MM_FLAGS); if (mtmp) success = TRUE; if (yours && mtmp) (void) tamedog(mtmp, (struct obj *) 0); *** Old/src/windows.c Tue May 28 17:31:32 1996 --- src/windows.c Fri May 24 14:27:05 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)windows.c 3.2 95/12/10 */ /* Copyright (c) D. Cohrs, 1993. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)windows.c 3.2 96/05/19 */ /* Copyright (c) D. Cohrs, 1993. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 15,20 **** --- 15,24 ---- #ifdef MAC extern struct window_procs mac_procs; #endif + #ifdef __begui__ + extern struct window_procs be_procs; + extern void NDECL(be_win_init); + #endif #ifdef AMIGA_INTUITION extern struct window_procs amii_procs; extern struct window_procs amiv_procs; *************** *** 43,48 **** --- 47,55 ---- #ifdef MAC { &mac_procs, 0 }, #endif + #ifdef __begui__ + { &be_procs, be_win_init }, + #endif #ifdef AMIGA_INTUITION { &amii_procs, ami_wininit_data }, /* Old font version of the game */ { &amiv_procs, ami_wininit_data }, /* Tile version of the game */ *************** *** 83,88 **** --- 90,96 ---- if (windowprocs.win_raw_print == def_raw_print) terminate(EXIT_SUCCESS); + wait_synch(); } /* *** Old/src/wizard.c Tue May 28 17:31:34 1996 --- src/wizard.c Fri May 3 15:26:36 1996 *************** *** 378,384 **** { register struct monst *mtmp2; ! if ((mtmp2 = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy)) != 0) { mtmp2->msleep = mtmp2->mtame = mtmp2->mpeaceful = 0; if (!u.uhave.amulet && rn2(2)) { /* give clone a fake */ add_to_minv(mtmp2, mksobj(FAKE_AMULET_OF_YENDOR, TRUE, FALSE)); --- 378,385 ---- { register struct monst *mtmp2; ! if ((mtmp2 = makemon(&mons[PM_WIZARD_OF_YENDOR], ! u.ux, u.uy, NO_MM_FLAGS)) != 0) { mtmp2->msleep = mtmp2->mtame = mtmp2->mpeaceful = 0; if (!u.uhave.amulet && rn2(2)) { /* give clone a fake */ add_to_minv(mtmp2, mksobj(FAKE_AMULET_OF_YENDOR, TRUE, FALSE)); *************** *** 406,416 **** for(i = rnd(tmp); i > 0; --i) for(j=0; j<20; j++) { if((mtmp = makemon(&mons[nasties[rn2(SIZE(nasties))]], ! u.ux, u.uy))) { mtmp->msleep = mtmp->mpeaceful = mtmp->mtame = 0; set_malign(mtmp); } else /* GENOD? */ ! mtmp = makemon((struct permonst *)0, u.ux, u.uy); if(mtmp && (mtmp->data->maligntyp == 0 || sgn(mtmp->data->maligntyp) == sgn(castalign)) ) break; --- 407,418 ---- for(i = rnd(tmp); i > 0; --i) for(j=0; j<20; j++) { if((mtmp = makemon(&mons[nasties[rn2(SIZE(nasties))]], ! u.ux, u.uy, NO_MM_FLAGS))) { mtmp->msleep = mtmp->mpeaceful = mtmp->mtame = 0; set_malign(mtmp); } else /* GENOD? */ ! mtmp = makemon((struct permonst *)0, ! u.ux, u.uy, NO_MM_FLAGS); if(mtmp && (mtmp->data->maligntyp == 0 || sgn(mtmp->data->maligntyp) == sgn(castalign)) ) break; *************** *** 430,436 **** if (!flags.no_of_wizards) { /* make a new Wizard */ verb = "kill"; ! mtmp = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy); } else { /* look for a migrating Wizard */ verb = "elude"; --- 432,439 ---- if (!flags.no_of_wizards) { /* make a new Wizard */ verb = "kill"; ! mtmp = makemon(&mons[PM_WIZARD_OF_YENDOR], ! u.ux, u.uy, NO_MM_FLAGS); } else { /* look for a migrating Wizard */ verb = "elude"; *** Old/src/worn.c Tue May 28 17:31:40 1996 --- src/worn.c Tue May 21 17:11:01 1996 *************** *** 5,10 **** --- 5,11 ---- #include "hack.h" static void FDECL(m_lose_armor, (struct monst *,struct obj *)); + static void FDECL(m_dowear_type, (struct monst *,long,BOOLEAN_P)); const struct worn { long w_mask; *************** *** 166,179 **** } /* weapons are handled separately; rings and eyewear aren't used by monsters */ - #define m_might_wear(O) ((O)->oclass == ARMOR_CLASS || \ - (O)->oclass == AMULET_CLASS) ! /* Wear first object of that type it finds, and never switch unless it ! * has none at all. This means that monsters with leather armor never ! * switch to plate mail, but it also avoids the overhead of either having 8 ! * struct obj *s for every monster in the game, or of doing multiple inventory ! * searches each round using which_armor(). * * We'll let monsters put on shirts and/or suits under worn cloaks, but * not shirts under worn suits. This is somewhat arbitrary, but it's --- 167,178 ---- } /* weapons are handled separately; rings and eyewear aren't used by monsters */ ! /* Wear the best object of each type that the monster has. During creation, ! * the monster can put everything on at once; otherwise, wearing takes time. ! * This doesn't affect monster searching for objects--a monster may very well ! * search for objects it would not want to wear, because we don't want to ! * check which_armor() each round. * * We'll let monsters put on shirts and/or suits under worn cloaks, but * not shirts under worn suits. This is somewhat arbitrary, but it's *************** *** 187,194 **** register struct monst *mon; boolean creation; { - register struct obj *obj; - /* Note the restrictions here are the same as in dowear in do_wear.c * except for the additional restriction on intelligence. (Players * are always intelligent, even if polymorphed). --- 186,191 ---- *************** *** 199,268 **** if (mindless(mon->data) && (mon->data->mlet != S_MUMMY || !creation)) return; ! for(obj = mon->minvent; obj; obj = obj->nobj) { ! long flag; ! int m_delay = 0; ! ! /* if already worn or never wearable, skip it right away */ ! if (obj->owornmask || !m_might_wear(obj)) continue; ! ! if (obj->oclass == AMULET_CLASS) { ! if (obj->otyp != AMULET_OF_LIFE_SAVING && ! obj->otyp != AMULET_OF_REFLECTION) ! continue; ! flag = W_AMUL; #ifdef TOURIST ! } else if (is_shirt(obj)) { ! if (cantweararm(mon->data) || ! /* can't put on shirt if already wearing suit */ ! (mon->misc_worn_check & W_ARM)) ! continue; ! flag = W_ARMU; ! m_delay = (mon->misc_worn_check & W_ARMC) ? 2 : 0; #endif ! } else if (is_cloak(obj)) { ! /* treating small as a special case allows ! hobbits, gnomes, and kobolds to wear cloaks */ ! if (cantweararm(mon->data) && ! mon->data->msize != MZ_SMALL) ! continue; ! flag = W_ARMC; ! } else if (is_helmet(obj)) { ! flag = W_ARMH; ! } else if (is_shield(obj)) { ! if (MON_WEP(mon) && bimanual(MON_WEP(mon))) ! continue; ! flag = W_ARMS; ! } else if (is_gloves(obj)) { ! if (MON_WEP(mon) && MON_WEP(mon)->cursed) ! continue; ! flag = W_ARMG; ! } else if (is_boots(obj)) { ! if (slithy(mon->data) || mon->data->mlet == S_CENTAUR) ! continue; ! flag = W_ARMF; ! } else if (obj->oclass == ARMOR_CLASS) { ! if (cantweararm(mon->data)) ! continue; ! flag = W_ARM; ! m_delay = (mon->misc_worn_check & W_ARMC) ? 2 : 0; ! } else ! continue; /* shouldn't be possible */ ! ! if (mon->misc_worn_check & flag) continue; ! /* already wearing one */ ! if (!creation && canseemon(mon)) { ! pline("%s puts on %s.", Monnam(mon), ! distant_name(obj, doname)); ! m_delay += objects[obj->otyp].oc_delay; ! mon->mfrozen = m_delay; ! if (mon->mfrozen) mon->mcanmove = 0; ! } ! mon->misc_worn_check |= flag; ! obj->owornmask |= flag; ! update_mon_intrinsics(mon, obj, TRUE); ! if (mon->mfrozen) break; /* now busy */ } } struct obj * --- 196,307 ---- if (mindless(mon->data) && (mon->data->mlet != S_MUMMY || !creation)) return; ! m_dowear_type(mon, W_AMUL, creation); #ifdef TOURIST ! /* can't put on shirt if already wearing suit */ ! if (!cantweararm(mon->data) || (mon->misc_worn_check & W_ARM)) ! m_dowear_type(mon, W_ARMU, creation); #endif ! /* treating small as a special case allows ! hobbits, gnomes, and kobolds to wear cloaks */ ! if (!cantweararm(mon->data) || mon->data->msize != MZ_SMALL) ! m_dowear_type(mon, W_ARMC, creation); ! m_dowear_type(mon, W_ARMH, creation); ! if (!MON_WEP(mon) || !bimanual(MON_WEP(mon))) ! m_dowear_type(mon, W_ARMS, creation); ! m_dowear_type(mon, W_ARMG, creation); ! if (!slithy(mon->data) && mon->data->mlet != S_CENTAUR) ! m_dowear_type(mon, W_ARMF, creation); ! if (!cantweararm(mon->data)) ! m_dowear_type(mon, W_ARM, creation); ! } ! ! static void ! m_dowear_type(mon, flag, creation) ! struct monst *mon; ! long flag; ! boolean creation; ! { ! struct obj *old, *best, *obj; ! int m_delay = 0; ! ! if (mon->mfrozen) return; /* probably putting previous item on */ ! ! old = which_armor(mon, flag); ! if (old && old->cursed) return; ! if (old && flag == W_AMUL) return; /* no such thing as better amulets */ ! best = old; ! ! for(obj = mon->minvent; obj; obj = obj->nobj) { ! switch(flag) { ! case W_AMUL: ! if (obj->oclass != AMULET_CLASS || ! (obj->otyp != AMULET_OF_LIFE_SAVING && ! obj->otyp != AMULET_OF_REFLECTION)) ! continue; ! best = obj; ! goto outer_break; /* no such thing as better amulets */ ! case W_ARMU: ! if (!is_shirt(obj)) continue; ! break; ! case W_ARMC: ! if (!is_cloak(obj)) continue; ! break; ! case W_ARMH: ! if (!is_helmet(obj)) continue; ! break; ! case W_ARMS: ! if (!is_shield(obj)) continue; ! break; ! case W_ARMG: ! if (!is_gloves(obj)) continue; ! break; ! case W_ARMF: ! if (!is_boots(obj)) continue; ! break; ! case W_ARM: ! if (!is_suit(obj)) continue; ! break; ! } ! if (obj->owornmask) continue; ! /* I'd like to define a VISIBLE_ARM_BONUS which doesn't assume the ! * monster knows obj->spe, but if I did that, a monster would keep ! * switching forever between two -2 caps since when it took off one ! * it would forget spe and once again think the object is better ! * than what it already has. ! */ ! if (best && (ARM_BONUS(best) >= ARM_BONUS(obj))) continue; ! best = obj; ! } ! outer_break: ! if (!best || best == old) return; ! ! if ((flag == W_ARMU || flag == W_ARM) && ! (mon->misc_worn_check & W_ARMC)) ! m_delay += 2; ! if (old) ! m_delay += objects[old->otyp].oc_delay; ! ! if (old) /* do this first to avoid "(being worn)" */ ! old->owornmask = 0L; ! if (!creation && canseemon(mon)) { ! if (old) { ! char buf[BUFSZ]; ! ! Sprintf(buf, "%s", distant_name(old, doname)); ! pline("%s removes %s and puts on %s.", ! Monnam(mon), buf, distant_name(best, doname)); ! } else ! pline("%s puts on %s.", Monnam(mon),distant_name(best,doname)); ! m_delay += objects[best->otyp].oc_delay; ! mon->mfrozen = m_delay; ! if (mon->mfrozen) mon->mcanmove = 0; } + if (old) + update_mon_intrinsics(mon, old, FALSE); + mon->misc_worn_check |= flag; + best->owornmask |= flag; + update_mon_intrinsics(mon, best, TRUE); } struct obj * *** Old/src/write.c Tue May 28 17:31:43 1996 --- src/write.c Sat May 18 11:50:44 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)write.c 3.2 95/02/11 */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" --- 1,4 ---- ! /* SCCS Id: @(#)write.c 3.2 96/05/05 */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" *************** *** 69,75 **** register struct obj *pen; { register struct obj *paper; ! char namebuf[BUFSZ], *nm; register struct obj *new_obj; int basecost, actualcost; int curseval; --- 69,75 ---- register struct obj *pen; { register struct obj *paper; ! char namebuf[BUFSZ], *nm, *bp; register struct obj *new_obj; int basecost, actualcost; int curseval; *************** *** 107,112 **** --- 107,113 ---- /* what to write */ Sprintf(qbuf, "What type of %s do you want to write?", typeword); getlin(qbuf, namebuf); + (void)mungspaces(namebuf); /* remove any excess whitespace */ if(namebuf[0] == '\033' || !namebuf[0]) return(1); nm = namebuf; *************** *** 114,139 **** else if (!strncmpi(nm, "spellbook ", 10)) nm += 10; if (!strncmpi(nm, "of ", 3)) nm += 3; ! if (paper->oclass == SPBOOK_CLASS) { ! first = bases[SPBOOK_CLASS]; ! last = bases[SPBOOK_CLASS+1] - 1; ! } else { ! first = bases[SCROLL_CLASS]; ! last = bases[SCROLL_CLASS+1] - 1; } ! for (i=first; i<=last; i++) { /* extra shufflable descr not representing a real object */ if (!OBJ_NAME(objects[i])) continue; ! if (!strncmpi(OBJ_NAME(objects[i]), nm, ! strlen(OBJ_NAME(objects[i])))) goto found; ! if (!strncmpi(OBJ_DESCR(objects[i]), nm, ! strlen(OBJ_DESCR(objects[i])))) { by_descr = TRUE; goto found; } } pline("There is no such %s!", typeword); return 1; found: --- 115,139 ---- else if (!strncmpi(nm, "spellbook ", 10)) nm += 10; if (!strncmpi(nm, "of ", 3)) nm += 3; ! if ((bp = strstri(nm, " armour")) != 0) { ! (void)strncpy(bp, " armor ", 7); /* won't add '\0' */ ! (void)mungspaces(bp + 1); /* remove the extra space */ } ! first = bases[(int)paper->oclass]; ! last = bases[(int)paper->oclass + 1] - 1; ! for (i = first; i <= last; i++) { /* extra shufflable descr not representing a real object */ if (!OBJ_NAME(objects[i])) continue; ! if (!strcmpi(OBJ_NAME(objects[i]), nm)) ! goto found; ! if (!strcmpi(OBJ_DESCR(objects[i]), nm)) { by_descr = TRUE; goto found; } } + pline("There is no such %s!", typeword); return 1; found: *************** *** 142,152 **** You_cant("write that!"); pline("It's obscene!"); return 1; ! } ! ! if (i == SPE_BOOK_OF_THE_DEAD) { pline("No mere dungeon adventurer could write that."); return 1; } new_obj = mksobj(i, FALSE, FALSE); --- 142,156 ---- You_cant("write that!"); pline("It's obscene!"); return 1; ! } else if (i == SPE_BOOK_OF_THE_DEAD) { pline("No mere dungeon adventurer could write that."); return 1; + } else if (by_descr && paper->oclass == SPBOOK_CLASS && + !objects[i].oc_name_known) { + /* can't write unknown spellbooks by description */ + pline( + "Unfortunately you don't have enough information to go on."); + return 1; } new_obj = mksobj(i, FALSE, FALSE); *************** *** 173,179 **** Your("marker dries out!"); /* scrolls disappear, spellbooks don't */ if (paper->oclass == SPBOOK_CLASS) ! pline_The("spellbook is left unfinished."); else { pline_The("scroll is now useless and disappears!"); useup(paper); --- 177,184 ---- Your("marker dries out!"); /* scrolls disappear, spellbooks don't */ if (paper->oclass == SPBOOK_CLASS) ! pline_The( ! "spellbook is left unfinished and your writing fades."); else { pline_The("scroll is now useless and disappears!"); useup(paper); *************** *** 187,200 **** /* can't write if we don't know it - unless we're lucky */ if(!(objects[new_obj->otyp].oc_name_known) && !(objects[new_obj->otyp].oc_uname) && - !by_descr && (rnl(Role_is('W') ? 3 : 15))) { ! You("don't know how to write that!"); /* scrolls disappear, spellbooks don't */ if (paper->oclass == SPBOOK_CLASS) ! You("write in your best handwriting: \"My Diary\"."); else { ! You("write \"%s was here!\" and the scroll disappears.",plname); useup(paper); } obfree(new_obj, (struct obj *) 0); --- 192,210 ---- /* can't write if we don't know it - unless we're lucky */ if(!(objects[new_obj->otyp].oc_name_known) && !(objects[new_obj->otyp].oc_uname) && (rnl(Role_is('W') ? 3 : 15))) { ! You("%s to write that!", by_descr ? "fail" : "don't know how"); /* scrolls disappear, spellbooks don't */ if (paper->oclass == SPBOOK_CLASS) ! You( ! "write in your best handwriting: \"My Diary\", but it quickly fades."); else { ! if (by_descr) { ! Strcpy(namebuf, OBJ_DESCR(objects[new_obj->otyp])); ! wipeout_text(namebuf, (6+MAXULEV - u.ulevel)/6, 0); ! } else ! Sprintf(namebuf, "%s was here!", plname); ! You("write \"%s\" and the scroll disappears.", namebuf); useup(paper); } obfree(new_obj, (struct obj *) 0); *************** *** 204,213 **** /* useup old scroll / spellbook */ useup(paper); - /* now you know it! */ - if (!by_descr) makeknown(new_obj->otyp); - /* success */ new_obj->blessed = (curseval > 0); new_obj->cursed = (curseval < 0); #ifdef MAIL --- 214,225 ---- /* useup old scroll / spellbook */ useup(paper); /* success */ + if (new_obj->oclass == SPBOOK_CLASS) { + /* acknowledge the change in the object's description... */ + pline("The spellbook warps strangely, then turns %s.", + OBJ_DESCR(objects[new_obj->otyp])); + } new_obj->blessed = (curseval > 0); new_obj->cursed = (curseval < 0); #ifdef MAIL *************** *** 216,222 **** new_obj = hold_another_object(new_obj, "Oops! %s out of your grasp!", The(aobjnam(new_obj, "slip")), (const char *)0); - if (new_obj) new_obj->known = 1; return(1); } --- 228,233 ---- *** Old/src/zap.c Tue May 28 17:31:46 1996 --- src/zap.c Fri May 24 08:52:28 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)zap.c 3.2 96/03/11 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)zap.c 3.2 96/05/02 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 16,29 **** static NEARDATA int poly_zapped; #endif /* kludge to use mondied instead of killed */ extern boolean m_using; STATIC_DCL void FDECL(polyuse, (struct obj*, int, int)); STATIC_DCL void FDECL(create_polymon, (struct obj *)); ! STATIC_DCL void FDECL(costly_cancel, (struct obj *)); ! STATIC_DCL int FDECL(zhit, (struct monst *,int,int)); #ifdef OVLB static int FDECL(zap_hit, (int)); --- 16,33 ---- static NEARDATA int poly_zapped; #endif + extern boolean notonhead; /* for long worms */ /* kludge to use mondied instead of killed */ extern boolean m_using; + STATIC_DCL void FDECL(costly_cancel, (struct obj *)); STATIC_DCL void FDECL(polyuse, (struct obj*, int, int)); STATIC_DCL void FDECL(create_polymon, (struct obj *)); ! STATIC_DCL boolean FDECL(zap_updown, (struct obj *)); ! STATIC_DCL int FDECL(zhitm, (struct monst *,int,int)); ! STATIC_DCL void FDECL(zhitu, (int,int,const char *,XCHAR_P,XCHAR_P)); ! STATIC_DCL void FDECL(revive_egg, (struct obj *)); #ifdef OVLB static int FDECL(zap_hit, (int)); *************** *** 47,54 **** --- 51,60 ---- #define ZT_BREATH(x) (20+(x)) #ifndef OVLB + STATIC_VAR const char are_blinded_by_the_flash[]; extern const char *flash_types[]; #else + STATIC_VAR const char are_blinded_by_the_flash[] = "are blinded by the flash!"; const char *flash_types[] = { /* also used in buzzmu(mcastu.c) */ "magic missile", /* Wands must be 0-9 */ *************** *** 198,203 **** --- 204,210 ---- break; case SPE_HEALING: case SPE_EXTRA_HEALING: + wake = FALSE; /* wakeup() makes the target angry */ mtmp->mhp += d(6, otyp == SPE_EXTRA_HEALING ? 8 : 4); if (mtmp->mhp > mtmp->mhpmax) mtmp->mhp = mtmp->mhpmax; *************** *** 217,222 **** --- 224,231 ---- makeknown(WAN_LIGHT); break; case WAN_SLEEP: /* (broken wand) */ + /* [wakeup() doesn't rouse victims of temporary sleep, + so it's okay to leave `wake' set to TRUE here] */ if (sleep_monst(mtmp, d(1 + otmp->spe, 12), WAND_CLASS)) slept_monst(mtmp); if (!Blind) makeknown(WAN_SLEEP); *************** *** 243,248 **** --- 252,259 ---- struct obj *otmp; mstatusline(mtmp); + if (notonhead) return; /* don't show minvent for long worm tail */ + if (mtmp->minvent || mtmp->mgold) { for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) otmp->dknown = 1; /* treat as "seen" */ *************** *** 282,290 **** *yp = obj->oy; return TRUE; case OBJ_MINVENT: ! *xp = obj->ocarry->mx; ! *yp = obj->ocarry->my; ! return TRUE; case OBJ_BURIED: if (locflags & BURIED_TOO) { *xp = obj->ox; --- 293,304 ---- *yp = obj->oy; return TRUE; case OBJ_MINVENT: ! if (obj->ocarry->mx) { ! *xp = obj->ocarry->mx; ! *yp = obj->ocarry->my; ! return TRUE; ! } ! break; /* !mx => migrating monster */ case OBJ_BURIED: if (locflags & BURIED_TOO) { *xp = obj->ox; *************** *** 348,367 **** if(cant_create(&montype)) { /* make a zombie or worm instead */ ! mtmp = makemon(&mons[montype], x, y); if (mtmp) { mtmp->mhp = mtmp->mhpmax = 100; mtmp->mspeed = MFAST; } } else { ! mtmp = makemon(&mons[montype], x, y); ! if (mtmp) { ! /* Monster retains its name */ ! if (obj->onamelth) ! mtmp = christen_monst(mtmp, ONAME(obj)); ! /* No inventory for newly revived monsters */ ! discard_minvent(mtmp); ! } } if (mtmp) { if (obj->oeaten) --- 362,411 ---- if(cant_create(&montype)) { /* make a zombie or worm instead */ ! mtmp = makemon(&mons[montype], x, y, NO_MM_FLAGS); if (mtmp) { mtmp->mhp = mtmp->mhpmax = 100; mtmp->mspeed = MFAST; } } else { ! #ifdef OEXTRA ! struct monst *mtraits = (struct monst *)0; ! ! if (obj->oxlth && obj->mtraits) mtraits = get_mtraits(obj); ! if (mtraits) { ! struct monst *mtmp2; ! mtmp = makemon(mtraits->data, x, y, NO_MINVENT); ! mtmp2 = newmonst(mtraits->mxlth + mtraits->mnamelth); ! *mtmp2 = *mtraits; ! (void) memcpy((genericptr_t) mtmp2->mextra, ! (genericptr_t) mtraits->mextra, ! mtraits->mxlth); ! /* Fix up the monster's hit points */ ! mtmp2->mhp = mtmp2->mhpmax; ! /* Now fix some other things up*/ ! mtmp2->minvent = (struct obj *)0; ! mtmp2->mx = mtmp->mx; ! mtmp2->my = mtmp->my; ! mtmp2->mux = mtmp->mux; ! mtmp2->muy = mtmp->muy; ! mtmp2->mw = mtmp->mw; ! mtmp2->wormno = mtmp->wormno; ! replmon(mtmp,mtmp2); ! /* the object name overrides original monster name */ ! if (!obj->onamelth && mtmp2->mnamelth) ! mtmp2 = christen_monst(mtmp2, NAME(mtraits)); ! mtmp = mtmp2; ! } else { ! #endif ! mtmp = makemon(&mons[montype], x, y, NO_MINVENT); ! #ifdef OEXTRA ! } ! #endif ! if (mtmp) { ! /* Monster retains its name */ ! if (obj->onamelth) ! mtmp = christen_monst(mtmp, ONAME(obj)); ! } } if (mtmp) { if (obj->oeaten) *************** *** 391,397 **** return mtmp; } ! /* try to revive all corpses carried by `mon' */ int unturn_dead(mon) struct monst *mon; --- 435,453 ---- return mtmp; } ! STATIC_OVL void ! revive_egg(obj) ! struct obj *obj; ! { ! ! /* ! * Note: generic eggs with corpsenm set to NON_PM will never hatch. ! */ ! if (obj->otyp != EGG) return; ! if (obj->corpsenm != NON_PM) attach_egg_hatch_timeout(obj); ! } ! ! /* try to revive all corpses and eggs carried by `mon' */ int unturn_dead(mon) struct monst *mon; *************** *** 407,412 **** --- 463,470 ---- while ((otmp = otmp2) != 0) { otmp2 = otmp->nobj; + if (otmp->otyp == EGG) + revive_egg(otmp); if (otmp->otyp != CORPSE) continue; /* save the name; the object is liable to go away */ if (youseeit) Strcpy(corpse, corpse_xname(otmp, TRUE)); *************** *** 610,616 **** for(otmp = objhdr; minwt > 0 && otmp; otmp = otmp2) { otmp2 = otmp->nexthere; ! if((objects[otmp->otyp].oc_material == mat) == (rn2(minwt+1) != 0)) { /* appropriately add damage to bill */ if (costly_spot(otmp->ox, otmp->oy)) if (*u.ushops) --- 668,675 ---- for(otmp = objhdr; minwt > 0 && otmp; otmp = otmp2) { otmp2 = otmp->nexthere; ! if (((int) objects[otmp->otyp].oc_material == mat) == ! (rn2(minwt + 1) != 0)) { /* appropriately add damage to bill */ if (costly_spot(otmp->ox, otmp->oy)) if (*u.ushops) *************** *** 685,691 **** if (!(mvitals[pm_index].mvflags & G_GENOD)) mdat = &mons[pm_index]; ! mtmp = makemon(mdat, obj->ox, obj->oy); polyuse(obj, poly_zapped, (int)mons[pm_index].cwt); if(!Blind && mtmp) { --- 744,750 ---- if (!(mvitals[pm_index].mvflags & G_GENOD)) mdat = &mons[pm_index]; ! mtmp = makemon(mdat, obj->ox, obj->oy, NO_MM_FLAGS); polyuse(obj, poly_zapped, (int)mons[pm_index].cwt); if(!Blind && mtmp) { *************** *** 900,924 **** res = !obj->dknown; /* target object has now been "seen (up close)" */ obj->dknown = 1; ! /* petrified monster's inventory */ ! if (obj->otyp == STATUE) { ! if (!obj->cobj) { ! struct trap *t = t_at(obj->ox, obj->oy); ! /* ! * This is a work-around for statue traps. ! * Inventories of statue traps are always empty, but ! * often the monsters that result have items in their ! * inventory. This might be perceived as a bug. ! * Ideally, the contents of a living statue, should ! * already be there, and the monster should inherit ! * its inventory from that. ! * ! * But until then, this makes the message about ! * the living statue being empty, much less definite. ! */ ! pline("%s %s empty.", The(xname(obj)), ! (t && t->ttyp == STATUE_TRAP) ? "seems" : "is"); ! } else { struct obj *o; /* view contents (not recursively) */ for (o = obj->cobj; o; o = o->nobj) --- 959,968 ---- res = !obj->dknown; /* target object has now been "seen (up close)" */ obj->dknown = 1; ! if (Has_contents(obj)) { ! if (!obj->cobj) ! pline("%s is empty.", The(xname(obj))); ! else { struct obj *o; /* view contents (not recursively) */ for (o = obj->cobj; o; o = o->nobj) *************** *** 936,942 **** else if (obj->otyp == STATUE) (void) break_statue(obj); else { ! (void)breaks(obj, obj->ox, obj->oy, FALSE); res = 0; } makeknown(otmp->otyp); --- 980,986 ---- else if (obj->otyp == STATUE) (void) break_statue(obj); else { ! (void)breaks(obj, obj->ox, obj->oy); res = 0; } makeknown(otmp->otyp); *************** *** 966,972 **** break; case WAN_UNDEAD_TURNING: case SPE_TURN_UNDEAD: ! res = !!revive(obj); break; case WAN_OPENING: case SPE_KNOCK: --- 1010,1019 ---- break; case WAN_UNDEAD_TURNING: case SPE_TURN_UNDEAD: ! if (obj->otyp == EGG) ! revive_egg(obj); ! else ! res = !!revive(obj); break; case WAN_OPENING: case SPE_KNOCK: *************** *** 1130,1136 **** } else { /* Are we having fun yet? ! * weffects -> buzz(obj->otyp) -> zhit (temple priest) -> * attack -> hitum -> known_hitum -> ghod_hitsu -> * buzz(AD_ELEC) -> destroy_item(WAND_CLASS) -> * useup -> obfree -> dealloc_obj -> free(obj) --- 1177,1183 ---- } else { /* Are we having fun yet? ! * weffects -> buzz(obj->otyp) -> zhitm (temple priest) -> * attack -> hitum -> known_hitum -> ghod_hitsu -> * buzz(AD_ELEC) -> destroy_item(WAND_CLASS) -> * useup -> obfree -> dealloc_obj -> free(obj) *************** *** 1184,1191 **** } destroy_item(WAND_CLASS, AD_ELEC); destroy_item(RING_CLASS, AD_ELEC); ! if(!Blind) { ! You("are blinded by the flash!"); make_blinded((long)rnd(100),FALSE); } break; --- 1231,1238 ---- } destroy_item(WAND_CLASS, AD_ELEC); destroy_item(RING_CLASS, AD_ELEC); ! if (!resists_blnd(&youmonst)) { ! You(are_blinded_by_the_flash); make_blinded((long)rnd(100),FALSE); } break; *************** *** 1342,1349 **** case EXPENSIVE_CAMERA: #endif damage += rnd(25); ! if (!Blind) { ! You("are blinded by the flash!"); make_blinded((long)damage, FALSE); makeknown(obj->otyp); } --- 1389,1396 ---- case EXPENSIVE_CAMERA: #endif damage += rnd(25); ! if (!resists_blnd(&youmonst)) { ! You(are_blinded_by_the_flash); make_blinded((long)damage, FALSE); makeknown(obj->otyp); } *************** *** 1436,1450 **** } } } - #endif /*OVL3*/ #ifdef OVLB /* called for various wand and spell effects - M. Stephenson */ void weffects(obj) register struct obj *obj; { ! int ptmp, otyp = obj->otyp; boolean disclose = FALSE, was_unkn = !objects[otyp].oc_name_known; exercise(A_WIS, TRUE); --- 1483,1606 ---- } } } + /* you've zapped an immediate type wand up or down */ + STATIC_OVL boolean + zap_updown(obj) + struct obj *obj; /* wand or spell */ + { + boolean striking = FALSE, disclose = FALSE; + int x, y, xx, yy, ptmp; + struct obj *otmp; + struct engr *e; + char buf[BUFSZ]; + + /* some wands have special effects other than normal bhitpile */ + /* drawbridge might change */ + x = xx = u.ux; /* is zap location */ + y = yy = u.uy; /* is drawbridge (portcullis) position */ + switch (obj->otyp) { + case WAN_PROBING: + if (u.dz < 0) { + You("probe towards the %s.", ceiling(x,y)); + ptmp = 0; + } else { + You("probe beneath the %s.", surface(x,y)); + ptmp = display_binventory(x, y, TRUE); + ptmp += bhitpile(obj, bhito, x, y); + } + if (!ptmp) Your("probe reveals nothing."); + return TRUE; /* we've done our own bhitpile */ + case WAN_OPENING: + case SPE_KNOCK: + /* up or down, but at closed portcullis only */ + if (is_db_wall(x,y) && find_drawbridge(&xx, &yy)) { + open_drawbridge(xx, yy); + disclose = TRUE; + } else if (u.dz > 0 && (x == xdnstair && y == ydnstair) && + /* can't use the stairs down to quest level 2 until + leader "unlocks" them; give feedback if you try */ + on_level(&u.uz, &qstart_level) && !ok_to_quest()) { + pline("The stairs seem to ripple momentarily."); + disclose = TRUE; + } + break; + case WAN_STRIKING: + case SPE_FORCE_BOLT: + striking = TRUE; + /*FALLTHRU*/ + case WAN_LOCKING: + case SPE_WIZARD_LOCK: + /* down at open bridge or up or down at open portcullis */ + if ((levl[x][y].typ == DRAWBRIDGE_DOWN) ? (u.dz > 0) : + (is_drawbridge_wall(x,y) && !is_db_wall(x,y)) && + find_drawbridge(&xx, &yy)) { + if (!striking) + close_drawbridge(xx, yy); + else + destroy_drawbridge(xx, yy); + disclose = TRUE; + } else if (striking && u.dz < 0 && rn2(3) && + !Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz)) { + /* similar to zap_dig() */ + pline("A rock is dislodged from the %s and falls on your %s.", + ceiling(x, y), body_part(HEAD)); + losehp(rnd((uarmh && is_metallic(uarmh)) ? 2 : 6), + "falling rock", KILLED_BY_AN); + if ((otmp = mksobj_at(ROCK, x, y, FALSE)) != 0) { + (void)xname(otmp); /* set dknown, maybe bknown */ + stackobj(otmp); + } + newsym(x, y); + } + break; + default: + break; + } + + if (u.dz > 0) { + /* zapping downward */ + (void) bhitpile(obj, bhito, x, y); + + /* subset of engraving effects; none sets `disclose' */ + if ((e = engr_at(x, y)) != 0) { + switch (obj->otyp) { + case WAN_POLYMORPH: + case SPE_POLYMORPH: + del_engr(e); + make_engr_at(x, y, random_engraving(buf), moves, (xchar)0); + break; + case WAN_CANCELLATION: + case SPE_CANCELLATION: + case WAN_MAKE_INVISIBLE: + del_engr(e); + break; + case WAN_TELEPORTATION: + case SPE_TELEPORT_AWAY: + rloc_engr(e); + break; + case WAN_STRIKING: + case SPE_FORCE_BOLT: + wipe_engr_at(x, y, d(2,4)); + break; + default: + break; + } + } + } + + return disclose; + } + + #endif /*OVL3*/ #ifdef OVLB + /* called for various wand and spell effects - M. Stephenson */ void weffects(obj) register struct obj *obj; { ! int otyp = obj->otyp; boolean disclose = FALSE, was_unkn = !objects[otyp].oc_name_known; exercise(A_WIS, TRUE); *************** *** 1452,1487 **** obj_zapped = FALSE; if (u.uswallow) { (void) bhitm(u.ustuck, obj); } else if (u.dz) { ! int x = u.ux, y = u.uy; ! ! if (otyp == WAN_PROBING) { ! if (u.dz < 0) { ! You("probe towards the %s.", ceiling(x,y)); ! ptmp = 0; ! } else { ! You("probe beneath the %s.", surface(x,y)); ! ptmp = display_binventory(x, y, TRUE); ! ptmp += bhitpile(obj, bhito, x, y); ! } ! if (!ptmp) Your("probe reveals nothing."); ! disclose = TRUE; ! } else if ((otyp == WAN_OPENING || otyp == SPE_KNOCK) && ! /* up/down at closed portcullis only */ ! is_db_wall(x,y) && find_drawbridge(&x, &y)) { ! open_drawbridge(x, y); ! disclose = TRUE; ! } else if ((otyp == WAN_LOCKING || otyp == SPE_WIZARD_LOCK) && ! /* down at open bridge or up/down at open portcullis */ ! ((levl[x][y].typ == DRAWBRIDGE_DOWN) ? u.dz > 0 : ! (is_drawbridge_wall(x,y) && !is_db_wall(x,y))) && ! find_drawbridge(&x, &y)) { ! close_drawbridge(x, y); ! disclose = TRUE; ! } else if (u.dz > 0) { ! /* zapping downward */ ! (void) bhitpile(obj, bhito, x, y); ! } } else { (void) bhit(u.dx,u.dy, rn1(8,6),ZAPPED_WAND, bhitm,bhito, obj); } --- 1608,1616 ---- obj_zapped = FALSE; if (u.uswallow) { (void) bhitm(u.ustuck, obj); + /* [how about `bhitpile(u.ustuck->minvent)' effect?] */ } else if (u.dz) { ! disclose = zap_updown(obj); } else { (void) bhit(u.dx,u.dy, rn1(8,6),ZAPPED_WAND, bhitm,bhito, obj); } *************** *** 1639,1644 **** --- 1768,1775 ---- } if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != 0) { + notonhead = (bhitpos.x != mtmp->mx || + bhitpos.y != mtmp->my); if(weapon != ZAPPED_WAND) { if(weapon != INVIS_BEAM) tmp_at(DISP_END, 0); return(mtmp); *************** *** 1767,1773 **** } STATIC_OVL int ! zhit(mon, type, nd) /* returns damage to mon */ register struct monst *mon; register int type, nd; { --- 1898,1904 ---- } STATIC_OVL int ! zhitm(mon, type, nd) /* returns damage to mon */ register struct monst *mon; register int type, nd; { *************** *** 1836,1842 **** /* can still blind the monster */ } else tmp = d(nd,6); ! if (haseyes(mon->data) && !(type > 0 && u.uswallow && mon == u.ustuck)) { register unsigned rnd_tmp = rnd(50); mon->mcansee = 0; --- 1967,1973 ---- /* can still blind the monster */ } else tmp = d(nd,6); ! if (!resists_blnd(mon) && !(type > 0 && u.uswallow && mon == u.ustuck)) { register unsigned rnd_tmp = rnd(50); mon->mcansee = 0; *************** *** 1869,1874 **** --- 2000,2125 ---- mon->mhp -= tmp; return(tmp); } + + STATIC_OVL void + zhitu(type, nd, fltxt, sx, sy) + int type, nd; + const char *fltxt; + xchar sx, sy; + { + int dam = 0; + + switch (abs(type) % 10) { + case ZT_MAGIC_MISSILE: + if (Antimagic) { + shieldeff(sx, sy); + pline_The("missiles bounce off!"); + } else { + dam = d(nd,6); + exercise(A_STR, FALSE); + } + break; + case ZT_FIRE: + if (Fire_resistance) { + shieldeff(sx, sy); + You("don't feel hot!"); + ugolemeffects(AD_FIRE, d(nd, 6)); + } else { + dam = d(nd, 6); + } + if (burnarmor()) { /* "body hit" */ + if (!rn2(3)) destroy_item(POTION_CLASS, AD_FIRE); + if (!rn2(3)) destroy_item(SCROLL_CLASS, AD_FIRE); + if (!rn2(5)) destroy_item(SPBOOK_CLASS, AD_FIRE); + } + break; + case ZT_COLD: + if (Cold_resistance) { + shieldeff(sx, sy); + You("don't feel cold."); + ugolemeffects(AD_COLD, d(nd, 6)); + } else { + dam = d(nd, 6); + } + if (!rn2(3)) destroy_item(POTION_CLASS, AD_COLD); + break; + case ZT_SLEEP: + if (Sleep_resistance) { + shieldeff(u.ux, u.uy); + You("don't feel sleepy."); + } else { + fall_asleep(-d(nd,25), TRUE); /* sleep ray */ + } + break; + case ZT_DEATH: + if (abs(type) == ZT_BREATH(ZT_DEATH)) { + if (Disint_resistance) { + You("are not disintegrated."); + break; + } else if (uarms) { + /* destroy shield; other possessions are safe */ + (void) destroy_arm(uarms); + break; + } else if (uarm) { + /* destroy suit; if present, cloak goes too */ + if (uarmc) (void) destroy_arm(uarmc); + (void) destroy_arm(uarm); + break; + } + /* no shield or suit, you're dead; wipe out cloak + and/or shirt in case of life-saving or bones */ + if (uarmc) (void) destroy_arm(uarmc); + #ifdef TOURIST + if (uarmu) (void) destroy_arm(uarmu); + #endif + } else if (nonliving(uasmon) || is_demon(uasmon)) { + shieldeff(sx, sy); + You("seem unaffected."); + break; + } else if (Antimagic) { + shieldeff(sx, sy); + You("aren't affected."); + break; + } + u.uhp = -1; + break; + case ZT_LIGHTNING: + if (Shock_resistance) { + shieldeff(sx, sy); + You("aren't affected."); + ugolemeffects(AD_ELEC, d(nd, 6)); + } else { + dam = d(nd, 6); + exercise(A_CON, FALSE); + } + if (!rn2(3)) destroy_item(WAND_CLASS, AD_ELEC); + if (!rn2(3)) destroy_item(RING_CLASS, AD_ELEC); + break; + case ZT_POISON_GAS: + poisoned("blast", A_DEX, "poisoned blast", 15); + break; + case ZT_ACID: + if (resists_acid(&youmonst)) { + dam = 0; + } else { + pline_The("acid burns!"); + dam = d(nd,6); + exercise(A_STR, FALSE); + } + if (!rn2(6)) erode_weapon(TRUE); + if (!rn2(6)) erode_armor(TRUE); + break; + } + + if (Half_spell_damage && dam && + type < 0 && (type > -20 || type < -29)) /* !Breath */ + dam = (dam + 1) / 2; + /* when killed by disintegration breath, don't leave corpse */ + u.ugrave_arise = (type == -ZT_BREATH(ZT_DEATH)) ? -3 : -1; + losehp(dam, fltxt, KILLED_BY_AN); + return; + } + #endif /*OVL1*/ #ifdef OVLB *************** *** 1958,1964 **** register int tmp; if(type < 0) return; ! tmp = zhit(u.ustuck, type, nd); if(!u.ustuck) u.uswallow = 0; else pline("%s rips into %s%s", The(fltxt), mon_nam(u.ustuck), exclam(tmp)); --- 2209,2215 ---- register int tmp; if(type < 0) return; ! tmp = zhitm(u.ustuck, type, nd); if(!u.ustuck) u.uswallow = 0; else pline("%s rips into %s%s", The(fltxt), mon_nam(u.ustuck), exclam(tmp)); *************** *** 2007,2013 **** dy = -dy; } else { boolean mon_could_move = mon->mcanmove; ! int tmp = zhit(mon, type, nd); if (is_rider(mon->data) && type == ZT_BREATH(ZT_DEATH)) { if (canseemon(mon)) { --- 2258,2264 ---- dy = -dy; } else { boolean mon_could_move = mon->mcanmove; ! int tmp = zhitm(mon, type, nd); if (is_rider(mon->data) && type == ZT_BREATH(ZT_DEATH)) { if (canseemon(mon)) { *************** *** 2072,2078 **** } else if (sx == u.ux && sy == u.uy && range >= 0) { nomul(0); if (zap_hit((int) u.uac)) { - register int dam = 0; range -= 2; pline("%s hits you!", The(fltxt)); if (Reflecting) { --- 2323,2328 ---- *************** *** 2088,2206 **** dx = -dx; dy = -dy; shieldeff(sx, sy); } ! else switch(abstype) { ! case ZT_MAGIC_MISSILE: ! if(Antimagic) { ! shieldeff(sx, sy); ! pline_The("missiles bounce off!"); ! } else { ! dam = d(nd,6); ! exercise(A_STR, FALSE); ! } ! break; ! case ZT_FIRE: ! if(Fire_resistance) { ! shieldeff(sx, sy); ! You("don't feel hot!"); ! ugolemeffects(AD_FIRE, d(nd, 6)); ! } else dam = d(nd, 6); ! if (burnarmor()) { /* "body hit" */ ! if (!rn2(3)) destroy_item(POTION_CLASS, AD_FIRE); ! if (!rn2(3)) destroy_item(SCROLL_CLASS, AD_FIRE); ! if (!rn2(5)) destroy_item(SPBOOK_CLASS, AD_FIRE); ! } ! break; ! case ZT_COLD: ! if(Cold_resistance) { ! shieldeff(sx, sy); ! You("don't feel cold."); ! ugolemeffects(AD_COLD, d(nd, 6)); ! } else ! dam = d(nd, 6); ! if(!rn2(3)) ! destroy_item(POTION_CLASS, AD_COLD); ! break; ! case ZT_SLEEP: ! if(Sleep_resistance) { ! shieldeff(u.ux, u.uy); ! You("don't feel sleepy."); ! } else { ! /* have to do this _before_ we reset multi */ ! stop_occupation(); ! fall_asleep(-d(nd,25), TRUE); /* sleep ray */ ! } ! break; ! case ZT_DEATH: ! if(abs(type) == ZT_BREATH(ZT_DEATH)) { ! if (Disint_resistance) { ! You("are not disintegrated."); ! break; ! } else if (uarms) { ! /* destroy shield; other possessions are safe */ ! (void) destroy_arm(uarms); ! break; ! } else if (uarm) { ! /* destroy suit; if present, cloak goes too */ ! if (uarmc) (void) destroy_arm(uarmc); ! (void) destroy_arm(uarm); ! break; ! } ! /* no shield or suit, you're dead; wipe out cloak ! and/or shirt in case of life-saving or bones */ ! if (uarmc) (void) destroy_arm(uarmc); ! #ifdef TOURIST ! if (uarmu) (void) destroy_arm(uarmu); ! #endif ! } else if (nonliving(uasmon) || is_demon(uasmon)) { ! shieldeff(sx, sy); ! You("seem unaffected."); ! break; ! } else if (Antimagic) { ! shieldeff(sx, sy); ! You("aren't affected."); ! break; ! } ! u.uhp = -1; ! break; ! case ZT_LIGHTNING: ! if (Shock_resistance) { ! shieldeff(sx, sy); ! You("aren't affected."); ! ugolemeffects(AD_ELEC, d(nd, 6)); ! } else { ! dam = d(nd, 6); ! exercise(A_CON, FALSE); ! } ! if(!rn2(3)) ! destroy_item(WAND_CLASS, AD_ELEC); ! if(!rn2(3)) ! destroy_item(RING_CLASS, AD_ELEC); ! break; ! case ZT_POISON_GAS: ! poisoned("blast", A_DEX, "poisoned blast", 15); ! break; ! case ZT_ACID: ! if (resists_acid(&youmonst)) ! dam = 0; ! else { ! pline_The("acid burns!"); ! dam = d(nd,6); ! exercise(A_STR, FALSE); ! } ! if(!rn2(6)) erode_weapon(TRUE); ! if(!rn2(6)) erode_armor(TRUE); ! break; ! } ! if(Half_spell_damage && dam && ! type < 0 && (type > -20 || type < -29)) /* !Breath */ ! dam = (dam+1) / 2; ! /* when killed by disintegration breath, don't leave corpse */ ! u.ugrave_arise = (type == -ZT_BREATH(ZT_DEATH)) ? -3 : -1; ! losehp(dam, fltxt, KILLED_BY_AN); ! } else pline("%s whizzes by you!", The(fltxt)); ! if (abstype == ZT_LIGHTNING && !Blind) { ! You("are blinded by the flash!"); make_blinded((long)d(nd,50),FALSE); } stop_occupation(); --- 2338,2351 ---- dx = -dx; dy = -dy; shieldeff(sx, sy); + } else { + zhitu(type, nd, fltxt, sx, sy); } ! } else { ! pline("%s whizzes by you!", The(fltxt)); ! } ! if (abstype == ZT_LIGHTNING && !resists_blnd(&youmonst)) { ! You(are_blinded_by_the_flash); make_blinded((long)d(nd,50),FALSE); } stop_occupation(); *************** *** 2494,2499 **** --- 2639,2646 ---- obj->oclass = GEM_CLASS; obj->known = FALSE; obj->onamelth = 0; /* no names */ + obj->oxlth = 0; /* no extra data */ + obj->mtraits = 0; if(!does_block(obj->ox,obj->oy,&levl[obj->ox][obj->oy])) unblock_point(obj->ox,obj->oy); if(cansee(obj->ox,obj->oy)) *************** *** 2508,2514 **** struct obj *item; if((trap = t_at(obj->ox,obj->oy)) && trap->ttyp == STATUE_TRAP) ! if(makemon(&mons[obj->corpsenm], obj->ox, obj->oy)) { pline("Instead of shattering, the statue suddenly comes alive!"); delobj(obj); deltrap(trap); --- 2655,2661 ---- struct obj *item; if((trap = t_at(obj->ox,obj->oy)) && trap->ttyp == STATUE_TRAP) ! if(makemon(&mons[obj->corpsenm], obj->ox, obj->oy, NO_MM_FLAGS)) { pline("Instead of shattering, the statue suddenly comes alive!"); delobj(obj); deltrap(trap); *** Old/util/dgn_comp.y Tue May 28 17:31:55 1996 --- util/dgn_comp.y Sat May 18 11:50:52 1996 *************** *** 1,5 **** %{ ! /* SCCS Id: @(#)dgn_comp.c 3.2 94/10/08 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ --- 1,5 ---- %{ ! /* SCCS Id: @(#)dgn_comp.c 3.2 96/05/10 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 647,654 **** { int nd, cl = 0, nl = 0, cb = 0, nb = 0; ! static long version_info[3] = { ! VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY }; if(++n_dgns <= 0) { --- 647,655 ---- { int nd, cl = 0, nl = 0, cb = 0, nb = 0; ! static unsigned long version_info[4] = { ! VERSION_NUMBER, VERSION_FEATURES, ! VERSION_SANITY1, VERSION_SANITY2 }; if(++n_dgns <= 0) { *** Old/util/dgn_main.c Tue May 28 17:31:58 1996 --- util/dgn_main.c Fri May 17 10:14:43 1996 *************** *** 63,69 **** FILE *fin, *fout; int i, len; boolean errors_encountered = FALSE; ! #if defined(THINK_C) || defined(__MWERKS__) char *mark; static char *mac_argv[] = { "dgn_comp", /* dummy argv[0] */ ":dat:dungeon.pdf" --- 63,69 ---- FILE *fin, *fout; int i, len; boolean errors_encountered = FALSE; ! #if defined(MAC) && (defined(THINK_C) || defined(__MWERKS__)) char *mark; static char *mac_argv[] = { "dgn_comp", /* dummy argv[0] */ ":dat:dungeon.pdf" *************** *** 98,104 **** } /* build output file name */ ! #if defined(THINK_C) || defined(__MWERKS__) /* extract basename from path to infile */ mark = strrchr(infile, ':'); strcpy(basename, mark ? mark+1 : infile); --- 98,104 ---- } /* build output file name */ ! #if defined(MAC) && (defined(THINK_C) || defined(__MWERKS__)) /* extract basename from path to infile */ mark = strrchr(infile, ':'); strcpy(basename, mark ? mark+1 : infile); *** Old/util/dlb_main.c Tue May 28 17:32:00 1996 --- util/dlb_main.c Fri May 24 08:52:30 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dlb_main.c 3.2 96/03/04 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dlb_main.c 3.2 96/05/23 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 9,14 **** --- 9,17 ---- #if !defined(O_WRONLY) && !defined(MAC) && !defined(AZTEC_C) #include #endif + #if defined(__DJGPP__) + #include + #endif #ifdef MICRO # undef exit *************** *** 284,290 **** total_read = 0; do { r = lib.dir[i].fsize - total_read; ! if (r > sizeof(buf)) r = sizeof(buf); n = fread(buf, 1, r, lib.fdata); if (n != r) { --- 287,293 ---- total_read = 0; do { r = lib.dir[i].fsize - total_read; ! if (r > (int) sizeof(buf)) r = (int) sizeof(buf); n = fread(buf, 1, r, lib.fdata); if (n != r) { *** Old/util/lev_comp.l Tue May 28 17:32:03 1996 --- util/lev_comp.l Fri May 17 11:37:03 1996 *************** *** 1,5 **** %{ ! /* SCCS Id: @(#)lev_lex.c 3.2 96/03/02 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 1,5 ---- %{ ! /* SCCS Id: @(#)lev_lex.c 3.2 96/05/16 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 72,91 **** extern YYSTYPE yylval; int line_number = 1, colon_line_number = 1; ! ! /* ! * This is *** UGLY *** but I can't think a better way to do it; ! * I really need a huge buffer to scan maps... ! * (This should probably be `#ifndef FLEX_SCANNER' since it's lex-specific.) ! */ ! #ifdef YYLMAX ! #undef YYLMAX ! #endif ! #define YYLMAX 2048 ! #if defined(sun) && defined(SVR4) && !defined(FLEX_SCANNER) ! char wwtext[YYLMAX]; ! #define yytext wwtext ! #endif /* * This is a hack required by Michael Hamel to get things --- 72,79 ---- extern YYSTYPE yylval; int line_number = 1, colon_line_number = 1; ! static char map[4096]; ! static int map_cnt = 0; /* * This is a hack required by Michael Hamel to get things *************** *** 122,146 **** %s MAPC %% ENDMAP { - #ifdef FLEX23_BUG - /* - * There is a bug in Flex 2.3 patch level < 6 - * (absent in previous versions) - * that results in the following behaviour : - * Once you enter an yymore(), you never exit from it. - * This should do the trick! - */ - extern int yy_more_len; - - yy_more_len = 0; - #endif /* FLEX23_BUG */ BEGIN(INITIAL); ! yylval.map = (char *) alloc(yyleng-5); ! (void) strncpy(yylval.map, yytext,yyleng-6); ! yylval.map[yyleng-6] = 0; return MAP_ID; } ! [-|}{+ABCISHKPLW\\#. ]*\n { line_number++; yymore(); } ^#.*\n { line_number++; } : { colon_line_number = line_number; return ':'; } MESSAGE return MESSAGE_ID; --- 110,128 ---- %s MAPC %% ENDMAP { BEGIN(INITIAL); ! yylval.map = (char *) alloc(map_cnt + 1); ! (void) strncpy(yylval.map, map, map_cnt); ! yylval.map[map_cnt] = 0; ! map_cnt = 0; return MAP_ID; } ! [-|}{+ABCISHKPLW\\#. ]*\n { ! line_number++; ! (void) strncpy(map + map_cnt, yytext, yyleng); ! map_cnt += yyleng; ! map[map_cnt] = 0; ! } ^#.*\n { line_number++; } : { colon_line_number = line_number; return ':'; } MESSAGE return MESSAGE_ID; *************** *** 239,244 **** --- 221,227 ---- hardfloor { yylval.i=HARDFLOOR; return FLAG_TYPE; } nommap { yylval.i=NOMMAP; return FLAG_TYPE; } shortsighted { yylval.i=SHORTSIGHTED; return FLAG_TYPE; } + \[\ *[0-9]+\%\ *\] { yylval.i = atoi(yytext + 1); return PERCENT; } [+\-]?[0-9]+ { yylval.i=atoi(yytext); return INTEGER; } \"[^"]*\" { yytext[yyleng-1] = 0; /* Discard the trailing \" */ yylval.map = (char *) alloc(strlen(yytext+1)+1); *** Old/util/lev_comp.y Tue May 28 17:32:05 1996 --- util/lev_comp.y Fri May 17 10:25:08 1996 *************** *** 1,5 **** %{ ! /* SCCS Id: @(#)lev_yacc.c 3.2 95/11/10 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 1,5 ---- %{ ! /* SCCS Id: @(#)lev_yacc.c 3.2 96/05/16 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 32,38 **** */ #define MAX_OF_TYPE 128 ! #define New(type) (type *) alloc(sizeof(type)) #define NewTab(type, size) (type **) alloc(sizeof(type *) * size) #define Free(ptr) free((genericptr_t)ptr) --- 32,39 ---- */ #define MAX_OF_TYPE 128 ! #define New(type) \ ! (type *) memset((genericptr_t)alloc(sizeof(type)), 0, sizeof(type)) #define NewTab(type, size) (type **) alloc(sizeof(type *) * size) #define Free(ptr) free((genericptr_t)ptr) *************** *** 146,152 **** } ! %token CHAR INTEGER BOOLEAN %token MESSAGE_ID MAZE_ID LEVEL_ID LEV_INIT_ID GEOMETRY_ID NOMAP_ID %token OBJECT_ID COBJECT_ID MONSTER_ID TRAP_ID DOOR_ID DRAWBRIDGE_ID %token MAZEWALK_ID WALLIFY_ID REGION_ID FILLING --- 147,153 ---- } ! %token CHAR INTEGER BOOLEAN PERCENT %token MESSAGE_ID MAZE_ID LEVEL_ID LEV_INIT_ID GEOMETRY_ID NOMAP_ID %token OBJECT_ID COBJECT_ID MONSTER_ID TRAP_ID DOOR_ID DRAWBRIDGE_ID %token MAZEWALK_ID WALLIFY_ID REGION_ID FILLING *************** *** 164,170 **** %token STRING MAP_ID %type h_justif v_justif trap_name room_type door_state light_state %type alignment altar_type a_register roomfill filling door_pos ! %type door_wall walled secret amount %type engraving_type flags flag_list prefilled lev_region lev_init %type monster monster_c m_register object object_c o_register %type string maze_def level_def m_name o_name --- 165,171 ---- %token STRING MAP_ID %type h_justif v_justif trap_name room_type door_state light_state %type alignment altar_type a_register roomfill filling door_pos ! %type door_wall walled secret amount chance %type engraving_type flags flag_list prefilled lev_region lev_init %type monster monster_c m_register object object_c o_register %type string maze_def level_def m_name o_name *************** *** 363,370 **** rooms : /* Nothing - dummy room for use with INIT_MAP */ { tmproom[nrooms] = New(room); - (void) memset((genericptr_t) tmproom[nrooms], 0, - sizeof *tmproom[nrooms]); tmproom[nrooms]->name = (char *) 0; tmproom[nrooms]->parent = (char *) 0; tmproom[nrooms]->rtype = 0; --- 364,369 ---- *************** *** 454,461 **** subroom_def : SUBROOM_ID ':' room_type ',' light_state ',' subroom_pos ',' room_size ',' string roomfill { tmproom[nrooms] = New(room); - (void) memset((genericptr_t) tmproom[nrooms], 0, - sizeof *tmproom[nrooms]); tmproom[nrooms]->parent = $11; tmproom[nrooms]->name = (char *) 0; tmproom[nrooms]->rtype = $3; --- 453,458 ---- *************** *** 474,481 **** room_def : ROOM_ID ':' room_type ',' light_state ',' room_pos ',' room_align ',' room_size roomfill { tmproom[nrooms] = New(room); - (void) memset((genericptr_t) tmproom[nrooms], 0, - sizeof *tmproom[nrooms]); tmproom[nrooms]->name = (char *) 0; tmproom[nrooms]->parent = (char *) 0; tmproom[nrooms]->rtype = $3; --- 471,476 ---- *************** *** 629,635 **** maze_def : MAZE_ID ':' string ',' filling { ! maze.filling = $5; if (index($3, '.')) yyerror("Invalid dot ('.') in level name."); if ((int) strlen($3) > 8) --- 624,630 ---- maze_def : MAZE_ID ':' string ',' filling { ! maze.filling = (schar) $5; if (index($3, '.')) yyerror("Invalid dot ('.') in level name."); if ((int) strlen($3) > 8) *************** *** 821,858 **** | passwall_detail ; ! monster_detail : MONSTER_ID ':' monster_c ',' m_name ',' coordinate { tmpmonst[nmons] = New(monster); tmpmonst[nmons]->x = current_coord.x; tmpmonst[nmons]->y = current_coord.y; ! tmpmonst[nmons]->class = $3; tmpmonst[nmons]->peaceful = -1; /* no override */ tmpmonst[nmons]->asleep = -1; tmpmonst[nmons]->align = - MAX_REGISTERS - 2; tmpmonst[nmons]->name.str = 0; tmpmonst[nmons]->appear = 0; tmpmonst[nmons]->appear_as.str = 0; if (!in_room) check_coord(current_coord.x, current_coord.y, "Monster"); ! if (!$5) ! tmpmonst[nmons]->id = NON_PM; ! else { ! int token = get_monster_id($5, (char) $3); ! if (token == ERR) { ! yywarning( "Invalid monster name! Making random monster."); ! tmpmonst[nmons]->id = NON_PM; ! } else ! tmpmonst[nmons]->id = token; ! Free($5); } } monster_infos { ! nmons++; ! if (nmons >= MAX_OF_TYPE) { yyerror("Too many monsters in room or mazepart!"); nmons--; } --- 816,851 ---- | passwall_detail ; ! monster_detail : MONSTER_ID chance ':' monster_c ',' m_name ',' coordinate { tmpmonst[nmons] = New(monster); tmpmonst[nmons]->x = current_coord.x; tmpmonst[nmons]->y = current_coord.y; ! tmpmonst[nmons]->class = $4; tmpmonst[nmons]->peaceful = -1; /* no override */ tmpmonst[nmons]->asleep = -1; tmpmonst[nmons]->align = - MAX_REGISTERS - 2; tmpmonst[nmons]->name.str = 0; tmpmonst[nmons]->appear = 0; tmpmonst[nmons]->appear_as.str = 0; + tmpmonst[nmons]->chance = $2; + tmpmonst[nmons]->id = NON_PM; if (!in_room) check_coord(current_coord.x, current_coord.y, "Monster"); ! if ($6) { ! int token = get_monster_id($6, (char) $4); ! if (token == ERR) ! yywarning( "Invalid monster name! Making random monster."); ! else ! tmpmonst[nmons]->id = token; ! Free($6); } } monster_infos { ! if (++nmons >= MAX_OF_TYPE) { yyerror("Too many monsters in room or mazepart!"); nmons--; } *************** *** 886,895 **** } ; ! object_detail : OBJECT_ID ':' object_desc { } ! | COBJECT_ID ':' object_desc { /* 1: is contents of next object with 2 */ /* 2: is a container */ --- 879,888 ---- } ; ! object_detail : OBJECT_ID object_desc { } ! | COBJECT_ID object_desc { /* 1: is contents of next object with 2 */ /* 2: is a container */ *************** *** 898,928 **** } ; ! object_desc : object_c ',' o_name { tmpobj[nobj] = New(object); ! tmpobj[nobj]->class = $1; tmpobj[nobj]->corpsenm = NON_PM; tmpobj[nobj]->curse_state = -1; tmpobj[nobj]->name.str = 0; ! if (!$3) ! tmpobj[nobj]->id = -1; ! else { ! int token = get_object_id($3); ! if (token == ERR) { ! yywarning("Illegal object name! Making random object."); ! tmpobj[nobj]->id = -1; ! } else ! tmpobj[nobj]->id = token; ! Free($3); } } ',' object_where object_infos { ! nobj++; ! if (nobj >= MAX_OF_TYPE) { ! yyerror("Too many objects in room or mazepart!"); ! nobj--; } } ; --- 891,920 ---- } ; ! object_desc : chance ':' object_c ',' o_name { tmpobj[nobj] = New(object); ! tmpobj[nobj]->class = $3; tmpobj[nobj]->corpsenm = NON_PM; tmpobj[nobj]->curse_state = -1; tmpobj[nobj]->name.str = 0; ! tmpobj[nobj]->chance = $1; ! tmpobj[nobj]->id = -1; ! if ($5) { ! int token = get_object_id($5); ! if (token == ERR) ! yywarning( ! "Illegal object name! Making random object."); ! else ! tmpobj[nobj]->id = token; ! Free($5); } } ',' object_where object_infos { ! if (++nobj >= MAX_OF_TYPE) { ! yyerror("Too many objects in room or mazepart!"); ! nobj--; } } ; *************** *** 1025,1058 **** } ; ! trap_detail : TRAP_ID ':' trap_name ',' coordinate ! { ! tmptrap[ntrap] = New(trap); ! tmptrap[ntrap]->x = current_coord.x; ! tmptrap[ntrap]->y = current_coord.y; ! tmptrap[ntrap]->type = $3; ! tmptrap[ntrap]->chance = 100; ! if (!in_room) ! check_coord(current_coord.x, current_coord.y, ! "Trap"); ! ntrap++; ! if (ntrap >= MAX_OF_TYPE) { ! yyerror("Too many traps in room or mazepart!"); ! ntrap--; ! } ! } ! | TRAP_ID ':' trap_name ',' coordinate ',' trap_chance { tmptrap[ntrap] = New(trap); tmptrap[ntrap]->x = current_coord.x; tmptrap[ntrap]->y = current_coord.y; ! tmptrap[ntrap]->type = $3; ! tmptrap[ntrap]->chance = $7; if (!in_room) check_coord(current_coord.x, current_coord.y, "Trap"); ! ntrap++; ! if (ntrap >= MAX_OF_TYPE) { yyerror("Too many traps in room or mazepart!"); ntrap--; } --- 1017,1033 ---- } ; ! trap_detail : TRAP_ID chance ':' trap_name ',' coordinate { tmptrap[ntrap] = New(trap); tmptrap[ntrap]->x = current_coord.x; tmptrap[ntrap]->y = current_coord.y; ! tmptrap[ntrap]->type = $4; ! tmptrap[ntrap]->chance = $2; if (!in_room) check_coord(current_coord.x, current_coord.y, "Trap"); ! if (++ntrap >= MAX_OF_TYPE) { yyerror("Too many traps in room or mazepart!"); ntrap--; } *************** *** 1535,1551 **** | RANDOM_TYPE ; - trap_chance : CHANCE_ID ':' INTEGER - { - if (tmptrap[ntrap]->chance) - yyerror("This trap already assigned a chance!"); - else if ($3 < 1 || $3 > 99) - yyerror("The chance is supposed to be percentile."); - else - tmptrap[ntrap]->chance = $3; - } - ; - room_type : string { int token = get_room_type($1); --- 1510,1515 ---- *************** *** 1668,1673 **** --- 1632,1649 ---- amount : INTEGER | RANDOM_TYPE + ; + + chance : /* empty */ + { + $$ = 100; /* default is 100% */ + } + | PERCENT + { + if ($1 <= 0 || $1 > 100) + yyerror("Expected percentile chance."); + $$ = $1; + } ; engraving_type : ENGRAVING_TYPE *** Old/util/lev_main.c Tue May 28 17:32:10 1996 --- util/lev_main.c Fri May 24 08:52:29 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)lev_main.c 3.2 95/10/04 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)lev_main.c 3.2 96/05/10 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 214,220 **** FILE *fin; int i; boolean errors_encountered = FALSE; ! #if defined(THINK_C) || defined(__MWERKS__) static char *mac_argv[] = { "lev_comp", /* dummy argv[0] */ ":dat:Arch.des", ":dat:Barb.des", --- 214,220 ---- FILE *fin; int i; boolean errors_encountered = FALSE; ! #if defined(MAC) && (defined(THINK_C) || defined(__MWERKS__)) static char *mac_argv[] = { "lev_comp", /* dummy argv[0] */ ":dat:Arch.des", ":dat:Barb.des", *************** *** 584,590 **** boolean check_subrooms() { ! short i, j, n_subrooms; boolean found, ok = TRUE; char *last_parent, msg[256]; --- 584,590 ---- boolean check_subrooms() { ! unsigned i, j, n_subrooms; boolean found, ok = TRUE; char *last_parent, msg[256]; *************** *** 941,948 **** { char c; uchar len; ! static long version_info[3] = { ! VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY }; Write(fd, version_info, sizeof version_info); --- 941,949 ---- { char c; uchar len; ! static unsigned long version_info[4] = { ! VERSION_NUMBER, VERSION_FEATURES, ! VERSION_SANITY1, VERSION_SANITY2 }; Write(fd, version_info, sizeof version_info); *** Old/util/makedefs.c Tue May 28 17:32:14 1996 --- util/makedefs.c Sat May 18 11:50:51 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)makedefs.c 3.2 95/10/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ /* Copyright (c) Dean Luick, 1990. */ --- 1,4 ---- ! /* SCCS Id: @(#)makedefs.c 3.2 96/05/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ /* Copyright (c) Dean Luick, 1990. */ *************** *** 12,17 **** --- 12,22 ---- #include "objclass.h" #include "monsym.h" #include "artilist.h" + #include "dungeon.h" + #include "obj.h" + #include "monst.h" + #include "you.h" + #include "flag.h" #include "dlb.h" /* version information */ *************** *** 100,108 **** "#\tThis data file is generated by 'makedefs'. Do not edit. \n"; static struct { ! long incarnation; ! long features; ! long entity_cnt; } version; /* definitions used for vision tables */ --- 105,114 ---- "#\tThis data file is generated by 'makedefs'. Do not edit. \n"; static struct { ! unsigned long incarnation; ! unsigned long features; ! unsigned long entity_cnt; ! unsigned long struct_sizes; } version; /* definitions used for vision tables */ *************** *** 153,158 **** --- 159,165 ---- extern void NDECL(objects_init); /* objects.c */ static void NDECL(make_version); + static char *FDECL(version_id_string, (char *,const char *)); static char *FDECL(xcrypt, (const char *)); static int FDECL(check_control, (char *)); static char *FDECL(without_control, (char *)); *************** *** 405,414 **** /* * integer version number */ ! version.incarnation = ((long)VERSION_MAJOR << 24) | ! ((long)VERSION_MINOR << 16) | ! ((long)PATCHLEVEL << 8) | ! ((long)EDITLEVEL); /* * encoded feature list * Note: if any of these magic numbers are changed or reassigned, --- 412,421 ---- /* * integer version number */ ! version.incarnation = ((unsigned long)VERSION_MAJOR << 24) | ! ((unsigned long)VERSION_MINOR << 16) | ! ((unsigned long)PATCHLEVEL << 8) | ! ((unsigned long)EDITLEVEL); /* * encoded feature list * Note: if any of these magic numbers are changed or reassigned, *************** *** 416,422 **** * The actual values have no special meaning, and the category * groupings are just for convenience. */ ! version.features = 0 /* levels and/or topology (0..4) */ #ifdef REINCARNATION | (1L << 1) --- 423,429 ---- * The actual values have no special meaning, and the category * groupings are just for convenience. */ ! version.features = (unsigned long)(0L /* levels and/or topology (0..4) */ #ifdef REINCARNATION | (1L << 1) *************** *** 454,459 **** --- 461,469 ---- #ifdef WEAPON_SKILLS | (1L << 22) #endif + #ifdef TIMED_DELAY + | (1L << 23) + #endif /* data format [COMPRESS excluded] (27..31) */ #ifdef ZEROCOMP | (1L << 27) *************** *** 461,485 **** #ifdef RLECOMP | (1L << 28) #endif ! ; /* * Value used for object & monster sanity check. * (NROFARTIFACTS<<24) | (NUM_OBJECTS<<12) | (NUMMONS<<0) */ for (i = 1; artifact_names[i]; i++) continue; ! version.entity_cnt = (long) (i - 1); for (i = 1; objects[i].oc_class != ILLOBJ_CLASS; i++) continue; ! version.entity_cnt = (version.entity_cnt << 12) | (long) i; for (i = 0; mons[i].mlet; i++) continue; ! version.entity_cnt = (version.entity_cnt << 12) | (long) i; return; } void do_date() { ! long clocktim; ! char cbuf[60], *c; filename[0]='\0'; #ifdef FILE_PREFIX --- 471,535 ---- #ifdef RLECOMP | (1L << 28) #endif ! ); /* * Value used for object & monster sanity check. * (NROFARTIFACTS<<24) | (NUM_OBJECTS<<12) | (NUMMONS<<0) */ for (i = 1; artifact_names[i]; i++) continue; ! version.entity_cnt = (unsigned long) (i - 1); for (i = 1; objects[i].oc_class != ILLOBJ_CLASS; i++) continue; ! version.entity_cnt = (version.entity_cnt << 12) | (unsigned long) i; for (i = 0; mons[i].mlet; i++) continue; ! version.entity_cnt = (version.entity_cnt << 12) | (unsigned long) i; ! /* ! * Value used for compiler (word size/field alignment/padding) check. ! */ ! version.struct_sizes = (((unsigned long)sizeof (struct flag) << 24) | ! ((unsigned long)sizeof (struct obj) << 17) | ! ((unsigned long)sizeof (struct monst) << 10) | ! ((unsigned long)sizeof (struct you))); return; } + /* this code used to be in src/version.c */ + static char * + version_id_string(outbuf, build_date) + char *outbuf; + const char *build_date; + { + Sprintf(outbuf, + #ifdef BETA + # ifdef PORT_SUB_ID + "%s NetHack %s Beta Version %d.%d.%d-%d - last build %s.", + # else + "%s NetHack Beta Version %d.%d.%d-%d - last build %s.", + # endif + #else + # ifdef PORT_SUB_ID + "%s NetHack %s Version %d.%d.%d - last build %s.", + # else + "%s NetHack Version %d.%d.%d - last build %s.", + # endif + #endif + PORT_ID, + #ifdef PORT_SUB_ID + PORT_SUB_ID, + #endif + VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, + #ifdef BETA + EDITLEVEL, + #endif + build_date); + return outbuf; + } + void do_date() { ! long clocktim = 0; ! char *c, cbuf[60], buf[BUFSZ]; ! const char *ul_sfx; filename[0]='\0'; #ifdef FILE_PREFIX *************** *** 490,496 **** perror(filename); exit(EXIT_FAILURE); } ! Fprintf(ofp,"/*\tSCCS Id: @(#)date.h\t3.2\t95/10/09 */\n\n"); Fprintf(ofp,Dont_Edit_Code); #ifdef KR1ED --- 540,546 ---- perror(filename); exit(EXIT_FAILURE); } ! Fprintf(ofp,"/*\tSCCS Id: @(#)date.h\t3.2\t96/05/17 */\n\n"); Fprintf(ofp,Dont_Edit_Code); #ifdef KR1ED *************** *** 500,512 **** (void) time((time_t *)&clocktim); Strcpy(cbuf, ctime((time_t *)&clocktim)); #endif ! for(c = cbuf; *c != '\n'; c++); *c = 0; /* strip off the '\n' */ Fprintf(ofp,"#define BUILD_DATE \"%s\"\n", cbuf); Fprintf(ofp,"#define BUILD_TIME (%ldL)\n", clocktim); Fprintf(ofp,"\n"); ! Fprintf(ofp,"#define VERSION_NUMBER 0x%08lxL\n", version.incarnation); ! Fprintf(ofp,"#define VERSION_FEATURES 0x%08lxL\n", version.features); ! Fprintf(ofp,"#define VERSION_SANITY 0x%08lxL\n", version.entity_cnt); Fprintf(ofp,"\n"); #ifdef AMIGA { --- 550,576 ---- (void) time((time_t *)&clocktim); Strcpy(cbuf, ctime((time_t *)&clocktim)); #endif ! for (c = cbuf; *c != '\n'; c++) continue; ! *c = 0; /* strip off the '\n' */ Fprintf(ofp,"#define BUILD_DATE \"%s\"\n", cbuf); Fprintf(ofp,"#define BUILD_TIME (%ldL)\n", clocktim); Fprintf(ofp,"\n"); ! #ifdef NHSTDC ! ul_sfx = "UL"; ! #else ! ul_sfx = "L"; ! #endif ! Fprintf(ofp,"#define VERSION_NUMBER 0x%08lx%s\n", ! version.incarnation, ul_sfx); ! Fprintf(ofp,"#define VERSION_FEATURES 0x%08lx%s\n", ! version.features, ul_sfx); ! Fprintf(ofp,"#define VERSION_SANITY1 0x%08lx%s\n", ! version.entity_cnt, ul_sfx); ! Fprintf(ofp,"#define VERSION_SANITY2 0x%08lx%s\n", ! version.struct_sizes, ul_sfx); ! Fprintf(ofp,"\n"); ! Fprintf(ofp,"#define VERSION_ID \\\n \"%s\"\n", ! version_id_string(buf, cbuf)); Fprintf(ofp,"\n"); #ifdef AMIGA { *************** *** 636,646 **** # endif #endif #ifdef TIMED_DELAY - # ifdef MSDOS "timed wait for display effects", - # else - "timer-driven display effects", - # endif #endif #ifdef TOURIST "tourists", --- 700,706 ---- *************** *** 2051,2055 **** --- 2111,2122 ---- return 1; } #endif /* VISION_TABLES */ + + #ifdef STRICT_REF_DEF + NEARDATA struct flag flags; + # ifdef ATTRIB_H + struct attribs attrmax, attrmin; + # endif + #endif /* STRICT_REF_DEF */ /*makedefs.c*/ *** Old/sys/amiga/Build.ami Tue May 28 17:32:25 1996 --- sys/amiga/Build.ami Fri May 24 08:51:49 1996 *************** *** 74,80 **** will build the auxiliary files including help files, special levels, icons, and the font files and will put these files into their final positions - most will be in dlb archives (if DLB was defined in config.h). ! The first make run should be done in OBJ: and the make install should be done in NetHack:; for both runs, the makefile is NH:sys/amiga/Makefile.ami (or NH:sys/amiga/DMakefile for DMake). --- 74,80 ---- will build the auxiliary files including help files, special levels, icons, and the font files and will put these files into their final positions - most will be in dlb archives (if DLB was defined in config.h). ! The first make run should be done in NH:obj and the make install should be done in NetHack:; for both runs, the makefile is NH:sys/amiga/Makefile.ami (or NH:sys/amiga/DMakefile for DMake). *** Old/sys/amiga/Makefile.ami Tue May 28 17:32:32 1996 --- sys/amiga/Makefile.ami Fri May 24 08:51:49 1996 *************** *** 947,965 **** $(OO)tiletxt.o $(FLLIB) $(NETHACK)tiles/objects.iff: /win/share/objects.txt $(SBIN)txt2iff - # $(UUDEC) $(WSHARE)objtil.uu $(SBIN)txt2iff $(WSHARE)objects.txt $(NETHACK)tiles/objects.iff - delete objects.til $(NETHACK)tiles/monsters.iff : /win/share/monsters.txt $(SBIN)txt2iff - # $(UUDEC) $(WSHARE)montil.uu $(SBIN)txt2iff $(WSHARE)monsters.txt $(NETHACK)tiles/monsters.iff - delete monsters.til $(NETHACK)tiles/other.iff : /win/share/other.txt $(SBIN)txt2iff - # $(UUDEC) $(WSHARE)othtil.uu $(SBIN)txt2iff $(WSHARE)other.txt $(NETHACK)tiles/other.iff - delete other.til # Sound installation rules. inst-sounds: $(SOUNDFILES) --- 947,959 ---- *** Old/sys/amiga/NetHack.cnf Tue May 28 17:32:39 1996 --- sys/amiga/NetHack.cnf Fri May 24 08:51:50 1996 *************** *** 152,158 **** #TEXTPENS=0,14 #OTHERPENS=1,12 # ! # Screen mode selections below should all work for either the font of tile # version of the game. Other modes can be tried and as long as they are at # least 640x200, the game should adapt to them... # --- 152,158 ---- #TEXTPENS=0,14 #OTHERPENS=1,12 # ! # Screen mode selections below should all work for either the font or tile # version of the game. Other modes can be tried and as long as they are at # least 640x200, the game should adapt to them... # *** Old/sys/amiga/amimenu.c Tue May 28 17:33:00 1996 --- sys/amiga/amimenu.c Fri May 24 08:52:11 1996 *************** *** 77,85 **** TEXT(T_Mn, "M-n #name an item or type of object"); TEXT(T_Mo, "M-o #offer a sacrifice to the gods"); TEXT(T_Mp, "M-p #pray to the gods for help"); - #ifdef WEAPON_SKILLS - TEXT(T_Mq, "M-q Show #qualifications with weapons"); - #endif TEXT(T_Mr, "M-r #rub a lamp"); TEXT(T_Ms, "M-s #sit down"); TEXT(T_Mt, "M-t #turn undead"); --- 77,82 ---- *************** *** 204,218 **** { &extsub[ 9+WS1], IDATA(128+'n', T_Mn, 80+WS10) }, { &extsub[10+WS1], IDATA(128+'o', T_Mo, 90+WS10) }, { &extsub[11+WS1], IDATA(128+'p', T_Mp, 100+WS10) }, ! #ifdef WEAPON_SKILLS ! { &extsub[12+WS1], IDATA(128+'q', T_Mq, 110+WS10) }, ! #endif ! { &extsub[12+WS1+WS1], IDATA(128+'r', T_Mr, 110+WS10+WS10) }, ! { &extsub[13+WS1+WS1], IDATA(128+'s', T_Ms, 120+WS10+WS10) }, ! { &extsub[14+WS1+WS1], IDATA(128+'t', T_Mt, 130+WS10+WS10) }, ! { &extsub[15+WS1+WS1], IDATA(128+'u', T_Mu, 140+WS10+WS10) }, ! { &extsub[16+WS1+WS1], IDATA(128+'v', T_Mv, 150+WS10+WS10) }, ! { NULL , IDATA(128+'w', T_Mw, 160+WS10+WS10) }, }; #undef WS1 #undef WS10 --- 201,212 ---- { &extsub[ 9+WS1], IDATA(128+'n', T_Mn, 80+WS10) }, { &extsub[10+WS1], IDATA(128+'o', T_Mo, 90+WS10) }, { &extsub[11+WS1], IDATA(128+'p', T_Mp, 100+WS10) }, ! { &extsub[12+WS1], IDATA(128+'r', T_Mr, 110+WS10) }, ! { &extsub[13+WS1], IDATA(128+'s', T_Ms, 120+WS10) }, ! { &extsub[14+WS1], IDATA(128+'t', T_Mt, 130+WS10) }, ! { &extsub[15+WS1], IDATA(128+'u', T_Mu, 140+WS10) }, ! { &extsub[16+WS1], IDATA(128+'v', T_Mv, 150+WS10) }, ! { NULL , IDATA(128+'w', T_Mw, 160+WS10) }, }; #undef WS1 #undef WS10 *** Old/sys/amiga/winami.c Tue May 28 17:34:27 1996 --- sys/amiga/winami.c Tue May 28 10:47:49 1996 *************** *** 759,768 **** sprintf( buf, "%-10s - %s ", extcmdlist[ i ].ef_txt, extcmdlist[ i ].ef_desc ); ! amii_add_menu( win, NO_GLYPH, &id, extcmdlist[i].ef_txt[0], 0, buf, MENU_UNSELECTED); } ! amii_end_menu( win, "\33" ); sel = amii_select_menu( win, PICK_ONE, &mip ); amii_destroy_nhwindow( win ); --- 759,768 ---- sprintf( buf, "%-10s - %s ", extcmdlist[ i ].ef_txt, extcmdlist[ i ].ef_desc ); ! amii_add_menu( win, NO_GLYPH, &id, extcmdlist[i].ef_txt[0], 0, 0, buf, MENU_UNSELECTED); } ! amii_end_menu( win, (char*)0 ); sel = amii_select_menu( win, PICK_ONE, &mip ); amii_destroy_nhwindow( win ); *************** *** 830,839 **** extcmdlist[ i ].ef_txt, extcmdlist[ i ].ef_desc ); amii_add_menu( win, NO_GLYPH, &id, extcmdlist[i].ef_txt[0], 0, ! buf, MENU_UNSELECTED); } ! amii_end_menu( win, "\33" ); sel = amii_select_menu( win, PICK_ONE, &mip ); amii_destroy_nhwindow( win ); --- 830,839 ---- extcmdlist[ i ].ef_txt, extcmdlist[ i ].ef_desc ); amii_add_menu( win, NO_GLYPH, &id, extcmdlist[i].ef_txt[0], 0, ! 0, buf, MENU_UNSELECTED); } ! amii_end_menu( win, (char*)0 ); sel = amii_select_menu( win, PICK_ONE, &mip ); amii_destroy_nhwindow( win ); *** Old/sys/amiga/winmenu.c Tue May 28 17:34:47 1996 --- sys/amiga/winmenu.c Tue May 28 10:47:37 1996 *************** *** 56,66 **** /* Add a string to a menu */ void ! amii_add_menu(window,glyph, id,ch,attr,str,preselected) register winid window; register int glyph; register const anything *id; register char ch; register int attr; register const char *str; register BOOLEAN_P preselected; --- 56,67 ---- /* Add a string to a menu */ void ! amii_add_menu(window,glyph, id, ch, gch, attr, str, preselected) register winid window; register int glyph; register const anything *id; register char ch; + register char gch; register int attr; register const char *str; register BOOLEAN_P preselected; *************** *** 80,85 **** --- 81,87 ---- mip->attr = attr; mip->glyph = Is_rogue_level(&u.uz) ? NO_GLYPH : glyph; mip->selector = 0; + mip->gselector = gch; if (id->a_void && !ch && cw->menu.chr != 0) { *************** *** 134,140 **** { anything any; any.a_void = 0; ! amii_add_menu( window, NO_GLYPH, &any, 0, ATR_NONE, morestr, MENU_UNSELECTED); } --- 136,142 ---- { anything any; any.a_void = 0; ! amii_add_menu( window, NO_GLYPH, &any, 0, 0, ATR_NONE, morestr, MENU_UNSELECTED); } *************** *** 731,736 **** --- 733,741 ---- { if( how == PICK_ONE ) aredone = 1; + amip->selected = !amip->selected; + } else if (amip->gselector == code ) + { amip->selected = !amip->selected; } } *** Old/sys/amiga/winproto.h Tue May 28 17:34:50 1996 --- sys/amiga/winproto.h Tue May 14 16:01:18 1996 *************** *** 39,45 **** /* winmenu.c */ void amii_start_menu ( winid window ); ! void FDECL(amii_add_menu, (winid,int,const anything *,CHAR_P,int,const char *,BOOLEAN_P)); void FDECL(amii_end_menu, (winid, const char *)); int FDECL(amii_select_menu, (winid, int, menu_item **)); int DoMenuScroll ( int win , int blocking, int how, menu_item ** ); --- 39,45 ---- /* winmenu.c */ void amii_start_menu ( winid window ); ! void FDECL(amii_add_menu, (winid,int,const anything *,CHAR_P,CHAR_P,int,const char *,BOOLEAN_P)); void FDECL(amii_end_menu, (winid, const char *)); int FDECL(amii_select_menu, (winid, int, menu_item **)); int DoMenuScroll ( int win , int blocking, int how, menu_item ** ); *** /dev/null Tue May 28 17:35:37 1996 --- sys/be/README Tue May 28 16:58:09 1996 *************** *** 0 **** --- 1,46 ---- + This file is sys/be/README. It is for those intending to compile + NetHack 3.2.1 on a BeBox running BeOS 1.1d7. An actual game + has never been run due to the (current) lack of an uncrippled + linker. + + + BeBox NetHack currently only supports the TTY windowing system. In + order to compile it, it would benefit you greatly to think of your Be + system as a unix variant. It is possible to compile using the + Metrowerks IDE -- the Mac port of Nethack uses the Metrowerks compiler. + However, there are four executables and several steps involved in making + NetHack. Unless you are extremely familiar with the build sequence, I + suggest you avoid it for now. Let the Unix Makefiles take care of all + that for you. + + + From a freshly unpacked source tree: + + 1. Copy the Makfiles in sys/unix to their proper spots. If you + don't know what they are, read sys/unix/Install.unx. + + 2. Edit src/Makefile: + o Change System to SysBe. + o Comment out the Unix versions of SYSSRC and SYSOBJ variables. + o Uncomment the Be versions of SYSRC and SYSOBJ. + o Uncomment the BeBox versions CC, CFLAGS, LD, and LFLAGS. + o Comment out the default CFLAGS and LFLAGS. + o Change WINTTYLIB to be -ltermcap. + + 3. Edit util/Makefile: + o Uncomment the BeBox versions of CC and CFLAGS. + o Comment out the default CFLAGS and LFLAGS. + o Change YACC and LEX to be bison -y and flex respectively. + + 4. Edit include/config.h to change HACKDIR to be the location of your + install directory. You may want to uncomment the DLB define. + + 5. Edit Makefile and change GAMEDIR to match HACKDIR in include/config.h. + Make sure the path to GAMEDIR exists. + + 6. Type make install at the top level. + + + + It is quite likely that some necessary steps needed to make the + game have been omitted. Feel free to ad-lib as necessary. *** /dev/null Tue May 28 17:35:39 1996 --- sys/be/bemain.c Tue May 28 16:58:18 1996 *************** *** 0 **** --- 1,223 ---- + /* SCCS Id: @(#)bemain.c 3.2 96/05/23 */ + /* Copyright (c) Dean Luick, 1996. */ + /* NetHack may be freely redistributed. See license for details. */ + + #include "hack.h" + + static void whoami(void); + static void process_options(int argc, char **argv); + static void chdirx(const char *dir, boolean wr); + + + int main(int argc, char **argv) + { + int fd; + char *dir; + + dir = getenv("NETHACKDIR"); + if (!dir) dir = getenv("HACKDIR"); + + choose_windows(DEFAULT_WINDOW_SYS); + chdirx(dir,1); + initoptions(); + + init_nhwindows(&argc, argv); + whoami(); + + /* + * It seems you really want to play. + */ + setrandom(); + u.uhp = 1; /* prevent RIP on early quits */ + process_options(argc, argv); /* command line options */ + + + #ifdef WIZARD + if (wizard) + Strcpy(plname, "wizard"); + else + #endif + if(!*plname || !strncmp(plname, "player", 4) + || !strncmp(plname, "games", 4)) + askname(); + plnamesuffix(); /* strip suffix from name; calls askname() */ + /* again if suffix was whole name */ + /* accepts any suffix */ + + //Sprintf(lock,"%d%s", getuid(), plname) ; + //getlock() ; + + + //dlb_init(); /* must be before newgame() */ + + /* + * Initialization of the boundaries of the mazes + * Both boundaries have to be even. + */ + x_maze_max = COLNO-1; + if (x_maze_max % 2) + x_maze_max--; + y_maze_max = ROWNO-1; + if (y_maze_max % 2) + y_maze_max--; + + /* + * Initialize the vision system. This must be before mklev() on a + * new game or before a level restore on a saved game. + */ + vision_init(); + + display_gamewindows(); + + if ((fd = restore_saved_game()) >= 0) { + #ifdef WIZARD + /* Since wizard is actually flags.debug, restoring might + * overwrite it. + */ + boolean remember_wiz_mode = wizard; + #endif + #ifdef NEWS + if(flags.news) { + display_file(NEWS, FALSE); + flags.news = FALSE; /* in case dorecover() fails */ + } + #endif + pline("Restoring save file..."); + mark_synch(); /* flush output */ + if(!dorecover(fd)) + goto not_recovered; + #ifdef WIZARD + if(!wizard && remember_wiz_mode) wizard = TRUE; + #endif + pline("Hello %s, welcome back to NetHack!", plname); + check_special_room(FALSE); + if (discover) + You("are in non-scoring discovery mode."); + + if (discover || wizard) { + if(yn("Do you want to keep the save file?") == 'n') + (void) delete_savefile(); + else { + compress(SAVEF); + } + } + + flags.move = 0; + } else { + not_recovered: + player_selection(); + newgame(); + /* give welcome message before pickup messages */ + pline("Hello %s, welcome to NetHack!", plname); + if (discover) + You("are in non-scoring discovery mode."); + + flags.move = 0; + set_wear(); + pickup(1); + } + + moveloop(); + return 0; + } + + static void + whoami(void) + { + /* + * Who am i? Algorithm: 1. Use name as specified in NETHACKOPTIONS + * 2. Use $USER or $LOGNAME (if 1. fails) + * The resulting name is overridden by command line options. + * If everything fails, or if the resulting name is some generic + * account like "games", "play", "player", "hack" then eventually + * we'll ask him. + */ + char *s; + + if (*plname) return; + if (s = getenv("USER")) { + (void) strncpy(plname, s, sizeof(plname)-1); + return; + } + if (s = getenv("LOGNAME")) { + (void) strncpy(plname, s, sizeof(plname)-1); + return; + } + } + + /* normalize file name - we don't like .'s, /'s, spaces */ + void + regularize(char *s) + { + register char *lp; + + while((lp=index(s, '.')) || (lp=index(s, '/')) || (lp=index(s,' '))) + *lp = '_'; + } + + static void + process_options(int argc, char **argv) + { + while (argc > 1 && argv[1][0] == '-') { + argv++; + argc--; + switch (argv[0][1]) { + case 'D': + #ifdef WIZARD + wizard = TRUE; + break; + #endif + /* otherwise fall thru to discover */ + case 'X': + discover = TRUE; + break; + #ifdef NEWS + case 'n': + flags.news = FALSE; + break; + #endif + case 'u': + if(argv[0][2]) + (void) strncpy(plname, argv[0]+2, sizeof(plname)-1); + else if (argc > 1) { + argc--; + argv++; + (void) strncpy(plname, argv[0], sizeof(plname)-1); + } else + raw_print("Player name expected after -u"); + break; + default: + /* allow -T for Tourist, etc. */ + (void) strncpy(pl_character, argv[0]+1, + sizeof(pl_character)-1); + + /* raw_printf("Unknown option: %s", *argv); */ + } + } + } + + static void + chdirx(const char *dir, boolean wr) + { + if (!dir) dir = HACKDIR; + + if (chdir(dir) < 0) + error("Cannot chdir to %s.", dir); + + /* Warn the player if we can't write the record file */ + /* perhaps we should also test whether . is writable */ + /* unfortunately the access system-call is worthless */ + if (wr) check_recordfile(dir); + } + + + /* + * This is pretty useless now, but will be needed when we add the Be GUI. + * When that happens, the main nethack code will run in its own thread. + * If the main code exits we must catch this and kill the GUI threads. + */ + void nethack_exit(int status); + void nethack_exit(int status) + { + exit(status); + } *** Old/sys/mac/Install.mw Tue May 28 17:35:41 1996 --- sys/mac/Install.mw Tue May 14 15:35:42 1996 *************** *** 89,100 **** not compile because of register overflow. [NetHack only] PPC Project ! Set name to Other settings [NetHack only] creator: nh31 ! preferred heap size: 2000 ! minimum heap size: 1500 ! stack size: 128 The SIOUX library may be replaced with console.stubs.c for the NetHack --- 89,100 ---- not compile because of register overflow. [NetHack only] PPC Project ! Set name to Other settings [NetHack only] creator: nh31 ! preferred heap size:2500 ! minimum heap size: 2000 ! stack size: 128 [PPC only] The SIOUX library may be replaced with console.stubs.c for the NetHack *** Old/sys/mac/NHrsrc.hqx Tue May 28 17:35:48 1996 --- sys/mac/NHrsrc.hqx Thu May 23 16:17:14 1996 *************** *** 1,9 **** (This file must be converted with BinHex 4.0) ! :$%jPG%KKBfXZFR0bB`"58e*$4'peC`!!!!!!!!!!AUCL&!!!!!!"!!!!9[X!!&A ! l!!!(U`!!!!!0!"!!,3!`S!)!U!!!!!!!&J!i!#F!iBJB8h4[$%jPG%KKBfXZFR0 bBfX#!!)!8P053d4[G@F"!!"S!8!#!&*68N0%Eh9R!3!!D!&!!!!!!!!!!!!!!!! ! !!!!!!!!!V@lZ@J!!!!!!!&kQ!!$)!6!!!3!!!!!!!!!!#lN!!!!!&3!!!!!!jJ& F!!%!!!!!!!!!!!Zi!!!!!"8!8!"Z!2S"Z!!"!!!!!!!!!!!(e!!!!!!9!&!!EJ$ k!EJ!!3!!!!!!!!!!"p-!!!!!&3"3!'i!qJ'i!!%!!!!!!!!!!!I5!!!!!"8!8!" Z!2S"Z!!!!"`"#!!)!8S!m!!!!!!!!!!!!!!(6@9cFf&RC6J+!!!!(!%Z!!3"8J( --- 1,9 ---- (This file must be converted with BinHex 4.0) ! :$%jPG%KKBfXZFR0bB`"58e*$4'peC`!!!!!!!!!!AUc$AJ!!!!!"!!!!9`%!!&B ! "!!!(U`!!!!!0!"!!,3!`S!)!U!!!!!!!&J!i!#F!iBJB8h4[$%jPG%KKBfXZFR0 bBfX#!!)!8P053d4[G@F"!!"S!8!#!&*68N0%Eh9R!3!!D!&!!!!!!!!!!!!!!!! ! !!!!!!!!!VC2TZ!!!!!!!!&kX!!$)!6!!!3!!!!!!!!!!#lN!!!!!&3!!!!!!jJ& F!!%!!!!!!!!!!!Zi!!!!!"8!8!"Z!2S"Z!!"!!!!!!!!!!!(e!!!!!!9!&!!EJ$ k!EJ!!3!!!!!!!!!!"p-!!!!!&3"3!'i!qJ'i!!%!!!!!!!!!!!I5!!!!!"8!8!" Z!2S"Z!!!!"`"#!!)!8S!m!!!!!!!!!!!!!!(6@9cFf&RC6J+!!!!(!%Z!!3"8J( *************** *** 463,509 **** !!&d!A3"a!*N%!ePPF`!!!!!!!!S!6`"3!91)!Pi`!!!!!!!+!"B!+J!fS!)!!!! !!!i!4!"%!,)"e3#!4%3`#J!!!!i!5J"U!0-"ea1)!!3`#J!!!%!!%!&c!@-"E`& K"`5PBh4X,@3#T5d()h9ZG(*KF!BMCQpbBf8&)fa[Eh3#T5d"433MC'P`"#0cDA3 ! #T5d"2!%q!!!!+3-JJ!!!!!-c,M)H8h4TBfKdD@jR)%eKG'KPE@&dDA0MD#"$C@j ! dFR9Y!!!!&"01CA4)B@0V)&"bC@CPFQ9ZBf9c!!!!*`-JJ!!!!!-c,M)F-bib)+N ! a16Je,6%j16BJ65iJ8h4PF'KPER0[EJ!!!3!!!&El!!"9q`!!"kX#LHFd%1B!!!! ! F"PS!&&G*6N3!"`#U9%e36!!"!3T1G@e`!!%")N&-8P3!!`%k4%P86!!+!@T69&) ! M!"%"lQPMFc3!"!,'D@0c)`!%!`**3diM!!3$2QPME$3!"!0k4%a24`!'!lC'6dj ! 8!!-%#NC26N3!!33k3e958`!)"&*ZD$-a!!!%[NC548B!"!6+3Nj%6!!!"3C048j ! 9!"-&%Ne195-!!3B#GQ9bF`!""KT69&)J!!!'-J#!!#d!!!"i!!!!!!#"!!!!!!! ! !!!!!!!##!!J!!!!J!!!!!!#$!!m!!!$H!!!!!!#%!"F!!!"!!!!!!!#&!"`!!!" ! D!!!!!!#'!#%!!!%#!!!!!!#(!+S!!$dD!!!!!!#!!$)!!!#H!!!!!!#"!6F!!&+ ! `!!!!!!#!!$F!!#BS!!!!!!#"!%%!!#C#!!!!!!#"rrmJ!!MJ!!!!!!#!rrm!!&8 ! M!!!!!"1)rrm!!&8e!!!!!"1*rrm!!%@6!!!!!!#"rrmJ!!M`!!!!!!#!rrm!!!b ! -!!!!!!##rrm!!!lq!!!!!!#)rrm!!!jf!!!!!!#&rrm!!!dL!!!!!!#'rrm!!!e ! i!!!!!!#(rrm!!!hJ!!!!!!#*rrm!!!q!!!!!!"1)rrm!!&5M!!!!!"1*rrm!!&6 ! E!!!!!"G`rrm!!&,r!!!!!!#!!*`J!!%Q!!!!!!#$!-8!!&"(!!!!!!#%!-N!!&2 ! A!!!!!!#&!-i!!&2f!!!!!!#'!0-!!&$E!!!!!!#(!0N!!&3J!!!!!!#)!0d!!&4 ! a!!!!!!#*!1-!!&9(!!!!!!$*!1J!!&%(!!!!!!$+!28!!&&`!!!!!!$,!3%!!&' ! @!!!!!!$-!3S!!&'m!!!!!!$0!4!!!&(F!!!!!!$1!4B!!&(m!!!!!!$2!4`!!&) ! F!!!!!!$3!5)!!&)m!!!!!!$)!5J!!&*@!!!!!!$4!5m!!&+F!!!!!!2Srrm!!!& ! !!!!!!!2Trrm!!!(%!!!!!!2Urrm!!!r`!!!!!!2VrrmJ!$em!!!!!!2XrrmJ!$i ! !!!!!!!2Srrm!!!*)!!!!!!2Trrm!!!+-!!!!!!2Urrm!!!T%!!!!!!2VrrmJ!$k ! %!!!!!!2XrrmJ!$l)!!!!!!2Srrm!!!,3!!!!!!2Trrm!!!28!!!!!!2Urrm!!!P ! !!!!!!!2VrrmJ!$m-!!!!!!2XrrmJ!%!3!!!!!!2Srrm!!!6B!!!!!!2Trrm!!!E ! F!!!!!!2Urrm!!!U)!!!!!!2VrrmJ!%%8!!!!!!2XrrmJ!%-B!!!!!!#)!%N!!!j ! D!!!!!!#(!&B!!!c1!!!!!!#'!&)!!!cU!!!!!!#&!%m!!!d'!!!!!!#*!&X!!!p ! N!!!!!!##!'N!!!bb!!!!!"G`!6`!!%@P!!!!!%Z*rrmJ!""d!!!!!%Z-rrm!!"S ! !!!!!!%`*!)3J!#DL!!!!!%`-!*%J!#pS!!!!!!#A!(!%!#AL!!!!!!#B!(N%!#C ! F!!!!!!)!rrmJ!$a#!!!!!!)$rrmJ!$b+!!!!!!)%rrmJ!$c5!!!!!!)&rrmJ!$U ! 5!!!!!!)(rrmJ!$VD!!!!!!)"rrmJ!$XL!!!!!!)'rrmJ!$YU!!!!!!))rrmJ!$Z ! b!!!!!!)#rrmJ!$[k!!!!!!!!rrmJ!$dq!!!!!!#!rrmJ!%8F!!!!!!#"rrmJ!%8 ! R!!!!!!##rrmJ!%8b!!!!!!#$rrmJ!%8p!!!!!!#%rrmJ!%9)!!!!!!#!rrmJ!%9 ! 6!!!!!!#"rrm!!%@q!!!!!!##rrm!!%Ce!!!!!!#$rrm!!%E"!!!!!!#%rrm!!%G ! a!!!!!!#!rrm!!%IS!!!!!!#&rrm!!%J@!!!!!!#'rrm!!%MJ!!!!!!#(rrm!!%P ! f!!!!!!#)rrm!!%S0!!!!!!#*rrm!!%V+!!!!!!$+rrm!!%Z&!!!!!!$,rrm!!%` ! 8!!!!!!$-rrm!!%b3!!!!!!!!cIrr!!"-p`!!!!!!c[rr!!"0AJ!!!!!!crrr!!" ! 0a3!!!!!!bIrr!!"1,!!!!!!!d2rr!!"1QJ!!!!!!b2rr!!"1l`!!!!!!dIrr!!" ! 2K!!!!!!!J!#e&!"2j`!!!!!!J3#p&!"3&`!!!!!!![rr)!"9L`!!!!!!!Irr)!" ! 9d!!!!!!!J!&#!!"9Z!!!!!!(6@9cFf&RC3C6G'&dGA-(4(9ZCf9[EJ40C@je"&4 ! PH(3,4'PKCfj[Fh4TBh-%6P9-6!41G@e`#99ZFfKTCR4PC!G6D'PQG'9N"APZ6Q& ! a!RPZ!hPZF34jEQ&a$90YB@aX)%GPG'aTEQ8'8(*[EA"d#%KKBfY'Efjd#P"65'& ! MDdC[ER3-8&0)B@0V4QpZG#!j#P"65'&MDdC[ER306@PcBbiJ8h4bD@jRF`T89&N ! J9fPZC'ph"fePER9LBA)(Fh9LE@9ZG30,BQ3%5'9XF!4*EQC["89aG@P`!d&MG!9 ! 0B@GTB`4#DA4c$'0[ER4bEf`JDf9jF`Y`G@jMG(9KG'P[EJKLFQ&MDf9dF`9K)#d ! JE39Z)#dJHJ9")#dJ6391)#dJ@J8`)#dJ13ChDATKFQ3(Bh9bFQ9ZG!406P8M"90 ! dBA*d$P"bC@BJ4QPXC5"1B@ePSam: --- 463,509 ---- !!&d!A3"a!*N%!ePPF`!!!!!!!!S!6`"3!91)!Pi`!!!!!!!+!"B!+J!fS!)!!!! !!!i!4!"%!,)"e3#!4%3`#J!!!!i!5J"U!0-"ea1)!!3`#J!!!%!!%!&c!@-"E`& K"`5PBh4X,@3#T5d()h9ZG(*KF!BMCQpbBf8&)fa[Eh3#T5d"433MC'P`"#0cDA3 ! #T5d"2!%q!!!!&"01CA4)B@0V)&"bC@CPFQ9ZBf9c!!!!+`-KJ!!!!!8c,M)Z-4i ! c,M)Z-5#T-6Ni05da16Nf)%dZ)&0dCA"SC@jcEfi!!!!V!b'!!!!!"6-Z-Lia(P0 ! dD@0SG'PZCb"0BA4SC@eKG'PcBfJJ3f9ZG(*eE3!!!3!!!&F"!!"@!3!!"kX"eHT ! %'i`!!!!F"PS!&&G*6N3!"`#U9%e36!!"!3T1G@e`!!%")N&-8P3!!`%k4%P86!! ! +!@T69&)M!"%"lQPMFc3!"!,'D@0c)`!%!`**3diM!!3$2QPME$3!"!0k4%a24`! ! '!lC'6dj8!!-%#NC26N3!!33k3e958`!)"&*ZD$-a!!!%[NC548B!"!6+3Nj%6!! ! !"3C048j9!"-&%Ne195-!!3B#GQ9bF`!""KT69&)J!!!'-J#!!#d!!!"i!!!!!!# ! "!!!!!!!!!!!!!!##!!J!!!!J!!!!!!#$!!m!!!$H!!!!!!#%!"F!!!"!!!!!!!# ! &!"`!!!"D!!!!!!#'!#%!!!%#!!!!!!#(!+S!!$dD!!!!!!#!!$)!!!#H!!!!!!# ! "!6F!!&+`!!!!!!#!!$F!!#BS!!!!!!#"!%%!!#C#!!!!!!#"rrmJ!!MJ!!!!!!# ! !rrm!!&8M!!!!!"1)rrm!!&8e!!!!!"1*rrm!!%@6!!!!!!#"rrmJ!!M`!!!!!!# ! !rrm!!!b-!!!!!!##rrm!!!lq!!!!!!#)rrm!!!jf!!!!!!#&rrm!!!dL!!!!!!# ! 'rrm!!!ei!!!!!!#(rrm!!!hJ!!!!!!#*rrm!!!q!!!!!!"1)rrm!!&5M!!!!!"1 ! *rrm!!&6E!!!!!"G`rrm!!&,r!!!!!!#!!*`J!!%Q!!!!!!#$!-8!!&"(!!!!!!# ! %!-N!!&2A!!!!!!#&!-i!!&2f!!!!!!#'!0-!!&$E!!!!!!#(!0N!!&3J!!!!!!# ! )!0d!!&4a!!!!!!#*!1-!!&9(!!!!!!$*!1J!!&%(!!!!!!$+!28!!&&`!!!!!!$ ! ,!3%!!&'@!!!!!!$-!3S!!&'m!!!!!!$0!4!!!&(F!!!!!!$1!4B!!&(m!!!!!!$ ! 2!4`!!&)F!!!!!!$3!5)!!&)m!!!!!!$)!5J!!&*@!!!!!!$4!5m!!&+F!!!!!!2 ! Srrm!!!&!!!!!!!2Trrm!!!(%!!!!!!2Urrm!!!r`!!!!!!2VrrmJ!$em!!!!!!2 ! XrrmJ!$i!!!!!!!2Srrm!!!*)!!!!!!2Trrm!!!+-!!!!!!2Urrm!!!T%!!!!!!2 ! VrrmJ!$k%!!!!!!2XrrmJ!$l)!!!!!!2Srrm!!!,3!!!!!!2Trrm!!!28!!!!!!2 ! Urrm!!!P!!!!!!!2VrrmJ!$m-!!!!!!2XrrmJ!%!3!!!!!!2Srrm!!!6B!!!!!!2 ! Trrm!!!EF!!!!!!2Urrm!!!U)!!!!!!2VrrmJ!%%8!!!!!!2XrrmJ!%-B!!!!!!# ! )!%N!!!jD!!!!!!#(!&B!!!c1!!!!!!#'!&)!!!cU!!!!!!#&!%m!!!d'!!!!!!# ! *!&X!!!pN!!!!!!##!'N!!!bb!!!!!"G`!6`!!%@P!!!!!%Z*rrmJ!""d!!!!!%Z ! -rrm!!"S!!!!!!%`*!)3J!#DL!!!!!%`-!*%J!#pS!!!!!!#A!(!%!#AL!!!!!!# ! B!(N%!#CF!!!!!!)!rrmJ!$a#!!!!!!)$rrmJ!$b+!!!!!!)%rrmJ!$c5!!!!!!) ! &rrmJ!$U5!!!!!!)(rrmJ!$VD!!!!!!)"rrmJ!$XL!!!!!!)'rrmJ!$YU!!!!!!) ! )rrmJ!$Zb!!!!!!)#rrmJ!$[k!!!!!!!!rrmJ!$dq!!!!!!#!rrmJ!%8F!!!!!!# ! "rrmJ!%8R!!!!!!##rrmJ!%8b!!!!!!#$rrmJ!%8p!!!!!!#%rrmJ!%9)!!!!!!# ! !rrmJ!%96!!!!!!#"rrm!!%@q!!!!!!##rrm!!%Ce!!!!!!#$rrm!!%E"!!!!!!# ! %rrm!!%Ga!!!!!!#!rrm!!%IS!!!!!!#&rrm!!%J@!!!!!!#'rrm!!%MJ!!!!!!# ! (rrm!!%Pf!!!!!!#)rrm!!%S0!!!!!!#*rrm!!%V+!!!!!!$+rrm!!%Z&!!!!!!$ ! ,rrm!!%`8!!!!!!$-rrm!!%b3!!!!!!!!cIrr!!"-p`!!!!!!c[rr!!"0AJ!!!!! ! !crrr!!"0a3!!!!!!bIrr!!"1,!!!!!!!d2rr!!"1QJ!!!!!!b2rr!!"1l`!!!!! ! !dIrr!!"2K!!!!!!!J!#e&!"2j`!!!!!!J3#p&!"3&`!!!!!!!Irr)!"9S`!!!!! ! !![rr)!"9dJ!!!!!!J!&#!!"9L`!!!!!(6@9cFf&RC3C6G'&dGA-(4(9ZCf9[EJ4 ! 0C@je"&4PH(3,4'PKCfj[Fh4TBh-%6P9-6!41G@e`#99ZFfKTCR4PC!G6D'PQG'9 ! N"APZ6Q&a!RPZ!hPZF34jEQ&a$90YB@aX)%GPG'aTEQ8'8(*[EA"d#%KKBfY'Efj ! d#P"65'&MDdC[ER3-8&0)B@0V4QpZG#!j#P"65'&MDdC[ER306@PcBbiJ8h4bD@j ! RF`T89&NJ9fPZC'ph"fePER9LBA)(Fh9LE@9ZG30,BQ3%5'9XF!4*EQC["89aG@P ! `!d&MG!90B@GTB`4#DA4c$'0[ER4bEf`JDf9jF`Y`G@jMG(9KG'P[EJKLFQ&MDf9 ! dF`9K)#dJE39Z)#dJHJ9")#dJ6391)#dJ@J8`)#dJ13ChDATKFQ3(Bh9bFQ9ZG!4 ! 06P8M"90dBA*d$P"bC@BJ4QPXC5"1B@ePI(8: *** Old/sys/mac/README Tue May 28 17:36:00 1996 --- sys/mac/README Thu May 23 16:17:55 1996 *************** *** 1,10 **** ! 12 March, 1996 ! NetHack 3.2.0 was built with Metrowerk's DR7 compiler on a PPC system. ! The official 68K and PPC versions were compiled with PowerPC Alignment ! to share files (Why not 68K alignment? -- Because the space saving is ! small and the PowerPC version will run better.). The 68K version ! was compiled with 4 byte ints using the far model. Only the Metrowerks compiler has been used to compile the code in a long time. It is _very_ likely that the other compilers, Think C and --- 1,14 ---- ! 23 May, 1996 ! NetHack 3.2.1 was built with Metrowerk's DR8 compiler on a PPC system. ! The official 68K and PPC versions were compiled with 68K Alignment ! to share files. The 3.2.0 versions were compiled with PPC alignment, ! but it was discovered that the Metrowerks 68K compiler has a bug with ! PPC alignment and structures that can be aligned to a single byte. This ! bug _may_ be fixed in DR10, it is not fixed in DR9. Why bother with PPC ! alignment at all? Because the space saving from 68K alignment is small ! and the PowerPC version will run better. The 68K version was compiled ! with 4 byte ints using the far model. Only the Metrowerks compiler has been used to compile the code in a long time. It is _very_ likely that the other compilers, Think C and *** Old/sys/mac/macwin.c Tue May 28 17:36:26 1996 --- sys/mac/macwin.c Tue May 14 16:01:16 1996 *************** *** 53,58 **** --- 53,59 ---- static void topl_set_def(int new_def_idx); static void adjust_window_pos(NhWindow *aWin, WindowPtr theWindow, short w); static void mac_cliparound (int x, int y); + static pascal void FrameItem(DialogPtr dlog, short item); #ifndef USESROUTINEDESCRIPTORS /* not using universal headers */ *************** *** 128,133 **** --- 129,135 ---- static Boolean cursor_locked = false ; static ControlActionUPP UpUPP, DownUPP; /* scrolling callbacks, initialized in InitMac */ + static UserItemUPP FrameItemUPP; void lock_mouse_cursor(Boolean new_cursor_locked) *************** *** 383,388 **** --- 385,391 ---- UpUPP = NewControlActionProc(Up); DownUPP = NewControlActionProc(Down); + FrameItemUPP = NewUserItemProc(FrameItem); } *************** *** 1617,1623 **** DoScrollBar ( Point p , short code , ControlHandle theBar , NhWindow * aWin , WindowPtr theWindow ) { ! ControlActionUPP func; winToScroll = aWin ; switch ( code ) { --- 1620,1626 ---- DoScrollBar ( Point p , short code , ControlHandle theBar , NhWindow * aWin , WindowPtr theWindow ) { ! ControlActionUPP func = NULL; winToScroll = aWin ; switch ( code ) { *************** *** 2723,2729 **** void ! mac_add_menu ( winid win , int glyph, const anything *any , CHAR_P menuChar , int attr , const char * inStr , int preselected) { long addSize ; int newWid ; --- 2726,2732 ---- void ! mac_add_menu ( winid win , int glyph, const anything *any , CHAR_P menuChar , CHAR_P groupAcc, int attr , const char * inStr , int preselected) { long addSize ; int newWid ; *************** *** 2925,2931 **** InsetRect ( & r , -4 , -4 ) ; r2 = r ; GetDItem ( dlog , frame , & kind , & h , & r ) ; ! SetDItem ( dlog , frame , kind , ( Handle ) FrameItem , & r2 ) ; frame_corner = 16 ; } --- 2928,2934 ---- InsetRect ( & r , -4 , -4 ) ; r2 = r ; GetDItem ( dlog , frame , & kind , & h , & r ) ; ! SetDItem ( dlog , frame , kind , ( Handle ) FrameItemUPP , & r2 ) ; frame_corner = 16 ; } *** Old/sys/mac/mrecover.c Tue May 28 17:36:39 1996 --- sys/mac/mrecover.c Thu May 23 16:17:39 1996 *************** *** 36,45 **** * - Share AppleEvents with NetHack to auto-recover crashed games. */ - #if 1 - /************************************************************************\ - * (1) precompile header => mrecover.h, (0) compile code - \************************************************************************/ /**** Toolbox defines ****/ --- 36,41 ---- *************** *** 69,74 **** --- 65,71 ---- #include #include #include + #include #ifndef __MWERKS__ /* glue for System 7 Icon Family call (needed by Think C 5.0.4) */ pascal OSErr GetIconSuite(Handle *theIconSuite, short theResID, long selector) *************** *** 200,211 **** unsigned char versStr[]; /* (small string)(large string) */ } versXRec, *versXPtr, **versXHandle; - #else - /************************************************************************\ - * compile source code - \************************************************************************/ - #include "mrecover.h" /**** Global variables ****/ modeFlags in = {1}; /* in Front */ --- 197,203 ---- *************** *** 230,235 **** --- 222,229 ---- Ptr pIOBuf; /* read/write buffer pointer */ short vRefNum; /* SFGetFile working directory/volume refnum */ long dirID; /* directory i.d. */ + NMUPP nmCompletionUPP; /* UPP for nmCompletion */ + FileFilterUPP basenameFileFilterUPP; /* UPP for basenameFileFilter */ #define CREATOR 'nh31' /* NetHack signature */ #define SAVETYPE 'SAVE' /* save file type */ *************** *** 302,316 **** InitWindows(); InitMenus(); TEInit(); ! InitDialogs((ResumeProcPtr) 0); InitCursor(); /* get system environment, notification requires 6.0 or better */ (void) SysEnvirons(curSysEnvVers, &sysEnv); if (sysEnv.systemVersion < 0x0600) { ParamText("\pAbort: System 6.0 is required", "\p", "\p", "\p"); ! (void) Alert(alidNote, (ModalFilterProcPtr) 0L); ExitToShell(); } --- 296,312 ---- InitWindows(); InitMenus(); TEInit(); ! InitDialogs(0L); InitCursor(); + nmCompletionUPP = NewNMProc(nmCompletion); + basenameFileFilterUPP = NewFileFilterProc(basenameFileFilter); /* get system environment, notification requires 6.0 or better */ (void) SysEnvirons(curSysEnvVers, &sysEnv); if (sysEnv.systemVersion < 0x0600) { ParamText("\pAbort: System 6.0 is required", "\p", "\p", "\p"); ! (void) Alert(alidNote, (ModalFilterUPP) 0L); ExitToShell(); } *************** *** 335,340 **** --- 331,337 ---- in.Front = (wnEvt.message & resumeFlag); } + #if 0 // ??? /* clear out the Finder info */ { short message, count; *************** *** 343,357 **** while(count) ClrAppFiles(count--); } /* fill out the notification template */ nmt.nmr.qType = nmType; nmt.nmr.nmMark = 1; nmt.nmr.nmSound = (Handle) -1L; /* system beep */ nmt.nmr.nmStr = nmt.nmBuf; ! nmt.nmr.nmResp = nmCompletion; nmt.nmr.nmPending = (long) &in.Notify; /* prepend app name (31 chars or less) to notification buffer */ { short apRefNum; --- 340,369 ---- while(count) ClrAppFiles(count--); } + #endif /* fill out the notification template */ nmt.nmr.qType = nmType; nmt.nmr.nmMark = 1; nmt.nmr.nmSound = (Handle) -1L; /* system beep */ nmt.nmr.nmStr = nmt.nmBuf; ! nmt.nmr.nmResp = nmCompletionUPP; nmt.nmr.nmPending = (long) &in.Notify; + + #if 1 + { + /* get the app name */ + ProcessInfoRec info; + ProcessSerialNumber psn; + + info.processInfoLength = sizeof(info); + info.processName = nmt.nmBuf; + info.processAppSpec = NULL; + GetCurrentProcess(&psn); + GetProcessInformation(&psn, &info); + } + #else /* prepend app name (31 chars or less) to notification buffer */ { short apRefNum; *************** *** 359,364 **** --- 371,377 ---- GetAppParms(* (Str255 *) &nmt.nmBuf, &apRefNum, &apParams); } + #endif /* add formatting (two line returns) */ nmt.nmBuf[++(nmt.nmBuf[0])] = '\r'; *************** *** 576,582 **** /* in front and no error so use an alert */ ParamText(msg, "\p", "\p", "\p"); ! (void) Alert(alertID, (ModalFilterProcPtr) 0L); ResetAlrtStage(); memActivity++; --- 589,595 ---- /* in front and no error so use an alert */ ParamText(msg, "\p", "\p", "\p"); ! (void) Alert(alertID, (ModalFilterUPP) 0L); ResetAlrtStage(); memActivity++; *************** *** 990,997 **** SFTypeList levlType = {'LEVL'}; SFReply sfGetReply; ! SFGetFile(sfGetWhere, "\p", &basenameFileFilter, 1, levlType, ! (DlgHookProcPtr) 0L, &sfGetReply); memActivity++; --- 1003,1010 ---- SFTypeList levlType = {'LEVL'}; SFReply sfGetReply; ! SFGetFile(sfGetWhere, "\p", basenameFileFilterUPP, 1, levlType, ! (DlgHookUPP) 0L, &sfGetReply); memActivity++; *************** *** 1404,1407 **** return; } } ! #endif --- 1417,1420 ---- return; } } ! *** /dev/null Tue May 28 17:36:43 1996 --- sys/mac/mrecover.hqx Thu May 23 16:16:17 1996 *************** *** 0 **** --- 1,70 ---- (This file must be converted with BinHex 4.0) ! :%QebC@0[GQ9b,R"bEfSZFR0bB`"bFh*M8P0&4!!!!!!!!!!!$)Gl5J!!!!!"!!! ! !#SJ!!!Q)!!!"r`!!Bk-+B80XDfPZDA3ZBi!#!!!!9%9B9%Y"5%`"!!!`%QebC@0 ! [GQ9b,R"bEfSZFR0bBh)#!!)!FR0bBe*6483#!(*cFQ058d9%!3$rrrrr!!!!!!! ! !!!!!!!!!!!!!!*C[VC2TdJ!!!!!!!!b(!!!!!!!!!!!3!!!!Bk-+B80XDfa[Eh! ! ZBi!#!!!!9%9B9%Y"5%`"!!"J!'`!!!!!BkX!!!!!@,8!!&`!!!!!!!!!!!!!!+2 ! V#E@P"lK(!!!!!(GT!!!!!!!!!!!!!!!!!!!!!$e9!"F!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!#)!!3!!!!!!1!"Z!%`!jJ3#6dX!!!!!!!S!#J!U!8U)!Pi ! `!!!!$!!S!#J!JJ&m!)!!"!!!!!`!+!!S!-)"I!#"!!3!!!")!))!!!!!!!!!!2r ! rrrX%4@4TG!49EQ4[!&S!!!%Y!!!!!!0$GA3!@!!!"%0[F(N!3`!!"9"KFh4P!&B ! !!!9$E'9KFJ!!!!!!!!!!1!#!!!!!!!!!!!$rrrrh!4333@*[GA3J8Q9MEhCPFLi ! Z,J!!!!!(5'9XF#iZ,J!!!!!",3!!!!!!!!!!4!!!!m!#`!2!!B!$`!``#"!3+"" ! )&iJ3#!J3$$!$`!!!!m!(i!IJ"q!$`!r`(rJIq$rm2r`rr$rm(rJIq!r`!m!!#3! ! (!!!!3!D!$X"Qi$GJ(m"2c2i5rbVTe1b)+4!bX!9B")`$"!!!(m"rm(rirrcrr[r ! qrrrrrrrrrrprrhrr2rmIrJrq!rJ!!!!FEQK5B`!!!!&'8N9'!!!!!!#!5801)`! ! !!!!!J!!!!!G"8&"-!!!!!!!!&"0%BACTC#")B@PbFh4[EL!c,cNc!!!"!!!!!!! ! !(`!!!(r!!#"r`!!i2l!!&$p`!")iq!!*0hJ!"2pi!!*rZ!!"2rJ!BCri!2r--1$ ! rj!%`l[)#N!$Tq393pq@+S1rMe8"1i5+!!H$*!!r`JJ!2m53!"m++!!!&@3!!#U5 ! !!"9#3!!5J@!!'3$3!!i!8!!!!$!!!!!!!!!!!!rr!!!rrm!!Irr`!(rrq!$rrr` ! !rrrq!2rrr`$rrrq!rrrr`2rrrq$rrrr`rrrrq2rrrrcrrrrmrrrrr[rrrrlrrrr ! rIrrrrhrrrrmrrrrr2rrrrarrrrm2rrrr"rrrr`2rrrm"rrrr!2rrr`"rrrm!2rr ! q!"rrrJ!(rr`!!Ir`!!!#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2rrr`!!!!!!!!! ! !!!!!!!m4%4(r!!!!!!!!!!$`!!!2%4%4(`!!!!!!!!!!rr!!!2%4%4rr!!!!!!! ! !!!rI!!$a%4(a(`!!!!!!!!!2hI!!m4rr%4(`!!!!!!!!!2hI!2(a%I%4m!!!!!! ! !!!!2hIm4%4(a%I!!!!!!!!!!!2hI%4%4(a(`!!!!!!!!!!!2hI%4%4%4m!!!!!! ! !$r!!$rhI%Irr%I!!!!!!!2%Irr%IhIm!!2m!!2r`!!$a%4%4%IhI!!!!!!p%r`! ! !m4m4(a%IhI!!!!$dp%m!!2%I(r%4rrhI!!!26dp2!!$a%I%4%I!2d2!!p26dm!! ! !m4m4%4(`!2!2$dp26`!!!!rr%4m4m!!2hI4%p2!!!!!!$rra%I!!!2p%p%m!!!! ! !!!m4%4%I!!$d4%6`!!!!!!!2m4%4(`!24242!!!!!!!!!!rrrr!!p24%rI!!!!! ! !!!!!!!!!$dp26rhI!!!!!!!!!!!!!26dp2!2hI!!!!!!!!!!!!p26dm!!2hI!!! ! !!!!!!!!2426`!!!2d2!!!!!!!!!!$r42!!!!!2$I!!!!!!!!!!$rm!!!!!!2h`! ! !!!!!!!!!!!!!!!!!!2m!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!J!!!$rr`!!!!!!$a(am!!!!0d!mI%I!!!!$G$a(am!!!!!hI%4m!!!!2!0h ! rr`$r!2(rrG!!$d6`m4%Ih3$dp2$a(am0hdp2!2rr(`$d42!!!!$`$d42!!!!!!$ ! dp2d!!!!!$dp2$G!!!!!242!!h3!!!!$r!!!0!!!!!!!!!!!!!!!!)!D!$X"Qi$G ! J(m"2c2i5rbVTe1b)+4!bX!9B")`$"!!!!!!!pJ!"!!!!!!"i!'i!M!$Q"!*25`! ! !!!!!#J!+!'S"5SM9-5NJ8f9XC@0d)#*2F'9Z,LiZ)L"QFQpY)(4SC5"'D@aP)'e ! PER8Z$6)T)&0PE'9MG#"dD'8JCf&YC5"dEb"bC@0[GQ9b)'CbEfdJG'KP)'4TB@a ! [Cbi0-bNJ9f&TG#"QEh)JG'KP)(*PFh9XG#!S6dXJEh)J8fpbFRNT,Jd04'mJEQp ! d)'&dG'9YF(3JG'mJFQ9MEhCPFL"K)'GKE@8JG'KKG#"TFb!LD@iJF(*[Ch*PFh- ! L)#KT,Q8Z)(0dD@aX)(*eEQjTEQFJD@iJ6Q9d5'&MDbNK!!!!!%)!J3!!!!!!!!! ! !rrrrk`4'D@aP"dp`C@iZ,Li!6`!!!5d!!!!!#%0XEh0P)%4"!&F!!!%Y!!!!!!4 ! 4G@Pd!&%!!!!!!!!8!!!!"!!!J!!!!$!!!!!3!!!!3!!!!!"#"&"bDAC'9e*%"d0 ! XC@&ZGA"%9e*%"e"bC@9YF(4%6%j("eGKFQjTEQG%6%j("8&LEh*d4%a14`C*6b" ! #G@C%6%j(!!!!4!!!!m!$3!2!!B!"J!*!"'!%)!4J"D!%)!4J!N!"J!!!!m!(i!I ! J"q!$`!2!"q!2m!r`$r!2m!r`$r!(i!2!!B!!#3!(!!!!4!!!!m!#`!2!!B!"J!* ! !!m!#3!I!"N!$`!*!!m!"J!!!!m!(i!IJ"q!$`!2!"q!(i!IJ$q!2i!IJ"q!(i!2 ! !!B!!#3!(!!!!(3!S!#J!3!&!!!3!!!!!!!!!!!%!#&"bEfGbCA0c!!!!%!!!!!! ! !!!!(!!X!%3%0J!!!!!"%!!!$`!0!!m!"J!'!!N!'B!3J"Q!&S!BJ"'!$3!'!!!! ! $`!IJ"q!(i!2!!m!(i!r`$r!2m!r`$r!2m!IJ!m!"J!!*!!F!!!"%!!!$`!0!!m! ! "J!'!!d!')!9J"5!&B!8J"@!#3!'!!!!$`!IJ"q!(i!2!!m!(i!r`$r!2m!r`$r! ! 2m!IJ!m!"J!!*!!F!!!"%!!!$`!,!!m!"J!'!!N!$`!*!!q!#B!2!!N!$`!'!!!! ! $`!IJ"q!(i!2!!m!(i!IJ"q!(m!I`"q!(i!IJ!m!"J!!*!!F!!!"%!!!$`!,!!m! ! "J!1!$j!!$"!CQ"QB'CJCQ!Q3!!`3!m!!!!2!"q!(i!IJ!m!2m"ri(rJrr$rm2r` ! rr"ri(rJ2m!2!!!N!"`!!!%3!!!2!!d!$`!'!!B!$`!8J"U!%S!DJ"+!'S!0!!B! ! !!!2!"q!(i!IJ!m!$`!IJ$r!2m!r`$r!2m!r`"q!$`!'!!!N!"`!!!%3$)B!!!!! ! &-bib,M%h8Q9MEhCPFL!c,M)Z-5!J)#!S05mj0LN0EQ9dD'&MDbeLG@Gc3'aTEQ- ! ZBfPc,R9`C@jZ,Q9NG3!!!#3$)B!!!!!&-bib,M%A8Q9MEhCPFL!c,M)Z-5!J)#! ! S05mj0LN!!!%!!!!+L!!!#BJ!!!(r!Q*)T"E'!!!!(!(k!!p"6&*8!!%!JN4*9%` !!J#D689193!#!,j$99*6!!F!iNP$6L-!!!&#D@0c)`!!!8j#6N4-!!!"@QjS8Q- !!!&Q4P*&4J!!!A*fCA*c!!%"IQPME$3!!!'@D@0c0!!!!D*65801!!!"VQePE8) ! !!!'k9%e36!!!!FC%6%p(!!!"dJ#!rrm!!!!Q!!!!!!#"rrm!!!!f!!!!!!#!rrm ! J!!!!!!!!!!#"rrmJ!!90!!!!!!%!rrmJ!!HF!!!!!!##rrm!!!"'!!!!!!#!rrm ! !!!#5!!!!!!#"rrm!!!C(!!!!!!#!rrm8!!$1!!!!!!#"rrm8!!EV!!!!!!##rrm ! 8!!Fc!!!!!!#(rrm8!!H`!!!!!!#&rrm8!!Ii!!!!!!#'rrm8!!K!!!!!!!#%rrm ! 8!!L)!!!!!!#$rrm8!!M3!!!!!!#!rrm!!!'G!!!!!!#!rrm!!!%@!!!!!!#!rrm ! !!!&D!!!!!!!!rrm!!!'&!!!!!!#!rrm!!!&k!!!!!!!"rrm!!!NB!!!!!!!#rrm ! !!!PJ!!!!!!#!rrm!!!+K!!!!!!#!rrm!!!5P!!!!!!#!rrm!!!8T!!!!!!#!rrm ! 8!!D0!!!!!!#!!!!!!!DP!!!!!!%!rrm!!!Gl!!!!!!4YC@e#P9!: *** Old/sys/msdos/Makefile.BC Tue May 28 17:37:19 1996 --- sys/msdos/Makefile.BC Tue May 14 19:27:15 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)Makefile.BC 3.2 96/04/01 # Copyright (c) Yitzhak Sapir, 1996. # NetHack may be freely distributed. See license for details. # --- 1,4 ---- ! # SCCS Id: @(#)Makefile.BC 3.2 96/05/14 # Copyright (c) Yitzhak Sapir, 1996. # NetHack may be freely distributed. See license for details. # *************** *** 677,683 **** $(O)mkmaze.o $(O)mkmap.o $(O)end.o $(O)o_init.o \ $(O)options.o $(O)rip.o $(O)sound.o $(O)teleport.o \ $(O)topten.o $(O)tty.o $(O)u_init.o $(O)extralev.o \ ! $(O)sp_lev.o $(O)dig.o OVL0 = $(O)allmain.0 $(O)apply.0 $(O)artifact.0 $(O)attrib.0 \ $(O)botl.0 $(O)cmd.0 $(O)dbridge.0 $(O)do.0 \ --- 677,683 ---- $(O)mkmaze.o $(O)mkmap.o $(O)end.o $(O)o_init.o \ $(O)options.o $(O)rip.o $(O)sound.o $(O)teleport.o \ $(O)topten.o $(O)tty.o $(O)u_init.o $(O)extralev.o \ ! $(O)sp_lev.o $(O)dig.o $(O)pckeys.o OVL0 = $(O)allmain.0 $(O)apply.0 $(O)artifact.0 $(O)attrib.0 \ $(O)botl.0 $(O)cmd.0 $(O)dbridge.0 $(O)do.0 \ *************** *** 1516,1521 **** --- 1516,1524 ---- $(O)sound.o: $(PCH0) $(MSYS)\sound.c $(HACK_H) $(INCL)\portio.h $(CC) $(FLAGUO) $$($(@B)_o) $(COBJNAM)$@ $(MSYS)\sound.c + + $(O)pckeys.o: $(PCHO) $(MSYS)\pckeys.c $(HACK_H) $(PCVIDEO_H) + $(CC) $(FLAGUO) $$($(@B)_o) $(COBJNAM)$@ $(MSYS)\pckeys.c $(O)video.0: $(PCH0) $(MSYS)\video.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ $(TILE_H) *** Old/sys/msdos/Makefile.GCC Tue May 28 17:37:24 1996 --- sys/msdos/Makefile.GCC Wed May 22 17:43:41 1996 *************** *** 193,199 **** VOBJ22 = dlb.o dig.o teleport.o SOBJ = msdos.o sound.o sys.o tty.o unix.o video.o \ ! vidtxt.o VVOBJ = version.o --- 193,199 ---- VOBJ22 = dlb.o dig.o teleport.o SOBJ = msdos.o sound.o sys.o tty.o unix.o video.o \ ! vidtxt.o pckeys.o VVOBJ = version.o *************** *** 383,388 **** --- 383,389 ---- if exist $(SRC)\termcap.c del $(SRC)\termcap.c if exist $(SRC)\tile2bin.c del $(SRC)\tile2bin.c if exist $(SRC)\msdos.c del $(SRC)\msdos.c + if exist $(SRC)\pckeys.c del $(SRC)\pckeys.c if exist $(SRC)\video.c del $(SRC)\video.c if exist $(SRC)\sound.c del $(SRC)\sound.c if exist $(SRC)\tilemap.c del $(SRC)\tilemap.c *************** *** 877,882 **** --- 878,887 ---- msdos.o : $(HACK_H) $(MSYS)\msdos.c copy $(MSYS)\msdos.c . $(CC) $(CFLAGS) -o$@ msdos.c + + pckeys.o : $(HACK_H) $(MSYS)\pckeys.c + copy $(MSYS)\pckeys.c . + $(CC) $(CFLAGS) -o$@ pckeys.c pctiles.o : $(HACK_H) $(MSYS)\pctiles.c $(INCL)\portio.h copy $(MSYS)\pctiles.c . *** Old/sys/msdos/Makefile.MSC Tue May 28 17:37:28 1996 --- sys/msdos/Makefile.MSC Tue May 14 19:27:17 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)Makefile.MSC 3.2 96/04/01 # Copyright (c) NetHack PC Development Team, 1996. # NetHack may be freely distributed. See license for details. # --- 1,4 ---- ! # SCCS Id: @(#)Makefile.MSC 3.2 96/05/14 # Copyright (c) NetHack PC Development Team, 1996. # NetHack may be freely distributed. See license for details. # *************** *** 718,724 **** $(O)mkmaze.o $(O)mkmap.o $(O)end.o $(O)o_init.o \ $(O)options.o $(O)rip.o $(O)sound.o $(O)teleport.o \ $(O)topten.o $(O)tty.o $(O)u_init.o $(O)extralev.o \ ! $(O)sp_lev.o $(O)dig.o OVL0 = $(O)allmain.0 $(O)apply.0 $(O)artifact.0 $(O)attrib.0 \ $(O)botl.0 $(O)cmd.0 $(O)dbridge.0 $(O)do.0 \ --- 718,724 ---- $(O)mkmaze.o $(O)mkmap.o $(O)end.o $(O)o_init.o \ $(O)options.o $(O)rip.o $(O)sound.o $(O)teleport.o \ $(O)topten.o $(O)tty.o $(O)u_init.o $(O)extralev.o \ ! $(O)sp_lev.o $(O)dig.o $(O)pckeys.o OVL0 = $(O)allmain.0 $(O)apply.0 $(O)artifact.0 $(O)attrib.0 \ $(O)botl.0 $(O)cmd.0 $(O)dbridge.0 $(O)do.0 \ *************** *** 1573,1578 **** --- 1573,1581 ---- $(O)sound.o: $(PCH0) $(MSYS)\sound.c $(HACK_H) $(INCL)\portio.h $(CC) $(FLAGUO) $(CCSNAM)$(@F) $(COBJNAM)$@ $(MSYS)\sound.c + + $(O)pckeys.o: $(PCHO) $(MSYS)\pckeys.c $(HACK_H) $(PCVIDEO_H) + $(CC) $(FLAGUO) $(CCSNAM)$(@F) $(COBJNAM)$@ $(MSYS)\pckeys.c $(O)video.0: $(PCH0) $(MSYS)\video.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ $(TILE_H) *** /dev/null Tue May 28 17:37:34 1996 --- sys/msdos/Makefile.SC Tue May 28 16:58:51 1996 *************** *** 0 **** --- 1,925 ---- + # SCCS Id : @(#)Makefile.SC 3.2 96/02/03 + # Copyright (c) NetHack Development Team 1996. + # + # Symantec C compiler V7.2 + # Written for Symantec SMAKE utility + # + # For questions or comments : nethack-bugs@linc.cis.upenn.edu + # + # In addition to your C compiler, + # + # if you want to change you will need a + # files with suffix workalike for + # .y yacc + # .l lex + # + + # Game Installation Variables + # NOTE : Make sure GAMEDIR exists before make is started. + + GAME = nethack + # The GNU Make has a problem if you include a drive spec below (unfortunately). + GAMEDIR = c:\games\nethacks + + # + # Directories, gcc likes unix style directory specs + # + + DDAT = ../dat + DUTIL = ../util + DSRC = ../src + + # But we must use dos directory specs to find src files, so.... + + DAT = ..\dat + DOC = ..\doc + INCL = ..\include + MSYS = ..\sys\msdos + SRC = ..\src + SSHR = ..\sys\share + UTIL = ..\util + WIN = ..\win\tty + WSHR = ..\win\share + + # + # Executables. + + CC = sc + LINK = link + MAKEBIN = smake + + # if you have a uudecode program, add its name here + # otherwise leave blank + UUDECODE = + + + # + # Special libraries and how to link them in. + + LIBS = + + # To build a DOS-extended executable uncomment the top line. + # To build a WIN32 console executable uncomment the second line. + + TARGENV=DOS_EXTENDED + #TARGENV=WIN32_CONSOLE + + # + # Yacc/Lex ... if you got 'em. + # + # If you have yacc/lex or a work-alike set YACC_LEX to Y + # + YACC_LEX = N + + # If YACC_LEX is Y above, set the following to values appropriate for + # your tools. + # + YACC = bison -y + LEX = flex + YTABC = y_tab.c + YTABH = y_tab.h + LEXYYC = lexyy.c + + # + # Uncomment the line below if you want to store all the level files, + # help files, etc. in a single library file. + + USE_DLB = N + + ############################################################################# + # + # nothing below this line should have to be changed + # + + GAMEFILE = $(GAMEDIR)\$(GAME).exe + + LIBRARIES = $(LIBS) $(TERMLIB) + + # Changing this conditional block is not recommended + !IF "$(USE_DLB)"=="Y" + DLBFLG = -DDLB + !ELSE + DLBFLG = + !ENDIF + + ####################################### + !IF "$(TARGENV)"=="DOS_EXTENDED" + + # DOS Extended Executable + # Flags. + # + # Debugging + CFLAGS = -c -Nc -w- -w2 -w3 -mx -g -I../include $(DLBFLG) + LFLAGS = /NOI /XREF /DETAILED /DEBUG cx + # Normal + #CFLAGS = -c -Nc -w- -w2 -w3 -mx -I../include $(DLBFLG) + #LFLAGS = /NOI /MAP cx + + !ELSE + + # WIN32 Console Executable + # Flags. + # + # Debugging + #CFLAGS = -c -o -Nc -w- -w2 -w3 -mx -g -gt -I../include $(DLBFLG) + #LFLAGS = /NOI /XREF /DETAILED /DEBUG cx + + # Normal + CFLAGS = -c -o -Nc -w- -w2 -w3 -mx -gt -I../include $(DLBFLG) + LFLAGS = /NOI /MAP cx + !ENDIF + + # + # Utility Objects. + # + + MAKEOBJS = makedefs.o monst.o objects.o + + SPLEVOBJS = lev_yacc.o lev_$(LEX).o lev_main.o alloc.o \ + monst.o objects.o panic.o \ + drawing.o decl.o + + DGNCOMPOBJS = dgn_yacc.o dgn_$(LEX).o dgn_main.o alloc.o \ + panic.o + + RECOVOBJS = recover.o + + # Tile related object files. + + TILOBJ = tile.o pctiles.o vidvga.o + + TEXTIO = tiletext.o tiletxt.o drawing.o decl.o monst.o objects.o + + TEXTIO2 = tiletex2.o tiletxt2.o drawing.o decl.o monst.o objects.o + + PLANAR_TIB = NetHack1.tib + + OVERVIEW_TIB = NetHacko.tib + + #TILEUTIL = $(TILOBJ) $(UTIL)\tile2bin.exe $(UTIL)\til2bin2.exe \ + # $(PLANAR_TIB) $(OVERVIEW_TIB) + + TILEUTIL = + + TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt + + TILEFILES2 = $(WSHR)\monthin.txt $(WSHR)\objthin.txt $(WSHR)\oththin.txt + + GIFREADERS = gifread.o alloc.o panic.o + + GIFREAD2 = gifread2.o alloc.o panic.o + + GIFWRITERS = gifwrite.o alloc.o panic.o + + GIFWRIT2 = gifwrit2.o alloc.o panic.o + + DLBOBJ = dlb.o + + # Object files for the game itself. + + VOBJ01 = allmain.o alloc.o apply.o artifact.o attrib.o + VOBJ02 = ball.o bones.o botl.o cmd.o dbridge.o + VOBJ03 = decl.o detect.o display.o do.o do_name.o + VOBJ04 = do_wear.o dog.o dogmove.o dokick.o dothrow.o + VOBJ05 = drawing.o dungeon.o eat.o end.o engrave.o + VOBJ06 = exper.o explode.o extralev.o files.o fountain.o + VOBJ07 = getline.o hack.o hacklib.o invent.o lock.o + VOBJ08 = mail.o main.o makemon.o mcastu.o mhitm.o + VOBJ09 = mhitu.o minion.o mkmap.o mklev.o mkmaze.o + VOBJ10 = mkobj.o mkroom.o mon.o mondata.o monmove.o + VOBJ11 = monst.o monstr.o mplayer.o mthrowu.o muse.o + VOBJ12 = music.o o_init.o objects.o objnam.o options.o + VOBJ13 = pickup.o pline.o polyself.o potion.o quest.o + VOBJ14 = questpgr.o pager.o pray.o priest.o read.o + VOBJ15 = rect.o restore.o rip.o rnd.o rumors.o + VOBJ16 = save.o shk.o shknam.o sit.o sounds.o + VOBJ17 = sp_lev.o spell.o steal.o termcap.o timeout.o + VOBJ18 = topl.o topten.o track.o trap.o u_init.o + VOBJ19 = uhitm.o vault.o vision.o vis_tab.o weapon.o + VOBJ20 = were.o wield.o windows.o wintty.o wizard.o + VOBJ21 = worm.o worn.o write.o zap.o light.o + VOBJ22 = dlb.o dig.o teleport.o random.o + + SOBJ = msdos.o sound.o sys.o tty.o unix.o video.o \ + vidtxt.o pckeys.o + + VVOBJ = version.o + + VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ + $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ + $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ + $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ + $(VOBJ21) $(VOBJ22) + + #ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(VVOBJ) + ALLOBJ = $(VOBJ) $(SOBJ) $(VVOBJ) + + # + # Header Objects. + # + + DGN_FILE_H = $(INCL)\align.h $(INCL)\dgn_file.h + DUNGEON_H = $(INCL)\align.h $(INCL)\dungeon.h + EMIN_H = $(DUNGEON_H) $(INCL)\emin.h + EPRI_H = $(DUNGEON_H) $(INCL)\align.h $(INCL)\epri.h + ESHK_H = $(DUNGEON_H) $(INCL)\eshk.h + MONDATA_H = $(INCL)\align.h $(INCL)\mondata.h + MONST_H = $(INCL)\align.h $(INCL)\monst.h + PERMONST_H = $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\align.h \ + $(INCL)\permonst.h + RM_H = $(INCL)\align.h $(INCL)\rm.h + SP_LEV_H = $(INCL)\align.h $(INCL)\sp_lev.h + VAULT_H = $(DUNGEON_H) $(INCL)\vault.h + YOUPROP_H = $(PERMONST_H) $(MONDATA_H) $(INCL)\prop.h \ + $(INCL)\pm.h $(INCL)\youprop.h + YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)\align.h \ + $(INCL)\attrib.h $(INCL)\you.h + DISPLAY_H = $(MONDATA_H) $(INCL)\vision.h $(INCL)\display.h + PCCONF_H = $(INCL)\micro.h $(INCL)\system.h $(INCL)\pcconf.h + CONFIG_H = $(GLOBAL_H) $(INCL)\tradstdc.h $(INCL)\config.h + DECL_H = $(YOU_H) $(INCL)\spell.h $(INCL)\color.h \ + $(INCL)\obj.h $(INCL)\onames.h $(INCL)\pm.h \ + $(INCL)\decl.h + GLOBAL_H = $(PCCONF_H) $(INCL)\coord.h $(INCL)\global.h + HACK_H = $(CONFIG_H) $(DUNGEON_H) $(DECL_H) \ + $(DISPLAY_H) $(INCL)\monsym.h $(INCL)\mkroom.h \ + $(INCL)\objclass.h $(INCL)\trap.h $(INCL)\flag.h \ + $(RM_H) $(INCL)\vision.h $(INCL)\wintype.h \ + $(INCL)\engrave.h $(INCL)\rect.h \ + $(INCL)\trampoli.h $(INCL)\hack.h + DLB_H = $(INCL)\dlb.h + TILE_H = $(INCL)\tile.h $(INCL)\pctiles.h + + !IF "$(USE_DLB)"=="Y" + DLB = dlb + DLBOBJS = dlb_main.o dlb.o alloc.o panic.o + !ELSE + DLB = + DLBOBJS = + !ENDIF + + # + # Make Rules. + # + + .SUFFIXES : .exe .o .c .y .l + + .c.o : + $(CC) $(CFLAGS) -o$@ $< + + # + # Primary Targets. + # + + # The default target. + + default : $(GAMEFILE) + + all : install.tag + + util : utility.tag + + install : install.tag + + utility.tag : $(INCL)\date.h $(INCL)\trap.h $(INCL)\onames.h \ + $(INCL)\pm.h monstr.c vis_tab.c \ + $(UTIL)\lev_comp.exe $(UTIL)\dgn_comp.exe \ + $(UTIL)\recover.exe $(TILEUTIL) + echo utilities made > utility.tag + + gifutil : $(UTIL)\gif2txt.exe $(UTIL)\txt2gif.exe + echo Optional GIF development utilities are up to date. + + install.tag : dat.tag $(GAMEFILE) + !IF "$(USE_DLB)"=="Y" + copy $(DAT)\nhdat $(GAMEDIR) + copy $(DAT)\license $(GAMEDIR) + !ELSE + copy $(DAT)\*. $(GAMEDIR) + copy $(DAT)\*.dat $(GAMEDIR) + copy $(DAT)\*.lev $(GAMEDIR) + copy $(MSYS)\msdoshlp.txt $(GAMEDIR) + if exist $(GAMEDIR)\makefile. del $(GAMEDIR)\makefile. + !ENDIF + copy $(SSHR)\termcap $(GAMEDIR) + copy *.tib $(GAMEDIR) + copy $(SSHR)\NetHack.cnf $(GAMEDIR) + copy $(UTIL)\recover.exe $(GAMEDIR) + copy $(DOC)\guideb*.txt $(GAMEDIR) + echo install done > install.tag + + # The main target. + + $(GAMEFILE) : utility.tag $(ALLOBJ) + $(LINK) /STACK:100000 $(LFLAGS) @<<$(GAME).lnk + $(ALLOBJ:^ =+^ + ) + $(GAMEFILE) + $(GAME); + <thintile.tag + + tile2bin.o : $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h $(INCL)\pcvideo.h \ + $(MSYS)\tile2bin.c + $(CC) $(CFLAGS) -o$@ $(MSYS)\tile2bin.c + + til2bin2.o : $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h $(INCL)\pcvideo.h \ + $(MSYS)\tile2bin.c + $(CC) $(CFLAGS) -DTILE_X=8 -DOVERVIEW_FILE -o$@ $(MSYS)\tile2bin.c + + tiletext.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tiletext.c + $(CC) $(CFLAGS) -o$@ $(WSHR)\tiletext.c + + tiletex2.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tiletext.c + $(CC) $(CFLAGS) -DTILE_X=8 -o$@ $(WSHR)\tiletext.c + + tiletxt.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tilemap.c + $(CC) $(CFLAGS) -DTILETEXT -o$@ $(WSHR)\tilemap.c + + tiletxt2.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tilemap.c + $(CC) $(CFLAGS) -DTILETEXT -DTILE_X=8 -o$@ $(WSHR)\tilemap.c + # + # Optional GIF Utilities (for development) + # + + $(UTIL)\gif2txt.exe : $(GIFREADERS) $(TEXTIO) + $(LINK) $(LFLAGS) $(GIFREADERS) $(TEXTIO) + + $(UTIL)\gif2txt2.exe : $(GIFREAD2) $(TEXTIO2) + $(LINK) $(LFLAGS) $(GIFREAD2) $(TEXTIO2) + + $(UTIL)\txt2gif.exe : $(GIFWRITERS) $(TEXTIO) + $(LINK) $(LFLAGS) $(GIFWRITERS) $(TEXTIO) + + $(UTIL)\txt2gif2.exe : $(GIFWRIT2) $(TEXTIO2) + $(LINK) $(LFLAGS) $(GIFWRIT2) $(TEXTIO2) + + gifread.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\gifread.c + $(CC) $(CFLAGS) -o$@ $(WSHR)\gifread.c + + gifread2.o : $(CONFIG_H) $(INCL)\tile.h gifread.c + $(CC) $(CFLAGS) -DTILE_X=8 -o$@ $(WSHR)\gifread.c + + gifwrite.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\gifwrite.c + $(CC) $(CFLAGS) -o$@ $(WSHR)\gifwrite.c + + gifwrit2.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\gifwrite.c + $(CC) $(CFLAGS) -DTILE_X=8 -o$@ $(WSHR)\gifwrite.c + + # + # Optional tile viewer (development sources only) + # + + $(UTIL)\viewtib.exe : viewtib.o + $(LINK) $(LFLAGS) viewtib.o,$@ + + viewtib.o : $(MSYS)\viewtib.c + $(CC) $(CFLAGS) -o$@ $(MSYS)\viewtib.c + + # + # Other Util Dependencies. + # + + alloc.o : $(CONFIG_H) alloc.c + $(CC) $(CFLAGS) -o$@ alloc.c + + drawing.o : $(CONFIG_H) drawing.c + $(CC) $(CFLAGS) -o$@ drawing.c + + decl.o : $(CONFIG_H) decl.c + $(CC) $(CFLAGS) -o$@ decl.c + + monst.o : $(CONFIG_H) $(PERMONST_H) $(ESHK_H) \ + $(EPRI_H) $(VAULT_H) $(INCL)\monsym.h \ + $(INCL)\color.h monst.c + $(CC) $(CFLAGS) -o$@ monst.c + + objects.o : $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ + $(INCL)\prop.h $(INCL)\color.h objects.c + $(CC) $(CFLAGS) -o$@ objects.c + + panic.o : $(CONFIG_H) $(UTIL)\panic.c + $(CC) $(CFLAGS) -o$@ $(UTIL)\panic.c + + + + + # + # make data.base an 8.3 filename to prevent an nmake warning + # + + DATABASE = $(DAT)\data.bas + + + dat.tag : $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ + $(DAT)\oracles $(DAT)\quest.dat sp_lev.tag $(DLB) + @echo dat done >dat.tag + + $(DAT)\data : utility.tag $(DATABASE) + $(UTIL)\makedefs -d + + $(DAT)\rumors : utility.tag $(DAT)\rumors.tru $(DAT)\rumors.fal + $(UTIL)\makedefs -r + + $(DAT)\quest.dat : utility.tag $(DAT)\quest.txt + $(UTIL)\makedefs -q + + $(DAT)\oracles : utility.tag $(DAT)\oracles.txt + $(UTIL)\makedefs -h + + sp_lev.tag : utility.tag $(DAT)\bigroom.des $(DAT)\castle.des \ + $(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des \ + $(DAT)\medusa.des $(DAT)\oracle.des $(DAT)\tower.des \ + $(DAT)\yendor.des $(DAT)\arch.des $(DAT)\barb.des \ + $(DAT)\caveman.des $(DAT)\elf.des $(DAT)\healer.des \ + $(DAT)\knight.des $(DAT)\priest.des $(DAT)\rogue.des \ + $(DAT)\samurai.des $(DAT)\tourist.des $(DAT)\valkyrie.des \ + $(DAT)\wizard.des + cd $(DAT) + $(UTIL)\lev_comp bigroom.des + $(UTIL)\lev_comp castle.des + $(UTIL)\lev_comp endgame.des + $(UTIL)\lev_comp gehennom.des + $(UTIL)\lev_comp knox.des + $(UTIL)\lev_comp mines.des + $(UTIL)\lev_comp medusa.des + $(UTIL)\lev_comp oracle.des + $(UTIL)\lev_comp tower.des + $(UTIL)\lev_comp yendor.des + $(UTIL)\lev_comp arch.des + $(UTIL)\lev_comp barb.des + $(UTIL)\lev_comp caveman.des + $(UTIL)\lev_comp elf.des + $(UTIL)\lev_comp healer.des + $(UTIL)\lev_comp knight.des + $(UTIL)\lev_comp priest.des + $(UTIL)\lev_comp rogue.des + $(UTIL)\lev_comp samurai.des + $(UTIL)\lev_comp tourist.des + $(UTIL)\lev_comp valkyrie.des + $(UTIL)\lev_comp wizard.des + cd $(SRC) + echo sp_levs done > sp_lev.tag + + $(DAT)\dungeon : utility.tag $(DAT)\dungeon.def + $(UTIL)\makedefs -e + cd $(DAT) + $(UTIL)\dgn_comp dungeon.pdf + cd $(SRC) + # + # DLB stuff + # + dlb : $(UTIL)\dlb_main.exe + cd $(DAT) + copy $(MSYS)\msdoshlp.txt . + @echo data >dlb.lst + @echo dungeon >>dlb.lst + @echo oracles >>dlb.lst + @echo options >>dlb.lst + @echo quest.dat >>dlb.lst + @echo rumors >>dlb.lst + @echo help >>dlb.lst + @echo hh >>dlb.lst + @echo cmdhelp >>dlb.lst + @echo history >>dlb.lst + @echo opthelp >>dlb.lst + @echo wizhelp >>dlb.lst + @echo license >>dlb.lst + @echo msdoshlp.txt >>dlb.lst + for %%N in (*.lev) do echo %%N >>dlb.lst + $(UTIL)\dlb_main cvIf dlb.lst nhdat + cd $(SRC) + + $(UTIL)\dlb_main.exe : $(DLBOBJS) + $(LINK) /STACK:65000 $(LFLAGS) $(DLBOBJS),$@ + + dlb_main.o : $(UTIL)\dlb_main.c $(INCL)\config.h $(DLB_H) + $(CC) $(CFLAGS) -odlb_main.o $(UTIL)\dlb_main.c + + # Game Dependencies + # Some files require movement as Gnu make doesn't like unix style '/' + # directory specs and djgcc doesn't like dos style directory specs. + # So we get to copy stuff where we might need it. Fun eh? + + # sys/share + main.o : $(HACK_H) $(DLB_H) $(SSHR)\pcmain.c + $(CC) $(CFLAGS) -o$@ $(SSHR)\pcmain.c + + tty.o : $(HACK_H) $(INCL)\wintty.h $(SSHR)\pctty.c + $(CC) $(CFLAGS) -o$@ $(SSHR)\pctty.c + + unix.o : $(HACK_H) $(SSHR)\pcunix.c + $(CC) $(CFLAGS) -o$@ $(SSHR)\pcunix.c + + sys.o : $(HACK_H) $(SSHR)\pcsys.c + $(CC) $(CFLAGS) -o$@ $(SSHR)\pcsys.c + + random.o : $(HACK_H) $(SSHR)\random.c + $(CC) $(CFLAGS) -o$@ $(SSHR)\random.c + + # sys/msdos + msdos.o : $(HACK_H) $(MSYS)\msdos.c + $(CC) $(CFLAGS) -o$@ $(MSYS)\msdos.c + + pckeys.o : $(HACK_H) $(MSYS)\pckeys.c + $(CC) $(CFLAGS) -o$@ $(MSYS)\pckeys.c + + pctiles.o : $(HACK_H) $(MSYS)\pctiles.c $(INCL)\portio.h + $(CC) $(CFLAGS) -o$@ $(MSYS)\pctiles.c + + sound.o : $(HACK_H) $(MSYS)\sound.c $(INCL)\portio.h + $(CC) $(CFLAGS) -o$@ $(MSYS)\sound.c + + video.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(MSYS)\video.c + $(CC) $(CFLAGS) -o$@ $(MSYS)\video.c + + vidvga.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(TILE_H) \ + $(MSYS)\vidvga.c + $(CC) $(CFLAGS) -e -o$@ $(MSYS)\vidvga.c + + vidtxt.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(TILE_H) \ + $(MSYS)\vidtxt.c + $(CC) $(CFLAGS) -o$@ $(MSYS)\vidtxt.c + + + + # win/tty + getline.o : $(HACK_H) $(INCL)\wintty.h $(WIN)\getline.c + $(CC) $(CFLAGS) -o$@ $(WIN)\getline.c + + termcap.o : $(CONFIG_H) $(WIN)\termcap.c + $(CC) $(CFLAGS) -o$@ $(WIN)\termcap.c + + topl.o : $(CONFIG_H) $(WIN)\topl.c + $(CC) $(CFLAGS) -o$@ $(WIN)\topl.c + + wintty.o : $(CONFIG_H) $(WIN)\wintty.c + $(CC) $(CFLAGS) -o$@ $(WIN)\wintty.c + + # src dependencies + allmain.o : $(HACK_H) + alloc.o : $(CONFIG_H) + apply.o : $(HACK_H) $(INCL)\edog.h + artifact.o : $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h + attrib.o : $(HACK_H) $(INCL)\artifact.h + ball.o : $(HACK_H) + bones.o : $(HACK_H) $(INCL)\lev.h + botl.o : $(HACK_H) + cmd.o : $(HACK_H) $(INCL)\func_tab.h + dbridge.o : $(HACK_H) + decl.o : $(HACK_H) $(INCL)\quest.h + detect.o : $(HACK_H) $(INCL)\artifact.h + dig.o : $(HACK_H) + display.o : $(HACK_H) + dlb.o : $(HACK_H) $(DLB_H) + do.o : $(HACK_H) $(INCL)\lev.h + do_name.o : $(HACK_H) + do_wear.o : $(HACK_H) + dog.o : $(HACK_H) $(INCL)\edog.h + dogmove.o : $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h + dokick.o : $(HACK_H) $(ESHK_H) + dothrow.o : $(HACK_H) + drawing.o : $(HACK_H) $(INCL)\termcap.h + dungeon.o : $(HACK_H) $(INCL)\dgn_file.h + eat.o : $(HACK_H) + end.o : $(HACK_H) $(ESHK_H) + engrave.o : $(HACK_H) $(INCL)\lev.h + exper.o : $(HACK_H) + explode.o : $(HACK_H) + extralev.o : $(HACK_H) + files.o : $(HACK_H) + fountain.o : $(HACK_H) + hack.o : $(HACK_H) + hacklib.o : $(HACK_H) + invent.o : $(HACK_H) $(INCL)\artifact.h + light.o : $(HACK_H) $(INCL)\lev.h + lock.o : $(HACK_H) + mail.o : $(HACK_H) $(INCL)\mail.h + makemon.o : $(HACK_H) $(EPRI_H) $(EMIN_H) + mcastu.o : $(HACK_H) + mhitm.o : $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h + mhitu.o : $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h + minion.o : $(HACK_H) $(EMIN_H) $(EPRI_H) + mklev.o : $(HACK_H) + mkmap.o : $(HACK_H) $(INCL)\sp_lev.h + mkmaze.o : $(HACK_H) $(INCL)\sp_lev.h + mkobj.o : $(HACK_H) $(INCL)\artifact.h $(INCL)\prop.h + mkroom.o : $(HACK_H) + mon.o : $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h + mondata.o : $(HACK_H) $(ESHK_H) $(EPRI_H) + monmove.o : $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h + monst.o : $(CONFIG_H) $(PERM_H) $(ESHK_H) $(EPRI_H) \ + $(INCL)\color.h $(INCL)\monsym.h $(INCL)\vault.h + mplayer.o : $(HACK_H) + mthrowu.o : $(HACK_H) + muse.o : $(HACK_H) + music.o : $(HACK_H) + o_init.o : $(HACK_H) + objects.o : $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ + $(INCL)\prop.h $(INCL)\color.h + objnam.o : $(HACK_H) + options.o : $(CONFIG_H) $(HACK_H) $(INCL)\objclass.h $(INCL)\flag.h \ + $(INCL)\termcap.h + pager.o : $(HACK_H) + pickup.o : $(HACK_H) + pline.o : $(HACK_H) $(EPRI_H) + polyself.o : $(HACK_H) + potion.o : $(HACK_H) + pray.o : $(HACK_H) $(EPRI_H) + priest.o : $(HACK_H) $(INCL)\mfndpos.h $(ESHK_H) $(EPRI_H) $(EMIN_H) + quest.o : $(HACK_H) $(INCL)\quest.h $(INCL)\qtext.h + questpgr.o : $(HACK_H) $(INCL)\qtext.h + read.o : $(HACK_H) + rect.o : $(HACK_H) + restore.o : $(HACK_H) $(INCL)\lev.h $(INCL)\termcap.h $(INCL)\quest.h + rip.o : $(HACK_H) + rnd.o : $(HACK_H) + rumors.o : $(HACK_H) + save.o : $(HACK_H) $(INCL)\lev.h $(INCL)\quest.h + shk.o : $(HACK_H) $(ESHK_H) + shknam.o : $(HACK_H) $(ESHK_H) + sit.o : $(HACK_H) $(INCL)\artifact.h + sounds.o : $(HACK_H) $(INCL)\edog.h + sp_lev.o : $(HACK_H) $(INCL)\sp_lev.h $(INCL)\align.h $(INCL)\rect.h + spell.o : $(HACK_H) + steal.o : $(HACK_H) + teleport.o : $(HACK_H) + timeout.o : $(HACK_H) + topten.o : $(HACK_H) + track.o : $(HACK_H) + trap.o : $(HACK_H) + u_init.o : $(HACK_H) + uhitm.o : $(HACK_H) + vault.o : $(HACK_H) $(INCL)\vault.h + version.o : $(HACK_H) $(INCL)\patchlev.h + vision.o : $(HACK_H) $(INCL)\vis_tab.h + weapon.o : $(HACK_H) + were.o : $(HACK_H) + wield.o : $(HACK_H) + windows.o : $(HACK_H) $(INCL)\wintty.h + wizard.o : $(HACK_H) $(INCL)\qtext.h + worm.o : $(HACK_H) $(INCL)\lev.h + worn.o : $(HACK_H) + write.o : $(HACK_H) + zap.o : $(HACK_H) + + # end of file *** Old/sys/msdos/msdos.c Tue May 28 17:37:39 1996 --- sys/msdos/msdos.c Tue May 21 11:30:17 1996 *************** *** 56,64 **** static char * NDECL(getdta); static unsigned int FDECL(dos_ioctl, (int,int,unsigned)); #ifdef USE_TILES ! extern boolean tiles_on; /* from video.c */ ! extern boolean traditional; /* from video.c */ ! extern boolean overview; /* from vidvga.c */ #endif int --- 56,62 ---- static char * NDECL(getdta); static unsigned int FDECL(dos_ioctl, (int,int,unsigned)); #ifdef USE_TILES ! extern boolean FDECL(pckeys,(unsigned char, unsigned char)); /* pckeys.c */ #endif int *************** *** 237,243 **** { unsigned char scan, shift, ch=0; const struct pad *kpad; - union REGS regs; do { --- 235,240 ---- *************** *** 263,305 **** else ch = kpad[scan - KEYPADLO].normal; } ! /* Check for special interface manipulation keys */ ! #ifdef SIMULATE_CURSOR ! if (scan == 0x3d) { /* F3 = toggle cursor type */ ! HideCursor(); ! cursor_type += 1; ! if (cursor_type >= NUM_CURSOR_TYPES) cursor_type = 0; ! DrawCursor(); ! ch = 0xFF; /* signal non-nethack code */ continue; } #endif - #if defined(USE_TILES) - if (tiles_on) { - if (scan == 0x74 && (shift & CTRL)) { - /* scroll horizontal to right */ - ch = 0xFF; /* signal non-nethack code */ - vga_userpan(1); - continue; - } else if (scan == 0x73 && (shift & CTRL)) { - /* scroll horizontal to left */ - ch = 0xFF; - vga_userpan(0); - continue; - } else if (scan == 0x3E) { - traditional = FALSE; - vga_overview(overview ? 0 : 1); - ch = 0xFF; - continue; - } else if (scan == 0x3F) { - overview = FALSE; - vga_traditional(traditional ? 0 : 1); - ch = 0xFF; - continue; - } - } - #endif /* Translate unassigned Alt-letters */ #ifdef PC9800 if (shift & KANA) --- 260,272 ---- else ch = kpad[scan - KEYPADLO].normal; } ! #ifdef USE_TILES /* Check for special interface manipulation keys */ ! if (pckeys(scan, shift)) { ! ch = 0xFF; continue; } #endif /* Translate unassigned Alt-letters */ #ifdef PC9800 if (shift & KANA) *************** *** 386,392 **** * Functions to get filenames using wildcards */ int ! findfirst(path) char *path; { union REGS regs; --- 353,359 ---- * Functions to get filenames using wildcards */ int ! findfirst_file(path) char *path; { union REGS regs; *************** *** 401,407 **** } int ! findnext() { union REGS regs; regs.h.ah = FINDNEXT; --- 368,374 ---- } int ! findnext_file() { union REGS regs; regs.h.ah = FINDNEXT; *************** *** 427,433 **** regs.h.ah = GETDTA; intdosx(®s, ®s, &sregs); # ifdef MK_FP ! ret = MK_FP(sregs.es, regs.x.bx); # else FP_OFF(ret) = regs.x.bx; FP_SEG(ret) = sregs.es; --- 394,400 ---- regs.h.ah = GETDTA; intdosx(®s, ®s, &sregs); # ifdef MK_FP ! ret = (char *)MK_FP(sregs.es, regs.x.bx); # else FP_OFF(ret) = regs.x.bx; FP_SEG(ret) = sregs.es; *************** *** 436,447 **** } long ! filesize(file) char *file; { char *dta; ! if (findfirst(file)) { dta = getdta(); return (* (long *) (dta + 26)); } else --- 403,414 ---- } long ! filesize_nh(file) char *file; { char *dta; ! if (findfirst_file(file)) { dta = getdta(); return (* (long *) (dta + 26)); } else *** Old/sys/msdos/msdoshlp.txt Tue May 28 17:37:42 1996 --- sys/msdos/msdoshlp.txt Tue May 21 11:52:15 1996 *************** *** 1,5 **** ! MSDOS specific help file for NetHack 3.2.0 ! (Last Revision: February 19, 1996) Copyright (c) NetHack PC Development Team 1993, 1994, 1995, 1996. NetHack may be freely distributed. See license for details. --- 1,5 ---- ! MSDOS specific help file for NetHack 3.2.1 ! (Last Revision: May 20, 1996) Copyright (c) NetHack PC Development Team 1993, 1994, 1995, 1996. NetHack may be freely distributed. See license for details. *************** *** 100,106 **** OPTIONS=VIDEOCOLORS (NetHack.cnf only) This option is only provided because some people on ! r.g.h mentioned how they liked to modify the color values from the default ANSI.SYS behaviour, and were "upset" to find out that they could no longer do so under 3.1.2. The color map is as accurate as possible --- 100,106 ---- OPTIONS=VIDEOCOLORS (NetHack.cnf only) This option is only provided because some people on ! r.g.r.n mentioned how they liked to modify the color values from the default ANSI.SYS behaviour, and were "upset" to find out that they could no longer do so under 3.1.2. The color map is as accurate as possible *************** *** 164,185 **** with another key to execute an extended command as an alternative method to pressing the # key combination: ! Alt-a adjust - adjust inventory letters. ! Alt-c chat - talk to someone. ! Alt-d dip - dip an object into something. ! Alt-f force - force a lock. ! Alt-i invoke - invoke an object's powers. ! Alt-j jump - jump to a location. ! Alt-l loot - loot a box on the floor. ! Alt-m monster - use a monster's special ability. ! Alt-n name - name an item or type of object. ! Alt-o offer - offer a sacrifice to the gods. ! Alt-p pray - pray to the gods for help. ! Alt-r rub - rub a lamp. ! Alt-s sit - sit down. ! Alt-t turn - turn undead. ! Alt-u untrap - untrap something. ! Alt-v version - list compile time options for this version of NetHack. ! Alt-w wipe - wipe off your face. If you are playing on NEC PC-9800, use the GRPH key instead of the ALT key. --- 164,186 ---- with another key to execute an extended command as an alternative method to pressing the # key combination: ! Alt-a adjust - adjust inventory letters. ! Alt-c chat - talk to someone or something. ! Alt-d dip - dip an object into something. ! Alt-e enhance - enhance your skill with a weapon. ! Alt-f force - force a lock. ! Alt-i invoke - invoke an object's powers. ! Alt-j jump - jump to a location. ! Alt-l loot - loot a box on the floor. ! Alt-m monster - use a monster's special ability. ! Alt-n name - name an item or type of object. ! Alt-o offer - offer a sacrifice to the gods. ! Alt-p pray - pray to the gods for help. ! Alt-r rub - rub a lamp. ! Alt-s sit - sit down. ! Alt-t turn - turn undead. ! Alt-u untrap - untrap something. ! Alt-v version - list compile time options for this version of NetHack. ! Alt-w wipe - wipe off your face. If you are playing on NEC PC-9800, use the GRPH key instead of the ALT key. *** /dev/null Tue May 28 17:37:50 1996 --- sys/msdos/pckeys.c Tue May 28 16:59:04 1996 *************** *** 0 **** --- 1,79 ---- + /* SCCS Id: @(#)pckeys.c 3.2 96/05/11 */ + /* Copyright (c) NetHack PC Development Team 1996 */ + /* NetHack may be freely redistributed. See license for details. */ + + /* + * MSDOS tile-specific key handling. + */ + + #include "hack.h" + + #ifdef MSDOS + # ifdef USE_TILES + #include "wintty.h" + #include "pcvideo.h" + + boolean FDECL(pckeys, (unsigned char, unsigned char)); + + extern struct WinDesc *wins[MAXWIN]; /* from wintty.c */ + extern boolean tiles_on; /* from video.c */ + extern boolean traditional; /* from video.c */ + extern boolean inmap; /* from video.c */ + extern boolean overview; + + #define SHIFT (0x1 | 0x2) + #define CTRL 0x4 + #define ALT 0x8 + + /* + * Check for special interface manipulation keys. + * Returns TRUE if the scan code triggered something. + * + */ + boolean + pckeys(scancode, shift) + unsigned char scancode; + unsigned char shift; + { + boolean opening_dialog; + + opening_dialog = pl_character[0] ? FALSE : TRUE; + # ifdef SIMULATE_CURSOR + switch(scancode) { + case 0x3d: /* F3 = toggle cursor type */ + HideCursor(); + cursor_type += 1; + if (cursor_type >= NUM_CURSOR_TYPES) cursor_type = 0; + DrawCursor(); + break; + # endif + case 0x74: /* Control-right_arrow = scroll horizontal to right */ + if ((shift & CTRL) && tiles_on && !opening_dialog) + vga_userpan(1); + break; + + case 0x73: /* Control-left_arrow = scroll horizontal to left */ + if ((shift & CTRL) && tiles_on && !opening_dialog) + vga_userpan(0); + break; + case 0x3E: /* F4 = toggle overview mode */ + if (tiles_on && !opening_dialog) { + traditional = FALSE; + vga_overview(overview ? 0 : 1); + } + break; + case 0x3F: /* F5 = toggle traditional mode */ + if (tiles_on && !opening_dialog) { + overview = FALSE; + vga_traditional(traditional ? 0 : 1); + } + break; + default: + return FALSE; + } + return TRUE; + } + # endif /* USE_TILES */ + #endif /* MSDOS */ + + /*pckeys.c*/ *** Old/sys/msdos/pctiles.c Tue May 28 17:37:53 1996 --- sys/msdos/pctiles.c Fri May 24 08:52:19 1996 *************** *** 14,21 **** #ifdef USE_TILES ! #ifdef __GO32__ #include #endif # if defined(_MSC_VER) --- 14,22 ---- #ifdef USE_TILES ! #if defined(__GO32__) || defined(__DJGPP__) #include + #define TILES_IN_RAM /* allow tiles to be read into ram */ #endif # if defined(_MSC_VER) *************** *** 36,45 **** STATIC_VAR FILE *tilefile_O; extern short glyph2tile[]; /* in tile.c (made from tilemap.c) */ # ifdef OVLB /* ! * Read the header/palette information at the start of the * NetHack.tib file. * * There is 1024 bytes (1K) of header information --- 37,54 ---- STATIC_VAR FILE *tilefile_O; extern short glyph2tile[]; /* in tile.c (made from tilemap.c) */ + #ifdef TILES_IN_RAM + struct planar_cell_struct *ramtiles; + struct overview_planar_cell_struct *oramtiles; + boolean tiles_in_ram = FALSE; + boolean otiles_in_ram = FALSE; + extern int total_tiles_used; /* tile.c */ + #endif + # ifdef OVLB /* ! * Read the header/palette information at the start of the * NetHack.tib file. * * There is 1024 bytes (1K) of header information *************** *** 82,88 **** boolean filestyle; { FILE *x; ! if (filestyle) { tilefile_O = fopen(tilefilename,"rb"); if (tilefile_O == (FILE *)0) return 1; --- 91,99 ---- boolean filestyle; { FILE *x; ! #ifdef TILES_IN_RAM ! int k; ! #endif if (filestyle) { tilefile_O = fopen(tilefilename,"rb"); if (tilefile_O == (FILE *)0) return 1; *************** *** 90,95 **** --- 101,149 ---- tilefile = fopen(tilefilename,"rb"); if (tilefile == (FILE *)0) return 1; } + #ifdef TILES_IN_RAM + if (flags.preload_tiles) { + if (filestyle) { + struct overview_planar_cell_struct *gp; + long ram_needed = sizeof(struct overview_planar_cell_struct) * + total_tiles_used; + if (fseek(tilefile_O,(long)TIBHEADER_SIZE, SEEK_SET)) { /*failure*/ + } + oramtiles = (struct overview_planar_cell_struct *)alloc(ram_needed); + /* Todo: fall back to file method here if alloc failed */ + gp = oramtiles; + for(k=0; k < total_tiles_used; ++k) { + fread(gp, sizeof(struct overview_planar_cell_struct), + 1, tilefile_O); + ++gp; + } + #ifdef DEBUG_RAMTILES + pline("%d overview tiles read into ram.", k); + mark_synch(); + #endif + otiles_in_ram = TRUE; + } else { + struct planar_cell_struct *gp; + long ram_needed = sizeof(struct planar_cell_struct) * + total_tiles_used; + if (fseek(tilefile,(long)TIBHEADER_SIZE, SEEK_SET)) { /*failure*/ + } + ramtiles = (struct planar_cell_struct *)alloc(ram_needed); + /* Todo: fall back to file method here if alloc failed */ + gp = ramtiles; + for(k=0; k < total_tiles_used; ++k) { + fread(gp, sizeof(struct planar_cell_struct), + 1, tilefile); + ++gp; + } + #ifdef DEBUG_RAMTILES + pline("%d tiles read into ram.", k); + mark_synch(); + #endif + tiles_in_ram = TRUE; + } + } + #endif return 0; } *************** *** 97,107 **** CloseTileFile(filestyle) boolean filestyle; { ! fclose(filestyle ? tilefile_O : tilefile); } # endif /* OVLB */ # ifdef OVL0 /* This routine retrieves the requested NetHack glyph tile * from the planar style binary .tib file. * This is currently done 'on demand', so if the player --- 151,174 ---- CloseTileFile(filestyle) boolean filestyle; { ! fclose(filestyle ? tilefile_O : tilefile); ! #ifdef TILES_IN_RAM ! if (!filestyle && tiles_in_ram) { ! if (ramtiles) free((genericptr_t) ramtiles); ! tiles_in_ram = FALSE; ! } else if (filestyle && otiles_in_ram) { ! if (oramtiles) free((genericptr_t) oramtiles); ! otiles_in_ram = FALSE; ! } ! #endif } # endif /* OVLB */ # ifdef OVL0 + + struct planar_cell_struct plancell; + struct overview_planar_cell_struct oplancell; + /* This routine retrieves the requested NetHack glyph tile * from the planar style binary .tib file. * This is currently done 'on demand', so if the player *************** *** 124,157 **** # ifdef PLANAR_FILE int ReadPlanarTileFile(tilenum,gp) int tilenum; ! struct planar_cell_struct *gp; { long fpos; ! fpos = ((long)(tilenum) * (long)sizeof(struct planar_cell_struct)) + (long)TIBHEADER_SIZE; if (fseek(tilefile,fpos,SEEK_SET)) { return 1; } else { ! fread(gp, sizeof(struct planar_cell_struct), 1, tilefile); } return 0; } int ReadPlanarTileFile_O(tilenum,gp) int tilenum; ! struct overview_planar_cell_struct *gp; { long fpos; ! fpos = ((long)(tilenum) * (long)sizeof(struct overview_planar_cell_struct)) + (long)TIBHEADER_SIZE; if (fseek(tilefile_O,fpos,SEEK_SET)) { return 1; } else { ! fread(gp, sizeof(struct overview_planar_cell_struct), 1, tilefile_O); } return 0; } # endif --- 191,238 ---- # ifdef PLANAR_FILE int ReadPlanarTileFile(tilenum,gp) int tilenum; ! struct planar_cell_struct **gp; { long fpos; ! ! #ifdef TILES_IN_RAM ! if (tiles_in_ram) { ! *gp = ramtiles + tilenum; ! return 0; ! } ! #endif fpos = ((long)(tilenum) * (long)sizeof(struct planar_cell_struct)) + (long)TIBHEADER_SIZE; if (fseek(tilefile,fpos,SEEK_SET)) { return 1; } else { ! fread(&plancell, sizeof(struct planar_cell_struct), 1, tilefile); } + *gp = &plancell; return 0; } int ReadPlanarTileFile_O(tilenum,gp) int tilenum; ! struct overview_planar_cell_struct **gp; { long fpos; ! ! #ifdef TILES_IN_RAM ! if (otiles_in_ram) { ! *gp = oramtiles + tilenum; ! return 0; ! } ! #endif fpos = ((long)(tilenum) * (long)sizeof(struct overview_planar_cell_struct)) + (long)TIBHEADER_SIZE; if (fseek(tilefile_O,fpos,SEEK_SET)) { return 1; } else { ! fread(&oplancell, sizeof(struct overview_planar_cell_struct), 1, tilefile_O); } + *gp = &oplancell; return 0; } # endif *** Old/sys/msdos/pctiles.h Tue May 28 17:37:55 1996 --- sys/msdos/pctiles.h Tue May 14 17:44:23 1996 *************** *** 48,56 **** # ifdef PLANAR_FILE # ifdef SCREEN_VGA ! extern int FDECL(ReadPlanarTileFile,(int, struct planar_cell_struct *)); extern int FDECL(ReadPlanarTileFile_O, ! (int, struct overview_planar_cell_struct *)); # endif # endif --- 48,56 ---- # ifdef PLANAR_FILE # ifdef SCREEN_VGA ! extern int FDECL(ReadPlanarTileFile,(int, struct planar_cell_struct **)); extern int FDECL(ReadPlanarTileFile_O, ! (int, struct overview_planar_cell_struct **)); # endif # endif *** Old/sys/msdos/video.c Tue May 28 17:38:20 1996 --- sys/msdos/video.c Fri May 17 10:13:46 1996 *************** *** 114,120 **** void FDECL(get_cursor, (int *, int *)); # endif ! void FDECL(cmov, (int, int)); void FDECL(nocmov, (int, int)); STATIC_DCL void NDECL(init_ttycolor); --- 114,120 ---- void FDECL(get_cursor, (int *, int *)); # endif ! void FDECL(adjust_cursor_flags, (struct WinDesc *)); void FDECL(cmov, (int, int)); void FDECL(nocmov, (int, int)); STATIC_DCL void NDECL(init_ttycolor); *************** *** 130,135 **** --- 130,136 ---- int attrib_gr_intense; /* graphics mode intense attribute */ boolean tiles_on = FALSE; /* do we have tiles on? */ boolean traditional = FALSE; /* traditonal TTY character mode */ + boolean inmap = FALSE; /* in the map window */ # ifdef TEXTCOLOR char ttycolors[CLR_MAX]; /* also used/set in options.c */ # endif /* TEXTCOLOR */ *************** *** 144,149 **** --- 145,151 ---- extern int attrib_gr_intense; extern boolean tiles_on; extern boolean traditonal; + extern boolean inmap; # ifdef TEXTCOLOR extern char ttycolors[CLR_MAX]; /* also used/set in options.c */ # endif /* TEXTCOLOR */ *************** *** 610,615 **** --- 612,637 ---- } # endif + void + adjust_cursor_flags(cw) + struct WinDesc *cw; + { + # ifdef SIMULATE_CURSOR + # if 0 + if (cw->type == NHW_MAP) cursor_flag = 1; + else cursor_flag = 0; + # else + if (cw->type == NHW_MAP) { + inmap = 1; + cursor_flag = 1; + } else { + inmap = 0; + cursor_flag = 1; + } + # endif /* 0 */ + # endif /* SIMULATE_CURSOR */ + } + # ifdef SIMULATE_CURSOR /* change the defaults in pcvideo.h, not here */ *************** *** 919,925 **** */ if (flags.hasvesa) flags.usevesa = 1; else if (flags.has8514) flags.use8514 = 1; ! else if (flags.hasvga) flags.usevga = 1; } else { return 0; } --- 941,952 ---- */ if (flags.hasvesa) flags.usevesa = 1; else if (flags.has8514) flags.use8514 = 1; ! else if (flags.hasvga) { ! flags.usevga = 1; ! /* VGA depends on BIOS to enable function keys*/ ! flags.BIOS = 1; ! flags.rawio = 1; ! } } else { return 0; } *** Old/sys/msdos/vidtxt.c Tue May 28 17:38:23 1996 --- sys/msdos/vidtxt.c Tue May 14 17:44:27 1996 *************** *** 338,343 **** --- 338,350 ---- (void) int86(DOS_EXT_FUNC, ®s, ®s); + if (ch == '\n') { + regs.h.dl = '\r'; + regs.h.ah = PUTCHAR; + regs.h.cl = DIRECT_CON_IO; + + (void) int86(DOS_EXT_FUNC, ®s, ®s); + } regs.h.dl = ch; regs.h.ah = PUTCHAR; regs.h.cl = DIRECT_CON_IO; *** Old/sys/msdos/vidvga.c Tue May 28 17:38:25 1996 --- sys/msdos/vidvga.c Tue May 14 17:44:24 1996 *************** *** 133,138 **** --- 133,139 ---- extern int attrib_gr_intense; /* graphics mode intense attribute */ extern boolean tiles_on; extern boolean traditional; + extern boolean inmap; /* in the map window */ /* * Global Variables *************** *** 193,200 **** extern int vp2[SCREENPLANES]; # endif /* OVLB */ ! STATIC_VAR struct planar_cell_struct planecell; ! STATIC_VAR struct overview_planar_cell_struct planecell_O; # if defined(USE_TILES) STATIC_VAR struct tibhdr_struct tibheader; --- 194,201 ---- extern int vp2[SCREENPLANES]; # endif /* OVLB */ ! STATIC_VAR struct planar_cell_struct *planecell; ! STATIC_VAR struct overview_planar_cell_struct *planecell_O; # if defined(USE_TILES) STATIC_VAR struct tibhdr_struct tibheader; *************** *** 401,407 **** } else if (!overview) { if ((col >= clipx) && (col <= clipxmax)) { if (!ReadPlanarTileFile(glyph2tile[glyphnum], &planecell)) ! vga_DisplayCell(&planecell, col - clipx, row); else pline("vga_xputg: Error reading tile (%d,%d) from file", --- 402,408 ---- } else if (!overview) { if ((col >= clipx) && (col <= clipxmax)) { if (!ReadPlanarTileFile(glyph2tile[glyphnum], &planecell)) ! vga_DisplayCell(planecell, col - clipx, row); else pline("vga_xputg: Error reading tile (%d,%d) from file", *************** *** 409,415 **** } } else { if (!ReadPlanarTileFile_O(glyph2tile[glyphnum], &planecell_O)) ! vga_DisplayCell_O(&planecell_O, col, row); else pline("vga_xputg: Error reading tile (%d,%d) from file", glyphnum,glyph2tile[glyphnum]); --- 410,416 ---- } } else { if (!ReadPlanarTileFile_O(glyph2tile[glyphnum], &planecell_O)) ! vga_DisplayCell_O(planecell_O, col, row); else pline("vga_xputg: Error reading tile (%d,%d) from file", glyphnum,glyph2tile[glyphnum]); *************** *** 510,516 **** if (!overview) { if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) { ! vga_DisplayCell(&planecell, x - clipx, y + TOP_MAP_ROW); } else pline("vga_redrawmap: Error reading tile (%d,%d)", --- 511,517 ---- if (!overview) { if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) { ! vga_DisplayCell(planecell, x - clipx, y + TOP_MAP_ROW); } else pline("vga_redrawmap: Error reading tile (%d,%d)", *************** *** 518,524 **** } else { if (!ReadPlanarTileFile_O(glyph2tile[t], &planecell_O)) { ! vga_DisplayCell_O(&planecell_O, x, y + TOP_MAP_ROW); } else pline("vga_redrawmap: Error reading tile (%d,%d)", --- 519,525 ---- } else { if (!ReadPlanarTileFile_O(glyph2tile[t], &planecell_O)) { ! vga_DisplayCell_O(planecell_O, x, y + TOP_MAP_ROW); } else pline("vga_redrawmap: Error reading tile (%d,%d)", *************** *** 648,654 **** for (x = i; x < j; x += 2) { t = map[y][x].glyph; if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) ! vga_DisplayCell(&planecell, x - clipx, y + TOP_MAP_ROW); else pline("vga_shiftmap: Error reading tile (%d,%d)", t, glyph2tile[t]); --- 649,655 ---- for (x = i; x < j; x += 2) { t = map[y][x].glyph; if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) ! vga_DisplayCell(planecell, x - clipx, y + TOP_MAP_ROW); else pline("vga_shiftmap: Error reading tile (%d,%d)", t, glyph2tile[t]); *************** *** 1125,1133 **** } } # ifdef SIMULATE_CURSOR ! tmp = curcol + 1; ! if ((tmp != ucol) && (curcol >= 0)) ! vga_special('_', tmp, PBAR_COLOR_HERO); # endif } --- 1126,1136 ---- } } # ifdef SIMULATE_CURSOR ! if (inmap) { ! tmp = curcol + 1; ! if ((tmp != ucol) && (curcol >= 0)) ! vga_special('_', tmp, PBAR_COLOR_HERO); ! } # endif } *************** *** 1183,1191 **** /* char on[2] = {0xFF,0xFF}; */ /* char off[2] = {0x00,0x00}; */ boolean isrogue = Is_rogue_level(&u.uz); ! boolean singlebyte = (isrogue || overview || traditional); ! if (!cursor_type) return; /* CURSOR_INVIS - nothing to do */ x = min(curcol,(CO - 1)); /* protection from callers */ y = min(currow,(LI - 1)); /* protection from callers */ --- 1186,1195 ---- /* char on[2] = {0xFF,0xFF}; */ /* char off[2] = {0x00,0x00}; */ boolean isrogue = Is_rogue_level(&u.uz); ! boolean singlebyte = (isrogue || overview || traditional || !inmap); ! int curtyp; ! if (!cursor_type && inmap) return; /* CURSOR_INVIS - nothing to do */ x = min(curcol,(CO - 1)); /* protection from callers */ y = min(currow,(LI - 1)); /* protection from callers */ *************** *** 1233,1240 **** */ cursor = undercursor; ! switch(cursor_type) { case CURSOR_CORNER: for(i = 0; i < 2; ++i) { --- 1237,1246 ---- */ cursor = undercursor; + if (inmap) curtyp = cursor_type; + else curtyp = CURSOR_UNDERLINE; ! switch(curtyp) { case CURSOR_CORNER: for(i = 0; i < 2; ++i) { *************** *** 1367,1373 **** } egawriteplane(15); #ifdef POSITIONBAR ! positionbar(); #endif } --- 1373,1379 ---- } egawriteplane(15); #ifdef POSITIONBAR ! if (inmap) positionbar(); #endif } *************** *** 1379,1387 **** char __far *tmp1; char __far *tmp2; boolean isrogue = Is_rogue_level(&u.uz); ! boolean singlebyte = (isrogue || overview || traditional); ! if (!cursor_type) return; /* CURSOR_INVIS - nothing to do */ /* protection from callers */ x = min(curcol,(CO - 1)); y = min(currow,(LI-1)); --- 1385,1394 ---- char __far *tmp1; char __far *tmp2; boolean isrogue = Is_rogue_level(&u.uz); ! boolean singlebyte = (isrogue || overview || traditional || !inmap); ! int curtyp; ! if (inmap && !cursor_type) return; /* CURSOR_INVIS - nothing to do */ /* protection from callers */ x = min(curcol,(CO - 1)); y = min(currow,(LI-1)); *************** *** 1393,1399 **** else pixx = col2x((x-clipx)); ! if (cursor_type == CURSOR_UNDERLINE) /* optimization for uline */ i = ROWS_PER_CELL - 1; else i = 0; --- 1400,1409 ---- else pixx = col2x((x-clipx)); ! if (inmap) curtyp = cursor_type; ! else curtyp = CURSOR_UNDERLINE; ! ! if (curtyp == CURSOR_UNDERLINE) /* optimization for uline */ i = ROWS_PER_CELL - 1; else i = 0; *** Old/sys/share/NetHack.cnf Tue May 28 17:39:13 1996 --- sys/share/NetHack.cnf Fri May 17 10:13:53 1996 *************** *** 18,28 **** # *** OPTIONS *** # ! # These two options should be used for most setups. If you're machine isn't ! # very IBM-compatible, and NetHack doesn't work, try commenting out this line. ! # OPTIONS=rawio,BIOS,IBMgraphics ! # To use VGA graphical tiles on an MS-DOS PC with VGA or better, use: #OPTIONS=video:autodetect # Some versions of NetHack use the pc speaker to play the notes given when # playing music instruments in NetHack. To use this feature, if available, --- 18,29 ---- # *** OPTIONS *** # ! # The three options on this line should be used for most setups. ! # If your machine isn't very IBM-compatible, and NetHack doesn't work, ! # try commenting out this line. OPTIONS=rawio,BIOS,IBMgraphics ! # To use VGA graphical tiles on an MS-DOS PC with VGA or better,uncomment ! # this: #OPTIONS=video:autodetect # Some versions of NetHack use the pc speaker to play the notes given when # playing music instruments in NetHack. To use this feature, if available, *** Old/sys/share/dgn_yacc.c Tue May 28 17:39:20 1996 --- sys/share/dgn_yacc.c Sat May 18 12:15:14 1996 *************** *** 8,14 **** #define yyerrok (yyerrflag=0) #define YYRECOVERING (yyerrflag!=0) #define YYPREFIX "yy" ! /* SCCS Id: @(#)dgn_comp.c 3.2 94/10/08 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ --- 8,14 ---- #define yyerrok (yyerrflag=0) #define YYRECOVERING (yyerrflag!=0) #define YYPREFIX "yy" ! /* SCCS Id: @(#)dgn_comp.c 3.2 96/05/10 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 548,555 **** { int nd, cl = 0, nl = 0, cb = 0, nb = 0; ! static long version_info[3] = { ! VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY }; if(++n_dgns <= 0) { --- 548,556 ---- { int nd, cl = 0, nl = 0, cb = 0, nb = 0; ! static unsigned long version_info[4] = { ! VERSION_NUMBER, VERSION_FEATURES, ! VERSION_SANITY1, VERSION_SANITY2 }; if(++n_dgns <= 0) { *** Old/sys/share/ioctl.c Tue May 28 17:39:24 1996 --- sys/share/ioctl.c Tue May 21 12:46:26 1996 *************** *** 82,91 **** } #endif /* AUX */ - #ifdef USE_WIN_IOCTL void getwindowsz() { /* * ttysize is found on Suns and BSD * winsize is found on Suns, BSD, and Ultrix --- 82,91 ---- } #endif /* AUX */ void getwindowsz() { + #ifdef USE_WIN_IOCTL /* * ttysize is found on Suns and BSD * winsize is found on Suns, BSD, and Ultrix *************** *** 102,109 **** if (ttsz.ws_col) CO = ttsz.ws_col; } - } #endif void getioctls() --- 102,109 ---- if (ttsz.ws_col) CO = ttsz.ws_col; } #endif + } void getioctls() *************** *** 122,130 **** # endif # endif #endif - #ifdef USE_WIN_IOCTL getwindowsz(); - #endif #ifdef AUX ( void ) signal ( SIGTSTP , catch_stp ) ; #endif --- 122,128 ---- *** Old/sys/share/lev_comp.h Tue May 28 17:39:26 1996 --- sys/share/lev_comp.h Fri May 17 10:44:23 1996 *************** *** 1,70 **** #define CHAR 257 #define INTEGER 258 #define BOOLEAN 259 ! #define MESSAGE_ID 260 ! #define MAZE_ID 261 ! #define LEVEL_ID 262 ! #define LEV_INIT_ID 263 ! #define GEOMETRY_ID 264 ! #define NOMAP_ID 265 ! #define OBJECT_ID 266 ! #define COBJECT_ID 267 ! #define MONSTER_ID 268 ! #define TRAP_ID 269 ! #define DOOR_ID 270 ! #define DRAWBRIDGE_ID 271 ! #define MAZEWALK_ID 272 ! #define WALLIFY_ID 273 ! #define REGION_ID 274 ! #define FILLING 275 ! #define RANDOM_OBJECTS_ID 276 ! #define RANDOM_MONSTERS_ID 277 ! #define RANDOM_PLACES_ID 278 ! #define ALTAR_ID 279 ! #define LADDER_ID 280 ! #define STAIR_ID 281 ! #define NON_DIGGABLE_ID 282 ! #define NON_PASSWALL_ID 283 ! #define ROOM_ID 284 ! #define PORTAL_ID 285 ! #define TELEPRT_ID 286 ! #define BRANCH_ID 287 ! #define LEV 288 ! #define CHANCE_ID 289 ! #define CORRIDOR_ID 290 ! #define GOLD_ID 291 ! #define ENGRAVING_ID 292 ! #define FOUNTAIN_ID 293 ! #define POOL_ID 294 ! #define SINK_ID 295 ! #define NONE 296 ! #define RAND_CORRIDOR_ID 297 ! #define DOOR_STATE 298 ! #define LIGHT_STATE 299 ! #define CURSE_TYPE 300 ! #define ENGRAVING_TYPE 301 ! #define DIRECTION 302 ! #define RANDOM_TYPE 303 ! #define O_REGISTER 304 ! #define M_REGISTER 305 ! #define P_REGISTER 306 ! #define A_REGISTER 307 ! #define ALIGNMENT 308 ! #define LEFT_OR_RIGHT 309 ! #define CENTER 310 ! #define TOP_OR_BOT 311 ! #define ALTAR_TYPE 312 ! #define UP_OR_DOWN 313 ! #define SUBROOM_ID 314 ! #define NAME_ID 315 ! #define FLAGS_ID 316 ! #define FLAG_TYPE 317 ! #define MON_ATTITUDE 318 ! #define MON_ALERTNESS 319 ! #define MON_APPEARANCE 320 ! #define CONTAINED 321 ! #define STRING 322 ! #define MAP_ID 323 typedef union { int i; --- 1,71 ---- #define CHAR 257 #define INTEGER 258 #define BOOLEAN 259 ! #define PERCENT 260 ! #define MESSAGE_ID 261 ! #define MAZE_ID 262 ! #define LEVEL_ID 263 ! #define LEV_INIT_ID 264 ! #define GEOMETRY_ID 265 ! #define NOMAP_ID 266 ! #define OBJECT_ID 267 ! #define COBJECT_ID 268 ! #define MONSTER_ID 269 ! #define TRAP_ID 270 ! #define DOOR_ID 271 ! #define DRAWBRIDGE_ID 272 ! #define MAZEWALK_ID 273 ! #define WALLIFY_ID 274 ! #define REGION_ID 275 ! #define FILLING 276 ! #define RANDOM_OBJECTS_ID 277 ! #define RANDOM_MONSTERS_ID 278 ! #define RANDOM_PLACES_ID 279 ! #define ALTAR_ID 280 ! #define LADDER_ID 281 ! #define STAIR_ID 282 ! #define NON_DIGGABLE_ID 283 ! #define NON_PASSWALL_ID 284 ! #define ROOM_ID 285 ! #define PORTAL_ID 286 ! #define TELEPRT_ID 287 ! #define BRANCH_ID 288 ! #define LEV 289 ! #define CHANCE_ID 290 ! #define CORRIDOR_ID 291 ! #define GOLD_ID 292 ! #define ENGRAVING_ID 293 ! #define FOUNTAIN_ID 294 ! #define POOL_ID 295 ! #define SINK_ID 296 ! #define NONE 297 ! #define RAND_CORRIDOR_ID 298 ! #define DOOR_STATE 299 ! #define LIGHT_STATE 300 ! #define CURSE_TYPE 301 ! #define ENGRAVING_TYPE 302 ! #define DIRECTION 303 ! #define RANDOM_TYPE 304 ! #define O_REGISTER 305 ! #define M_REGISTER 306 ! #define P_REGISTER 307 ! #define A_REGISTER 308 ! #define ALIGNMENT 309 ! #define LEFT_OR_RIGHT 310 ! #define CENTER 311 ! #define TOP_OR_BOT 312 ! #define ALTAR_TYPE 313 ! #define UP_OR_DOWN 314 ! #define SUBROOM_ID 315 ! #define NAME_ID 316 ! #define FLAGS_ID 317 ! #define FLAG_TYPE 318 ! #define MON_ATTITUDE 319 ! #define MON_ALERTNESS 320 ! #define MON_APPEARANCE 321 ! #define CONTAINED 322 ! #define STRING 323 ! #define MAP_ID 324 typedef union { int i; *** Old/sys/share/lev_lex.c Tue May 28 17:39:28 1996 --- sys/share/lev_lex.c Fri May 17 11:39:22 1996 *************** *** 25,31 **** int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; ! /* SCCS Id: @(#)lev_lex.c 3.2 96/03/02 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 25,31 ---- int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; ! /* SCCS Id: @(#)lev_lex.c 3.2 96/05/16 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 98,117 **** extern YYSTYPE yylval; int line_number = 1, colon_line_number = 1; ! ! /* ! * This is *** UGLY *** but I can't think a better way to do it; ! * I really need a huge buffer to scan maps... ! * (This should probably be `#ifndef FLEX_SCANNER' since it's lex-specific.) ! */ ! #ifdef YYLMAX ! #undef YYLMAX ! #endif ! #define YYLMAX 2048 ! #if defined(sun) && defined(SVR4) && !defined(FLEX_SCANNER) ! char wwtext[YYLMAX]; ! #define yytext wwtext ! #endif /* * This is a hack required by Michael Hamel to get things --- 98,105 ---- extern YYSTYPE yylval; int line_number = 1, colon_line_number = 1; ! static char map[4096]; ! static int map_cnt = 0; /* * This is a hack required by Michael Hamel to get things *************** *** 151,177 **** if(yywrap()) return(0); break; case 1: { - #ifdef FLEX23_BUG - /* - * There is a bug in Flex 2.3 patch level < 6 - * (absent in previous versions) - * that results in the following behaviour : - * Once you enter an yymore(), you never exit from it. - * This should do the trick! - */ - extern int yy_more_len; - - yy_more_len = 0; - #endif /* FLEX23_BUG */ BEGIN(INITIAL); ! yylval.map = (char *) alloc(yyleng-5); ! (void) strncpy(yylval.map, yytext,yyleng-6); ! yylval.map[yyleng-6] = 0; return MAP_ID; } break; case 2: ! { line_number++; yymore(); } break; case 3: { line_number++; } --- 139,159 ---- if(yywrap()) return(0); break; case 1: { BEGIN(INITIAL); ! yylval.map = (char *) alloc(map_cnt + 1); ! (void) strncpy(yylval.map, map, map_cnt); ! yylval.map[map_cnt] = 0; ! map_cnt = 0; return MAP_ID; } break; case 2: ! { ! line_number++; ! (void) strncpy(map + map_cnt, yytext, yyleng); ! map_cnt += yyleng; ! map[map_cnt] = 0; ! } break; case 3: { line_number++; } *************** *** 468,491 **** { yylval.i=SHORTSIGHTED; return FLAG_TYPE; } break; case 101: ! { yylval.i=atoi(yytext); return INTEGER; } break; case 102: { yytext[yyleng-1] = 0; /* Discard the trailing \" */ yylval.map = (char *) alloc(strlen(yytext+1)+1); Strcpy(yylval.map, yytext+1); /* Discard the first \" */ return STRING; } break; ! case 103: { line_number++; } break; ! case 104: ; break; ! case 105: { yylval.i = yytext[1]; return CHAR; } break; ! case 106: { return yytext[0]; } break; case -1: --- 450,476 ---- { yylval.i=SHORTSIGHTED; return FLAG_TYPE; } break; case 101: ! { yylval.i = atoi(yytext + 1); return PERCENT; } break; case 102: + { yylval.i=atoi(yytext); return INTEGER; } + break; + case 103: { yytext[yyleng-1] = 0; /* Discard the trailing \" */ yylval.map = (char *) alloc(strlen(yytext+1)+1); Strcpy(yylval.map, yytext+1); /* Discard the first \" */ return STRING; } break; ! case 104: { line_number++; } break; ! case 105: ; break; ! case 106: { yylval.i = yytext[1]; return CHAR; } break; ! case 107: { return yytext[0]; } break; case -1: *************** *** 524,715 **** int yyvstop[] = { 0, ! 106, 0, ! 104, ! 106, 0, ! 103, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 101, ! 106, 0, 4, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 2, ! 103, 0, 104, - 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 106, 0, ! 104, 0, ! 102, 0, ! 101, 0, 85, --- 509,703 ---- int yyvstop[] = { 0, ! 107, 0, ! 105, ! 107, 0, ! 104, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 102, ! 107, 0, 4, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, + 2, 104, 0, ! 105, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 107, 0, ! 105, 0, ! 103, ! 0, ! ! 102, 0, 85, *************** *** 721,734 **** 2, 0, ! 104, 0, 2, 3, 0, ! 105, 0, 72, --- 709,722 ---- 2, 0, ! 105, 0, 2, 3, 0, ! 106, 0, 72, *************** *** 764,769 **** --- 752,760 ---- 16, 0, + 101, + 0, + 91, 0, *************** *** 1023,1239 **** struct yywork { YYTYPE verify, advance; } yycrank[] = { 0,0, 0,0, 1,5, 0,0, 0,0, 0,0, 0,0, 0,0, ! 8,64, 0,0, 1,6, 1,7, ! 0,0, 0,0, 6,63, 0,0, ! 8,64, 8,64, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,6, 0,0, 1,8, ! 1,5, 6,63, 0,0, 8,64, ! 1,9, 8,65, 8,64, 0,0, 1,10, 0,0, 0,0, 0,0, ! 0,0, 1,11, 8,64, 0,0, ! 0,0, 0,0, 0,0, 8,64, 0,0, 0,0, 0,0, 1,12, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,13, 1,14, 1,15, 1,16, 1,17, 1,18, ! 1,19, 24,87, 1,20, 29,97, ! 0,0, 1,21, 1,22, 1,23, ! 1,24, 1,25, 0,0, 1,26, ! 1,27, 1,28, 13,68, 15,70, ! 1,29, 14,69, 16,72, 17,74, ! 18,75, 16,73, 15,71, 18,76, ! 19,77, 20,79, 1,30, 1,31, ! 1,32, 1,33, 1,34, 1,35, ! 21,80, 1,36, 19,78, 23,85, ! 21,81, 1,37, 1,38, 1,39, ! 1,40, 1,41, 2,5, 1,42, ! 1,43, 1,44, 1,45, 25,88, ! 1,46, 23,86, 2,6, 2,7, ! 10,67, 10,67, 10,67, 10,67, ! 10,67, 10,67, 10,67, 10,67, ! 10,67, 10,67, 41,129, 22,82, ! 26,89, 33,110, 28,95, 22,83, ! 26,90, 41,130, 27,92, 33,111, ! 34,112, 2,6, 46,140, 2,8, ! 2,47, 22,84, 26,91, 28,96, ! 2,9, 27,93, 27,94, 30,98, ! 2,10, 34,113, 36,116, 2,5, ! 35,114, 2,11, 30,99, 40,127, ! 31,101, 39,125, 30,100, 31,102, ! 35,115, 48,143, 31,103, 2,12, ! 36,117, 31,104, 45,138, 39,126, ! 45,139, 40,128, 2,13, 2,14, 2,15, 2,16, 2,17, 2,18, ! 2,19, 2,5, 2,20, 53,147, ! 2,5, 2,21, 2,48, 2,23, ! 2,24, 2,25, 37,118, 2,26, ! 2,27, 2,28, 37,119, 42,131, ! 2,29, 54,69, 37,120, 56,149, ! 38,122, 2,5, 38,123, 42,132, ! 37,121, 55,148, 2,30, 2,31, ! 2,32, 2,33, 2,34, 2,35, ! 55,71, 2,36, 3,49, 43,133, ! 38,124, 2,37, 2,38, 2,39, ! 2,40, 2,41, 43,134, 2,42, ! 2,43, 2,44, 2,45, 44,136, ! 2,46, 43,135, 44,137, 57,79, ! 2,5, 2,5, 2,5, 32,105, ! 3,50, 58,150, 32,106, 3,51, ! 59,88, 58,81, 32,107, 3,9, ! 61,152, 32,108, 66,155, 3,52, ! 68,156, 69,157, 70,158, 32,109, ! 52,67, 52,67, 52,67, 52,67, ! 52,67, 52,67, 52,67, 52,67, ! 52,67, 52,67, 3,12, 72,161, ! 71,159, 73,162, 74,163, 60,151, ! 71,160, 3,53, 3,54, 3,55, ! 3,16, 3,56, 3,18, 3,19, ! 75,164, 3,57, 60,93, 60,94, ! 3,58, 3,22, 3,23, 3,24, ! 3,59, 76,165, 3,26, 3,60, ! 3,28, 77,166, 78,167, 3,61, ! 79,168, 80,169, 81,170, 82,171, ! 83,172, 84,173, 85,174, 87,177, ! 4,49, 3,30, 3,31, 3,32, ! 3,33, 3,34, 3,35, 89,180, ! 3,36, 62,153, 86,175, 86,176, ! 3,37, 3,38, 3,39, 3,40, ! 3,41, 90,181, 3,42, 3,43, ! 3,44, 3,45, 4,50, 3,46, ! 88,178, 4,62, 91,182, 88,179, ! 92,183, 4,9, 93,184, 62,154, ! 94,185, 4,52, 62,154, 95,186, ! 4,51, 96,187, 97,188, 98,189, ! 99,191, 100,192, 62,154, 101,193, ! 102,194, 103,195, 104,196, 105,197, ! 4,12, 106,198, 98,190, 107,199, ! 108,200, 109,201, 110,202, 4,53, ! 4,54, 4,55, 4,16, 4,56, ! 4,18, 4,19, 4,51, 4,57, ! 111,203, 4,51, 4,58, 4,48, ! 4,23, 4,24, 4,59, 112,204, ! 4,26, 4,60, 4,28, 113,205, ! 114,206, 4,61, 115,207, 116,208, ! 117,210, 118,211, 4,51, 120,214, ! 121,215, 116,209, 122,216, 4,30, ! 4,31, 4,32, 4,33, 4,34, ! 4,35, 122,217, 4,36, 122,218, ! 123,219, 124,220, 4,37, 4,38, ! 4,39, 4,40, 4,41, 9,66, ! 4,42, 4,43, 4,44, 4,45, ! 119,212, 4,46, 47,141, 9,66, ! 9,0, 4,51, 4,51, 4,51, ! 125,221, 127,228, 47,141, 47,142, ! 128,229, 129,230, 130,231, 131,232, ! 119,213, 50,63, 50,144, 132,233, ! 133,234, 134,235, 135,237, 136,238, ! 134,236, 137,239, 9,66, 140,243, ! 9,66, 9,66, 147,156, 143,244, ! 148,245, 47,141, 150,169, 47,141, ! 47,141, 9,66, 151,183, 152,247, ! 50,145, 143,171, 9,66, 50,146, ! 47,141, 149,246, 156,248, 126,222, ! 149,163, 47,141, 126,223, 50,146, ! 138,240, 50,146, 50,146, 138,241, ! 157,249, 51,144, 158,250, 126,224, ! 126,225, 138,242, 159,251, 160,252, ! 126,226, 161,253, 126,227, 162,254, ! 163,255, 164,256, 165,257, 166,258, ! 154,153, 50,146, 50,146, 50,146, ! 167,259, 168,260, 169,261, 51,146, ! 50,146, 50,146, 51,146, 50,146, ! 50,146, 170,262, 171,263, 172,264, ! 50,146, 173,265, 51,146, 50,146, ! 51,146, 51,146, 154,154, 50,146, ! 174,266, 154,154, 175,267, 176,268, ! 50,146, 177,269, 178,270, 179,271, ! 180,272, 154,154, 181,273, 182,274, ! 183,275, 184,276, 185,277, 186,278, ! 51,146, 51,146, 51,146, 187,279, ! 188,280, 189,281, 190,282, 51,146, ! 51,146, 191,283, 51,146, 51,146, ! 192,284, 193,285, 194,286, 51,146, ! 195,287, 196,288, 51,146, 50,146, ! 50,146, 50,146, 51,146, 197,289, ! 198,290, 199,291, 200,292, 51,146, ! 201,293, 202,294, 203,295, 204,296, ! 205,297, 206,298, 207,299, 208,300, ! 209,301, 210,302, 212,303, 213,304, ! 215,305, 216,306, 217,307, 218,308, ! 219,309, 220,310, 221,311, 222,312, ! 223,313, 224,314, 225,315, 226,316, ! 227,317, 228,318, 229,319, 230,320, ! 231,321, 232,322, 51,146, 51,146, ! 51,146, 233,323, 234,324, 235,325, ! 236,326, 237,327, 239,328, 240,329, ! 241,330, 242,331, 243,332, 244,333, ! 245,250, 246,334, 247,335, 248,336, ! 249,337, 250,338, 251,339, 252,340, ! 254,341, 255,342, 256,343, 257,344, ! 258,345, 260,346, 261,347, 262,348, ! 263,349, 264,350, 265,351, 267,352, ! 268,353, 269,355, 271,356, 272,357, ! 273,358, 276,359, 277,360, 278,361, ! 280,362, 281,363, 282,364, 283,365, ! 268,354, 284,366, 285,367, 286,368, ! 287,369, 289,370, 290,371, 291,372, ! 292,373, 293,374, 297,375, 298,376, ! 299,377, 300,378, 301,379, 302,380, ! 304,381, 305,382, 306,383, 307,384, ! 308,385, 310,386, 311,387, 312,388, ! 313,389, 314,390, 316,391, 317,392, ! 318,393, 320,394, 321,395, 322,396, ! 323,397, 324,398, 325,399, 326,400, ! 327,401, 329,402, 330,403, 331,404, ! 334,405, 335,406, 337,407, 338,408, ! 339,409, 340,410, 341,411, 342,412, ! 344,413, 345,414, 346,415, 347,416, ! 349,417, 350,418, 351,419, 353,420, ! 354,421, 355,422, 356,423, 357,424, ! 358,425, 360,426, 361,427, 362,428, ! 365,429, 367,430, 368,431, 369,432, ! 370,433, 372,434, 373,435, 374,436, ! 375,437, 377,438, 378,439, 379,441, ! 380,442, 381,443, 382,444, 383,445, ! 378,440, 384,446, 385,447, 386,448, ! 387,449, 388,450, 389,451, 390,452, ! 392,453, 393,454, 394,455, 396,456, ! 398,457, 399,458, 400,459, 402,460, ! 403,461, 405,462, 406,428, 409,463, ! 410,464, 411,465, 412,466, 413,467, ! 414,468, 415,469, 417,470, 418,471, ! 419,472, 420,473, 421,474, 424,475, ! 426,476, 427,477, 428,478, 430,479, ! 435,480, 437,481, 439,482, 440,483, ! 441,484, 442,485, 443,486, 445,487, ! 446,488, 447,489, 448,490, 449,491, ! 450,492, 453,493, 455,494, 457,495, ! 458,496, 460,497, 461,498, 463,499, ! 464,500, 465,501, 466,502, 467,503, ! 468,504, 469,505, 470,506, 473,507, ! 474,508, 475,509, 477,513, 480,514, ! 482,515, 483,516, 484,517, 486,518, ! 487,519, 488,520, 489,521, 475,510, ! 493,522, 475,511, 475,512, 494,523, ! 496,524, 497,525, 498,526, 499,527, ! 501,528, 502,529, 507,530, 508,531, ! 509,532, 510,533, 511,534, 512,535, ! 513,536, 514,537, 515,538, 516,539, ! 517,540, 518,541, 519,542, 520,543, ! 522,544, 524,545, 528,546, 530,547, ! 531,548, 532,549, 533,550, 534,551, ! 535,552, 536,553, 539,554, 544,555, ! 545,556, 547,557, 548,558, 549,559, ! 550,560, 551,561, 552,562, 553,563, ! 556,564, 557,565, 558,566, 559,567, ! 560,568, 561,569, 562,570, 563,571, ! 564,572, 567,573, 568,574, 569,575, ! 570,576, 571,577, 573,578, 574,579, ! 575,580, 577,581, 578,582, 579,583, ! 581,584, 582,585, 0,0, 0,0, 0,0}; struct yysvf yysvec[] = { 0, 0, 0, --- 1014,1237 ---- struct yywork { YYTYPE verify, advance; } yycrank[] = { 0,0, 0,0, 1,5, 0,0, 0,0, 0,0, 0,0, 0,0, ! 8,65, 0,0, 1,6, 1,7, ! 0,0, 0,0, 6,64, 0,0, ! 8,65, 8,65, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,6, 0,0, 1,8, ! 1,5, 6,64, 0,0, 8,65, ! 1,9, 8,66, 8,65, 0,0, 1,10, 0,0, 0,0, 0,0, ! 0,0, 1,11, 8,65, 0,0, ! 0,0, 0,0, 0,0, 8,65, 0,0, 0,0, 0,0, 1,12, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,13, 1,14, 1,15, 1,16, 1,17, 1,18, ! 1,19, 0,0, 1,20, 0,0, ! 24,88, 1,21, 1,22, 1,23, ! 1,24, 1,25, 29,98, 1,26, ! 1,27, 1,28, 13,69, 15,71, ! 1,29, 14,70, 16,73, 17,75, ! 1,30, 16,74, 15,72, 20,80, ! 19,78, 25,89, 1,31, 1,32, ! 1,33, 1,34, 1,35, 1,36, ! 18,76, 1,37, 19,79, 18,77, ! 28,96, 1,38, 1,39, 1,40, ! 1,41, 1,42, 2,5, 1,43, ! 1,44, 1,45, 1,46, 47,143, ! 1,47, 28,97, 2,6, 2,7, ! 10,68, 10,68, 10,68, 10,68, ! 10,68, 10,68, 10,68, 10,68, ! 10,68, 10,68, 21,81, 22,83, ! 23,86, 26,90, 21,82, 22,84, ! 34,113, 26,91, 27,93, 49,146, ! 35,115, 2,6, 34,114, 2,8, ! 2,48, 22,85, 23,87, 26,92, ! 2,9, 27,94, 27,95, 31,101, ! 2,10, 35,116, 37,119, 2,5, ! 36,117, 2,11, 31,102, 41,130, ! 32,104, 40,128, 31,103, 32,105, ! 36,118, 42,132, 32,106, 2,12, ! 37,120, 32,107, 54,150, 40,129, ! 42,133, 41,131, 2,13, 2,14, 2,15, 2,16, 2,17, 2,18, ! 2,19, 2,5, 2,20, 55,70, ! 2,5, 2,21, 2,49, 2,23, ! 2,24, 2,25, 38,121, 2,26, ! 2,27, 2,28, 38,122, 43,134, ! 2,29, 57,152, 38,123, 45,139, ! 2,30, 2,5, 45,140, 43,135, ! 38,124, 56,151, 2,31, 2,32, ! 2,33, 2,34, 2,35, 2,36, ! 56,72, 2,37, 3,50, 58,80, ! 60,89, 2,38, 2,39, 2,40, ! 2,41, 2,42, 62,155, 2,43, ! 2,44, 2,45, 2,46, 67,158, ! 2,47, 39,125, 44,136, 39,126, ! 2,5, 2,5, 2,5, 30,99, ! 3,51, 44,137, 46,141, 3,52, ! 46,142, 69,159, 59,153, 3,9, ! 44,138, 39,127, 59,82, 3,53, ! 70,160, 71,161, 73,164, 30,100, ! 30,100, 30,100, 30,100, 30,100, ! 30,100, 30,100, 30,100, 30,100, ! 30,100, 72,162, 3,12, 74,165, ! 75,166, 72,163, 76,167, 61,154, ! 77,168, 3,54, 3,55, 3,56, ! 3,16, 3,57, 3,18, 3,19, ! 78,169, 3,58, 61,94, 61,95, ! 3,59, 3,22, 3,23, 3,24, ! 3,60, 79,170, 3,26, 3,61, ! 3,28, 80,171, 81,172, 3,62, ! 82,173, 83,174, 84,175, 3,30, ! 85,176, 86,177, 87,178, 87,179, ! 4,50, 3,31, 3,32, 3,33, ! 3,34, 3,35, 3,36, 88,180, ! 3,37, 90,183, 63,156, 91,184, ! 3,38, 3,39, 3,40, 3,41, ! 3,42, 92,185, 3,43, 3,44, ! 3,45, 3,46, 4,51, 3,47, ! 33,108, 4,63, 93,186, 33,109, ! 94,187, 4,9, 95,188, 33,110, ! 63,157, 4,53, 33,111, 63,157, ! 4,52, 96,189, 89,181, 97,190, ! 33,112, 89,182, 98,191, 63,157, ! 102,195, 103,196, 104,197, 105,198, ! 4,12, 106,199, 107,200, 108,201, ! 109,202, 101,193, 110,203, 4,54, ! 4,55, 4,56, 4,16, 4,57, ! 4,18, 4,19, 4,52, 4,58, ! 101,194, 4,52, 4,59, 4,49, ! 4,23, 4,24, 4,60, 111,204, ! 4,26, 4,61, 4,28, 112,205, ! 113,206, 4,62, 114,207, 115,208, ! 116,209, 4,30, 4,52, 117,210, ! 118,211, 120,214, 121,215, 4,31, ! 4,32, 4,33, 4,34, 4,35, ! 4,36, 123,218, 4,37, 124,219, ! 126,223, 127,224, 4,38, 4,39, ! 4,40, 4,41, 4,42, 9,67, ! 4,43, 4,44, 4,45, 4,46, ! 122,216, 4,47, 48,144, 9,67, ! 9,0, 4,52, 4,52, 4,52, ! 119,212, 128,225, 48,144, 48,145, ! 125,220, 130,232, 119,213, 131,233, ! 122,217, 51,64, 51,147, 125,221, ! 132,234, 125,222, 133,235, 134,236, ! 135,237, 136,238, 9,67, 137,239, ! 9,67, 9,67, 137,240, 138,241, ! 139,242, 48,144, 140,243, 48,144, ! 48,144, 9,67, 141,244, 143,247, ! 51,148, 141,245, 9,67, 51,149, ! 48,144, 146,248, 150,159, 141,246, ! 151,249, 48,144, 153,172, 51,149, ! 154,186, 51,149, 51,149, 146,174, ! 155,251, 52,147, 53,68, 53,68, ! 53,68, 53,68, 53,68, 53,68, ! 53,68, 53,68, 53,68, 53,68, ! 152,250, 159,252, 160,253, 152,166, ! 161,254, 51,149, 51,149, 51,149, ! 162,255, 163,256, 164,257, 52,149, ! 51,149, 51,149, 52,149, 51,149, ! 51,149, 157,156, 129,226, 165,258, ! 51,149, 129,227, 52,149, 51,149, ! 52,149, 52,149, 166,259, 51,149, ! 167,260, 168,261, 129,228, 129,229, ! 51,149, 169,262, 170,263, 129,230, ! 171,264, 129,231, 172,265, 157,157, ! 173,266, 174,267, 157,157, 175,268, ! 52,149, 52,149, 52,149, 176,269, ! 177,270, 178,271, 157,157, 52,149, ! 52,149, 179,272, 52,149, 52,149, ! 180,273, 181,274, 182,275, 52,149, ! 183,276, 100,192, 52,149, 51,149, ! 51,149, 51,149, 52,149, 184,277, ! 185,278, 186,279, 187,280, 52,149, ! 100,100, 100,100, 100,100, 100,100, ! 100,100, 100,100, 100,100, 100,100, ! 100,100, 100,100, 188,281, 189,282, ! 190,283, 191,284, 192,192, 193,286, ! 194,287, 195,288, 196,289, 197,290, ! 198,291, 199,292, 200,293, 201,294, ! 202,295, 203,296, 204,297, 205,298, ! 206,299, 207,300, 52,149, 52,149, ! 52,149, 208,301, 209,302, 210,303, ! 211,304, 212,305, 213,306, 214,307, ! 216,308, 217,309, 219,310, 220,311, ! 221,312, 222,313, 223,314, 224,315, ! 225,316, 226,317, 227,318, 228,319, ! 229,320, 230,321, 231,322, 232,323, ! 233,324, 234,325, 235,326, 236,327, ! 237,328, 238,329, 239,330, 240,331, ! 241,332, 243,333, 244,334, 245,335, ! 246,336, 247,337, 248,338, 249,254, ! 250,339, 251,340, 252,341, 192,285, ! 253,342, 254,343, 255,344, 256,345, ! 258,346, 259,347, 260,348, 261,349, ! 262,350, 264,351, 265,352, 266,353, ! 267,354, 268,355, 269,356, 271,357, ! 272,358, 273,360, 275,361, 276,362, ! 277,363, 280,364, 281,365, 282,366, ! 284,367, 286,368, 287,369, 288,370, ! 272,359, 289,371, 290,372, 291,373, ! 292,374, 294,375, 295,376, 296,377, ! 297,378, 298,379, 302,380, 303,381, ! 304,382, 305,383, 306,384, 307,385, ! 309,386, 310,387, 311,388, 312,389, ! 313,390, 315,391, 316,392, 317,393, ! 318,394, 319,395, 321,396, 322,397, ! 323,398, 325,399, 326,400, 327,401, ! 328,402, 329,403, 330,404, 331,405, ! 332,406, 334,407, 335,408, 336,409, ! 339,410, 340,411, 342,412, 343,413, ! 344,414, 345,415, 346,416, 347,417, ! 349,418, 350,419, 351,420, 352,421, ! 354,422, 355,423, 356,424, 358,425, ! 359,426, 360,427, 361,428, 362,429, ! 363,430, 365,431, 366,432, 367,433, ! 370,434, 372,435, 373,436, 374,437, ! 375,438, 377,439, 378,440, 379,441, ! 380,442, 382,443, 383,444, 384,446, ! 385,447, 386,448, 387,449, 388,450, ! 383,445, 389,451, 390,452, 391,453, ! 392,454, 393,455, 394,456, 395,457, ! 397,458, 398,459, 399,460, 401,461, ! 403,462, 404,463, 405,464, 407,465, ! 408,466, 410,467, 411,433, 414,468, ! 415,469, 416,470, 417,471, 418,472, ! 419,473, 420,474, 422,475, 423,476, ! 424,477, 425,478, 426,479, 429,480, ! 431,481, 432,482, 433,483, 435,484, ! 440,485, 442,486, 444,487, 445,488, ! 446,489, 447,490, 448,491, 450,492, ! 451,493, 452,494, 453,495, 454,496, ! 455,497, 458,498, 460,499, 462,500, ! 463,501, 465,502, 466,503, 468,504, ! 469,505, 470,506, 471,507, 472,508, ! 473,509, 474,510, 475,511, 478,512, ! 479,513, 480,514, 482,518, 485,519, ! 487,520, 488,521, 489,522, 491,523, ! 492,524, 493,525, 494,526, 480,515, ! 498,527, 480,516, 480,517, 499,528, ! 501,529, 502,530, 503,531, 504,532, ! 506,533, 507,534, 512,535, 513,536, ! 514,537, 515,538, 516,539, 517,540, ! 518,541, 519,542, 520,543, 521,544, ! 522,545, 523,546, 524,547, 525,548, ! 527,549, 529,550, 533,551, 535,552, ! 536,553, 537,554, 538,555, 539,556, ! 540,557, 541,558, 544,559, 549,560, ! 550,561, 552,562, 553,563, 554,564, ! 555,565, 556,566, 557,567, 558,568, ! 561,569, 562,570, 563,571, 564,572, ! 565,573, 566,574, 567,575, 568,576, ! 569,577, 572,578, 573,579, 574,580, ! 575,581, 576,582, 578,583, 579,584, ! 580,585, 582,586, 583,587, 584,588, ! 586,589, 587,590, 0,0, 0,0, 0,0}; struct yysvf yysvec[] = { 0, 0, 0, *************** *** 1254,1829 **** yycrank+15, 0, yyvstop+24, yycrank+11, 0, yyvstop+26, yycrank+13, 0, yyvstop+28, ! yycrank+16, 0, yyvstop+30, yycrank+27, 0, yyvstop+32, ! yycrank+19, 0, yyvstop+34, ! yycrank+39, 0, yyvstop+36, yycrank+70, 0, yyvstop+38, ! yycrank+42, 0, yyvstop+40, ! yycrank+7, 0, yyvstop+42, ! yycrank+40, 0, yyvstop+44, ! yycrank+71, 0, yyvstop+46, yycrank+69, 0, yyvstop+48, ! yycrank+69, 0, yyvstop+50, ! yycrank+10, 0, yyvstop+52, ! yycrank+47, 0, yyvstop+54, ! yycrank+56, 0, yyvstop+56, ! yycrank+138, 0, yyvstop+58, ! yycrank+26, 0, yyvstop+60, ! yycrank+47, 0, yyvstop+62, ! yycrank+63, 0, yyvstop+64, ! yycrank+61, 0, yyvstop+66, ! yycrank+97, 0, yyvstop+68, ! yycrank+109, 0, yyvstop+70, ! yycrank+64, 0, yyvstop+72, ! yycrank+65, 0, yyvstop+74, ! yycrank+33, 0, yyvstop+76, ! yycrank+102, 0, yyvstop+78, ! yycrank+122, 0, yyvstop+80, ! yycrank+120, 0, yyvstop+82, ! yycrank+64, 0, yyvstop+84, ! yycrank+45, 0, yyvstop+86, ! yycrank+-413, 0, yyvstop+88, ! yycrank+104, yysvec+22, yyvstop+90, ! yycrank+0, 0, yyvstop+92, ! yycrank+420, 0, yyvstop+95, ! yycrank+459, 0, yyvstop+98, ! yycrank+208, yysvec+51, yyvstop+100, ! yycrank+111, yysvec+51, yyvstop+102, ! yycrank+119, yysvec+51, yyvstop+104, ! yycrank+137, yysvec+51, yyvstop+106, ! yycrank+125, 0, yyvstop+108, ! yycrank+157, yysvec+51, yyvstop+110, ! yycrank+176, yysvec+51, yyvstop+112, ! yycrank+165, yysvec+51, yyvstop+114, ! yycrank+198, yysvec+51, yyvstop+116, ! yycrank+183, yysvec+51, yyvstop+118, ! yycrank+-303, yysvec+47, yyvstop+120, ! yycrank+0, yysvec+6, yyvstop+122, yycrank+0, yysvec+8, 0, ! yycrank+0, 0, yyvstop+124, ! yycrank+211, 0, 0, ! yycrank+0, yysvec+10, yyvstop+126, ! yycrank+168, 0, 0, yycrank+188, 0, 0, ! yycrank+189, 0, 0, ! yycrank+190, 0, 0, ! yycrank+188, 0, 0, ! yycrank+204, 0, 0, ! yycrank+199, 0, 0, yycrank+215, 0, 0, ! yycrank+204, 0, 0, ! yycrank+214, 0, 0, ! yycrank+218, 0, 0, ! yycrank+223, 0, 0, ! yycrank+229, 0, 0, ! yycrank+212, 0, 0, ! yycrank+209, 0, 0, ! yycrank+217, 0, 0, ! yycrank+223, 0, 0, yycrank+225, 0, 0, yycrank+237, 0, 0, - yycrank+229, 0, 0, - yycrank+249, 0, 0, - yycrank+233, 0, 0, - yycrank+250, 0, 0, - yycrank+251, 0, 0, - yycrank+254, 0, 0, - yycrank+269, 0, 0, - yycrank+270, 0, 0, yycrank+263, 0, 0, ! yycrank+276, 0, 0, ! yycrank+266, 0, 0, ! yycrank+238, 0, 0, ! yycrank+236, 0, 0, ! yycrank+248, 0, 0, ! yycrank+246, 0, 0, ! yycrank+232, 0, 0, ! yycrank+238, 0, 0, ! yycrank+236, 0, 0, ! yycrank+241, 0, 0, ! yycrank+256, 0, 0, yycrank+244, 0, 0, ! yycrank+246, 0, 0, ! yycrank+243, 0, 0, ! yycrank+239, 0, 0, ! yycrank+253, 0, 0, ! yycrank+260, 0, 0, ! yycrank+276, 0, 0, ! yycrank+272, 0, 0, yycrank+274, 0, 0, - yycrank+275, 0, 0, - yycrank+269, 0, 0, - yycrank+266, 0, 0, - yycrank+310, 0, 0, yycrank+271, 0, 0, ! yycrank+289, 0, 0, ! yycrank+288, 0, 0, yycrank+286, 0, 0, yycrank+291, 0, 0, ! yycrank+303, 0, 0, ! yycrank+362, 0, 0, ! yycrank+315, 0, 0, ! yycrank+323, 0, 0, yycrank+328, 0, 0, yycrank+329, 0, 0, ! yycrank+317, 0, 0, ! yycrank+328, 0, 0, ! yycrank+322, 0, 0, ! yycrank+322, 0, 0, ! yycrank+317, 0, 0, ! yycrank+323, 0, 0, ! yycrank+320, 0, 0, ! yycrank+365, 0, 0, ! yycrank+0, 0, yyvstop+128, ! yycrank+324, 0, 0, ! yycrank+0, yysvec+47, 0, yycrank+0, 0, yyvstop+130, ! yycrank+363, 0, 0, yycrank+0, 0, yyvstop+132, ! yycrank+0, yysvec+50, yyvstop+134, ! yycrank+0, yysvec+51, 0, ! yycrank+358, yysvec+51, 0, ! yycrank+379, yysvec+51, 0, ! yycrank+389, 0, 0, ! yycrank+378, yysvec+51, 0, ! yycrank+372, yysvec+51, 0, ! yycrank+375, yysvec+51, 0, ! yycrank+0, 0, yyvstop+136, ! yycrank+-474, yysvec+47, 0, ! yycrank+0, 0, yyvstop+139, ! yycrank+393, 0, 0, ! yycrank+390, 0, 0, ! yycrank+392, 0, 0, ! yycrank+390, 0, 0, ! yycrank+393, 0, 0, ! yycrank+395, 0, 0, ! yycrank+392, 0, 0, ! yycrank+398, 0, 0, ! yycrank+410, 0, 0, yycrank+404, 0, 0, yycrank+406, 0, 0, ! yycrank+420, 0, 0, ! yycrank+405, 0, 0, ! yycrank+422, 0, 0, ! yycrank+428, 0, 0, ! yycrank+429, 0, 0, ! yycrank+416, 0, 0, ! yycrank+418, 0, 0, ! yycrank+439, 0, 0, ! yycrank+445, 0, 0, ! yycrank+416, 0, 0, ! yycrank+444, 0, 0, ! yycrank+438, 0, 0, yycrank+431, 0, 0, ! yycrank+448, 0, 0, ! yycrank+445, 0, 0, ! yycrank+442, 0, 0, ! yycrank+445, 0, 0, ! yycrank+448, 0, 0, ! yycrank+440, 0, 0, ! yycrank+454, 0, 0, ! yycrank+447, 0, 0, ! yycrank+452, 0, 0, ! yycrank+426, 0, 0, ! yycrank+433, 0, 0, yycrank+432, 0, 0, - yycrank+429, 0, 0, - yycrank+422, 0, 0, - yycrank+422, 0, 0, - yycrank+433, 0, 0, - yycrank+431, 0, 0, - yycrank+431, 0, 0, - yycrank+437, 0, 0, - yycrank+434, 0, 0, - yycrank+434, 0, 0, - yycrank+437, 0, 0, - yycrank+443, 0, 0, - yycrank+438, 0, 0, - yycrank+439, 0, 0, - yycrank+442, 0, 0, - yycrank+442, 0, 0, yycrank+450, 0, 0, ! yycrank+457, 0, 0, ! yycrank+460, 0, 0, ! yycrank+445, 0, 0, ! yycrank+0, 0, yyvstop+141, ! yycrank+446, 0, 0, ! yycrank+449, 0, 0, ! yycrank+0, 0, yyvstop+143, ! yycrank+457, 0, 0, yycrank+464, 0, 0, ! yycrank+455, 0, 0, ! yycrank+469, 0, 0, yycrank+461, 0, 0, yycrank+454, 0, 0, ! yycrank+454, 0, 0, yycrank+463, 0, 0, ! yycrank+461, 0, 0, yycrank+464, 0, 0, - yycrank+473, 0, 0, yycrank+459, 0, 0, ! yycrank+475, 0, 0, ! yycrank+476, 0, 0, ! yycrank+468, 0, 0, yycrank+480, 0, 0, - yycrank+481, 0, 0, - yycrank+481, 0, 0, - yycrank+481, 0, 0, yycrank+487, 0, 0, ! yycrank+473, 0, 0, ! yycrank+483, 0, 0, ! yycrank+473, 0, 0, yycrank+0, 0, yyvstop+145, - yycrank+489, 0, 0, - yycrank+474, 0, 0, yycrank+487, 0, 0, ! yycrank+488, 0, 0, ! yycrank+478, 0, 0, ! yycrank+585, 0, 0, ! yycrank+518, yysvec+51, 0, ! yycrank+520, 0, 0, ! yycrank+522, yysvec+51, 0, ! yycrank+517, 0, 0, ! yycrank+533, 0, 0, ! yycrank+534, 0, 0, ! yycrank+537, 0, 0, ! yycrank+530, 0, 0, yycrank+0, 0, yyvstop+147, ! yycrank+538, 0, 0, ! yycrank+540, 0, 0, ! yycrank+523, 0, 0, ! yycrank+523, 0, 0, ! yycrank+539, 0, 0, ! yycrank+0, 0, yyvstop+149, yycrank+514, 0, 0, ! yycrank+541, 0, 0, ! yycrank+535, 0, 0, ! yycrank+525, 0, yyvstop+151, ! yycrank+548, 0, 0, ! yycrank+530, 0, 0, ! yycrank+0, 0, yyvstop+153, ! yycrank+535, 0, 0, ! yycrank+548, 0, 0, ! yycrank+550, 0, 0, yycrank+0, 0, yyvstop+155, ! yycrank+553, 0, 0, ! yycrank+540, 0, 0, ! yycrank+541, 0, 0, yycrank+0, 0, yyvstop+157, yycrank+0, 0, yyvstop+159, - yycrank+539, 0, 0, - yycrank+543, 0, 0, - yycrank+543, 0, 0, yycrank+0, 0, yyvstop+161, ! yycrank+551, 0, 0, ! yycrank+515, 0, 0, ! yycrank+512, 0, 0, ! yycrank+526, 0, 0, ! yycrank+528, 0, 0, ! yycrank+515, 0, 0, ! yycrank+520, 0, 0, ! yycrank+531, 0, 0, yycrank+0, 0, yyvstop+163, ! yycrank+532, 0, 0, ! yycrank+519, 0, 0, ! yycrank+534, 0, 0, ! yycrank+539, 0, 0, ! yycrank+536, 0, 0, yycrank+0, 0, yyvstop+165, yycrank+0, 0, yyvstop+167, yycrank+0, 0, yyvstop+169, - yycrank+541, 0, 0, - yycrank+538, 0, 0, - yycrank+539, 0, 0, - yycrank+596, 0, 0, - yycrank+540, 0, 0, - yycrank+538, 0, 0, yycrank+0, 0, yyvstop+171, - yycrank+543, 0, 0, - yycrank+544, 0, 0, - yycrank+549, 0, 0, - yycrank+537, 0, 0, - yycrank+542, 0, 0, yycrank+0, 0, yyvstop+173, ! yycrank+533, 0, 0, ! yycrank+536, 0, 0, ! yycrank+546, 0, 0, ! yycrank+541, 0, 0, ! yycrank+556, 0, 0, yycrank+0, 0, yyvstop+175, ! yycrank+550, 0, 0, ! yycrank+547, 0, 0, ! yycrank+557, 0, 0, yycrank+0, 0, yyvstop+177, ! yycrank+556, 0, 0, ! yycrank+557, 0, 0, ! yycrank+548, 0, 0, ! yycrank+544, 0, 0, ! yycrank+545, 0, 0, ! yycrank+546, 0, 0, ! yycrank+553, 0, 0, ! yycrank+560, 0, 0, yycrank+0, 0, yyvstop+179, ! yycrank+551, 0, 0, ! yycrank+558, 0, 0, ! yycrank+551, 0, 0, yycrank+0, 0, yyvstop+181, yycrank+0, 0, yyvstop+183, ! yycrank+603, 0, 0, ! yycrank+596, yysvec+51, 0, yycrank+0, 0, yyvstop+185, - yycrank+598, 0, 0, - yycrank+602, 0, 0, - yycrank+599, 0, 0, - yycrank+605, 0, 0, - yycrank+592, 0, 0, - yycrank+589, 0, 0, yycrank+0, 0, yyvstop+187, ! yycrank+611, 0, 0, ! yycrank+593, 0, 0, ! yycrank+601, 0, 0, ! yycrank+597, 0, 0, yycrank+0, 0, yyvstop+189, ! yycrank+615, 0, 0, ! yycrank+610, 0, 0, ! yycrank+613, 0, 0, yycrank+0, 0, yyvstop+191, ! yycrank+610, 0, 0, ! yycrank+619, 0, 0, ! yycrank+601, 0, 0, ! yycrank+610, 0, 0, ! yycrank+610, 0, 0, ! yycrank+610, 0, 0, ! yycrank+0, 0, yyvstop+193, ! yycrank+610, 0, 0, ! yycrank+611, 0, 0, yycrank+621, 0, 0, yycrank+0, 0, yyvstop+195, yycrank+0, 0, yyvstop+197, ! yycrank+580, 0, 0, yycrank+0, 0, yyvstop+199, - yycrank+592, 0, 0, - yycrank+585, 0, 0, - yycrank+585, 0, 0, - yycrank+582, 0, 0, yycrank+0, 0, yyvstop+201, ! yycrank+597, 0, 0, ! yycrank+593, 0, 0, ! yycrank+599, 0, 0, ! yycrank+582, 0, 0, yycrank+0, 0, yyvstop+203, ! yycrank+601, 0, 0, ! yycrank+594, 0, 0, ! yycrank+595, 0, 0, ! yycrank+596, 0, 0, ! yycrank+602, 0, 0, ! yycrank+606, 0, 0, ! yycrank+591, 0, 0, ! yycrank+594, 0, 0, ! yycrank+609, 0, 0, ! yycrank+610, 0, 0, ! yycrank+615, 0, 0, yycrank+610, 0, 0, - yycrank+600, 0, 0, - yycrank+603, 0, 0, yycrank+0, 0, yyvstop+205, ! yycrank+615, 0, 0, ! yycrank+601, 0, 0, ! yycrank+616, 0, 0, ! yycrank+0, 0, yyvstop+207, yycrank+610, 0, 0, yycrank+0, 0, yyvstop+209, ! yycrank+603, 0, 0, ! yycrank+606, 0, 0, ! yycrank+621, 0, 0, yycrank+0, 0, yyvstop+211, ! yycrank+608, 0, 0, ! yycrank+616, 0, 0, yycrank+0, 0, yyvstop+213, ! yycrank+645, 0, 0, ! yycrank+656, yysvec+51, 0, yycrank+0, 0, yyvstop+215, yycrank+0, 0, yyvstop+217, ! yycrank+649, 0, 0, ! yycrank+649, 0, 0, ! yycrank+656, 0, 0, ! yycrank+657, 0, 0, ! yycrank+658, 0, 0, ! yycrank+650, 0, 0, ! yycrank+668, 0, 0, yycrank+0, 0, yyvstop+219, - yycrank+658, 0, 0, - yycrank+666, 0, 0, - yycrank+654, 0, 0, - yycrank+666, 0, 0, - yycrank+655, 0, 0, yycrank+0, 0, yyvstop+221, yycrank+0, 0, yyvstop+223, ! yycrank+644, 0, 0, yycrank+0, 0, yyvstop+225, - yycrank+663, 0, 0, - yycrank+659, 0, 0, - yycrank+653, 0, 0, yycrank+0, 0, yyvstop+227, ! yycrank+643, 0, 0, yycrank+0, 0, yyvstop+229, yycrank+0, 0, yyvstop+231, yycrank+0, 0, yyvstop+233, yycrank+0, 0, yyvstop+235, - yycrank+634, 0, 0, yycrank+0, 0, yyvstop+237, - yycrank+644, 0, 0, yycrank+0, 0, yyvstop+239, ! yycrank+645, 0, 0, ! yycrank+642, 0, 0, ! yycrank+637, 0, 0, ! yycrank+648, 0, 0, ! yycrank+645, 0, 0, yycrank+0, 0, yyvstop+241, ! yycrank+634, 0, 0, ! yycrank+636, 0, 0, ! yycrank+654, 0, 0, ! yycrank+640, 0, 0, ! yycrank+647, 0, 0, ! yycrank+646, 0, 0, yycrank+0, 0, yyvstop+243, yycrank+0, 0, yyvstop+245, ! yycrank+645, 0, 0, yycrank+0, 0, yyvstop+247, - yycrank+641, 0, 0, yycrank+0, 0, yyvstop+249, ! yycrank+650, 0, 0, ! yycrank+655, 0, 0, yycrank+0, 0, yyvstop+251, ! yycrank+660, 0, 0, ! yycrank+661, 0, 0, yycrank+0, 0, yyvstop+253, ! yycrank+694, 0, 0, ! yycrank+682, 0, 0, ! yycrank+697, 0, 0, yycrank+688, 0, 0, yycrank+689, 0, 0, - yycrank+679, 0, 0, - yycrank+689, 0, 0, - yycrank+695, 0, 0, - yycrank+0, 0, yyvstop+255, yycrank+0, 0, yyvstop+257, ! yycrank+700, 0, 0, ! yycrank+689, 0, 0, ! yycrank+706, 0, 0, yycrank+0, 0, yyvstop+259, - yycrank+690, 0, 0, yycrank+0, 0, yyvstop+261, yycrank+0, 0, yyvstop+263, ! yycrank+674, 0, 0, yycrank+0, 0, yyvstop+265, - yycrank+674, 0, 0, - yycrank+674, 0, 0, - yycrank+667, 0, 0, yycrank+0, 0, yyvstop+267, ! yycrank+668, 0, 0, ! yycrank+666, 0, 0, ! yycrank+680, 0, 0, ! yycrank+666, 0, 0, yycrank+0, 0, yyvstop+269, yycrank+0, 0, yyvstop+271, yycrank+0, 0, yyvstop+273, - yycrank+673, 0, 0, - yycrank+679, 0, 0, yycrank+0, 0, yyvstop+275, - yycrank+685, 0, 0, - yycrank+689, 0, 0, - yycrank+690, 0, 0, - yycrank+709, 0, 0, yycrank+0, 0, yyvstop+277, ! yycrank+721, 0, 0, ! yycrank+722, 0, 0, yycrank+0, 0, yyvstop+279, yycrank+0, 0, yyvstop+281, yycrank+0, 0, yyvstop+283, yycrank+0, 0, yyvstop+285, yycrank+729, 0, 0, ! yycrank+708, 0, 0, ! yycrank+717, 0, 0, yycrank+718, 0, 0, - yycrank+732, 0, 0, yycrank+723, 0, 0, ! yycrank+705, 0, 0, ! yycrank+701, 0, 0, ! yycrank+686, 0, 0, ! yycrank+699, 0, 0, ! yycrank+690, 0, 0, ! yycrank+695, 0, 0, ! yycrank+705, 0, 0, ! yycrank+693, 0, 0, ! yycrank+0, 0, yyvstop+287, ! yycrank+694, 0, 0, ! yycrank+0, 0, yyvstop+289, ! yycrank+705, 0, 0, yycrank+0, 0, yyvstop+291, yycrank+0, 0, yyvstop+293, yycrank+0, 0, yyvstop+295, - yycrank+741, 0, 0, yycrank+0, 0, yyvstop+297, - yycrank+745, 0, 0, - yycrank+747, 0, 0, - yycrank+731, 0, 0, - yycrank+736, 0, 0, - yycrank+741, 0, 0, - yycrank+751, 0, 0, - yycrank+735, 0, 0, yycrank+0, 0, yyvstop+299, yycrank+0, 0, yyvstop+301, ! yycrank+702, 0, 0, yycrank+0, 0, yyvstop+303, yycrank+0, 0, yyvstop+305, yycrank+0, 0, yyvstop+307, yycrank+0, 0, yyvstop+309, - yycrank+703, 0, 0, - yycrank+704, 0, 0, yycrank+0, 0, yyvstop+311, - yycrank+745, 0, 0, - yycrank+746, 0, 0, - yycrank+741, 0, 0, - yycrank+741, 0, 0, - yycrank+756, 0, 0, - yycrank+759, 0, 0, - yycrank+758, 0, 0, yycrank+0, 0, yyvstop+313, yycrank+0, 0, yyvstop+315, ! yycrank+727, 0, 0, ! yycrank+760, 0, 0, ! yycrank+754, 0, 0, ! yycrank+758, 0, 0, ! yycrank+748, 0, 0, ! yycrank+766, 0, 0, ! yycrank+765, 0, 0, ! yycrank+764, 0, 0, ! yycrank+736, 0, 0, ! yycrank+0, 0, yyvstop+317, ! yycrank+0, 0, yyvstop+319, yycrank+769, 0, 0, yycrank+769, 0, 0, yycrank+755, 0, 0, ! yycrank+757, 0, 0, ! yycrank+768, 0, 0, yycrank+0, 0, yyvstop+321, - yycrank+763, 0, 0, - yycrank+761, 0, 0, - yycrank+761, 0, 0, yycrank+0, 0, yyvstop+323, ! yycrank+766, 0, 0, ! yycrank+764, 0, 0, ! yycrank+764, 0, 0, yycrank+0, 0, yyvstop+325, ! yycrank+770, 0, 0, ! yycrank+766, 0, 0, yycrank+0, 0, yyvstop+327, yycrank+0, 0, yyvstop+329, yycrank+0, 0, yyvstop+331, 0, 0, 0}; ! struct yywork *yytop = yycrank+849; struct yysvf *yybgin = yysvec+1; char yymatch[] = { 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , --- 1252,1832 ---- yycrank+15, 0, yyvstop+24, yycrank+11, 0, yyvstop+26, yycrank+13, 0, yyvstop+28, ! yycrank+28, 0, yyvstop+30, yycrank+27, 0, yyvstop+32, ! yycrank+17, 0, yyvstop+34, ! yycrank+69, 0, yyvstop+36, yycrank+70, 0, yyvstop+38, ! yycrank+71, 0, yyvstop+40, ! yycrank+10, 0, yyvstop+42, ! yycrank+18, 0, yyvstop+44, ! yycrank+72, 0, yyvstop+46, yycrank+69, 0, yyvstop+48, ! yycrank+39, 0, yyvstop+50, ! yycrank+17, 0, yyvstop+52, ! yycrank+207, 0, yyvstop+54, ! yycrank+47, 0, yyvstop+56, ! yycrank+56, 0, yyvstop+58, ! yycrank+227, 0, yyvstop+60, ! yycrank+29, 0, yyvstop+62, ! yycrank+47, 0, yyvstop+64, ! yycrank+63, 0, yyvstop+66, ! yycrank+61, 0, yyvstop+68, ! yycrank+97, 0, yyvstop+70, ! yycrank+138, 0, yyvstop+72, ! yycrank+64, 0, yyvstop+74, ! yycrank+65, 0, yyvstop+76, ! yycrank+68, 0, yyvstop+78, ! yycrank+102, 0, yyvstop+80, ! yycrank+137, 0, yyvstop+82, ! yycrank+92, 0, yyvstop+84, ! yycrank+132, 0, yyvstop+86, ! yycrank+18, 0, yyvstop+88, ! yycrank+-413, 0, yyvstop+90, ! yycrank+78, yysvec+22, yyvstop+92, ! yycrank+0, 0, yyvstop+94, ! yycrank+420, 0, yyvstop+97, ! yycrank+459, 0, yyvstop+100, ! yycrank+422, yysvec+52, yyvstop+102, ! yycrank+98, yysvec+52, yyvstop+104, ! yycrank+105, yysvec+52, yyvstop+106, ! yycrank+137, yysvec+52, yyvstop+108, ! yycrank+123, 0, yyvstop+110, ! yycrank+141, yysvec+52, yyvstop+112, ! yycrank+181, yysvec+52, yyvstop+114, ! yycrank+141, yysvec+52, yyvstop+116, ! yycrank+198, yysvec+52, yyvstop+118, ! yycrank+161, yysvec+52, yyvstop+120, ! yycrank+-304, yysvec+48, yyvstop+122, ! yycrank+0, yysvec+6, yyvstop+124, yycrank+0, yysvec+8, 0, ! yycrank+0, 0, yyvstop+126, ! yycrank+192, 0, 0, ! yycrank+0, yysvec+10, yyvstop+128, ! yycrank+161, 0, 0, ! yycrank+187, 0, 0, yycrank+188, 0, 0, ! yycrank+187, 0, 0, ! yycrank+175, 0, 0, ! yycrank+202, 0, 0, ! yycrank+197, 0, 0, ! yycrank+205, 0, 0, ! yycrank+187, 0, 0, ! yycrank+201, 0, 0, ! yycrank+213, 0, 0, ! yycrank+220, 0, 0, ! yycrank+226, 0, 0, ! yycrank+210, 0, 0, ! yycrank+207, 0, 0, yycrank+215, 0, 0, ! yycrank+222, 0, 0, ! yycrank+224, 0, 0, yycrank+225, 0, 0, yycrank+237, 0, 0, yycrank+263, 0, 0, ! yycrank+235, 0, 0, yycrank+244, 0, 0, ! yycrank+242, 0, 0, ! yycrank+252, 0, 0, ! yycrank+267, 0, 0, ! yycrank+268, 0, 0, ! yycrank+265, 0, 0, ! yycrank+278, 0, 0, ! yycrank+270, 0, 0, ! yycrank+0, yysvec+30, 0, ! yycrank+504, 0, 0, ! yycrank+252, 0, 0, ! yycrank+240, 0, 0, ! yycrank+252, 0, 0, ! yycrank+249, 0, 0, ! yycrank+235, 0, 0, ! yycrank+242, 0, 0, ! yycrank+240, 0, 0, ! yycrank+245, 0, 0, ! yycrank+259, 0, 0, ! yycrank+247, 0, 0, ! yycrank+265, 0, 0, ! yycrank+265, 0, 0, ! yycrank+261, 0, 0, ! yycrank+267, 0, 0, ! yycrank+268, 0, 0, ! yycrank+281, 0, 0, ! yycrank+279, 0, 0, ! yycrank+280, 0, 0, ! yycrank+312, 0, 0, yycrank+274, 0, 0, yycrank+271, 0, 0, ! yycrank+310, 0, 0, ! yycrank+281, 0, 0, ! yycrank+300, 0, 0, ! yycrank+322, 0, 0, yycrank+286, 0, 0, yycrank+291, 0, 0, ! yycrank+304, 0, 0, ! yycrank+401, 0, 0, ! yycrank+319, 0, 0, ! yycrank+326, 0, 0, ! yycrank+335, 0, 0, ! yycrank+337, 0, 0, ! yycrank+325, 0, 0, ! yycrank+333, 0, 0, ! yycrank+327, 0, 0, yycrank+328, 0, 0, + yycrank+326, 0, 0, + yycrank+332, 0, 0, yycrank+329, 0, 0, ! yycrank+351, 0, 0, yycrank+0, 0, yyvstop+130, ! yycrank+336, 0, 0, ! yycrank+0, yysvec+48, 0, yycrank+0, 0, yyvstop+132, ! yycrank+377, 0, 0, ! yycrank+0, 0, yyvstop+134, ! yycrank+0, yysvec+51, yyvstop+136, ! yycrank+0, yysvec+52, 0, ! yycrank+374, yysvec+52, 0, ! yycrank+395, yysvec+52, 0, ! yycrank+412, 0, 0, ! yycrank+394, yysvec+52, 0, ! yycrank+386, yysvec+52, 0, ! yycrank+392, yysvec+52, 0, ! yycrank+0, 0, yyvstop+138, ! yycrank+-487, yysvec+48, 0, ! yycrank+0, 0, yyvstop+141, ! yycrank+416, 0, 0, yycrank+404, 0, 0, yycrank+406, 0, 0, ! yycrank+404, 0, 0, ! yycrank+407, 0, 0, ! yycrank+408, 0, 0, ! yycrank+412, 0, 0, ! yycrank+424, 0, 0, ! yycrank+437, 0, 0, yycrank+431, 0, 0, ! yycrank+436, 0, 0, ! yycrank+446, 0, 0, yycrank+432, 0, 0, yycrank+450, 0, 0, ! yycrank+451, 0, 0, ! yycrank+452, 0, 0, ! yycrank+440, 0, 0, ! yycrank+444, 0, 0, ! yycrank+459, 0, 0, yycrank+464, 0, 0, ! yycrank+438, 0, 0, ! yycrank+467, 0, 0, yycrank+461, 0, 0, yycrank+454, 0, 0, ! yycrank+472, 0, 0, ! yycrank+474, 0, 0, ! yycrank+471, 0, 0, ! yycrank+474, 0, 0, ! yycrank+477, 0, 0, ! yycrank+480, 0, 0, ! yycrank+494, 0, 0, ! yycrank+484, 0, 0, ! yycrank+489, 0, 0, ! yycrank+534, 0, 0, ! yycrank+464, 0, 0, ! yycrank+471, 0, 0, ! yycrank+468, 0, 0, yycrank+463, 0, 0, ! yycrank+456, 0, 0, ! yycrank+456, 0, 0, ! yycrank+466, 0, 0, yycrank+464, 0, 0, yycrank+459, 0, 0, ! yycrank+465, 0, 0, ! yycrank+462, 0, 0, ! yycrank+462, 0, 0, ! yycrank+464, 0, 0, ! yycrank+470, 0, 0, ! yycrank+465, 0, 0, ! yycrank+469, 0, 0, ! yycrank+472, 0, 0, ! yycrank+472, 0, 0, yycrank+480, 0, 0, yycrank+487, 0, 0, ! yycrank+490, 0, 0, ! yycrank+475, 0, 0, ! yycrank+0, 0, yyvstop+143, ! yycrank+476, 0, 0, ! yycrank+479, 0, 0, yycrank+0, 0, yyvstop+145, yycrank+487, 0, 0, ! yycrank+494, 0, 0, ! yycrank+485, 0, 0, ! yycrank+499, 0, 0, ! yycrank+491, 0, 0, ! yycrank+484, 0, 0, ! yycrank+484, 0, 0, ! yycrank+493, 0, 0, ! yycrank+491, 0, 0, ! yycrank+494, 0, 0, ! yycrank+503, 0, 0, ! yycrank+489, 0, 0, ! yycrank+505, 0, 0, ! yycrank+506, 0, 0, ! yycrank+498, 0, 0, ! yycrank+510, 0, 0, ! yycrank+511, 0, 0, ! yycrank+511, 0, 0, ! yycrank+508, 0, 0, ! yycrank+514, 0, 0, ! yycrank+500, 0, 0, ! yycrank+510, 0, 0, ! yycrank+500, 0, 0, yycrank+0, 0, yyvstop+147, ! yycrank+516, 0, 0, ! yycrank+501, 0, 0, yycrank+514, 0, 0, ! yycrank+515, 0, 0, ! yycrank+505, 0, 0, ! yycrank+612, 0, 0, ! yycrank+545, yysvec+52, 0, ! yycrank+547, 0, 0, ! yycrank+549, yysvec+52, 0, ! yycrank+544, 0, 0, ! yycrank+561, 0, 0, ! yycrank+562, 0, 0, ! yycrank+565, 0, 0, ! yycrank+558, 0, 0, ! yycrank+0, 0, yyvstop+149, ! yycrank+566, 0, 0, ! yycrank+568, 0, 0, ! yycrank+551, 0, 0, ! yycrank+551, 0, 0, ! yycrank+567, 0, 0, ! yycrank+0, 0, yyvstop+151, ! yycrank+542, 0, 0, ! yycrank+569, 0, 0, ! yycrank+563, 0, 0, ! yycrank+553, 0, yyvstop+153, ! yycrank+576, 0, 0, ! yycrank+558, 0, 0, yycrank+0, 0, yyvstop+155, ! yycrank+563, 0, 0, ! yycrank+576, 0, 0, ! yycrank+578, 0, 0, yycrank+0, 0, yyvstop+157, + yycrank+581, 0, 0, + yycrank+568, 0, 0, + yycrank+569, 0, 0, yycrank+0, 0, yyvstop+159, yycrank+0, 0, yyvstop+161, ! yycrank+567, 0, 0, ! yycrank+571, 0, 0, ! yycrank+571, 0, 0, yycrank+0, 0, yyvstop+163, ! yycrank+579, 0, 0, yycrank+0, 0, yyvstop+165, + yycrank+543, 0, 0, + yycrank+540, 0, 0, + yycrank+554, 0, 0, + yycrank+556, 0, 0, + yycrank+543, 0, 0, + yycrank+548, 0, 0, + yycrank+559, 0, 0, yycrank+0, 0, yyvstop+167, + yycrank+560, 0, 0, + yycrank+547, 0, 0, + yycrank+562, 0, 0, + yycrank+567, 0, 0, + yycrank+564, 0, 0, yycrank+0, 0, yyvstop+169, yycrank+0, 0, yyvstop+171, yycrank+0, 0, yyvstop+173, ! yycrank+569, 0, 0, ! yycrank+566, 0, 0, ! yycrank+567, 0, 0, ! yycrank+624, 0, 0, ! yycrank+568, 0, 0, ! yycrank+566, 0, 0, yycrank+0, 0, yyvstop+175, ! yycrank+571, 0, 0, ! yycrank+572, 0, 0, ! yycrank+577, 0, 0, ! yycrank+565, 0, 0, ! yycrank+570, 0, 0, yycrank+0, 0, yyvstop+177, ! yycrank+561, 0, 0, ! yycrank+564, 0, 0, ! yycrank+574, 0, 0, ! yycrank+569, 0, 0, ! yycrank+584, 0, 0, yycrank+0, 0, yyvstop+179, ! yycrank+578, 0, 0, ! yycrank+575, 0, 0, ! yycrank+585, 0, 0, yycrank+0, 0, yyvstop+181, + yycrank+584, 0, 0, + yycrank+585, 0, 0, + yycrank+576, 0, 0, + yycrank+572, 0, 0, + yycrank+573, 0, 0, + yycrank+574, 0, 0, + yycrank+581, 0, 0, + yycrank+588, 0, 0, yycrank+0, 0, yyvstop+183, ! yycrank+579, 0, 0, ! yycrank+586, 0, 0, ! yycrank+579, 0, 0, yycrank+0, 0, yyvstop+185, yycrank+0, 0, yyvstop+187, ! yycrank+631, 0, 0, ! yycrank+624, yysvec+52, 0, yycrank+0, 0, yyvstop+189, ! yycrank+626, 0, 0, ! yycrank+630, 0, 0, ! yycrank+627, 0, 0, ! yycrank+633, 0, 0, ! yycrank+620, 0, 0, ! yycrank+617, 0, 0, yycrank+0, 0, yyvstop+191, ! yycrank+639, 0, 0, yycrank+621, 0, 0, + yycrank+629, 0, 0, + yycrank+625, 0, 0, + yycrank+0, 0, yyvstop+193, + yycrank+643, 0, 0, + yycrank+638, 0, 0, + yycrank+641, 0, 0, yycrank+0, 0, yyvstop+195, + yycrank+638, 0, 0, + yycrank+647, 0, 0, + yycrank+629, 0, 0, + yycrank+638, 0, 0, + yycrank+638, 0, 0, + yycrank+638, 0, 0, yycrank+0, 0, yyvstop+197, ! yycrank+638, 0, 0, ! yycrank+639, 0, 0, ! yycrank+649, 0, 0, yycrank+0, 0, yyvstop+199, yycrank+0, 0, yyvstop+201, ! yycrank+608, 0, 0, yycrank+0, 0, yyvstop+203, ! yycrank+620, 0, 0, ! yycrank+613, 0, 0, ! yycrank+613, 0, 0, yycrank+610, 0, 0, yycrank+0, 0, yyvstop+205, ! yycrank+625, 0, 0, ! yycrank+621, 0, 0, ! yycrank+627, 0, 0, yycrank+610, 0, 0, + yycrank+0, 0, yyvstop+207, + yycrank+629, 0, 0, + yycrank+622, 0, 0, + yycrank+623, 0, 0, + yycrank+624, 0, 0, + yycrank+630, 0, 0, + yycrank+634, 0, 0, + yycrank+619, 0, 0, + yycrank+622, 0, 0, + yycrank+637, 0, 0, + yycrank+638, 0, 0, + yycrank+643, 0, 0, + yycrank+638, 0, 0, + yycrank+628, 0, 0, + yycrank+631, 0, 0, yycrank+0, 0, yyvstop+209, ! yycrank+643, 0, 0, ! yycrank+629, 0, 0, ! yycrank+644, 0, 0, yycrank+0, 0, yyvstop+211, ! yycrank+638, 0, 0, yycrank+0, 0, yyvstop+213, ! yycrank+631, 0, 0, ! yycrank+634, 0, 0, ! yycrank+649, 0, 0, yycrank+0, 0, yyvstop+215, + yycrank+636, 0, 0, + yycrank+644, 0, 0, yycrank+0, 0, yyvstop+217, ! yycrank+673, 0, 0, ! yycrank+684, yysvec+52, 0, yycrank+0, 0, yyvstop+219, yycrank+0, 0, yyvstop+221, + yycrank+677, 0, 0, + yycrank+677, 0, 0, + yycrank+684, 0, 0, + yycrank+685, 0, 0, + yycrank+686, 0, 0, + yycrank+678, 0, 0, + yycrank+696, 0, 0, yycrank+0, 0, yyvstop+223, ! yycrank+686, 0, 0, ! yycrank+694, 0, 0, ! yycrank+682, 0, 0, ! yycrank+694, 0, 0, ! yycrank+683, 0, 0, yycrank+0, 0, yyvstop+225, yycrank+0, 0, yyvstop+227, ! yycrank+672, 0, 0, yycrank+0, 0, yyvstop+229, + yycrank+691, 0, 0, + yycrank+687, 0, 0, + yycrank+681, 0, 0, yycrank+0, 0, yyvstop+231, + yycrank+671, 0, 0, yycrank+0, 0, yyvstop+233, yycrank+0, 0, yyvstop+235, yycrank+0, 0, yyvstop+237, yycrank+0, 0, yyvstop+239, ! yycrank+662, 0, 0, yycrank+0, 0, yyvstop+241, ! yycrank+672, 0, 0, yycrank+0, 0, yyvstop+243, + yycrank+673, 0, 0, + yycrank+670, 0, 0, + yycrank+665, 0, 0, + yycrank+676, 0, 0, + yycrank+673, 0, 0, yycrank+0, 0, yyvstop+245, ! yycrank+662, 0, 0, ! yycrank+664, 0, 0, ! yycrank+682, 0, 0, ! yycrank+668, 0, 0, ! yycrank+675, 0, 0, ! yycrank+674, 0, 0, yycrank+0, 0, yyvstop+247, yycrank+0, 0, yyvstop+249, ! yycrank+673, 0, 0, yycrank+0, 0, yyvstop+251, ! yycrank+669, 0, 0, yycrank+0, 0, yyvstop+253, ! yycrank+678, 0, 0, ! yycrank+683, 0, 0, ! yycrank+0, 0, yyvstop+255, yycrank+688, 0, 0, yycrank+689, 0, 0, yycrank+0, 0, yyvstop+257, ! yycrank+722, 0, 0, ! yycrank+710, 0, 0, ! yycrank+725, 0, 0, ! yycrank+716, 0, 0, ! yycrank+717, 0, 0, ! yycrank+707, 0, 0, ! yycrank+717, 0, 0, ! yycrank+723, 0, 0, yycrank+0, 0, yyvstop+259, yycrank+0, 0, yyvstop+261, + yycrank+728, 0, 0, + yycrank+717, 0, 0, + yycrank+734, 0, 0, yycrank+0, 0, yyvstop+263, ! yycrank+718, 0, 0, yycrank+0, 0, yyvstop+265, yycrank+0, 0, yyvstop+267, ! yycrank+702, 0, 0, yycrank+0, 0, yyvstop+269, + yycrank+702, 0, 0, + yycrank+702, 0, 0, + yycrank+695, 0, 0, yycrank+0, 0, yyvstop+271, + yycrank+696, 0, 0, + yycrank+694, 0, 0, + yycrank+708, 0, 0, + yycrank+694, 0, 0, yycrank+0, 0, yyvstop+273, yycrank+0, 0, yyvstop+275, yycrank+0, 0, yyvstop+277, ! yycrank+701, 0, 0, ! yycrank+707, 0, 0, yycrank+0, 0, yyvstop+279, + yycrank+713, 0, 0, + yycrank+717, 0, 0, + yycrank+718, 0, 0, + yycrank+737, 0, 0, yycrank+0, 0, yyvstop+281, + yycrank+749, 0, 0, + yycrank+750, 0, 0, yycrank+0, 0, yyvstop+283, yycrank+0, 0, yyvstop+285, + yycrank+0, 0, yyvstop+287, + yycrank+0, 0, yyvstop+289, + yycrank+757, 0, 0, + yycrank+736, 0, 0, + yycrank+745, 0, 0, + yycrank+746, 0, 0, + yycrank+760, 0, 0, + yycrank+751, 0, 0, + yycrank+733, 0, 0, yycrank+729, 0, 0, ! yycrank+714, 0, 0, ! yycrank+727, 0, 0, yycrank+718, 0, 0, yycrank+723, 0, 0, ! yycrank+733, 0, 0, ! yycrank+721, 0, 0, yycrank+0, 0, yyvstop+291, + yycrank+722, 0, 0, yycrank+0, 0, yyvstop+293, + yycrank+733, 0, 0, yycrank+0, 0, yyvstop+295, yycrank+0, 0, yyvstop+297, yycrank+0, 0, yyvstop+299, + yycrank+769, 0, 0, yycrank+0, 0, yyvstop+301, ! yycrank+773, 0, 0, ! yycrank+775, 0, 0, ! yycrank+759, 0, 0, ! yycrank+764, 0, 0, ! yycrank+769, 0, 0, ! yycrank+779, 0, 0, ! yycrank+763, 0, 0, yycrank+0, 0, yyvstop+303, yycrank+0, 0, yyvstop+305, + yycrank+730, 0, 0, yycrank+0, 0, yyvstop+307, yycrank+0, 0, yyvstop+309, yycrank+0, 0, yyvstop+311, yycrank+0, 0, yyvstop+313, + yycrank+731, 0, 0, + yycrank+732, 0, 0, yycrank+0, 0, yyvstop+315, ! yycrank+773, 0, 0, ! yycrank+774, 0, 0, yycrank+769, 0, 0, yycrank+769, 0, 0, + yycrank+784, 0, 0, + yycrank+787, 0, 0, + yycrank+786, 0, 0, + yycrank+0, 0, yyvstop+317, + yycrank+0, 0, yyvstop+319, yycrank+755, 0, 0, ! yycrank+788, 0, 0, ! yycrank+782, 0, 0, ! yycrank+786, 0, 0, ! yycrank+776, 0, 0, ! yycrank+794, 0, 0, ! yycrank+793, 0, 0, ! yycrank+792, 0, 0, ! yycrank+764, 0, 0, yycrank+0, 0, yyvstop+321, yycrank+0, 0, yyvstop+323, ! yycrank+797, 0, 0, ! yycrank+797, 0, 0, ! yycrank+783, 0, 0, ! yycrank+785, 0, 0, ! yycrank+796, 0, 0, yycrank+0, 0, yyvstop+325, ! yycrank+791, 0, 0, ! yycrank+789, 0, 0, ! yycrank+789, 0, 0, yycrank+0, 0, yyvstop+327, + yycrank+794, 0, 0, + yycrank+792, 0, 0, + yycrank+792, 0, 0, yycrank+0, 0, yyvstop+329, + yycrank+798, 0, 0, + yycrank+794, 0, 0, yycrank+0, 0, yyvstop+331, + yycrank+0, 0, yyvstop+333, + yycrank+0, 0, yyvstop+335, 0, 0, 0}; ! struct yywork *yytop = yycrank+877; struct yysvf *yybgin = yysvec+1; char yymatch[] = { 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , *** Old/sys/share/lev_yacc.c Tue May 28 17:39:35 1996 --- sys/share/lev_yacc.c Fri May 17 10:44:23 1996 *************** *** 8,14 **** #define yyerrok (yyerrflag=0) #define YYRECOVERING (yyerrflag!=0) #define YYPREFIX "yy" ! /* SCCS Id: @(#)lev_yacc.c 3.2 95/11/10 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 8,14 ---- #define yyerrok (yyerrflag=0) #define YYRECOVERING (yyerrflag!=0) #define YYPREFIX "yy" ! /* SCCS Id: @(#)lev_yacc.c 3.2 96/05/16 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 41,47 **** */ #define MAX_OF_TYPE 128 ! #define New(type) (type *) alloc(sizeof(type)) #define NewTab(type, size) (type **) alloc(sizeof(type *) * size) #define Free(ptr) free((genericptr_t)ptr) --- 41,48 ---- */ #define MAX_OF_TYPE 128 ! #define New(type) \ ! (type *) memset((genericptr_t)alloc(sizeof(type)), 0, sizeof(type)) #define NewTab(type, size) (type **) alloc(sizeof(type *) * size) #define Free(ptr) free((genericptr_t)ptr) *************** *** 154,247 **** #define CHAR 257 #define INTEGER 258 #define BOOLEAN 259 ! #define MESSAGE_ID 260 ! #define MAZE_ID 261 ! #define LEVEL_ID 262 ! #define LEV_INIT_ID 263 ! #define GEOMETRY_ID 264 ! #define NOMAP_ID 265 ! #define OBJECT_ID 266 ! #define COBJECT_ID 267 ! #define MONSTER_ID 268 ! #define TRAP_ID 269 ! #define DOOR_ID 270 ! #define DRAWBRIDGE_ID 271 ! #define MAZEWALK_ID 272 ! #define WALLIFY_ID 273 ! #define REGION_ID 274 ! #define FILLING 275 ! #define RANDOM_OBJECTS_ID 276 ! #define RANDOM_MONSTERS_ID 277 ! #define RANDOM_PLACES_ID 278 ! #define ALTAR_ID 279 ! #define LADDER_ID 280 ! #define STAIR_ID 281 ! #define NON_DIGGABLE_ID 282 ! #define NON_PASSWALL_ID 283 ! #define ROOM_ID 284 ! #define PORTAL_ID 285 ! #define TELEPRT_ID 286 ! #define BRANCH_ID 287 ! #define LEV 288 ! #define CHANCE_ID 289 ! #define CORRIDOR_ID 290 ! #define GOLD_ID 291 ! #define ENGRAVING_ID 292 ! #define FOUNTAIN_ID 293 ! #define POOL_ID 294 ! #define SINK_ID 295 ! #define NONE 296 ! #define RAND_CORRIDOR_ID 297 ! #define DOOR_STATE 298 ! #define LIGHT_STATE 299 ! #define CURSE_TYPE 300 ! #define ENGRAVING_TYPE 301 ! #define DIRECTION 302 ! #define RANDOM_TYPE 303 ! #define O_REGISTER 304 ! #define M_REGISTER 305 ! #define P_REGISTER 306 ! #define A_REGISTER 307 ! #define ALIGNMENT 308 ! #define LEFT_OR_RIGHT 309 ! #define CENTER 310 ! #define TOP_OR_BOT 311 ! #define ALTAR_TYPE 312 ! #define UP_OR_DOWN 313 ! #define SUBROOM_ID 314 ! #define NAME_ID 315 ! #define FLAGS_ID 316 ! #define FLAG_TYPE 317 ! #define MON_ATTITUDE 318 ! #define MON_ALERTNESS 319 ! #define MON_APPEARANCE 320 ! #define CONTAINED 321 ! #define STRING 322 ! #define MAP_ID 323 #define YYERRCODE 256 short yylhs[] = { -1, ! 0, 0, 35, 35, 36, 36, 37, 38, 31, 22, ! 22, 14, 14, 18, 18, 19, 19, 39, 39, 44, ! 41, 41, 45, 45, 42, 42, 48, 48, 43, 43, ! 50, 51, 51, 52, 52, 34, 49, 49, 55, 53, ! 10, 10, 58, 58, 56, 56, 59, 59, 57, 57, ! 54, 54, 60, 60, 60, 60, 60, 60, 60, 60, ! 60, 60, 60, 60, 60, 61, 62, 63, 15, 15, ! 13, 13, 12, 12, 30, 11, 11, 40, 40, 74, ! 75, 75, 78, 1, 1, 2, 2, 76, 76, 79, ! 79, 79, 46, 46, 47, 47, 80, 82, 80, 77, ! 77, 83, 83, 83, 83, 83, 83, 83, 83, 83, ! 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, ! 83, 98, 64, 97, 97, 99, 99, 99, 99, 99, ! 65, 65, 101, 100, 102, 102, 103, 103, 103, 103, ! 104, 104, 105, 106, 106, 107, 107, 107, 84, 66, ! 66, 85, 91, 92, 93, 73, 109, 87, 110, 88, ! 111, 113, 89, 114, 90, 112, 112, 21, 21, 68, ! 69, 70, 94, 95, 86, 67, 71, 72, 24, 24, ! 24, 27, 27, 27, 32, 32, 33, 33, 3, 3, ! 108, 4, 4, 20, 20, 20, 96, 96, 96, 5, ! 5, 6, 6, 7, 7, 7, 8, 8, 117, 28, ! 25, 9, 81, 23, 26, 29, 16, 16, 17, 17, 116, 115, }; short yylen[] = { 2, --- 155,249 ---- #define CHAR 257 #define INTEGER 258 #define BOOLEAN 259 ! #define PERCENT 260 ! #define MESSAGE_ID 261 ! #define MAZE_ID 262 ! #define LEVEL_ID 263 ! #define LEV_INIT_ID 264 ! #define GEOMETRY_ID 265 ! #define NOMAP_ID 266 ! #define OBJECT_ID 267 ! #define COBJECT_ID 268 ! #define MONSTER_ID 269 ! #define TRAP_ID 270 ! #define DOOR_ID 271 ! #define DRAWBRIDGE_ID 272 ! #define MAZEWALK_ID 273 ! #define WALLIFY_ID 274 ! #define REGION_ID 275 ! #define FILLING 276 ! #define RANDOM_OBJECTS_ID 277 ! #define RANDOM_MONSTERS_ID 278 ! #define RANDOM_PLACES_ID 279 ! #define ALTAR_ID 280 ! #define LADDER_ID 281 ! #define STAIR_ID 282 ! #define NON_DIGGABLE_ID 283 ! #define NON_PASSWALL_ID 284 ! #define ROOM_ID 285 ! #define PORTAL_ID 286 ! #define TELEPRT_ID 287 ! #define BRANCH_ID 288 ! #define LEV 289 ! #define CHANCE_ID 290 ! #define CORRIDOR_ID 291 ! #define GOLD_ID 292 ! #define ENGRAVING_ID 293 ! #define FOUNTAIN_ID 294 ! #define POOL_ID 295 ! #define SINK_ID 296 ! #define NONE 297 ! #define RAND_CORRIDOR_ID 298 ! #define DOOR_STATE 299 ! #define LIGHT_STATE 300 ! #define CURSE_TYPE 301 ! #define ENGRAVING_TYPE 302 ! #define DIRECTION 303 ! #define RANDOM_TYPE 304 ! #define O_REGISTER 305 ! #define M_REGISTER 306 ! #define P_REGISTER 307 ! #define A_REGISTER 308 ! #define ALIGNMENT 309 ! #define LEFT_OR_RIGHT 310 ! #define CENTER 311 ! #define TOP_OR_BOT 312 ! #define ALTAR_TYPE 313 ! #define UP_OR_DOWN 314 ! #define SUBROOM_ID 315 ! #define NAME_ID 316 ! #define FLAGS_ID 317 ! #define FLAG_TYPE 318 ! #define MON_ATTITUDE 319 ! #define MON_ALERTNESS 320 ! #define MON_APPEARANCE 321 ! #define CONTAINED 322 ! #define STRING 323 ! #define MAP_ID 324 #define YYERRCODE 256 short yylhs[] = { -1, ! 0, 0, 36, 36, 37, 37, 38, 39, 32, 23, ! 23, 14, 14, 19, 19, 20, 20, 40, 40, 45, ! 42, 42, 46, 46, 43, 43, 49, 49, 44, 44, ! 51, 52, 52, 53, 53, 35, 50, 50, 56, 54, ! 10, 10, 59, 59, 57, 57, 60, 60, 58, 58, ! 55, 55, 61, 61, 61, 61, 61, 61, 61, 61, ! 61, 61, 61, 61, 61, 62, 63, 64, 15, 15, ! 13, 13, 12, 12, 31, 11, 11, 41, 41, 75, ! 76, 76, 79, 1, 1, 2, 2, 77, 77, 80, ! 80, 80, 47, 47, 48, 48, 81, 83, 81, 78, ! 78, 84, 84, 84, 84, 84, 84, 84, 84, 84, ! 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, ! 84, 99, 65, 98, 98, 100, 100, 100, 100, 100, ! 66, 66, 102, 101, 103, 103, 104, 104, 104, 104, ! 105, 105, 106, 107, 107, 108, 108, 108, 85, 67, ! 86, 92, 93, 94, 74, 109, 88, 110, 89, 111, ! 113, 90, 114, 91, 112, 112, 22, 22, 69, 70, ! 71, 95, 96, 87, 68, 72, 73, 25, 25, 25, ! 28, 28, 28, 33, 33, 34, 34, 3, 3, 4, ! 4, 21, 21, 21, 97, 97, 97, 5, 5, 6, ! 6, 7, 7, 7, 8, 8, 117, 29, 26, 9, ! 82, 24, 27, 30, 16, 16, 17, 17, 18, 18, 116, 115, }; short yylen[] = { 2, *************** *** 257,277 **** 3, 3, 1, 3, 1, 3, 1, 0, 4, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 0, 9, 0, 2, 2, 2, 2, 2, 3, ! 3, 3, 0, 7, 1, 1, 0, 7, 5, 5, ! 1, 1, 1, 1, 1, 0, 2, 2, 5, 5, ! 7, 7, 5, 1, 5, 5, 0, 8, 0, 8, ! 0, 0, 8, 0, 6, 0, 2, 1, 10, 3, ! 3, 3, 3, 3, 8, 7, 5, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 3, 1, 1, 0, 2, 4, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, ! 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 9, }; short yydefred[] = { 0, 0, 0, 0, 0, 0, 2, 0, 5, 6, 0, ! 0, 0, 0, 0, 4, 216, 0, 9, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 21, 76, 77, 75, 0, 0, 0, 0, 81, 7, 0, 88, 0, 19, 0, 16, 0, 20, 0, 79, 0, --- 259,279 ---- 3, 3, 1, 3, 1, 3, 1, 0, 4, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 0, 10, 0, 2, 2, 2, 2, 2, 3, ! 2, 2, 0, 9, 1, 1, 0, 7, 5, 5, ! 1, 1, 1, 1, 1, 0, 2, 2, 5, 6, ! 7, 5, 1, 5, 5, 0, 8, 0, 8, 0, ! 0, 8, 0, 6, 0, 2, 1, 10, 3, 3, ! 3, 3, 3, 8, 7, 5, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 0, 2, 4, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, ! 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 5, 9, }; short yydefred[] = { 0, 0, 0, 0, 0, 0, 2, 0, 5, 6, 0, ! 0, 0, 0, 0, 4, 214, 0, 9, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 21, 76, 77, 75, 0, 0, 0, 0, 81, 7, 0, 88, 0, 19, 0, 16, 0, 20, 0, 79, 0, *************** *** 279,406 **** 51, 0, 84, 85, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 31, 8, 29, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 103, 105, 112, 113, 118, 119, 117, 101, 104, 106, 107, 108, 109, ! 110, 111, 114, 115, 116, 120, 121, 215, 0, 23, ! 214, 0, 24, 193, 0, 192, 0, 0, 33, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 0, ! 87, 86, 83, 90, 92, 0, 91, 0, 213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 183, 0, 182, 0, 184, 131, 132, 180, ! 0, 179, 0, 181, 190, 0, 189, 200, 201, 0, ! 199, 0, 0, 197, 198, 0, 0, 0, 0, 0, ! 0, 0, 157, 0, 168, 173, 174, 159, 161, 164, ! 217, 218, 0, 0, 170, 94, 96, 202, 203, 0, ! 0, 0, 0, 69, 70, 0, 67, 172, 171, 66, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 99, 0, 188, 187, 133, 0, 186, 185, ! 0, 0, 149, 0, 0, 153, 0, 0, 206, 0, ! 204, 0, 205, 155, 0, 0, 0, 156, 0, 0, ! 0, 177, 219, 220, 0, 44, 0, 0, 46, 0, ! 0, 0, 35, 34, 0, 0, 221, 210, 0, 211, ! 0, 0, 209, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 162, 165, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 122, 0, 151, 152, 0, 0, 0, ! 208, 207, 176, 0, 0, 0, 0, 178, 0, 48, ! 0, 0, 0, 50, 0, 0, 0, 71, 72, 0, ! 12, 13, 11, 136, 135, 0, 124, 0, 0, 0, ! 175, 212, 0, 158, 160, 0, 163, 0, 0, 0, ! 0, 0, 0, 73, 74, 0, 0, 0, 134, 0, ! 191, 0, 0, 0, 167, 43, 0, 0, 45, 0, ! 0, 36, 68, 142, 141, 143, 0, 0, 0, 125, ! 0, 0, 0, 0, 0, 40, 0, 39, 0, 0, ! 127, 128, 0, 129, 126, 222, 196, 0, 47, 42, ! 49, 145, 144, 0, 0, 0, 130, 169, 0, 0, ! 139, 140, 0, 147, 148, 138, }; short yydgoto[] = { 3, ! 65, 163, 216, 135, 220, 250, 312, 373, 313, 446, ! 33, 416, 390, 393, 256, 243, 325, 13, 25, 401, ! 233, 21, 132, 213, 214, 129, 206, 207, 136, 4, ! 5, 301, 297, 253, 6, 7, 8, 9, 28, 39, ! 44, 56, 76, 29, 57, 130, 133, 58, 59, 77, ! 78, 139, 60, 80, 61, 331, 386, 328, 382, 146, ! 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, ! 157, 158, 159, 40, 41, 50, 69, 42, 70, 167, ! 168, 202, 115, 116, 117, 118, 119, 120, 121, 122, ! 123, 124, 125, 126, 127, 234, 420, 397, 440, 208, ! 339, 396, 419, 437, 438, 465, 471, 366, 279, 281, ! 282, 407, 377, 283, 235, 224, 225, }; ! short yysindex[] = { -122, ! -7, 6, 0, -240, -240, 0, -122, 0, 0, -206, ! -206, 60, -141, -141, 0, 0, 86, 0, -185, 88, ! -107, -107, -232, 100, 0, -79, 126, -100, -107, 0, ! 0, 0, 0, -185, 144, -127, 138, 0, 0, -100, ! 0, -125, 0, -216, 0, -60, 0, -133, 0, -126, ! 0, 141, 142, 143, 146, -95, 0, 0, -221, 0, ! 0, 161, 0, 0, 162, 149, 150, 151, -112, 0, ! -47, -46, -255, -255, 0, 0, 0, -76, 0, -236, ! -236, -44, -128, -47, -46, 172, 158, 159, 160, 163, ! 165, 167, 168, 0, 169, 170, 171, 173, 174, 175, ! 176, 177, 178, 179, 180, 181, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 186, 0, ! 0, 196, 0, 0, 197, 0, 198, 185, 0, 187, ! 188, 189, 190, 191, 192, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, ! 0, 0, 0, 0, 0, -39, 0, 0, 0, -220, ! -220, -233, -249, -160, 34, 34, 184, 34, 34, 54, ! 184, 184, -37, -37, -37, -223, 34, 34, -47, -46, ! -261, -261, 212, -215, 34, -38, 34, 34, -206, -6, ! 210, 215, 0, 207, 0, 216, 0, 0, 0, 0, ! 211, 0, 217, 0, 0, 218, 0, 0, 0, 221, ! 0, 224, 283, 0, 0, 291, -2, 295, 308, 315, ! 318, 123, 0, 317, 0, 0, 0, 0, 0, 0, ! 0, 0, 357, 358, 0, 0, 0, 0, 0, 360, ! 361, 152, 364, 0, 0, 365, 0, 0, 0, 0, ! 368, 155, 172, 157, -225, 164, -211, 34, 34, 183, ! 97, 114, 375, -261, -174, 107, 208, 377, 379, 111, ! 381, 382, 398, 34, -189, -25, -24, 423, -36, -160, ! -261, 427, 0, 383, 0, 0, 0, 384, 0, 0, ! 434, 435, 0, 390, 441, 0, 228, 445, 0, 397, ! 0, 446, 0, 0, 447, 241, -37, 0, -37, -37, ! -37, 0, 0, 0, 457, 0, 244, 460, 0, 247, ! 463, 204, 0, 0, 464, 465, 0, 0, 467, 0, ! 34, 223, 0, -160, 470, -255, 257, -263, 263, 21, ! 472, 489, 0, 0, -206, 503, -23, 508, -13, 509, ! -116, -213, 35, 0, 496, 0, 0, 298, 514, 466, ! 0, 0, 0, 516, 248, -206, 518, 0, 305, 0, ! -133, 520, 307, 0, 309, 522, -222, 0, 0, 524, ! 0, 0, 0, 0, 0, 525, 0, 312, 527, 299, ! 0, 0, 319, 0, 0, 260, 0, 561, 559, -13, ! 567, 565, -206, 0, 0, 569, -222, -253, 0, 568, ! 0, 356, 577, 579, 0, 0, -128, 580, 0, 367, ! 580, 0, 0, 0, 0, 0, 582, 583, -212, 0, ! 572, 370, 372, 592, 376, 0, 593, 0, -237, -217, ! 0, 0, -206, 0, 0, 0, 0, 595, 0, 0, ! 0, 0, 0, 594, 600, 600, 0, 0, -217, -270, ! 0, 0, 600, 0, 0, 0, }; ! short yyrindex[] = { 637, ! 0, 0, 0, -137, 380, 0, 646, 0, 0, 0, ! 0, 0, -129, 406, 0, 0, 0, 0, 0, 0, ! -74, 454, 0, 355, 0, 0, 0, 0, 411, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, ! 0, 0, 0, 117, 0, 0, 0, 0, 0, 546, ! 0, 0, 0, 0, 0, 101, 0, 0, 213, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 0, 0, 0, 0, 0, 0, 89, 0, 444, ! 462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 258, 0, ! 0, 314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 513, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 281,408 ---- 51, 0, 84, 85, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 31, 8, 29, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 103, 105, 112, 113, 118, 119, 117, 101, 104, 106, 107, 108, 109, ! 110, 111, 114, 115, 116, 120, 121, 213, 0, 23, ! 212, 0, 24, 191, 0, 190, 0, 0, 33, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 0, ! 87, 86, 83, 90, 92, 0, 91, 0, 211, 218, ! 0, 131, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 198, 199, 0, ! 197, 0, 0, 195, 196, 0, 0, 0, 0, 0, ! 0, 0, 156, 0, 167, 172, 173, 158, 160, 163, ! 215, 216, 0, 0, 169, 94, 96, 200, 201, 0, ! 0, 0, 0, 69, 70, 0, 67, 171, 170, 66, ! 0, 0, 0, 182, 0, 181, 0, 183, 179, 0, ! 178, 0, 180, 189, 0, 188, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 99, 0, 0, 0, 0, 0, 149, 0, 0, 152, ! 0, 0, 204, 0, 202, 0, 203, 154, 0, 0, ! 0, 155, 0, 0, 0, 176, 219, 220, 0, 44, ! 0, 0, 46, 0, 0, 0, 35, 34, 0, 0, ! 221, 0, 187, 186, 133, 0, 185, 184, 0, 150, ! 207, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 161, 164, 0, 0, 0, 0, 0, 0, 0, 0, ! 208, 0, 209, 0, 151, 0, 0, 0, 206, 205, ! 175, 0, 0, 0, 0, 177, 0, 48, 0, 0, ! 0, 50, 0, 0, 0, 71, 72, 0, 12, 13, ! 11, 0, 122, 0, 0, 174, 210, 0, 157, 159, ! 0, 162, 0, 0, 0, 0, 0, 0, 73, 74, ! 0, 0, 136, 135, 0, 124, 0, 0, 0, 166, ! 43, 0, 0, 45, 0, 0, 36, 68, 0, 134, ! 0, 0, 0, 0, 0, 0, 40, 0, 39, 142, ! 141, 143, 0, 0, 0, 125, 222, 194, 0, 47, ! 42, 49, 0, 0, 127, 128, 0, 129, 126, 168, ! 145, 144, 0, 0, 0, 130, 0, 0, 139, 140, ! 0, 147, 148, 138, }; short yydgoto[] = { 3, ! 65, 163, 265, 135, 210, 240, 306, 371, 307, 437, ! 33, 411, 388, 391, 246, 233, 171, 319, 13, 25, ! 396, 223, 21, 132, 262, 263, 129, 257, 258, 136, ! 4, 5, 339, 335, 243, 6, 7, 8, 9, 28, ! 39, 44, 56, 76, 29, 57, 130, 133, 58, 59, ! 77, 78, 139, 60, 80, 61, 325, 384, 322, 380, ! 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, ! 156, 157, 158, 159, 40, 41, 50, 69, 42, 70, ! 167, 168, 204, 115, 116, 117, 118, 119, 120, 121, ! 122, 123, 124, 125, 126, 127, 224, 431, 416, 446, ! 172, 362, 415, 430, 443, 444, 464, 469, 277, 279, ! 280, 402, 375, 281, 225, 214, 215, }; ! short yysindex[] = { -166, ! -18, 4, 0, -233, -233, 0, -166, 0, 0, -222, ! -222, 32, -134, -134, 0, 0, 88, 0, -173, 76, ! -114, -114, -230, 105, 0, -99, 115, -124, -114, 0, ! 0, 0, 0, -173, 127, -143, 128, 0, 0, -124, ! 0, -132, 0, -236, 0, -67, 0, -155, 0, -156, ! 0, 137, 138, 140, 142, -94, 0, 0, -263, 0, ! 0, 161, 0, 0, 162, 149, 150, 151, -105, 0, ! -47, -46, -276, -276, 0, 0, 0, -79, 0, -142, ! -142, -45, -151, -47, -46, 173, -44, -44, -44, -44, ! 160, 163, 165, 0, 166, 167, 168, 170, 171, 172, ! 174, 175, 176, 177, 178, 179, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 187, 0, ! 0, 194, 0, 0, 195, 0, 197, 184, 0, 185, ! 186, 188, 189, 190, 191, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, ! 0, 0, 0, 0, 0, -43, 0, 0, 0, 0, ! 193, 0, 0, 196, 198, -239, 45, 45, 180, 45, ! 45, 58, 180, 180, -37, -37, -37, -232, 45, 45, ! -47, -46, -218, -218, 205, -238, 45, -41, 45, 45, ! -222, -6, 211, 213, -234, -237, -268, 0, 0, 214, ! 0, 169, 215, 0, 0, 217, -39, 218, 219, 220, ! 225, 12, 0, 296, 0, 0, 0, 0, 0, 0, ! 0, 0, 300, 306, 0, 0, 0, 0, 0, 317, ! 319, 112, 329, 0, 0, 341, 0, 0, 0, 0, ! 342, 129, 173, 0, 315, 0, 366, 0, 0, 320, ! 0, 368, 0, 0, 374, 0, 45, 200, 120, 124, ! 385, -218, -201, 116, 202, 389, 390, 118, 399, 401, ! 405, 45, -254, -38, -9, 407, -36, -239, -218, 411, ! 0, 207, -267, 238, -260, 45, 0, 360, 410, 0, ! 239, 412, 0, 386, 0, 415, 0, 0, 454, 242, ! -37, 0, -37, -37, -37, 0, 0, 0, 457, 0, ! 246, 492, 0, 279, 495, 237, 0, 0, 497, 498, ! 0, 456, 0, 0, 0, 458, 0, 0, 506, 0, ! 0, -239, 509, -276, 298, -259, 299, 72, 510, 517, ! 0, 0, -222, 518, -1, 519, 28, 520, -119, -227, ! 0, 522, 0, 45, 0, 316, 531, 483, 0, 0, ! 0, 533, 264, -222, 537, 0, 321, 0, -155, 539, ! 328, 0, 330, 543, -229, 0, 0, 545, 0, 0, ! 0, 38, 0, 546, 318, 0, 0, 333, 0, 0, ! 281, 0, 552, 555, 28, 559, 557, -222, 0, 0, ! 561, -229, 0, 0, 560, 0, 338, 563, 566, 0, ! 0, -151, 571, 0, 345, 571, 0, 0, -243, 0, ! 575, 579, 362, 367, 585, 371, 0, 586, 0, 0, ! 0, 0, 590, 591, -209, 0, 0, 0, 597, 0, ! 0, 0, -240, -228, 0, 0, -222, 0, 0, 0, ! 0, 0, 595, 599, 599, 0, -228, -264, 0, 0, ! 599, 0, 0, 0, }; ! short yyrindex[] = { 641, ! 0, 0, 0, -172, 307, 0, 645, 0, 0, 0, ! 0, 0, -146, 355, 0, 0, 0, 0, 0, 0, ! -72, 351, 0, 282, 0, 0, 0, 0, 346, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, ! 0, 0, 0, 157, 0, 0, 0, 0, 0, 491, ! 0, 0, 0, 0, 0, 57, 0, 0, 159, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 91, 0, ! 0, 0, 0, 0, 0, 0, 0, 106, 0, 267, ! 388, 0, 0, 0, 0, 0, 589, 589, 589, 589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, ! 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 446, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** *** 414,652 **** 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 589, 0, - 0, 0, 0, 0, 0, 0, 622, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, - 0, 0, 655, 0, 0, 0, 0, 203, 0, 0, - 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 166, 166, 0, 0, 0, 0, ! 0, 0, 166, 0, 0, 0, }; short yygindex[] = { 0, ! 266, 222, 0, -69, -267, -170, 209, 0, 0, 219, ! 0, 234, 0, 0, 0, 0, 0, 648, 620, 0, ! -172, 644, 487, 0, 0, 22, 0, 0, -10, 0, ! 0, 0, 0, 371, 654, 0, 0, 0, 80, 623, ! 0, 0, 0, 0, 0, -70, -65, 603, 0, 0, ! 0, 0, 0, 604, 0, 0, 261, 0, 0, 0, ! 0, 0, 0, 605, 609, 610, 611, 612, 0, 0, ! 615, 616, 617, 0, 0, 0, 0, 0, 0, 426, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, -169, 0, 0, 0, 521, ! 0, 0, 0, 0, 242, -345, -353, 0, 0, 0, ! 0, 0, 0, 0, -40, -78, 0, }; ! #define YYTABLESIZE 948 short yytable[] = { 17, ! 18, 150, 227, 252, 137, 223, 226, 169, 229, 230, ! 238, 239, 240, 164, 327, 330, 381, 244, 245, 165, ! 462, 251, 335, 131, 31, 474, 385, 258, 259, 87, ! 88, 89, 90, 140, 241, 414, 128, 248, 137, 371, ! 462, 249, 96, 254, 141, 391, 434, 134, 372, 435, ! 10, 475, 142, 215, 104, 105, 106, 143, 144, 52, ! 53, 337, 54, 11, 368, 463, 16, 54, 436, 210, ! 32, 211, 16, 166, 166, 12, 367, 295, 145, 242, ! 415, 80, 203, 204, 436, 463, 78, 255, 30, 392, ! 309, 299, 55, 232, 310, 311, 16, 55, 302, 303, ! 32, 30, 123, 308, 466, 451, 452, 453, 43, 16, ! 16, 323, 472, 324, 322, 16, 25, 19, 246, 476, ! 336, 20, 14, 473, 247, 14, 14, 14, 309, 23, ! 10, 24, 310, 311, 10, 10, 228, 218, 1, 2, ! 236, 237, 219, 34, 351, 26, 352, 353, 354, 66, ! 67, 68, 27, 87, 88, 89, 90, 91, 92, 93, ! 94, 95, 217, 37, 38, 146, 96, 97, 98, 99, ! 100, 364, 101, 102, 103, 63, 64, 35, 104, 105, ! 106, 161, 162, 36, 169, 388, 389, 46, 260, 18, ! 18, 205, 205, 395, 47, 48, 62, 51, 71, 72, ! 73, 75, 41, 74, 82, 83, 84, 85, 86, 128, ! 131, 166, 27, 138, 160, 170, 171, 172, 201, 257, ! 173, 333, 174, 227, 175, 176, 177, 178, 179, 189, ! 180, 181, 182, 183, 184, 185, 186, 187, 188, 190, ! 191, 192, 193, 200, 194, 195, 196, 197, 198, 199, ! 231, 252, 261, 262, 296, 273, 300, 93, 263, 265, ! 267, 268, 150, 150, 269, 150, 150, 150, 150, 150, ! 150, 150, 150, 150, 150, 150, 369, 326, 329, 380, ! 150, 150, 150, 150, 150, 150, 150, 150, 150, 384, ! 150, 150, 150, 150, 150, 150, 150, 264, 150, 137, ! 137, 266, 137, 137, 137, 137, 137, 137, 137, 137, ! 137, 137, 137, 95, 270, 150, 150, 137, 137, 137, ! 137, 137, 137, 137, 137, 137, 271, 137, 137, 137, ! 137, 137, 137, 137, 272, 137, 221, 221, 274, 222, ! 222, 231, 80, 80, 378, 80, 80, 78, 78, 30, ! 30, 275, 137, 137, 17, 394, 221, 277, 276, 222, ! 280, 32, 32, 123, 123, 405, 123, 123, 123, 123, ! 123, 123, 123, 123, 123, 123, 123, 25, 25, 14, ! 278, 123, 123, 123, 123, 123, 123, 123, 123, 123, ! 32, 123, 123, 123, 123, 123, 123, 123, 305, 123, ! 284, 285, 431, 286, 287, 10, 25, 289, 290, 288, ! 18, 291, 292, 25, 294, 306, 123, 123, 307, 314, ! 316, 298, 317, 318, 319, 320, 146, 146, 455, 146, ! 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, ! 304, 321, 467, 37, 146, 146, 146, 146, 146, 146, ! 146, 146, 146, 18, 146, 146, 146, 146, 146, 146, ! 146, 38, 146, 41, 41, 315, 332, 337, 41, 41, ! 41, 41, 41, 27, 27, 338, 340, 341, 342, 146, ! 146, 41, 343, 41, 344, 345, 41, 347, 346, 348, ! 349, 41, 41, 41, 41, 41, 41, 41, 350, 41, ! 355, 356, 27, 357, 358, 360, 359, 361, 362, 27, ! 363, 365, 97, 368, 370, 375, 41, 41, 93, 93, ! 374, 93, 93, 93, 93, 93, 93, 93, 93, 93, ! 93, 93, 376, 93, 93, 93, 93, 93, 93, 93, ! 93, 93, 93, 93, 93, 100, 379, 93, 93, 93, ! 93, 383, 387, 398, 93, 399, 98, 400, 402, 403, ! 404, 406, 408, 410, 411, 413, 412, 417, 418, 421, ! 422, 93, 425, 423, 95, 95, 424, 95, 95, 95, ! 95, 95, 95, 95, 95, 95, 95, 95, 194, 95, ! 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, ! 95, 426, 427, 95, 95, 95, 95, 429, 430, 432, ! 95, 439, 456, 441, 17, 17, 17, 17, 17, 17, ! 442, 166, 443, 445, 447, 449, 450, 95, 457, 458, ! 17, 17, 459, 461, 460, 468, 1, 469, 17, 14, ! 14, 14, 14, 470, 17, 3, 409, 454, 444, 448, ! 433, 17, 14, 45, 195, 14, 14, 22, 212, 334, ! 15, 79, 49, 14, 81, 10, 10, 10, 17, 14, ! 428, 18, 18, 107, 18, 18, 14, 108, 109, 110, ! 111, 10, 10, 112, 113, 114, 18, 18, 293, 10, ! 464, 209, 0, 14, 18, 10, 0, 0, 0, 0, ! 18, 0, 10, 0, 37, 37, 0, 18, 0, 0, ! 0, 0, 0, 0, 18, 18, 0, 0, 0, 10, ! 0, 0, 38, 38, 18, 0, 0, 37, 0, 18, ! 18, 0, 0, 37, 0, 0, 0, 18, 0, 0, ! 37, 0, 0, 18, 0, 38, 0, 0, 0, 0, ! 18, 38, 0, 0, 0, 0, 0, 37, 38, 0, ! 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, ! 0, 0, 0, 97, 97, 38, 97, 97, 97, 97, ! 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, ! 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, ! 0, 0, 0, 97, 97, 97, 100, 100, 0, 100, ! 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, ! 0, 0, 0, 0, 100, 100, 100, 100, 100, 0, ! 100, 100, 100, 0, 0, 0, 100, 100, 100, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, ! 194, 0, 194, 194, 194, 194, 194, 194, 194, 194, ! 194, 194, 194, 0, 0, 0, 0, 194, 194, 194, ! 194, 194, 0, 194, 194, 194, 0, 0, 0, 194, ! 194, 194, 166, 166, 0, 166, 166, 166, 166, 166, ! 166, 166, 166, 166, 166, 166, 0, 0, 0, 0, ! 166, 166, 166, 166, 166, 0, 166, 166, 166, 0, ! 0, 0, 166, 166, 166, 195, 195, 0, 195, 195, ! 195, 195, 195, 195, 195, 195, 195, 195, 195, 0, ! 0, 0, 0, 195, 195, 195, 195, 195, 0, 195, ! 195, 195, 0, 0, 0, 195, 195, 195, }; short yycheck[] = { 10, ! 11, 0, 40, 40, 74, 175, 176, 86, 178, 179, ! 183, 184, 185, 84, 40, 40, 40, 187, 188, 85, ! 258, 192, 290, 257, 257, 296, 40, 197, 198, 266, ! 267, 268, 269, 270, 258, 258, 257, 299, 0, 303, ! 258, 303, 279, 259, 281, 259, 300, 303, 312, 303, ! 58, 322, 289, 303, 291, 292, 293, 294, 295, 276, ! 277, 41, 284, 58, 44, 303, 322, 284, 322, 303, ! 303, 305, 322, 40, 40, 316, 344, 303, 315, 303, ! 303, 0, 303, 304, 322, 303, 0, 303, 0, 303, ! 303, 303, 314, 40, 307, 308, 322, 314, 268, 269, ! 0, 22, 0, 274, 450, 318, 319, 320, 29, 322, ! 322, 301, 466, 303, 284, 322, 0, 58, 189, 473, ! 291, 263, 260, 469, 190, 263, 264, 265, 303, 44, ! 260, 317, 307, 308, 264, 265, 177, 298, 261, 262, ! 181, 182, 303, 44, 317, 58, 319, 320, 321, 276, ! 277, 278, 260, 266, 267, 268, 269, 270, 271, 272, ! 273, 274, 173, 264, 265, 0, 279, 280, 281, 282, ! 283, 341, 285, 286, 287, 309, 310, 257, 291, 292, ! 293, 310, 311, 58, 263, 302, 303, 44, 199, 264, ! 265, 170, 171, 363, 322, 58, 257, 323, 58, 58, ! 58, 297, 0, 58, 44, 44, 58, 58, 58, 257, ! 257, 40, 0, 290, 259, 58, 58, 58, 258, 258, ! 58, 258, 58, 40, 58, 58, 58, 58, 58, 44, ! 58, 58, 58, 58, 58, 58, 58, 58, 58, 44, ! 44, 44, 58, 44, 58, 58, 58, 58, 58, 58, ! 288, 40, 259, 44, 265, 258, 267, 0, 44, 44, ! 44, 44, 261, 262, 44, 264, 265, 266, 267, 268, ! 269, 270, 271, 272, 273, 274, 346, 303, 303, 303, ! 279, 280, 281, 282, 283, 284, 285, 286, 287, 303, ! 289, 290, 291, 292, 293, 294, 295, 91, 297, 261, ! 262, 91, 264, 265, 266, 267, 268, 269, 270, 271, ! 272, 273, 274, 0, 91, 314, 315, 279, 280, 281, ! 282, 283, 284, 285, 286, 287, 44, 289, 290, 291, ! 292, 293, 294, 295, 44, 297, 303, 303, 44, 306, ! 306, 288, 261, 262, 355, 264, 265, 261, 262, 261, ! 262, 44, 314, 315, 0, 321, 303, 40, 44, 306, ! 44, 261, 262, 261, 262, 376, 264, 265, 266, 267, ! 268, 269, 270, 271, 272, 273, 274, 261, 262, 0, ! 258, 279, 280, 281, 282, 283, 284, 285, 286, 287, ! 290, 289, 290, 291, 292, 293, 294, 295, 302, 297, ! 44, 44, 413, 44, 44, 0, 290, 44, 44, 258, ! 0, 44, 258, 297, 258, 302, 314, 315, 44, 313, ! 44, 258, 44, 313, 44, 44, 261, 262, 439, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ! 258, 44, 453, 0, 279, 280, 281, 282, 283, 284, ! 285, 286, 287, 0, 289, 290, 291, 292, 293, 294, ! 295, 0, 297, 261, 262, 258, 44, 41, 266, 267, ! 268, 269, 270, 261, 262, 93, 93, 44, 44, 314, ! 315, 279, 93, 281, 44, 258, 284, 91, 44, 44, ! 44, 289, 290, 291, 292, 293, 294, 295, 258, 297, ! 44, 258, 290, 44, 258, 302, 44, 44, 44, 297, ! 44, 289, 0, 44, 258, 44, 314, 315, 261, 262, ! 258, 264, 265, 266, 267, 268, 269, 270, 271, 272, ! 273, 274, 44, 276, 277, 278, 279, 280, 281, 282, ! 283, 284, 285, 286, 287, 0, 44, 290, 291, 292, ! 293, 44, 44, 58, 297, 258, 44, 44, 93, 44, ! 313, 44, 258, 44, 258, 44, 258, 44, 44, 258, ! 44, 314, 313, 275, 261, 262, 258, 264, 265, 266, ! 267, 268, 269, 270, 271, 272, 273, 274, 0, 276, ! 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, ! 287, 41, 44, 290, 291, 292, 293, 41, 44, 41, ! 297, 44, 41, 258, 260, 261, 262, 263, 264, 265, ! 44, 0, 44, 44, 258, 44, 44, 314, 259, 258, ! 276, 277, 41, 41, 259, 41, 0, 44, 284, 260, ! 261, 262, 263, 44, 290, 0, 381, 439, 427, 431, ! 417, 297, 5, 34, 0, 276, 277, 14, 172, 289, ! 7, 59, 40, 284, 61, 260, 261, 262, 314, 290, ! 410, 261, 262, 69, 264, 265, 297, 69, 69, 69, ! 69, 276, 277, 69, 69, 69, 276, 277, 263, 284, ! 449, 171, -1, 314, 284, 290, -1, -1, -1, -1, ! 290, -1, 297, -1, 261, 262, -1, 297, -1, -1, ! -1, -1, -1, -1, 261, 262, -1, -1, -1, 314, ! -1, -1, 261, 262, 314, -1, -1, 284, -1, 276, ! 277, -1, -1, 290, -1, -1, -1, 284, -1, -1, ! 297, -1, -1, 290, -1, 284, -1, -1, -1, -1, ! 297, 290, -1, -1, -1, -1, -1, 314, 297, -1, ! -1, -1, -1, -1, -1, -1, -1, 314, -1, -1, ! -1, -1, -1, 261, 262, 314, 264, 265, 266, 267, ! 268, 269, 270, 271, 272, 273, 274, -1, 276, 277, ! 278, 279, 280, 281, 282, 283, -1, 285, 286, 287, ! -1, -1, -1, 291, 292, 293, 261, 262, -1, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ! -1, -1, -1, -1, 279, 280, 281, 282, 283, -1, ! 285, 286, 287, -1, -1, -1, 291, 292, 293, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, ! 262, -1, 264, 265, 266, 267, 268, 269, 270, 271, ! 272, 273, 274, -1, -1, -1, -1, 279, 280, 281, ! 282, 283, -1, 285, 286, 287, -1, -1, -1, 291, ! 292, 293, 261, 262, -1, 264, 265, 266, 267, 268, ! 269, 270, 271, 272, 273, 274, -1, -1, -1, -1, ! 279, 280, 281, 282, 283, -1, 285, 286, 287, -1, ! -1, -1, 291, 292, 293, 261, 262, -1, 264, 265, ! 266, 267, 268, 269, 270, 271, 272, 273, 274, -1, ! -1, -1, -1, 279, 280, 281, 282, 283, -1, 285, ! 286, 287, -1, -1, -1, 291, 292, 293, }; #define YYFINAL 3 #ifndef YYDEBUG #define YYDEBUG 0 #endif ! #define YYMAXTOKEN 323 #if YYDEBUG char *yyname[] = { "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, --- 416,644 ---- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 535, 0, 0, 0, ! 0, 0, 0, 0, 572, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 6, 0, 0, 606, 0, 0, ! 0, 0, 146, 0, 0, 146, 0, 0, 0, 0, ! 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 109, 109, 0, 0, 0, 0, 0, ! 109, 0, 0, 0, }; short yygindex[] = { 0, ! 269, 230, 0, -60, -269, -184, 209, 0, 0, 229, ! 0, 244, 0, 0, 0, 0, 113, 0, 652, 624, ! 0, -178, 646, 453, 0, 0, 459, 0, 0, -10, ! 0, 0, 0, 0, 375, 656, 0, 0, 0, 24, ! 625, 0, 0, 0, 0, 0, -73, -68, 608, 0, ! 0, 0, 0, 0, 607, 0, 0, 266, 0, 0, ! 0, 0, 0, 0, 600, 603, 605, 609, 611, 0, ! 0, 612, 613, 614, 0, 0, 0, 0, 0, 0, ! 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, -165, 0, 0, 0, ! 588, 0, 0, 0, 0, 224, -416, -384, 0, 0, ! 0, 0, 0, 0, -40, -81, 0, }; ! #define YYTABLESIZE 900 short yytable[] = { 17, ! 18, 321, 217, 242, 169, 137, 228, 229, 230, 241, ! 164, 213, 216, 137, 219, 220, 165, 461, 329, 131, ! 244, 54, 128, 234, 235, 231, 31, 134, 409, 461, ! 324, 389, 472, 248, 249, 264, 333, 465, 379, 10, ! 52, 53, 123, 337, 369, 30, 16, 317, 54, 318, ! 471, 55, 43, 370, 16, 16, 32, 440, 473, 208, ! 441, 11, 16, 462, 209, 245, 259, 383, 260, 254, ! 255, 232, 365, 32, 410, 462, 390, 166, 55, 442, ! 470, 238, 442, 12, 166, 239, 474, 302, 14, 19, ! 80, 14, 14, 14, 303, 1, 2, 222, 304, 305, ! 16, 297, 303, 78, 330, 30, 304, 305, 146, 455, ! 456, 457, 331, 16, 10, 366, 316, 236, 10, 10, ! 66, 67, 68, 237, 87, 88, 89, 90, 140, 20, ! 340, 23, 349, 26, 350, 351, 352, 96, 218, 141, ! 37, 38, 226, 227, 24, 41, 27, 142, 34, 104, ! 105, 106, 143, 144, 63, 64, 25, 35, 27, 161, ! 162, 87, 88, 89, 90, 91, 92, 93, 94, 95, ! 46, 169, 36, 145, 96, 97, 98, 99, 100, 47, ! 101, 102, 103, 386, 387, 48, 104, 105, 106, 62, ! 250, 51, 18, 18, 71, 72, 266, 73, 393, 74, ! 93, 174, 175, 75, 82, 83, 84, 85, 86, 128, ! 131, 138, 166, 160, 203, 170, 247, 176, 271, 217, ! 177, 327, 178, 179, 180, 181, 414, 182, 183, 184, ! 191, 185, 186, 187, 188, 189, 190, 192, 193, 95, ! 194, 195, 196, 197, 242, 198, 199, 200, 201, 202, ! 205, 221, 251, 206, 252, 207, 253, 267, 269, 268, ! 270, 272, 273, 274, 275, 320, 37, 137, 137, 276, ! 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, ! 137, 17, 334, 367, 338, 137, 137, 137, 137, 137, ! 137, 137, 137, 137, 323, 137, 137, 137, 137, 137, ! 137, 137, 378, 137, 123, 123, 14, 123, 123, 123, ! 123, 123, 123, 123, 123, 123, 123, 123, 32, 32, ! 137, 137, 123, 123, 123, 123, 123, 123, 123, 123, ! 123, 382, 123, 123, 123, 123, 123, 123, 123, 278, ! 123, 211, 376, 282, 212, 18, 221, 32, 211, 283, ! 18, 212, 80, 80, 10, 80, 80, 123, 123, 413, ! 284, 211, 285, 400, 212, 78, 78, 30, 30, 286, ! 146, 146, 287, 146, 146, 146, 146, 146, 146, 146, ! 146, 146, 146, 146, 288, 289, 290, 38, 146, 146, ! 146, 146, 146, 146, 146, 146, 146, 426, 146, 146, ! 146, 146, 146, 146, 146, 292, 146, 41, 41, 293, ! 294, 295, 41, 41, 41, 41, 41, 296, 25, 25, ! 27, 27, 299, 146, 146, 41, 300, 41, 301, 308, ! 41, 312, 310, 311, 459, 41, 41, 41, 41, 41, ! 41, 41, 313, 41, 314, 97, 466, 25, 315, 27, ! 326, 331, 341, 342, 25, 344, 27, 298, 346, 309, ! 41, 41, 93, 93, 332, 93, 93, 93, 93, 93, ! 93, 93, 93, 93, 93, 93, 345, 93, 93, 93, ! 93, 93, 93, 93, 93, 93, 93, 93, 93, 98, ! 100, 93, 93, 93, 93, 336, 343, 347, 93, 348, ! 353, 95, 95, 354, 95, 95, 95, 95, 95, 95, ! 95, 95, 95, 95, 95, 93, 95, 95, 95, 95, ! 95, 95, 95, 95, 95, 95, 95, 95, 37, 37, ! 95, 95, 95, 95, 192, 355, 356, 95, 357, 358, ! 359, 360, 17, 17, 17, 17, 17, 17, 361, 364, ! 363, 37, 366, 373, 95, 368, 372, 37, 17, 17, ! 374, 377, 381, 385, 37, 392, 17, 14, 14, 14, ! 14, 165, 17, 394, 395, 397, 398, 399, 403, 17, ! 401, 37, 405, 14, 14, 406, 408, 407, 412, 417, ! 419, 14, 421, 418, 420, 432, 17, 14, 422, 424, ! 425, 427, 438, 429, 14, 193, 433, 18, 18, 434, ! 18, 18, 18, 18, 436, 10, 10, 10, 445, 447, ! 448, 14, 18, 18, 449, 450, 452, 18, 18, 451, ! 18, 10, 10, 453, 454, 18, 18, 460, 467, 10, ! 1, 18, 468, 18, 3, 10, 217, 404, 18, 38, ! 38, 435, 10, 458, 439, 428, 14, 45, 261, 22, ! 18, 328, 15, 256, 49, 18, 79, 81, 107, 10, ! 423, 108, 38, 109, 291, 173, 463, 110, 38, 111, ! 112, 113, 114, 0, 0, 38, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 38, 0, 0, 0, 0, 97, 97, 0, ! 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, ! 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, ! 0, 97, 97, 97, 0, 0, 0, 97, 97, 97, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 100, 100, 0, 100, 100, 100, 100, 100, ! 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, ! 100, 100, 100, 100, 100, 0, 100, 100, 100, 0, ! 0, 0, 100, 100, 100, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 192, 192, 0, 192, ! 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, ! 0, 0, 0, 0, 192, 192, 192, 192, 192, 0, ! 192, 192, 192, 0, 0, 0, 192, 192, 192, 0, ! 0, 0, 0, 165, 165, 0, 165, 165, 165, 165, ! 165, 165, 165, 165, 165, 165, 165, 0, 0, 0, ! 0, 165, 165, 165, 165, 165, 0, 165, 165, 165, ! 0, 0, 0, 165, 165, 165, 0, 193, 193, 0, ! 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, ! 193, 0, 0, 0, 0, 193, 193, 193, 193, 193, ! 0, 193, 193, 193, 0, 0, 0, 193, 193, 193, }; short yycheck[] = { 10, ! 11, 40, 40, 40, 86, 0, 185, 186, 187, 194, ! 84, 177, 178, 74, 180, 181, 85, 258, 288, 257, ! 259, 285, 257, 189, 190, 258, 257, 304, 258, 258, ! 40, 259, 297, 199, 200, 304, 304, 454, 40, 58, ! 277, 278, 0, 304, 304, 22, 323, 302, 285, 304, ! 467, 315, 29, 313, 323, 323, 0, 301, 323, 299, ! 304, 58, 323, 304, 304, 304, 304, 40, 306, 304, ! 305, 304, 342, 304, 304, 304, 304, 40, 315, 323, ! 465, 300, 323, 317, 40, 304, 471, 272, 261, 58, ! 0, 264, 265, 266, 304, 262, 263, 40, 308, 309, ! 323, 267, 304, 0, 289, 0, 308, 309, 0, 319, ! 320, 321, 41, 323, 261, 44, 282, 191, 265, 266, ! 277, 278, 279, 192, 267, 268, 269, 270, 271, 264, ! 296, 44, 311, 58, 313, 314, 315, 280, 179, 282, ! 265, 266, 183, 184, 318, 0, 261, 290, 44, 292, ! 293, 294, 295, 296, 310, 311, 0, 257, 0, 311, ! 312, 267, 268, 269, 270, 271, 272, 273, 274, 275, ! 44, 253, 58, 316, 280, 281, 282, 283, 284, 323, ! 286, 287, 288, 303, 304, 58, 292, 293, 294, 257, ! 201, 324, 265, 266, 58, 58, 207, 58, 364, 58, ! 0, 89, 90, 298, 44, 44, 58, 58, 58, 257, ! 257, 291, 40, 259, 258, 260, 258, 58, 258, 40, ! 58, 258, 58, 58, 58, 58, 392, 58, 58, 58, ! 44, 58, 58, 58, 58, 58, 58, 44, 44, 0, ! 44, 58, 58, 58, 40, 58, 58, 58, 58, 44, ! 58, 289, 259, 58, 44, 58, 44, 44, 44, 91, ! 44, 44, 44, 44, 40, 304, 0, 262, 263, 258, ! 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ! 275, 0, 293, 344, 295, 280, 281, 282, 283, 284, ! 285, 286, 287, 288, 304, 290, 291, 292, 293, 294, ! 295, 296, 304, 298, 262, 263, 0, 265, 266, 267, ! 268, 269, 270, 271, 272, 273, 274, 275, 262, 263, ! 315, 316, 280, 281, 282, 283, 284, 285, 286, 287, ! 288, 304, 290, 291, 292, 293, 294, 295, 296, 44, ! 298, 304, 353, 44, 307, 0, 289, 291, 304, 44, ! 0, 307, 262, 263, 0, 265, 266, 315, 316, 322, ! 44, 304, 44, 374, 307, 262, 263, 262, 263, 258, ! 262, 263, 44, 265, 266, 267, 268, 269, 270, 271, ! 272, 273, 274, 275, 44, 44, 258, 0, 280, 281, ! 282, 283, 284, 285, 286, 287, 288, 408, 290, 291, ! 292, 293, 294, 295, 296, 91, 298, 262, 263, 44, ! 91, 44, 267, 268, 269, 270, 271, 44, 262, 263, ! 262, 263, 303, 315, 316, 280, 303, 282, 44, 314, ! 285, 314, 44, 44, 445, 290, 291, 292, 293, 294, ! 295, 296, 44, 298, 44, 0, 457, 291, 44, 291, ! 44, 41, 93, 44, 298, 44, 298, 258, 44, 258, ! 315, 316, 262, 263, 258, 265, 266, 267, 268, 269, ! 270, 271, 272, 273, 274, 275, 91, 277, 278, 279, ! 280, 281, 282, 283, 284, 285, 286, 287, 288, 44, ! 0, 291, 292, 293, 294, 258, 258, 44, 298, 258, ! 44, 262, 263, 258, 265, 266, 267, 268, 269, 270, ! 271, 272, 273, 274, 275, 315, 277, 278, 279, 280, ! 281, 282, 283, 284, 285, 286, 287, 288, 262, 263, ! 291, 292, 293, 294, 0, 44, 258, 298, 44, 303, ! 44, 44, 261, 262, 263, 264, 265, 266, 93, 44, ! 93, 285, 44, 44, 315, 258, 258, 291, 277, 278, ! 44, 44, 44, 44, 298, 44, 285, 261, 262, 263, ! 264, 0, 291, 258, 44, 93, 44, 314, 258, 298, ! 44, 315, 44, 277, 278, 258, 44, 258, 44, 44, ! 258, 285, 41, 276, 314, 258, 315, 291, 44, 41, ! 44, 41, 258, 44, 298, 0, 44, 262, 263, 44, ! 265, 266, 262, 263, 44, 261, 262, 263, 44, 41, ! 259, 315, 277, 278, 258, 41, 41, 277, 278, 259, ! 285, 277, 278, 44, 44, 285, 291, 41, 44, 285, ! 0, 291, 44, 298, 0, 291, 58, 379, 298, 262, ! 263, 422, 298, 445, 426, 412, 5, 34, 206, 14, ! 315, 287, 7, 205, 40, 315, 59, 61, 69, 315, ! 405, 69, 285, 69, 253, 88, 453, 69, 291, 69, ! 69, 69, 69, -1, -1, 298, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 315, -1, -1, -1, -1, 262, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ! 275, -1, 277, 278, 279, 280, 281, 282, 283, 284, ! -1, 286, 287, 288, -1, -1, -1, 292, 293, 294, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 262, 263, -1, 265, 266, 267, 268, 269, ! 270, 271, 272, 273, 274, 275, -1, -1, -1, -1, ! 280, 281, 282, 283, 284, -1, 286, 287, 288, -1, ! -1, -1, 292, 293, 294, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 262, 263, -1, 265, ! 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, ! -1, -1, -1, -1, 280, 281, 282, 283, 284, -1, ! 286, 287, 288, -1, -1, -1, 292, 293, 294, -1, ! -1, -1, -1, 262, 263, -1, 265, 266, 267, 268, ! 269, 270, 271, 272, 273, 274, 275, -1, -1, -1, ! -1, 280, 281, 282, 283, 284, -1, 286, 287, 288, ! -1, -1, -1, 292, 293, 294, -1, 262, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ! 275, -1, -1, -1, -1, 280, 281, 282, 283, 284, ! -1, 286, 287, 288, -1, -1, -1, 292, 293, 294, }; #define YYFINAL 3 #ifndef YYDEBUG #define YYDEBUG 0 #endif ! #define YYMAXTOKEN 324 #if YYDEBUG char *yyname[] = { "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, *************** *** 656,662 **** 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"CHAR", ! "INTEGER","BOOLEAN","MESSAGE_ID","MAZE_ID","LEVEL_ID","LEV_INIT_ID", "GEOMETRY_ID","NOMAP_ID","OBJECT_ID","COBJECT_ID","MONSTER_ID","TRAP_ID", "DOOR_ID","DRAWBRIDGE_ID","MAZEWALK_ID","WALLIFY_ID","REGION_ID","FILLING", "RANDOM_OBJECTS_ID","RANDOM_MONSTERS_ID","RANDOM_PLACES_ID","ALTAR_ID", --- 648,654 ---- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"CHAR", ! "INTEGER","BOOLEAN","PERCENT","MESSAGE_ID","MAZE_ID","LEVEL_ID","LEV_INIT_ID", "GEOMETRY_ID","NOMAP_ID","OBJECT_ID","COBJECT_ID","MONSTER_ID","TRAP_ID", "DOOR_ID","DRAWBRIDGE_ID","MAZEWALK_ID","WALLIFY_ID","REGION_ID","FILLING", "RANDOM_OBJECTS_ID","RANDOM_MONSTERS_ID","RANDOM_PLACES_ID","ALTAR_ID", *************** *** 793,799 **** "map_detail : diggable_detail", "map_detail : passwall_detail", "$$2 :", ! "monster_detail : MONSTER_ID ':' monster_c ',' m_name ',' coordinate $$2 monster_infos", "monster_infos :", "monster_infos : monster_infos monster_info", "monster_info : ',' string", --- 785,791 ---- "map_detail : diggable_detail", "map_detail : passwall_detail", "$$2 :", ! "monster_detail : MONSTER_ID chance ':' monster_c ',' m_name ',' coordinate $$2 monster_infos", "monster_infos :", "monster_infos : monster_infos monster_info", "monster_info : ',' string", *************** *** 801,810 **** "monster_info : ',' MON_ALERTNESS", "monster_info : ',' alignment", "monster_info : ',' MON_APPEARANCE string", ! "object_detail : OBJECT_ID ':' object_desc", ! "object_detail : COBJECT_ID ':' object_desc", "$$3 :", ! "object_desc : object_c ',' o_name $$3 ',' object_where object_infos", "object_where : coordinate", "object_where : CONTAINED", "object_infos :", --- 793,802 ---- "monster_info : ',' MON_ALERTNESS", "monster_info : ',' alignment", "monster_info : ',' MON_APPEARANCE string", ! "object_detail : OBJECT_ID object_desc", ! "object_detail : COBJECT_ID object_desc", "$$3 :", ! "object_desc : chance ':' object_c ',' o_name $$3 ',' object_where object_infos", "object_where : coordinate", "object_where : CONTAINED", "object_infos :", *************** *** 820,827 **** "optional_name : ',' NONE", "optional_name : ',' STRING", "door_detail : DOOR_ID ':' door_state ',' coordinate", ! "trap_detail : TRAP_ID ':' trap_name ',' coordinate", ! "trap_detail : TRAP_ID ':' trap_name ',' coordinate ',' trap_chance", "drawbridge_detail : DRAWBRIDGE_ID ':' coordinate ',' DIRECTION ',' door_state", "mazewalk_detail : MAZEWALK_ID ':' coordinate ',' DIRECTION", "wallify_detail : WALLIFY_ID", --- 812,818 ---- "optional_name : ',' NONE", "optional_name : ',' STRING", "door_detail : DOOR_ID ':' door_state ',' coordinate", ! "trap_detail : TRAP_ID chance ':' trap_name ',' coordinate", "drawbridge_detail : DRAWBRIDGE_ID ':' coordinate ',' DIRECTION ',' door_state", "mazewalk_detail : MAZEWALK_ID ':' coordinate ',' DIRECTION", "wallify_detail : WALLIFY_ID", *************** *** 861,867 **** "o_name : RANDOM_TYPE", "trap_name : string", "trap_name : RANDOM_TYPE", - "trap_chance : CHANCE_ID ':' INTEGER", "room_type : string", "room_type : RANDOM_TYPE", "prefilled :", --- 852,857 ---- *************** *** 889,894 **** --- 879,886 ---- "string : STRING", "amount : INTEGER", "amount : RANDOM_TYPE", + "chance :", + "chance : PERCENT", "engraving_type : ENGRAVING_TYPE", "engraving_type : RANDOM_TYPE", "coord : '(' INTEGER ',' INTEGER ')'", *************** *** 1222,1229 **** case 25: { tmproom[nrooms] = New(room); - (void) memset((genericptr_t) tmproom[nrooms], 0, - sizeof *tmproom[nrooms]); tmproom[nrooms]->name = (char *) 0; tmproom[nrooms]->parent = (char *) 0; tmproom[nrooms]->rtype = 0; --- 1214,1219 ---- *************** *** 1297,1304 **** case 39: { tmproom[nrooms] = New(room); - (void) memset((genericptr_t) tmproom[nrooms], 0, - sizeof *tmproom[nrooms]); tmproom[nrooms]->parent = yyvsp[-1].map; tmproom[nrooms]->name = (char *) 0; tmproom[nrooms]->rtype = yyvsp[-9].i; --- 1287,1292 ---- *************** *** 1316,1323 **** case 40: { tmproom[nrooms] = New(room); - (void) memset((genericptr_t) tmproom[nrooms], 0, - sizeof *tmproom[nrooms]); tmproom[nrooms]->name = (char *) 0; tmproom[nrooms]->parent = (char *) 0; tmproom[nrooms]->rtype = yyvsp[-9].i; --- 1304,1309 ---- *************** *** 1436,1442 **** break; case 75: { ! maze.filling = yyvsp[0].i; if (index(yyvsp[-2].map, '.')) yyerror("Invalid dot ('.') in level name."); if ((int) strlen(yyvsp[-2].map) > 8) --- 1422,1428 ---- break; case 75: { ! maze.filling = (schar) yyvsp[0].i; if (index(yyvsp[-2].map, '.')) yyerror("Invalid dot ('.') in level name."); if ((int) strlen(yyvsp[-2].map) > 8) *************** *** 1595,1621 **** tmpmonst[nmons]->name.str = 0; tmpmonst[nmons]->appear = 0; tmpmonst[nmons]->appear_as.str = 0; if (!in_room) check_coord(current_coord.x, current_coord.y, "Monster"); ! if (!yyvsp[-2].map) ! tmpmonst[nmons]->id = NON_PM; ! else { ! int token = get_monster_id(yyvsp[-2].map, (char) yyvsp[-4].i); ! if (token == ERR) { ! yywarning( "Invalid monster name! Making random monster."); ! tmpmonst[nmons]->id = NON_PM; ! } else ! tmpmonst[nmons]->id = token; ! Free(yyvsp[-2].map); } } break; case 123: { ! nmons++; ! if (nmons >= MAX_OF_TYPE) { yyerror("Too many monsters in room or mazepart!"); nmons--; } --- 1581,1605 ---- tmpmonst[nmons]->name.str = 0; tmpmonst[nmons]->appear = 0; tmpmonst[nmons]->appear_as.str = 0; + tmpmonst[nmons]->chance = yyvsp[-6].i; + tmpmonst[nmons]->id = NON_PM; if (!in_room) check_coord(current_coord.x, current_coord.y, "Monster"); ! if (yyvsp[-2].map) { ! int token = get_monster_id(yyvsp[-2].map, (char) yyvsp[-4].i); ! if (token == ERR) ! yywarning( "Invalid monster name! Making random monster."); ! else ! tmpmonst[nmons]->id = token; ! Free(yyvsp[-2].map); } } break; case 123: { ! if (++nmons >= MAX_OF_TYPE) { yyerror("Too many monsters in room or mazepart!"); nmons--; } *************** *** 1666,1690 **** tmpobj[nobj]->corpsenm = NON_PM; tmpobj[nobj]->curse_state = -1; tmpobj[nobj]->name.str = 0; ! if (!yyvsp[0].map) ! tmpobj[nobj]->id = -1; ! else { ! int token = get_object_id(yyvsp[0].map); ! if (token == ERR) { ! yywarning("Illegal object name! Making random object."); ! tmpobj[nobj]->id = -1; ! } else ! tmpobj[nobj]->id = token; ! Free(yyvsp[0].map); } } break; case 134: { ! nobj++; ! if (nobj >= MAX_OF_TYPE) { ! yyerror("Too many objects in room or mazepart!"); ! nobj--; } } break; --- 1650,1673 ---- tmpobj[nobj]->corpsenm = NON_PM; tmpobj[nobj]->curse_state = -1; tmpobj[nobj]->name.str = 0; ! tmpobj[nobj]->chance = yyvsp[-4].i; ! tmpobj[nobj]->id = -1; ! if (yyvsp[0].map) { ! int token = get_object_id(yyvsp[0].map); ! if (token == ERR) ! yywarning( ! "Illegal object name! Making random object."); ! else ! tmpobj[nobj]->id = token; ! Free(yyvsp[0].map); } } break; case 134: { ! if (++nobj >= MAX_OF_TYPE) { ! yyerror("Too many objects in room or mazepart!"); ! nobj--; } } break; *************** *** 1791,1802 **** tmptrap[ntrap]->x = current_coord.x; tmptrap[ntrap]->y = current_coord.y; tmptrap[ntrap]->type = yyvsp[-2].i; ! tmptrap[ntrap]->chance = 100; if (!in_room) check_coord(current_coord.x, current_coord.y, "Trap"); ! ntrap++; ! if (ntrap >= MAX_OF_TYPE) { yyerror("Too many traps in room or mazepart!"); ntrap--; } --- 1774,1784 ---- tmptrap[ntrap]->x = current_coord.x; tmptrap[ntrap]->y = current_coord.y; tmptrap[ntrap]->type = yyvsp[-2].i; ! tmptrap[ntrap]->chance = yyvsp[-4].i; if (!in_room) check_coord(current_coord.x, current_coord.y, "Trap"); ! if (++ntrap >= MAX_OF_TYPE) { yyerror("Too many traps in room or mazepart!"); ntrap--; } *************** *** 1804,1826 **** break; case 151: { - tmptrap[ntrap] = New(trap); - tmptrap[ntrap]->x = current_coord.x; - tmptrap[ntrap]->y = current_coord.y; - tmptrap[ntrap]->type = yyvsp[-4].i; - tmptrap[ntrap]->chance = yyvsp[0].i; - if (!in_room) - check_coord(current_coord.x, current_coord.y, - "Trap"); - ntrap++; - if (ntrap >= MAX_OF_TYPE) { - yyerror("Too many traps in room or mazepart!"); - ntrap--; - } - } - break; - case 152: - { int x, y, dir; tmpdb[ndb] = New(drawbridge); --- 1786,1791 ---- *************** *** 1860,1866 **** } } break; ! case 153: { tmpwalk[nwalk] = New(walk); tmpwalk[nwalk]->x = current_coord.x; --- 1825,1831 ---- } } break; ! case 152: { tmpwalk[nwalk] = New(walk); tmpwalk[nwalk]->x = current_coord.x; *************** *** 1873,1884 **** } } break; ! case 154: { wallify_map(); } break; ! case 155: { tmplad[nlad] = New(lad); tmplad[nlad]->x = current_coord.x; --- 1838,1849 ---- } } break; ! case 153: { wallify_map(); } break; ! case 154: { tmplad[nlad] = New(lad); tmplad[nlad]->x = current_coord.x; *************** *** 1894,1900 **** } } break; ! case 156: { tmpstair[nstair] = New(stair); tmpstair[nstair]->x = current_coord.x; --- 1859,1865 ---- } } break; ! case 155: { tmpstair[nstair] = New(stair); tmpstair[nstair]->x = current_coord.x; *************** *** 1910,1916 **** } } break; ! case 157: { tmplreg[nlreg] = New(lev_region); tmplreg[nlreg]->in_islev = yyvsp[0].i; --- 1875,1881 ---- } } break; ! case 156: { tmplreg[nlreg] = New(lev_region); tmplreg[nlreg]->in_islev = yyvsp[0].i; *************** *** 1920,1926 **** tmplreg[nlreg]->inarea.y2 = current_region.y2; } break; ! case 158: { tmplreg[nlreg]->del_islev = yyvsp[-2].i; tmplreg[nlreg]->delarea.x1 = current_region.x1; --- 1885,1891 ---- tmplreg[nlreg]->inarea.y2 = current_region.y2; } break; ! case 157: { tmplreg[nlreg]->del_islev = yyvsp[-2].i; tmplreg[nlreg]->delarea.x1 = current_region.x1; *************** *** 1939,1945 **** } } break; ! case 159: { tmplreg[nlreg] = New(lev_region); tmplreg[nlreg]->in_islev = yyvsp[0].i; --- 1904,1910 ---- } } break; ! case 158: { tmplreg[nlreg] = New(lev_region); tmplreg[nlreg]->in_islev = yyvsp[0].i; *************** *** 1949,1955 **** tmplreg[nlreg]->inarea.y2 = current_region.y2; } break; ! case 160: { tmplreg[nlreg]->del_islev = yyvsp[-2].i; tmplreg[nlreg]->delarea.x1 = current_region.x1; --- 1914,1920 ---- tmplreg[nlreg]->inarea.y2 = current_region.y2; } break; ! case 159: { tmplreg[nlreg]->del_islev = yyvsp[-2].i; tmplreg[nlreg]->delarea.x1 = current_region.x1; *************** *** 1965,1971 **** } } break; ! case 161: { tmplreg[nlreg] = New(lev_region); tmplreg[nlreg]->in_islev = yyvsp[0].i; --- 1930,1936 ---- } } break; ! case 160: { tmplreg[nlreg] = New(lev_region); tmplreg[nlreg]->in_islev = yyvsp[0].i; *************** *** 1975,1981 **** tmplreg[nlreg]->inarea.y2 = current_region.y2; } break; ! case 162: { tmplreg[nlreg]->del_islev = yyvsp[0].i; tmplreg[nlreg]->delarea.x1 = current_region.x1; --- 1940,1946 ---- tmplreg[nlreg]->inarea.y2 = current_region.y2; } break; ! case 161: { tmplreg[nlreg]->del_islev = yyvsp[0].i; tmplreg[nlreg]->delarea.x1 = current_region.x1; *************** *** 1984,1990 **** tmplreg[nlreg]->delarea.y2 = current_region.y2; } break; ! case 163: { switch(yyvsp[0].i) { case -1: tmplreg[nlreg]->rtype = LR_TELE; break; --- 1949,1955 ---- tmplreg[nlreg]->delarea.y2 = current_region.y2; } break; ! case 162: { switch(yyvsp[0].i) { case -1: tmplreg[nlreg]->rtype = LR_TELE; break; *************** *** 1999,2005 **** } } break; ! case 164: { tmplreg[nlreg] = New(lev_region); tmplreg[nlreg]->in_islev = yyvsp[0].i; --- 1964,1970 ---- } } break; ! case 163: { tmplreg[nlreg] = New(lev_region); tmplreg[nlreg]->in_islev = yyvsp[0].i; *************** *** 2009,2015 **** tmplreg[nlreg]->inarea.y2 = current_region.y2; } break; ! case 165: { tmplreg[nlreg]->del_islev = yyvsp[0].i; tmplreg[nlreg]->delarea.x1 = current_region.x1; --- 1974,1980 ---- tmplreg[nlreg]->inarea.y2 = current_region.y2; } break; ! case 164: { tmplreg[nlreg]->del_islev = yyvsp[0].i; tmplreg[nlreg]->delarea.x1 = current_region.x1; *************** *** 2025,2046 **** } } break; ! case 166: { yyval.i = -1; } break; ! case 167: { yyval.i = yyvsp[0].i; } break; ! case 168: { yyval.i = 0; } break; ! case 169: { /* This series of if statements is a hack for MSC 5.1. It seems that its tiny little brain cannot compile if these are all one big if statement. */ --- 1990,2011 ---- } } break; ! case 165: { yyval.i = -1; } break; ! case 166: { yyval.i = yyvsp[0].i; } break; ! case 167: { yyval.i = 0; } break; ! case 168: { /* This series of if statements is a hack for MSC 5.1. It seems that its tiny little brain cannot compile if these are all one big if statement. */ *************** *** 2059,2065 **** yyval.i = 1; } break; ! case 170: { tmpfountain[nfountain] = New(fountain); tmpfountain[nfountain]->x = current_coord.x; --- 2024,2030 ---- yyval.i = 1; } break; ! case 169: { tmpfountain[nfountain] = New(fountain); tmpfountain[nfountain]->x = current_coord.x; *************** *** 2074,2080 **** } } break; ! case 171: { tmpsink[nsink] = New(sink); tmpsink[nsink]->x = current_coord.x; --- 2039,2045 ---- } } break; ! case 170: { tmpsink[nsink] = New(sink); tmpsink[nsink]->x = current_coord.x; *************** *** 2086,2092 **** } } break; ! case 172: { tmppool[npool] = New(pool); tmppool[npool]->x = current_coord.x; --- 2051,2057 ---- } } break; ! case 171: { tmppool[npool] = New(pool); tmppool[npool]->x = current_coord.x; *************** *** 2098,2104 **** } } break; ! case 173: { tmpdig[ndig] = New(digpos); tmpdig[ndig]->x1 = current_region.x1; --- 2063,2069 ---- } } break; ! case 172: { tmpdig[ndig] = New(digpos); tmpdig[ndig]->x1 = current_region.x1; *************** *** 2112,2118 **** } } break; ! case 174: { tmppass[npass] = New(digpos); tmppass[npass]->x1 = current_region.x1; --- 2077,2083 ---- } } break; ! case 173: { tmppass[npass] = New(digpos); tmppass[npass]->x1 = current_region.x1; *************** *** 2126,2132 **** } } break; ! case 175: { tmpreg[nreg] = New(region); tmpreg[nreg]->x1 = current_region.x1; --- 2091,2097 ---- } } break; ! case 174: { tmpreg[nreg] = New(region); tmpreg[nreg]->x1 = current_region.x1; *************** *** 2191,2197 **** } } break; ! case 176: { tmpaltar[naltar] = New(altar); tmpaltar[naltar]->x = current_coord.x; --- 2156,2162 ---- } } break; ! case 175: { tmpaltar[naltar] = New(altar); tmpaltar[naltar]->x = current_coord.x; *************** *** 2208,2214 **** } } break; ! case 177: { tmpgold[ngold] = New(gold); tmpgold[ngold]->x = current_coord.x; --- 2173,2179 ---- } } break; ! case 176: { tmpgold[ngold] = New(gold); tmpgold[ngold]->x = current_coord.x; *************** *** 2224,2230 **** } } break; ! case 178: { tmpengraving[nengraving] = New(engraving); tmpengraving[nengraving]->x = current_coord.x; --- 2189,2195 ---- } } break; ! case 177: { tmpengraving[nengraving] = New(engraving); tmpengraving[nengraving]->x = current_coord.x; *************** *** 2241,2267 **** } } break; ! case 180: { yyval.i = - MAX_REGISTERS - 1; } break; ! case 183: { yyval.i = - MAX_REGISTERS - 1; } break; ! case 186: { yyval.map = (char *) 0; } break; ! case 188: { yyval.map = (char *) 0; } break; ! case 189: { int token = get_trap_type(yyvsp[0].map); if (token == ERR) --- 2206,2232 ---- } } break; ! case 179: { yyval.i = - MAX_REGISTERS - 1; } break; ! case 182: { yyval.i = - MAX_REGISTERS - 1; } break; ! case 185: { yyval.map = (char *) 0; } break; ! case 187: { yyval.map = (char *) 0; } break; ! case 188: { int token = get_trap_type(yyvsp[0].map); if (token == ERR) *************** *** 2270,2286 **** Free(yyvsp[0].map); } break; ! case 191: ! { ! if (tmptrap[ntrap]->chance) ! yyerror("This trap already assigned a chance!"); ! else if (yyvsp[0].i < 1 || yyvsp[0].i > 99) ! yyerror("The chance is supposed to be percentile."); ! else ! tmptrap[ntrap]->chance = yyvsp[0].i; ! } ! break; ! case 192: { int token = get_room_type(yyvsp[0].map); if (token == ERR) { --- 2235,2241 ---- Free(yyvsp[0].map); } break; ! case 190: { int token = get_room_type(yyvsp[0].map); if (token == ERR) { *************** *** 2291,2322 **** Free(yyvsp[0].map); } break; ! case 194: { yyval.i = 0; } break; ! case 195: { yyval.i = yyvsp[0].i; } break; ! case 196: { yyval.i = yyvsp[-2].i + (yyvsp[0].i << 1); } break; ! case 199: { current_coord.x = current_coord.y = -MAX_REGISTERS-1; } break; ! case 206: { yyval.i = - MAX_REGISTERS - 1; } break; ! case 209: { if ( yyvsp[-1].i >= MAX_REGISTERS ) yyerror("Register Index overflow!"); --- 2246,2277 ---- Free(yyvsp[0].map); } break; ! case 192: { yyval.i = 0; } break; ! case 193: { yyval.i = yyvsp[0].i; } break; ! case 194: { yyval.i = yyvsp[-2].i + (yyvsp[0].i << 1); } break; ! case 197: { current_coord.x = current_coord.y = -MAX_REGISTERS-1; } break; ! case 204: { yyval.i = - MAX_REGISTERS - 1; } break; ! case 207: { if ( yyvsp[-1].i >= MAX_REGISTERS ) yyerror("Register Index overflow!"); *************** *** 2324,2330 **** current_coord.x = current_coord.y = - yyvsp[-1].i - 1; } break; ! case 210: { if ( yyvsp[-1].i >= MAX_REGISTERS ) yyerror("Register Index overflow!"); --- 2279,2285 ---- current_coord.x = current_coord.y = - yyvsp[-1].i - 1; } break; ! case 208: { if ( yyvsp[-1].i >= MAX_REGISTERS ) yyerror("Register Index overflow!"); *************** *** 2332,2338 **** yyval.i = - yyvsp[-1].i - 1; } break; ! case 211: { if ( yyvsp[-1].i >= MAX_REGISTERS ) yyerror("Register Index overflow!"); --- 2287,2293 ---- yyval.i = - yyvsp[-1].i - 1; } break; ! case 209: { if ( yyvsp[-1].i >= MAX_REGISTERS ) yyerror("Register Index overflow!"); *************** *** 2340,2346 **** yyval.i = - yyvsp[-1].i - 1; } break; ! case 212: { if ( yyvsp[-1].i >= 3 ) yyerror("Register Index overflow!"); --- 2295,2301 ---- yyval.i = - yyvsp[-1].i - 1; } break; ! case 210: { if ( yyvsp[-1].i >= 3 ) yyerror("Register Index overflow!"); *************** *** 2348,2354 **** yyval.i = - yyvsp[-1].i - 1; } break; ! case 214: { if (check_monster_char((char) yyvsp[0].i)) yyval.i = yyvsp[0].i ; --- 2303,2309 ---- yyval.i = - yyvsp[-1].i - 1; } break; ! case 212: { if (check_monster_char((char) yyvsp[0].i)) yyval.i = yyvsp[0].i ; *************** *** 2358,2364 **** } } break; ! case 215: { char c = yyvsp[0].i; if (check_object_char(c)) --- 2313,2319 ---- } } break; ! case 213: { char c = yyvsp[0].i; if (check_object_char(c)) *************** *** 2367,2372 **** --- 2322,2339 ---- yyerror("Unknown char class!"); yyval.i = ERR; } + } + break; + case 217: + { + yyval.i = 100; /* default is 100% */ + } + break; + case 218: + { + if (yyvsp[0].i <= 0 || yyvsp[0].i > 100) + yyerror("Expected percentile chance."); + yyval.i = yyvsp[0].i; } break; case 221: *** Old/sys/share/pcmain.c Tue May 28 17:39:42 1996 --- sys/share/pcmain.c Sat May 4 17:08:56 1996 *************** *** 205,211 **** exit(EXIT_SUCCESS); } /* Don't inialize the window system just to print usage */ ! if (!strncmp(argv[1], "-?", 2) || !strncmp(argv[1], "-H", 2)) { nhusage(); exit(EXIT_SUCCESS); } --- 205,211 ---- exit(EXIT_SUCCESS); } /* Don't inialize the window system just to print usage */ ! if (!strncmp(argv[1], "-?", 2) || !strncmp(argv[1], "/?", 2)) { nhusage(); exit(EXIT_SUCCESS); } *** Old/sys/share/pcsys.c Tue May 28 17:39:44 1996 --- sys/share/pcsys.c Tue May 21 11:30:16 1996 *************** *** 21,26 **** --- 21,31 ---- #ifdef TOS #include #endif + #if defined(MSDOS) && !defined(__GO32__) + #define findfirst findfirst_file + #define findnext findnext_file + #define filesize filesize_nh + #endif #ifdef MOVERLAY extern void __far __cdecl _movepause( void ); *************** *** 97,105 **** if (flags.BIOS) (void)Cursconf(1, -1); # endif get_scr_size(); /* maybe the screen mode changed (TH) */ resume_nhwindows(); - chdirx(hackdir, 0); } else pline("Can't find %s.",COMSPEC); return 0; --- 102,110 ---- if (flags.BIOS) (void)Cursconf(1, -1); # endif + chdirx(hackdir, 0); get_scr_size(); /* maybe the screen mode changed (TH) */ resume_nhwindows(); } else pline("Can't find %s.",COMSPEC); return 0; *** Old/sys/unix/Makefile.src Tue May 28 17:40:44 1996 --- sys/unix/Makefile.src Tue May 28 17:19:17 1996 *************** *** 1,5 **** # NetHack Makefile. ! # SCCS Id: @(#)Makefile.src 3.2 94/07/10 # newer makes predefine $(MAKE) to 'make' and do smarter processing of # recursive make calls if $(MAKE) is used --- 1,5 ---- # NetHack Makefile. ! # SCCS Id: @(#)Makefile.src 3.2 96/05/08 # newer makes predefine $(MAKE) to 'make' and do smarter processing of # recursive make calls if $(MAKE) is used *************** *** 21,26 **** --- 21,27 ---- # 'Sysatt' -- AT&T UNIXPC, 7300, 3B1 # 'SysV-AT' -- Microport 286 UNIX (put -DDUMB in CFLAGS) # 'Systos' -- Atari + # 'SysBe' -- BeBox SYSTEM = Sysunix # *************** *** 36,42 **** # system. # # for UNIX systems ! SYSSRC = ../sys/unix/ioctl.c ../sys/unix/unixmain.c ../sys/unix/unixtty.c \ ../sys/unix/unixunix.c SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o # --- 37,43 ---- # system. # # for UNIX systems ! SYSSRC = ../sys/share/ioctl.c ../sys/share/unixtty.c ../sys/unix/unixmain.c \ ../sys/unix/unixunix.c SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o # *************** *** 44,49 **** --- 45,54 ---- # SYSSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ # ../sys/share/pctty.c ../sys/share/pcunix.c # SYSOBJ = tos.o pcmain.o pcsys.o pctty.o pcunix.o + # + # for BeBox + #SYSSRC = ../sys/be/bemain.c ../sys/share/unixtty.c ../sys/share/ioctl.c + #SYSOBJ = bemain.o unixtty.o ioctl.o # if you are using gcc as your compiler: *************** *** 109,114 **** --- 114,125 ---- # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include -I/usr/X11/include # LFLAGS = -b i486-linuxaout -L/usr/X11/lib + # flags for BeBox + #CC = mwcc + #CFLAGS = -r -D__beos__=1 -I../include + #LD = mwld + #LFLAGS = -map nethack.xMAP + # flags for debugging: # CFLAGS = -g -I../include *************** *** 143,149 **** # Systos needs -lcurses16 if you use -mshort # AIX 3.1 on RS/6000 likes -lcurses if TERMINFO defined in config.h # and -ltermcap otherwise ! # Linux uses -ltermcap # # libraries for tty ports # WINTTYLIB = -ltermcap --- 154,160 ---- # Systos needs -lcurses16 if you use -mshort # AIX 3.1 on RS/6000 likes -lcurses if TERMINFO defined in config.h # and -ltermcap otherwise ! # Be and Linux use -ltermcap # # libraries for tty ports # WINTTYLIB = -ltermcap *************** *** 223,230 **** # all operating-system-dependent .c (for dependencies and such) SYSCSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ ../sys/share/pctty.c ../sys/share/pcunix.c ../sys/share/random.c \ ! ../sys/unix/ioctl.c ../sys/unix/unixmain.c ../sys/unix/unixtty.c \ ! ../sys/unix/unixunix.c # all windowing-system-dependent .c (for dependencies and such) WINCSRC = $(WINTTYSRC) $(WINX11SRC) --- 234,241 ---- # all operating-system-dependent .c (for dependencies and such) SYSCSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ ../sys/share/pctty.c ../sys/share/pcunix.c ../sys/share/random.c \ ! ../sys/share/ioctl.c ../sys/share/unixtty.c ../sys/unix/unixmain.c \ ! ../sys/unix/unixunix.c ../sys/be/bemain.c # all windowing-system-dependent .c (for dependencies and such) WINCSRC = $(WINTTYSRC) $(WINX11SRC) *************** *** 240,248 **** # cause dependency loops if run through "make depend" # and dgn_comp.h, dgn_file.h, lev_comp.h, special level & dungeon files. # ! HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h color.h \ ! config.h coord.h decl.h def_os2.h display.h dlb.h dungeon.h edog.h \ ! emin.h engrave.h epri.h eshk.h extern.h flag.h func_tab.h \ global.h hack.h lev.h macconf.h mfndpos.h micro.h mkroom.h \ monattk.h mondata.h monflag.h monst.h monsym.h obj.h objclass.h \ os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h rm.h \ --- 251,259 ---- # cause dependency loops if run through "make depend" # and dgn_comp.h, dgn_file.h, lev_comp.h, special level & dungeon files. # ! HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h \ ! color.h config.h coord.h decl.h def_os2.h display.h dlb.h dungeon.h \ ! edog.h emin.h engrave.h epri.h eshk.h extern.h flag.h func_tab.h \ global.h hack.h lev.h macconf.h mfndpos.h micro.h mkroom.h \ monattk.h mondata.h monflag.h monst.h monsym.h obj.h objclass.h \ os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h rm.h \ *************** *** 301,306 **** --- 312,322 ---- @$(CC) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) @touch SysV-AT + SysBe: $(HOBJ) Makefile + @echo "Loading ..." + @$(LD) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS) + @touch SysBe + DUMB.Setup: ../include/extern.h cp ../include/extern.h ../include/extern.h.BAK cat ../include/extern.h | \ *************** *** 338,346 **** $(CC) $(CFLAGS) -c objects.c @rm -f $(MAKEDEFS) ! # need those include files not in monst.c/objects.c dependencies below ! $(MAKEDEFS): ../util/makedefs.c ../include/artilist.h ../include/patchlevel.h \ ! ../include/qtext.h @( cd ../util ; $(MAKE) makedefs) ../include/onames.h: $(MAKEDEFS) --- 354,364 ---- $(CC) $(CFLAGS) -c objects.c @rm -f $(MAKEDEFS) ! $(MAKEDEFS): ../util/makedefs.c ../include/config.h ../include/permonst.h \ ! ../include/objclass.h ../include/monsym.h \ ! ../include/artilist.h ../include/dungeon.h ../include/obj.h \ ! ../include/monst.h ../include/you.h ../include/flag.h \ ! ../include/dlb.h ../include/patchlevel.h ../include/qtext.h @( cd ../util ; $(MAKE) makedefs) ../include/onames.h: $(MAKEDEFS) *************** *** 471,477 **** tos.o: ../sys/atari/tos.c ../include/hack.h ../include/termcap.h $(CC) $(CFLAGS) -c ../sys/atari/tos.c pcmain.o: ../sys/share/pcmain.c ../include/hack.h ../include/dlb.h \ ! ../include/win32api.h $(CC) $(CFLAGS) -c ../sys/share/pcmain.c pcsys.o: ../sys/share/pcsys.c ../include/hack.h ../include/wintty.h $(CC) $(CFLAGS) -c ../sys/share/pcsys.c --- 489,495 ---- tos.o: ../sys/atari/tos.c ../include/hack.h ../include/termcap.h $(CC) $(CFLAGS) -c ../sys/atari/tos.c pcmain.o: ../sys/share/pcmain.c ../include/hack.h ../include/dlb.h \ ! # ../include/win32api.h $(CC) $(CFLAGS) -c ../sys/share/pcmain.c pcsys.o: ../sys/share/pcsys.c ../include/hack.h ../include/wintty.h $(CC) $(CFLAGS) -c ../sys/share/pcsys.c *************** *** 481,494 **** $(CC) $(CFLAGS) -c ../sys/share/pcunix.c random.o: ../sys/share/random.c ../include/hack.h $(CC) $(CFLAGS) -c ../sys/share/random.c ! ioctl.o: ../sys/unix/ioctl.c ../include/hack.h ../include/termcap.h ! $(CC) $(CFLAGS) -c ../sys/unix/ioctl.c unixmain.o: ../sys/unix/unixmain.c ../include/hack.h ../include/dlb.h $(CC) $(CFLAGS) -c ../sys/unix/unixmain.c - unixtty.o: ../sys/unix/unixtty.c ../include/hack.h - $(CC) $(CFLAGS) -c ../sys/unix/unixtty.c unixunix.o: ../sys/unix/unixunix.c ../include/hack.h $(CC) $(CFLAGS) -c ../sys/unix/unixunix.c getline.o: ../win/tty/getline.c ../include/hack.h ../include/wintty.h \ ../include/func_tab.h $(CC) $(CFLAGS) -c ../win/tty/getline.c --- 499,514 ---- $(CC) $(CFLAGS) -c ../sys/share/pcunix.c random.o: ../sys/share/random.c ../include/hack.h $(CC) $(CFLAGS) -c ../sys/share/random.c ! ioctl.o: ../sys/share/ioctl.c ../include/hack.h ../include/termcap.h ! $(CC) $(CFLAGS) -c ../sys/share/ioctl.c ! unixtty.o: ../sys/share/unixtty.c ../include/hack.h ! $(CC) $(CFLAGS) -c ../sys/share/unixtty.c unixmain.o: ../sys/unix/unixmain.c ../include/hack.h ../include/dlb.h $(CC) $(CFLAGS) -c ../sys/unix/unixmain.c unixunix.o: ../sys/unix/unixunix.c ../include/hack.h $(CC) $(CFLAGS) -c ../sys/unix/unixunix.c + bemain.o: ../sys/be/bemain.c ../include/hack.h + $(CC) $(CFLAGS) -c ../sys/be/bemain.c getline.o: ../win/tty/getline.c ../include/hack.h ../include/wintty.h \ ../include/func_tab.h $(CC) $(CFLAGS) -c ../win/tty/getline.c *************** *** 609,615 **** ../include/quest.h rip.o: ../include/hack.h rnd.o: ../include/hack.h ! rumors.o: ../include/hack.h ../include/dlb.h save.o: ../include/hack.h ../include/lev.h ../include/quest.h shk.o: ../include/hack.h ../include/eshk.h shknam.o: ../include/hack.h ../include/eshk.h --- 629,635 ---- ../include/quest.h rip.o: ../include/hack.h rnd.o: ../include/hack.h ! rumors.o: ../include/hack.h ../include/lev.h ../include/dlb.h save.o: ../include/hack.h ../include/lev.h ../include/quest.h shk.o: ../include/hack.h ../include/eshk.h shknam.o: ../include/hack.h ../include/eshk.h *************** *** 659,673 **** ../include/global.h: ../include/coord.h ../include/vmsconf.h \ ../include/unixconf.h ../include/os2conf.h \ ../include/pcconf.h ../include/tosconf.h ../include/amiconf.h \ ! ../include/macconf.h ../include/ntconf.h touch ../include/global.h ../include/hack.h: ../include/config.h ../include/dungeon.h \ ../include/monsym.h ../include/mkroom.h ../include/objclass.h \ ! ../include/wintype.h ../include/decl.h ../include/timeout.h \ ! ../include/trap.h ../include/flag.h ../include/rm.h \ ! ../include/vision.h ../include/display.h ../include/engrave.h \ ! ../include/rect.h ../include/winprocs.h ../include/wintty.h \ ! ../include/trampoli.h touch ../include/hack.h ../include/macconf.h: ../include/system.h touch ../include/macconf.h --- 679,693 ---- ../include/global.h: ../include/coord.h ../include/vmsconf.h \ ../include/unixconf.h ../include/os2conf.h \ ../include/pcconf.h ../include/tosconf.h ../include/amiconf.h \ ! ../include/macconf.h ../include/beconf.h ../include/ntconf.h touch ../include/global.h ../include/hack.h: ../include/config.h ../include/dungeon.h \ ../include/monsym.h ../include/mkroom.h ../include/objclass.h \ ! ../include/youprop.h ../include/wintype.h ../include/decl.h \ ! ../include/timeout.h ../include/trap.h ../include/flag.h \ ! ../include/rm.h ../include/vision.h ../include/display.h \ ! ../include/engrave.h ../include/rect.h ../include/winprocs.h \ ! ../include/wintty.h ../include/trampoli.h touch ../include/hack.h ../include/macconf.h: ../include/system.h touch ../include/macconf.h *************** *** 684,691 **** touch ../include/permonst.h ../include/rm.h: ../include/align.h touch ../include/rm.h - ../include/sp_lev.h: ../include/align.h - touch ../include/sp_lev.h ../include/tosconf.h: ../include/micro.h ../include/pcconf.h touch ../include/tosconf.h ../include/unixconf.h: ../include/system.h --- 704,709 ---- *************** *** 695,701 **** ../include/vmsconf.h: ../include/system.h touch ../include/vmsconf.h ../include/you.h: ../include/align.h ../include/attrib.h ../include/monst.h \ ! ../include/youprop.h touch ../include/you.h ../include/youprop.h: ../include/prop.h ../include/permonst.h \ ../include/mondata.h ../include/pm.h --- 713,719 ---- ../include/vmsconf.h: ../include/system.h touch ../include/vmsconf.h ../include/you.h: ../include/align.h ../include/attrib.h ../include/monst.h \ ! ../include/prop.h touch ../include/you.h ../include/youprop.h: ../include/prop.h ../include/permonst.h \ ../include/mondata.h ../include/pm.h *** Old/sys/unix/Makefile.top Tue May 28 17:40:47 1996 --- sys/unix/Makefile.top Tue May 28 17:19:17 1996 *************** *** 103,109 **** ( cd util ; $(MAKE) lev_comp ) ( cd dat ; $(MAKE) spec_levs ) ( cd dat ; $(MAKE) quest_levs ) ! dungeon: ( cd util ; $(MAKE) dgn_comp ) ( cd dat ; $(MAKE) dungeon ) --- 103,109 ---- ( cd util ; $(MAKE) lev_comp ) ( cd dat ; $(MAKE) spec_levs ) ( cd dat ; $(MAKE) quest_levs ) ! dungeon: ( cd util ; $(MAKE) dgn_comp ) ( cd dat ; $(MAKE) dungeon ) *** Old/sys/unix/Makefile.utl Tue May 28 17:40:49 1996 --- sys/unix/Makefile.utl Tue May 28 17:19:18 1996 *************** *** 1,5 **** # Makefile for NetHack's utility programs. ! # SCCS Id: @(#)Makefile.utl 3.2 95/05/06 # newer makes predefine $(MAKE) to 'make' and do smarter processing of # recursive make calls if $(MAKE) is used --- 1,5 ---- # Makefile for NetHack's utility programs. ! # SCCS Id: @(#)Makefile.utl 3.2 96/05/09 # newer makes predefine $(MAKE) to 'make' and do smarter processing of # recursive make calls if $(MAKE) is used *************** *** 69,74 **** --- 69,79 ---- # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include -I/usr/X11/include # LFLAGS = -b i486-linuxaout -L/usr/X11/lib + # flags for BeBox using the command line + # remember to uncomment flex and bison below + #CC = mwcc + #CFLAGS = -D__beos__=1 -I../include + # flags for debugging: # CFLAGS = -g -I../include *************** *** 138,145 **** makedefs: $(MAKEOBJS) $(CC) $(LFLAGS) -o makedefs $(MAKEOBJS) ! makedefs.o: ../include/config.h ../include/permonst.h ../include/objclass.h \ ! ../include/monsym.h ../include/artilist.h \ ../include/patchlevel.h ../include/qtext.h ../include/onames.h: makedefs --- 143,152 ---- makedefs: $(MAKEOBJS) $(CC) $(LFLAGS) -o makedefs $(MAKEOBJS) ! makedefs.o: makedefs.c ../include/config.h ../include/permonst.h \ ! ../include/objclass.h ../include/monsym.h \ ! ../include/artilist.h ../include/dungeon.h ../include/obj.h \ ! ../include/monst.h ../include/you.h ../include/flag.h \ ../include/patchlevel.h ../include/qtext.h ../include/onames.h: makedefs *** Old/sys/unix/unixmain.c Tue May 28 17:41:10 1996 --- sys/unix/unixmain.c Tue May 21 11:01:34 1996 *************** *** 34,39 **** --- 34,44 ---- extern void NDECL(init_sco_cons); #endif + static void NDECL(wd_message); + #ifdef WIZARD + static boolean wiz_error_flag = FALSE; + #endif + int main(argc,argv) int argc; *************** *** 223,230 **** #endif pline("Hello %s, welcome back to NetHack!", plname); check_special_room(FALSE); ! if (discover) ! You("are in non-scoring discovery mode."); if (discover || wizard) { if(yn("Do you want to keep the save file?") == 'n') --- 228,234 ---- #endif pline("Hello %s, welcome back to NetHack!", plname); check_special_room(FALSE); ! wd_message(); if (discover || wizard) { if(yn("Do you want to keep the save file?") == 'n') *************** *** 241,248 **** newgame(); /* give welcome message before pickup messages */ pline("Hello %s, welcome to NetHack!", plname); ! if (discover) ! You("are in non-scoring discovery mode."); flags.move = 0; set_wear(); --- 245,251 ---- newgame(); /* give welcome message before pickup messages */ pline("Hello %s, welcome to NetHack!", plname); ! wd_message(); flags.move = 0; set_wear(); *************** *** 268,274 **** argc--; switch(argv[0][1]){ case 'D': ! # ifdef WIZARD { char *user; int uid; --- 271,277 ---- argc--; switch(argv[0][1]){ case 'D': ! #ifdef WIZARD { char *user; int uid; *************** *** 296,302 **** } } /* otherwise fall thru to discover */ ! # endif case 'X': discover = TRUE; break; --- 299,306 ---- } } /* otherwise fall thru to discover */ ! wiz_error_flag = TRUE; ! #endif case 'X': discover = TRUE; break; *************** *** 406,417 **** void port_help() { ! /* ! * Display unix-specific help. Just show contents of the helpfile ! * named by PORT_HELP. ! */ ! display_file(PORT_HELP, TRUE); } #endif /*unixmain.c*/ --- 410,438 ---- void port_help() { ! /* ! * Display unix-specific help. Just show contents of the helpfile ! * named by PORT_HELP. ! */ ! display_file(PORT_HELP, TRUE); } #endif + static void + wd_message() + { + #ifdef WIZARD + if (wiz_error_flag) { + pline("Only user \"%s\" may access debug (wizard) mode.", + # ifndef KR1ED + WIZARD); + # else + WIZARD_NAME); + # endif + pline("Entering discovery mode instead."); + } else + #endif + if (discover) + You("are in non-scoring discovery mode."); + } /*unixmain.c*/ *** Old/sys/vms/Install.vms Tue May 28 17:41:15 1996 --- sys/vms/Install.vms Fri May 24 22:21:44 1996 *************** *** 1,4 **** ! Instructions for Installing NetHack 3.2.0 on a VMS system ========================================= --- 1,4 ---- ! Instructions for Installing NetHack 3.2.1 on a VMS system ========================================= *************** *** 6,14 **** NetHack, then read it again! 1. Building NetHack requires a C compiler (either VAX C, DEC C, or GNU C) ! and VMS version V4.6 or later (but see note #9). This release has ! been tested on VAX/VMS V5.5-2, V6.2, and Alpha/VMS V6.2, plus been ! confirmed to compile and link successfully under V7.0. The build procedure (vmsbuild.com) should not need to be modified; it accepts an option for selecting the compiler, and it can detect different versions which might require specific command qualifiers. Versions --- 6,14 ---- NetHack, then read it again! 1. Building NetHack requires a C compiler (either VAX C, DEC C, or GNU C) ! and VMS version V4.6 or later (but see note #9). This release has been ! tested on VAX/VMS V5.5-2, V6.2, and Alpha/VMS V6.2; also, release 3.2.0 ! was confirmed to compile and link successfully under V7.0. The build procedure (vmsbuild.com) should not need to be modified; it accepts an option for selecting the compiler, and it can detect different versions which might require specific command qualifiers. Versions *************** *** 38,43 **** --- 38,44 ---- [.sys .amiga] -- AmigaDOS [.sys .amiga .splitter] [.sys .atari] -- Atari TOS + [.sys .be] -- BeBox BeOS [.sys .mac] -- Macintosh [.sys .mac .old] [.sys .msdos] -- MSDOS for IBM PCs and compatibles *************** *** 127,133 **** 8. The file nethack.com which is copied to the playground directory can be used to invoke NetHack, or nethack.exe can be run directly. Most of the command-line options specified in the Unix man-page (file ! [.dat]nethack.6) are also applicable to VMS. Some comments at the beginning of nethack.com illustrate several of the options. New players should read the file "Guidebook.txt" which will be copied into the playground directory as "Guidebook.doc". --- 128,134 ---- 8. The file nethack.com which is copied to the playground directory can be used to invoke NetHack, or nethack.exe can be run directly. Most of the command-line options specified in the Unix man-page (file ! [.doc]nethack.txt) are also applicable to VMS. Some comments at the beginning of nethack.com illustrate several of the options. New players should read the file "Guidebook.txt" which will be copied into the playground directory as "Guidebook.doc". *************** *** 136,144 **** Notes: 1. Save files and bones files from earlier versions will not work with ! 3.2.0. The scoreboard file (RECORD) from old versions is also not ! compatible with 3.2.0. If you install into an existing playground ! directory, you should remove old files RECORD.;1 and LOGFILE.;* first. 2. To specify user-preference options in your environment, define the logical name NETHACKOPTIONS to have the value of a quoted string --- 137,144 ---- Notes: 1. Save files and bones files from earlier versions will not work with ! 3.2.1. The scoreboard file (RECORD) from versions older than 3.2.0 ! are not compatible, but one from version 3.2.0 is. 2. To specify user-preference options in your environment, define the logical name NETHACKOPTIONS to have the value of a quoted string *************** *** 153,159 **** tradeoff for enabling checkpoint is that using it makes level changes do more I/O and take longer. The "menustyle" option controls some aspects of the user interface, and can be set to "menustyle:traditional" ! to make 3.2.0 behave more like 3.1.3. If logical name or DCL symbol NETHACKOPTIONS is not defined, NetHack will try HACKOPTIONS instead. Regardless of whether or not either --- 153,159 ---- tradeoff for enabling checkpoint is that using it makes level changes do more I/O and take longer. The "menustyle" option controls some aspects of the user interface, and can be set to "menustyle:traditional" ! to make 3.2.1 behave more like 3.1.3. If logical name or DCL symbol NETHACKOPTIONS is not defined, NetHack will try HACKOPTIONS instead. Regardless of whether or not either *************** *** 176,183 **** 3. Instead of using vmsbuild.com to compile and link everything, you can use the set of Makefiles found in the vms subdirectory, provided you have an appropriate and compatible make utility. They've been tested ! using Digital's MMS. There are five of them, and the suffix or ! filetype on their names indicates where they should be placed. $ copy [.sys.vms]Makefile.top []Makefile. $ copy [.sys.vms]Makefile.src [.src]Makefile. $ copy [.sys.vms]Makefile.utl [.util]Makefile. --- 176,184 ---- 3. Instead of using vmsbuild.com to compile and link everything, you can use the set of Makefiles found in the vms subdirectory, provided you have an appropriate and compatible make utility. They've been tested ! using MMK, a freeware clone of Digital's MMS. There are five of them, ! and the suffix or filetype on their names indicates where they should ! be placed. $ copy [.sys.vms]Makefile.top []Makefile. $ copy [.sys.vms]Makefile.src [.src]Makefile. $ copy [.sys.vms]Makefile.utl [.util]Makefile. *************** *** 196,202 **** much of the actual installation work, so if you want to make any customizations or file protection changes, edit install.com to suit. Also set MAKE in all of the Makefiles to the appropriate command if ! not using MMS. Once the Makefiles are tailored for your site, give the command $ mms all,install --- 197,203 ---- much of the actual installation work, so if you want to make any customizations or file protection changes, edit install.com to suit. Also set MAKE in all of the Makefiles to the appropriate command if ! not using MMS or MMK. Once the Makefiles are tailored for your site, give the command $ mms all,install *************** *** 433,439 **** PERM.LOCK;1 no such file then someone has deleted PERM.;1 while the synonym entry was still in place, and PERM.LOCK was left as a dangling name which no longer ! points at any file. The SET FILE/REMOVE command above will fix it. In similar fashion, synchronized access to the scoreboard file RECORD is accomplished using temporary entry RECORD.LOCK and LOGFILE using --- 434,441 ---- PERM.LOCK;1 no such file then someone has deleted PERM.;1 while the synonym entry was still in place, and PERM.LOCK was left as a dangling name which no longer ! points at any file. The SET FILE/REMOVE command above will fix the ! dangling name; a new PERM.;1 will need to be created as mentioned above. In similar fashion, synchronized access to the scoreboard file RECORD is accomplished using temporary entry RECORD.LOCK and LOGFILE using *************** *** 468,475 **** 14. There is no support for VMS POSIX in this release of NetHack. 15. If necessary, send problem reports via e-mail to ! "nethack-bugs@linc.cis.upenn.edu" (numeric address 130.91.6.8). Always include version information for NetHack, the operating system, and the C compiler used. ! 15-MAR-1996 --- 470,477 ---- 14. There is no support for VMS POSIX in this release of NetHack. 15. If necessary, send problem reports via e-mail to ! "nethack-bugs@linc.cis.upenn.edu" (numeric address 158.130.12.3). Always include version information for NetHack, the operating system, and the C compiler used. ! 24-MAY-1996 *** Old/sys/vms/Makefile.src Tue May 28 17:41:23 1996 --- sys/vms/Makefile.src Fri May 24 22:21:45 1996 *************** *** 1,5 **** # NetHack Makefile (VMS) - for building nethack itself. ! # SCCS Id: @(#)Makefile.src 3.2 96/03/02 # Copy this file to [.src]Makefile. and then edit it as needed. # If you changed CC or CFLAGS, make similar changes in [.util]Makefile. --- 1,5 ---- # NetHack Makefile (VMS) - for building nethack itself. ! # SCCS Id: @(#)Makefile.src 3.2 96/05/24 # Copy this file to [.src]Makefile. and then edit it as needed. # If you changed CC or CFLAGS, make similar changes in [.util]Makefile. *************** *** 92,98 **** # note: no trailing whitespace (or comment) after version or patchlevel numbers VERSION =3.2 ! PATCHLVL =0 MAKEDEFS = $(UTL)makedefs.exe; --- 92,98 ---- # note: no trailing whitespace (or comment) after version or patchlevel numbers VERSION =3.2 ! PATCHLVL =1 MAKEDEFS = $(UTL)makedefs.exe; *************** *** 120,126 **** # cause dependency loops if run through "make depend" # and dgn_comp.h, dgn_file.h, lev_comp.h, special level & dungeon files. # ! HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h color.h \ config.h coord.h decl.h def_os2.h display.h dlb.h dungeon.h edog.h \ emin.h engrave.h epri.h eshk.h extern.h flag.h func_tab.h \ global.h hack.h lev.h macconf.h mfndpos.h micro.h mkroom.h \ --- 120,126 ---- # cause dependency loops if run through "make depend" # and dgn_comp.h, dgn_file.h, lev_comp.h, special level & dungeon files. # ! HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \ config.h coord.h decl.h def_os2.h display.h dlb.h dungeon.h edog.h \ emin.h engrave.h epri.h eshk.h extern.h flag.h func_tab.h \ global.h hack.h lev.h macconf.h mfndpos.h micro.h mkroom.h \ *************** *** 216,224 **** $(CC) $(CFLAGS) objects.c @- if f$search("$(MAKEDEFS)").nes."" then delete $(MAKEDEFS) - # need those include files not in monst.c/objects.c dependencies below $(MAKEDEFS) : $(FIRSTOBJ) $(UTL)makedefs.c \ ! $(INC)artilist.h $(INC)patchlevel.h $(INC)qtext.h $(LIBOPT) $(CD) $(UTL) $(MAKE)$(MAKEFLAGS) $(MAKEDEFS) @ $(CD) $(SRC) --- 216,226 ---- $(CC) $(CFLAGS) objects.c @- if f$search("$(MAKEDEFS)").nes."" then delete $(MAKEDEFS) $(MAKEDEFS) : $(FIRSTOBJ) $(UTL)makedefs.c \ ! $(INC)config.h $(INC)permonst.h $(INC)objclass.h \ ! $(INC)monsym.h $(INC)artilist.h $(INC)dungeon.h \ ! $(INC)obj.h $(INC)monst.h $(INC)you.h $(INC)flag.h \ ! $(INC)dlb.h $(INC)patchlevel.h $(INC)qtext.h $(LIBOPT) $(CD) $(UTL) $(MAKE)$(MAKEFLAGS) $(MAKEDEFS) @ $(CD) $(SRC) *************** *** 397,403 **** restore.obj : $(INC)hack.h $(INC)lev.h $(INC)termcap.h $(INC)quest.h rip.obj : $(INC)hack.h rnd.obj : $(INC)hack.h ! rumors.obj : $(INC)hack.h $(INC)dlb.h save.obj : $(INC)hack.h $(INC)lev.h $(INC)quest.h shk.obj : $(INC)hack.h $(INC)eshk.h shknam.obj : $(INC)hack.h $(INC)eshk.h --- 399,405 ---- restore.obj : $(INC)hack.h $(INC)lev.h $(INC)termcap.h $(INC)quest.h rip.obj : $(INC)hack.h rnd.obj : $(INC)hack.h ! rumors.obj : $(INC)hack.h $(INC)lev.h $(INC)dlb.h save.obj : $(INC)hack.h $(INC)lev.h $(INC)quest.h shk.obj : $(INC)hack.h $(INC)eshk.h shknam.obj : $(INC)hack.h $(INC)eshk.h *************** *** 445,458 **** # ignore the non-VMS configuration headers #$(INC)global.h : $(INC)coord.h $(INC)vmsconf.h $(INC)unixconf.h \ # $(INC)os2conf.h $(INC)pcconf.h $(INC)tosconf.h \ ! # $(INC)amiconf.h $(INC)macconf.h $(INC)ntconf.h $(INC)global.h : $(INC)coord.h $(INC)vmsconf.h $(TOUCH) $(INC)global.h $(INC)hack.h : $(INC)config.h $(INC)dungeon.h $(INC)monsym.h $(INC)mkroom.h \ ! $(INC)objclass.h $(INC)decl.h $(INC)timeout.h $(INC)trap.h \ ! $(INC)flag.h $(INC)rm.h $(INC)vision.h $(INC)display.h \ ! $(INC)engrave.h $(INC)rect.h $(INC)winprocs.h \ ! $(INC)wintty.h $(INC)trampoli.h $(TOUCH) $(INC)hack.h $(INC)macconf.h : $(INC)system.h $(TOUCH) $(INC)macconf.h --- 447,460 ---- # ignore the non-VMS configuration headers #$(INC)global.h : $(INC)coord.h $(INC)vmsconf.h $(INC)unixconf.h \ # $(INC)os2conf.h $(INC)pcconf.h $(INC)tosconf.h \ ! # $(INC)amiconf.h $(INC)macconf.h $(INC)beconf.h $(INC)ntconf.h $(INC)global.h : $(INC)coord.h $(INC)vmsconf.h $(TOUCH) $(INC)global.h $(INC)hack.h : $(INC)config.h $(INC)dungeon.h $(INC)monsym.h $(INC)mkroom.h \ ! $(INC)objclass.h $(INC)youprop.h $(INC)wintype.h \ ! $(INC)decl.h $(INC)timeout.h $(INC)trap.h $(INC)flag.h \ ! $(INC)rm.h $(INC)vision.h $(INC)display.h $(INC)engrave.h \ ! $(INC)rect.h $(INC)winprocs.h $(INC)wintty.h $(INC)trampoli.h $(TOUCH) $(INC)hack.h $(INC)macconf.h : $(INC)system.h $(TOUCH) $(INC)macconf.h *************** *** 468,475 **** $(TOUCH) $(INC)permonst.h $(INC)rm.h : $(INC)align.h $(TOUCH) $(INC)rm.h - $(INC)sp_lev.h : $(INC)align.h - $(TOUCH) $(INC)sp_lev.h $(INC)tosconf.h : $(INC)micro.h $(INC)pcconf.h $(TOUCH) $(INC)tosconf.h $(INC)unixconf.h : $(INC)system.h --- 470,475 ---- *************** *** 478,484 **** $(TOUCH) $(INC)vault.h $(INC)vmsconf.h : $(INC)system.h $(TOUCH) $(INC)vmsconf.h ! $(INC)you.h : $(INC)align.h $(INC)attrib.h $(INC)monst.h $(INC)youprop.h $(TOUCH) $(INC)you.h $(INC)youprop.h : $(INC)prop.h $(INC)permonst.h $(INC)mondata.h $(INC)pm.h $(TOUCH) $(INC)youprop.h --- 478,484 ---- $(TOUCH) $(INC)vault.h $(INC)vmsconf.h : $(INC)system.h $(TOUCH) $(INC)vmsconf.h ! $(INC)you.h : $(INC)align.h $(INC)attrib.h $(INC)monst.h $(INC)prop.h $(TOUCH) $(INC)you.h $(INC)youprop.h : $(INC)prop.h $(INC)permonst.h $(INC)mondata.h $(INC)pm.h $(TOUCH) $(INC)youprop.h *** Old/sys/vms/Makefile.utl Tue May 28 17:41:28 1996 --- sys/vms/Makefile.utl Tue May 14 16:57:33 1996 *************** *** 1,5 **** # NetHack Makefile (VMS) - for utility programs. ! # SCCS Id: @(#)Makefile.utl 3.2 95/10/23 # Copy this file to [.util]Makefile. and then edit it as needed. # Settings for CC and CFLAGS ought to match the ones used in [.src]Makefile. --- 1,5 ---- # NetHack Makefile (VMS) - for utility programs. ! # SCCS Id: @(#)Makefile.utl 3.2 96/05/10 # Copy this file to [.util]Makefile. and then edit it as needed. # Settings for CC and CFLAGS ought to match the ones used in [.src]Makefile. *************** *** 150,157 **** $(MAKEDEFS) : $(MAKEOBJS) $(VMSMAKEOBJS) $(LIBOPT) $(LINK) $(LFLAGS) $(MAKEOBJS),$(VMSMAKEOBJS),$(LIBS) ! makedefs.obj : $(INC)config.h $(INC)permonst.h $(INC)objclass.h \ ! $(INC)monsym.h $(INC)artilist.h $(INC)patchlevel.h $(INC)qtext.h $(INC)onames.h : $(MAKEDEFS) $(RUN) $(MAKEDEFS) -o --- 150,160 ---- $(MAKEDEFS) : $(MAKEOBJS) $(VMSMAKEOBJS) $(LIBOPT) $(LINK) $(LFLAGS) $(MAKEOBJS),$(VMSMAKEOBJS),$(LIBS) ! makedefs.obj : makedefs.c \ ! $(INC)config.h $(INC)permonst.h $(INC)objclass.h \ ! $(INC)monsym.h $(INC)artilist.h $(INC)dungeon.h \ ! $(INC)obj.h $(INC)monst.h $(INC)you.h $(INC)flag.h \ ! $(INC)dlb.h $(INC)patchlevel.h $(INC)qtext.h $(INC)onames.h : $(MAKEDEFS) $(RUN) $(MAKEDEFS) -o *** Old/sys/vms/vmsbuild.com Tue May 28 17:41:41 1996 --- sys/vms/vmsbuild.com Tue May 14 16:57:32 1996 *************** *** 1,5 **** $ ! vms/vmsbuild.com -- compile and link NetHack 3.2.* [pr] ! $ version_number = "3.2.0" $ ! $ ! usage: $ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms] --- 1,5 ---- $ ! vms/vmsbuild.com -- compile and link NetHack 3.2.* [pr] ! $ version_number = "3.2.1" $ ! $ ! usage: $ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms] *************** *** 271,277 **** $! $link: $ milestone "" ! $ link/Exe=nethack 'nethacklib'/Lib/Incl=(vmsmain)'crtl''gnulib''ident_opt' $ milestone "NetHack" $ if c_opt.eq.o_LINK then goto done !"LINK" only $special: --- 271,277 ---- $! $link: $ milestone "" ! $ link/Exe=nethack.exe 'nethacklib'/Lib/Incl=(vmsmain)'crtl''gnulib''ident_opt' $ milestone "NetHack" $ if c_opt.eq.o_LINK then goto done !"LINK" only $special: *************** *** 286,303 **** $ copy [-.sys.vms]lev_lex.h stdio.*/Prot=(s:rwd,o:rwd) $ gosub compile_list $ rename stdio.h lev_lex.* ! $ link/exe=lev_comp lev_main,lev_yacc,lev_lex,- panic.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt' $ milestone "lev_comp" ! $ link/exe=dgn_comp dgn_main,dgn_yacc,dgn_lex,- panic.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt' $ milestone "dgn_comp" $! $ c_list = "#dlb_main,#recover" $ gosub compile_list ! $ link/exe=dlb dlb_main.obj,panic.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt' $ milestone "dlb" ! $ link/exe=[] recover.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt' $ milestone "recover" $! $done: --- 286,303 ---- $ copy [-.sys.vms]lev_lex.h stdio.*/Prot=(s:rwd,o:rwd) $ gosub compile_list $ rename stdio.h lev_lex.* ! $ link/exe=lev_comp.exe lev_main.obj,lev_yacc.obj,lev_lex.obj,- panic.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt' $ milestone "lev_comp" ! $ link/exe=dgn_comp.exe dgn_main.obj,dgn_yacc.obj,dgn_lex.obj,- panic.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt' $ milestone "dgn_comp" $! $ c_list = "#dlb_main,#recover" $ gosub compile_list ! $ link/exe=dlb.exe dlb_main.obj,panic.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt' $ milestone "dlb" ! $ link/exe=recover.exe recover.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt' $ milestone "recover" $! $done: *** Old/sys/vms/vmsmain.c Tue May 28 17:41:49 1996 --- sys/vms/vmsmain.c Sat May 18 11:50:56 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)vmsmain.c 3.2 96/01/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ /* main.c - VMS NetHack */ --- 1,4 ---- ! /* SCCS Id: @(#)vmsmain.c 3.2 96/05/17 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ /* main.c - VMS NetHack */ *************** *** 22,27 **** --- 22,32 ---- #include /* system service status codes */ #endif + static void NDECL(wd_message); + #ifdef WIZARD + static boolean wiz_error_flag = FALSE; + #endif + int main(argc,argv) int argc; *************** *** 127,133 **** Strcpy(plname, "wizard"); else #endif ! if(!*plname || !strncmp(plname, "games", 4)) askname(); plnamesuffix(); /* strip suffix from name; calls askname() */ /* again if suffix was whole name */ --- 132,139 ---- Strcpy(plname, "wizard"); else #endif ! if (!*plname || !strncmpi(plname, "games", 4) || ! !strcmpi(plname, "nethack")) askname(); plnamesuffix(); /* strip suffix from name; calls askname() */ /* again if suffix was whole name */ *************** *** 196,203 **** #endif pline("Hello %s, welcome back to NetHack!", plname); check_special_room(FALSE); ! if (discover) ! You("are in non-scoring discovery mode."); if (discover || wizard) { if (yn("Do you want to keep the save file?") == 'n') --- 202,208 ---- #endif pline("Hello %s, welcome back to NetHack!", plname); check_special_room(FALSE); ! wd_message(); if (discover || wizard) { if (yn("Do you want to keep the save file?") == 'n') *************** *** 213,220 **** newgame(); /* give welcome message before pickup messages */ pline("Hello %s, welcome to NetHack!", plname); ! if (discover) ! You("are in non-scoring discovery mode."); flags.move = 0; set_wear(); --- 218,224 ---- newgame(); /* give welcome message before pickup messages */ pline("Hello %s, welcome to NetHack!", plname); ! wd_message(); flags.move = 0; set_wear(); *************** *** 240,252 **** argc--; switch(argv[0][1]){ case 'D': ! # ifdef WIZARD if(!strcmpi(getenv("USER"), WIZARD_NAME)) { wizard = TRUE; break; } /* otherwise fall thru to discover */ ! # endif case 'X': case 'x': discover = TRUE; --- 244,257 ---- argc--; switch(argv[0][1]){ case 'D': ! #ifdef WIZARD if(!strcmpi(getenv("USER"), WIZARD_NAME)) { wizard = TRUE; break; } /* otherwise fall thru to discover */ ! wiz_error_flag = TRUE; ! #endif /* WIZARD */ case 'X': case 'x': discover = TRUE; *************** *** 394,398 **** --- 399,429 ---- return SS$_RESIGNAL; } #endif + + #ifdef PORT_HELP + void + port_help() + { + /* + * Display VMS-specific help. Just show contents of the helpfile + * named by PORT_HELP. + */ + display_file(PORT_HELP, TRUE); + } + #endif /* PORT_HELP */ + + static void + wd_message() + { + #ifdef WIZARD + if (wiz_error_flag) { + pline("Only user \"%s\" may access debug (wizard) mode.", + WIZARD_NAME); + pline("Entering discovery mode instead."); + } else + #endif + if (discover) + You("are in non-scoring discovery mode."); + } /*vmsmain.c*/ *** Old/sys/winnt/Install.nt Tue May 28 17:41:58 1996 --- sys/winnt/Install.nt Tue May 21 11:52:16 1996 *************** *** 4,10 **** Instructions for compiling and installing NetHack 3.2 on a Windows NT or Windows 95 system ============================================================== ! (or, How to make NetHack 3.2.0 for the WIN32 Console subsystem) Last revision: February 23, 1996 Credit for PC versions of NetHack 3.2 goes to the PC Development team --- 4,10 ---- Instructions for compiling and installing NetHack 3.2 on a Windows NT or Windows 95 system ============================================================== ! (or, How to make NetHack 3.2.1 for the WIN32 Console subsystem) Last revision: February 23, 1996 Credit for PC versions of NetHack 3.2 goes to the PC Development team *************** *** 61,67 **** they are not necessary for building the TTY version for the Win32 console subsystem. You can delete them to save space. Your distribution may contain a directory win\win32. This window port variant was a ! recent addition and was not ready for the 3.2.0 release. You may ignore it (or contribute to it). Required Directories for a Win32 Console NetHack: --- 61,67 ---- they are not necessary for building the TTY version for the Win32 console subsystem. You can delete them to save space. Your distribution may contain a directory win\win32. This window port variant was a ! recent addition and was not ready for the 3.2.1 release. You may ignore it (or contribute to it). Required Directories for a Win32 Console NetHack: *************** *** 180,186 **** or from a shortcut, just use the following information when setting up the icon or shortcut. ! Description : NetHack 3.2.0 Command Line : C:\GAMES\NETHACK\NETHACK.EXE (changing the directory to the appropriate one of course) --- 180,186 ---- or from a shortcut, just use the following information when setting up the icon or shortcut. ! Description : NetHack 3.2.1 Command Line : C:\GAMES\NETHACK\NETHACK.EXE (changing the directory to the appropriate one of course) *** Old/sys/winnt/Makefile.nt Tue May 28 17:42:01 1996 --- sys/winnt/Makefile.nt Tue May 21 11:52:17 1996 *************** *** 131,137 **** RESFILE = $(GAME).res ! #Do not uncomment these for 3.2.0 #TILEUTIL = $(UTIL)\tile2bmp.exe #TILEBMP = $(OBJ)\nhtiles.bmp #TILEGAME = $(OBJ)\tile.o --- 131,137 ---- RESFILE = $(GAME).res ! #Do not uncomment these for 3.2.1 #TILEUTIL = $(UTIL)\tile2bmp.exe #TILEBMP = $(OBJ)\nhtiles.bmp #TILEGAME = $(OBJ)\tile.o *************** *** 315,321 **** RECOVOBJS = $(O)recover.o # ! # Leave these commented for 3.2.0 # #TEXT_IO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \ # $(O)decl.o $(O)monst.o $(O)objects.o --- 315,321 ---- RECOVOBJS = $(O)recover.o # ! # Leave these commented for 3.2.1 # #TEXT_IO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \ # $(O)decl.o $(O)monst.o $(O)objects.o *** Old/sys/winnt/nethack.def Tue May 28 17:42:05 1996 --- sys/winnt/nethack.def Tue May 21 11:52:49 1996 *************** *** 1,5 **** NAME NETHACK ! DESCRIPTION 'NetHack 3.2.0 for Windows NT' EXETYPE WINDOWS STUB 'WINSTUB.EXE' CODE PRELOAD MOVEABLE DISCARDABLE --- 1,5 ---- NAME NETHACK ! DESCRIPTION 'NetHack 3.2.1 for Windows NT' EXETYPE WINDOWS STUB 'WINSTUB.EXE' CODE PRELOAD MOVEABLE DISCARDABLE *** Old/win/X11/tile2x11.c Tue May 28 17:42:58 1996 --- win/X11/tile2x11.c Fri May 3 17:44:17 1996 *************** *** 157,163 **** fprintf(fp, "\",\n"); } ! return fprintf(fp, "};\n")>0; } #endif /* USE_XPM */ --- 157,163 ---- fprintf(fp, "\",\n"); } ! return fprintf(fp, "};\n")>=0; } #endif /* USE_XPM */ *** Old/win/X11/winX.c Tue May 28 17:43:00 1996 --- win/X11/winX.c Wed Apr 24 10:10:07 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)winX.c 3.2 96/02/02 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)winX.c 3.2 96/04/05 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 79,85 **** */ struct xwindow window_list[MAX_WINDOWS]; AppResources appResources; ! void (*input_func)(); int click_x, click_y, click_button; /* Click position on a map window */ /* (filled by set_button_values()). */ int updated_inventory; --- 79,85 ---- */ struct xwindow window_list[MAX_WINDOWS]; AppResources appResources; ! void FDECL((*input_func), (Widget,XEvent *,String *,Cardinal *)); int click_x, click_y, click_button; /* Click position on a map window */ /* (filled by set_button_values()). */ int updated_inventory; *************** *** 594,599 **** --- 594,600 ---- /* The create routines will set type, popup, w, and Win_info. */ wp->prevx = wp->prevy = wp->cursx = wp->cursy = wp->pixel_width = wp->pixel_height = 0; + wp->keep_window = FALSE; switch (type) { case NHW_MAP: *************** *** 647,654 **** boolean blocking; { struct xwindow *wp; - check_winid(window); wp = &window_list[window]; switch (wp->type) { --- 648,655 ---- boolean blocking; { struct xwindow *wp; + check_winid(window); wp = &window_list[window]; switch (wp->type) { *************** *** 709,716 **** winid window; { struct xwindow *wp; - check_winid(window); /* * "Zap" known windows, but don't destroy them. We need to keep the * toplevel widget popped up so that later windows (e.g. tombstone) --- 710,718 ---- winid window; { struct xwindow *wp; + check_winid(window); + wp = &window_list[window]; /* * "Zap" known windows, but don't destroy them. We need to keep the * toplevel widget popped up so that later windows (e.g. tombstone) *************** *** 718,739 **** * roots that the DECWindow wm creates. */ if (window == WIN_MESSAGE) { WIN_MESSAGE = WIN_ERR; flags.window_inited = 0; - return; } else if (window == WIN_MAP) { WIN_MAP = WIN_ERR; - return; } else if (window == WIN_STATUS) { WIN_STATUS = WIN_ERR; - return; } else if (window == WIN_INVEN) { WIN_INVEN = WIN_ERR; - return; } - wp = &window_list[window]; - switch (wp->type) { case NHW_MAP: destroy_map_window(wp); --- 720,739 ---- * roots that the DECWindow wm creates. */ if (window == WIN_MESSAGE) { + wp->keep_window = TRUE; WIN_MESSAGE = WIN_ERR; flags.window_inited = 0; } else if (window == WIN_MAP) { + wp->keep_window = TRUE; WIN_MAP = WIN_ERR; } else if (window == WIN_STATUS) { + wp->keep_window = TRUE; WIN_STATUS = WIN_ERR; } else if (window == WIN_INVEN) { + /* don't need to keep this one */ WIN_INVEN = WIN_ERR; } switch (wp->type) { case NHW_MAP: destroy_map_window(wp); *************** *** 817,824 **** int how; { struct xwindow *wp; - check_winid(window); wp = &window_list[window]; if (wp->type == NHW_TEXT) { --- 817,824 ---- int how; { struct xwindow *wp; + check_winid(window); wp = &window_list[window]; if (wp->type == NHW_TEXT) { *************** *** 979,987 **** } /* ! * Let the OS take care of almost everything. This includes the "main" ! * three windows: message, map, and status. If I destroy one, I must ! * destroy them all. */ /* ARGSUSED */ void X11_exit_nhwindows(dummy) --- 979,985 ---- } /* ! * All done. */ /* ARGSUSED */ void X11_exit_nhwindows(dummy) *************** *** 998,1003 **** --- 996,1009 ---- XFreePixmap(XtDisplay(toplevel), tile_pixmap); tile_pixmap = None; } + if (WIN_INVEN != WIN_ERR) + X11_destroy_nhwindow(WIN_INVEN); + if (WIN_STATUS != WIN_ERR) + X11_destroy_nhwindow(WIN_STATUS); + if (WIN_MAP != WIN_ERR) + X11_destroy_nhwindow(WIN_MAP); + if (WIN_MESSAGE != WIN_ERR) + X11_destroy_nhwindow(WIN_MESSAGE); } *************** *** 1276,1281 **** --- 1282,1289 ---- #define LLEN 128 char line[LLEN]; int num_lines; + char *textlines; + int charcount; /* Use the port-independent file opener to see if the file exists. */ fp = dlb_fopen(str, RDTMODE); *************** *** 1287,1299 **** } /* ! * Count the number of lines in the file. If under the max display ! * size, use that instead. */ num_lines = 0; while (dlb_fgets(line, LLEN, fp)) { num_lines++; ! if (num_lines >= DISPLAY_FILE_SIZE) break; } (void) dlb_fclose(fp); --- 1295,1307 ---- } /* ! * Count the number of lines and characters in the file. */ num_lines = 0; + charcount = 1; while (dlb_fgets(line, LLEN, fp)) { num_lines++; ! charcount += strlen(line); } (void) dlb_fclose(fp); *************** *** 1301,1306 **** --- 1309,1333 ---- /* Ignore empty files */ if (num_lines == 0) return; + /* If over the max window size, truncate the window size to the max */ + if (num_lines >= DISPLAY_FILE_SIZE) + num_lines = DISPLAY_FILE_SIZE; + + /* + * Re-open the file and read the data into a buffer. Cannot use + * the XawAsciiFile type of widget, because that is not DLB-aware. + */ + textlines = (char *) alloc((unsigned int) charcount); + textlines[0] = '\0'; + + fp = dlb_fopen(str, RDTMODE); + + while (dlb_fgets(line, LLEN, fp)) { + (void) strcat(textlines, line); + } + + (void) dlb_fclose(fp); + num_args = 0; XtSetArg(args[num_args], XtNtitle, str); num_args++; *************** *** 1314,1321 **** XawtextScrollWhenNeeded); num_args++; XtSetArg(args[num_args], XtNscrollVertical, XawtextScrollWhenNeeded); num_args++; ! XtSetArg(args[num_args], XtNtype, XawAsciiFile); num_args++; ! XtSetArg(args[num_args], XtNstring, str); num_args++; XtSetArg(args[num_args], XtNdisplayCaret, False); num_args++; XtSetArg(args[num_args], XtNtranslations, XtParseTranslationTable(display_translations)); num_args++; --- 1341,1348 ---- XawtextScrollWhenNeeded); num_args++; XtSetArg(args[num_args], XtNscrollVertical, XawtextScrollWhenNeeded); num_args++; ! XtSetArg(args[num_args], XtNtype, XawAsciiString); num_args++; ! XtSetArg(args[num_args], XtNstring, textlines); num_args++; XtSetArg(args[num_args], XtNdisplayCaret, False); num_args++; XtSetArg(args[num_args], XtNtranslations, XtParseTranslationTable(display_translations)); num_args++; *************** *** 1353,1358 **** --- 1380,1386 ---- XtSetValues(dispfile, args, num_args); nh_XtPopup(popup, (int)XtGrabNone, (Widget)0); + free(textlines); } *** Old/win/X11/winmap.c Tue May 28 17:43:05 1996 --- win/X11/winmap.c Sun Apr 21 13:22:06 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)winmap.c 3.2 95/09/03 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)winmap.c 3.2 96/04/05 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 1112,1117 **** --- 1112,1118 ---- wp = find_widget(w); map_info = wp->map_information; + if (wp->keep_window && !map_info) return; /* * The map is sent an expose event when the viewport resizes. Make sure * that the cursor is still in the viewport after the resize. *************** *** 1527,1547 **** struct xwindow *wp; { struct map_info_t *map_info = wp->map_information; - #ifdef TEXTCOLOR - int i; - #endif ! if (wp->popup) { nh_XtPopdown(wp->popup); ! if (map_info->is_tile) { ! /* free alloc'ed tile information */ ! free((char *) map_info->mtype.tile_map); ! } else { ! struct text_map_info_t *text_map = map_info->mtype.text_map; ! /* Free allocated GCs. */ #ifdef TEXTCOLOR for (i = 0; i < CLR_MAX; i++) { XtReleaseGC(wp->w, text_map->color_gcs[i]); XtReleaseGC(wp->w, text_map->inv_color_gcs[i]); --- 1528,1545 ---- struct xwindow *wp; { struct map_info_t *map_info = wp->map_information; ! if (wp->popup) nh_XtPopdown(wp->popup); ! if (map_info) { ! struct text_map_info_t *text_map = map_info->mtype.text_map; ! /* Free allocated GCs. */ ! if (!map_info->is_tile) { #ifdef TEXTCOLOR + int i; + for (i = 0; i < CLR_MAX; i++) { XtReleaseGC(wp->w, text_map->color_gcs[i]); XtReleaseGC(wp->w, text_map->inv_color_gcs[i]); *************** *** 1550,1567 **** XtReleaseGC(wp->w, text_map->copy_gc); XtReleaseGC(wp->w, text_map->inv_copy_gc); #endif - /* free alloc'ed text information */ - free((char *) map_info->mtype.text_map); } /* Free malloc'ed space. */ ! free((char *) map_info); /* Destroy map widget. */ ! XtDestroyWidget(wp->popup); ! } ! wp->type = NHW_NONE; /* allow re-use */ } --- 1548,1569 ---- XtReleaseGC(wp->w, text_map->copy_gc); XtReleaseGC(wp->w, text_map->inv_copy_gc); #endif } + /* free alloc'ed text information */ + free((genericptr_t)text_map), map_info->mtype.text_map = 0; /* Free malloc'ed space. */ ! free((genericptr_t)map_info), wp->map_information = 0; ! } /* Destroy map widget. */ ! if (wp->popup && !wp->keep_window) ! XtDestroyWidget(wp->popup), wp->popup = (Widget)0; ! if (wp->keep_window) ! XtRemoveCallback(wp->w, XtNexposeCallback, map_exposed, (XtPointer)0); ! else ! wp->type = NHW_NONE; /* allow re-use */ } *** Old/win/X11/winmenu.c Tue May 28 17:43:10 1996 --- win/X11/winmenu.c Tue May 21 17:03:01 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)winmenu.c 3.2 96/01/15 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)winmenu.c 3.2 96/05/12 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 27,32 **** --- 27,33 ---- #else #include #endif + #include #ifdef PRESERVE_NO_SYSV # ifdef SYSV *************** *** 40,45 **** --- 41,47 ---- static void FDECL(menu_select, (Widget, XtPointer, XtPointer)); + static void FDECL(invert_line, (struct xwindow *, x11_menu_item *, int)); static void FDECL(menu_ok, (Widget, XtPointer, XtPointer)); static void FDECL(menu_cancel, (Widget, XtPointer, XtPointer)); static void FDECL(menu_all, (Widget, XtPointer, XtPointer)); *************** *** 145,150 **** --- 147,178 ---- } /* + * Invert the count'th line (curr) in the given window. + */ + /*ARGSUSED*/ + static void + invert_line(wp, curr, count) + struct xwindow *wp; + x11_menu_item *curr; + int count; + { + curr->selected = !curr->selected; + if (curr->selected) { + #ifdef USE_FWF + XfwfMultiListHighlightItem((XfwfMultiListWidget)wp->w, count); + #else + curr->str[2] = '+'; + #endif + } else { + #ifdef USE_FWF + XfwfMultiListUnhighlightItem((XfwfMultiListWidget)wp->w, count); + #else + curr->str[2] = '-'; + #endif + } + } + + /* * Called when we get a key press event on a menu window. */ /* ARGSUSED */ *************** *** 172,184 **** } if (menu_info->is_active) { /* waiting for input */ if (ch == '\033') { /* quit */ select_none(wp); - } else if (ch == '\n' || ch == '\r') { ; /* accept */ ! ! } else if (ch == '/') { /* search */ if (menu_info->how == PICK_ANY || menu_info->how == PICK_ONE) { char buf[BUFSZ]; X11_getlin("Search for:", buf); --- 200,211 ---- } if (menu_info->is_active) { /* waiting for input */ + ch = map_menu_cmd(ch); if (ch == '\033') { /* quit */ select_none(wp); } else if (ch == '\n' || ch == '\r') { ; /* accept */ ! } else if (ch == MENU_SEARCH) { /* search */ if (menu_info->how == PICK_ANY || menu_info->how == PICK_ONE) { char buf[BUFSZ]; X11_getlin("Search for:", buf); *************** *** 193,216 **** X11_nhbell(); return; } ! } else if (ch == '*') { /* select all */ if (menu_info->how == PICK_ANY) select_all(wp); else X11_nhbell(); return; ! } else if (ch == '%') { /* deselect all */ if (menu_info->how == PICK_ANY) select_none(wp); else X11_nhbell(); return; ! } else if (ch == '@') { /* invert all */ if (menu_info->how == PICK_ANY) invert_all(wp); else X11_nhbell(); return; } else { boolean selected_something = FALSE; for (count = 0, curr = menu_info->curr_menu.base; curr; --- 220,257 ---- X11_nhbell(); return; } ! } else if (ch == MENU_SELECT_ALL) { /* select all */ if (menu_info->how == PICK_ANY) select_all(wp); else X11_nhbell(); return; ! } else if (ch == MENU_UNSELECT_ALL) { /* unselect all */ if (menu_info->how == PICK_ANY) select_none(wp); else X11_nhbell(); return; ! } else if (ch == MENU_INVERT_ALL) { /* invert all */ if (menu_info->how == PICK_ANY) invert_all(wp); else X11_nhbell(); return; + } else if (index(menu_info->curr_menu.gacc, ch)) { + /* matched a group accelerator */ + if (menu_info->how == PICK_ANY) { + for (count = 0, curr = menu_info->curr_menu.base; curr; + curr = curr->next, count++) { + if (curr->identifier.a_void != 0 && curr->gselector == ch) + invert_line(wp, curr, count); + } + #ifndef USE_FWF + XawListChange(wp->w, menu_info->curr_menu.list_pointer, 0, 0, True); + #endif + } else + X11_nhbell(); + return; } else { boolean selected_something = FALSE; for (count = 0, curr = menu_info->curr_menu.base; curr; *************** *** 218,242 **** if (curr->identifier.a_void != 0 && curr->selector == ch) break; if (curr) { ! curr->selected = !curr->selected; ! if (curr->selected) { ! #ifdef USE_FWF ! XfwfMultiListHighlightItem((XfwfMultiListWidget)wp->w, count); ! #else ! curr->str[2] = '+'; ! XawListChange(wp->w, ! menu_info->curr_menu.list_pointer, 0, 0, True); ! #endif ! selected_something = TRUE; ! } else { ! #ifdef USE_FWF ! XfwfMultiListUnhighlightItem((XfwfMultiListWidget)wp->w, count); ! #else ! curr->str[2] = '-'; ! XawListChange(wp->w, ! menu_info->curr_menu.list_pointer, 0, 0, True); #endif ! } } else { X11_nhbell(); /* no match */ } --- 259,269 ---- if (curr->identifier.a_void != 0 && curr->selector == ch) break; if (curr) { ! invert_line(wp, curr, count); ! #ifndef USE_FWF ! XawListChange(wp->w, menu_info->curr_menu.list_pointer, 0, 0, True); #endif ! selected_something = curr->selected; } else { X11_nhbell(); /* no match */ } *************** *** 273,280 **** { struct xwindow *wp = (struct xwindow *) client_data; ! if (wp->menu_information->is_active) select_none(wp); menu_popdown(wp); } --- 300,309 ---- { struct xwindow *wp = (struct xwindow *) client_data; ! if (wp->menu_information->is_active) { select_none(wp); + wp->menu_information->cancelled = TRUE; + } menu_popdown(wp); } *************** *** 333,350 **** { x11_menu_item *curr; int count; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0 && !curr->selected) { ! curr->selected = TRUE; ! #ifdef USE_FWF ! XfwfMultiListHighlightItem((XfwfMultiListWidget) wp->w, count); ! #else ! curr->str[2] = '+'; ! #endif ! } #ifndef USE_FWF XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } --- 362,379 ---- { x11_menu_item *curr; int count; + boolean changed = FALSE; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0 && !curr->selected) ! if (!curr->selected) { ! invert_line(wp, curr, count); ! changed = TRUE; ! } ! #ifndef USE_FWF + if (changed) XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } *************** *** 355,372 **** { x11_menu_item *curr; int count; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0 && curr->selected) { ! curr->selected = FALSE; ! #ifdef USE_FWF ! XfwfMultiListUnhighlightItem((XfwfMultiListWidget) wp->w, count); ! #else ! curr->str[2] = '-'; ! #endif ! } #ifndef USE_FWF XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } --- 384,401 ---- { x11_menu_item *curr; int count; + boolean changed = FALSE; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0 && curr->selected) ! if (curr->selected) { ! invert_line(wp, curr, count); ! changed = TRUE; ! } ! #ifndef USE_FWF + if (changed) XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } *************** *** 380,398 **** for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0) { ! curr->selected = !curr->selected; ! #ifdef USE_FWF ! if (curr->selected) ! XfwfMultiListHighlightItem((XfwfMultiListWidget) wp->w, count); ! else ! XfwfMultiListUnhighlightItem((XfwfMultiListWidget)wp->w, count); ! #else ! curr->str[2] = curr->selected ? '+' : '-'; ! #endif ! } #ifndef USE_FWF ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } --- 409,419 ---- for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0) ! invert_line(wp, curr, count); ! #ifndef USE_FWF ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } *************** *** 403,423 **** { x11_menu_item *curr; int count; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; ! curr = curr->next, count++) if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { ! curr->selected = !curr->selected; ! #ifdef USE_FWF ! if (curr->selected) ! XfwfMultiListHighlightItem((XfwfMultiListWidget) wp->w, count); ! else ! XfwfMultiListUnhighlightItem((XfwfMultiListWidget)wp->w, count); ! #else ! curr->str[2] = curr->selected ? '+' : '-'; ! #endif } #ifndef USE_FWF XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } --- 424,440 ---- { x11_menu_item *curr; int count; + boolean changed = FALSE; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; ! curr = curr->next, count++) if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { ! invert_line(wp, curr, count); ! changed = TRUE; } + #ifndef USE_FWF + if (changed) XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } *************** *** 433,445 **** for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { ! curr->selected = TRUE; ! #ifdef USE_FWF ! XfwfMultiListHighlightItem((XfwfMultiListWidget) wp->w, count); ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); ! #else ! curr->str[2] = '+'; #endif return; } --- 450,461 ---- for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { ! if (!curr->selected) { ! invert_line(wp, curr, count); ! #ifndef USE_FWF ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif + } return; } *************** *** 515,525 **** /*ARGSUSED*/ void ! X11_add_menu(window, glyph, identifier, ch, attr, str, preselected) winid window; int glyph; /* unused (for now) */ const anything *identifier; char ch; int attr; const char *str; boolean preselected; --- 531,542 ---- /*ARGSUSED*/ void ! X11_add_menu(window, glyph, identifier, ch, gch, attr, str, preselected) winid window; int glyph; /* unused (for now) */ const anything *identifier; char ch; + char gch; /* group accelerator (0 = no group) */ int attr; const char *str; boolean preselected; *************** *** 540,546 **** item->attr = attr; /* item->selected = preselected; */ item->selected = FALSE; ! if (identifier->a_void) { char buf[QBUFSZ]; --- 557,563 ---- item->attr = attr; /* item->selected = preselected; */ item->selected = FALSE; ! if (identifier->a_void) { char buf[QBUFSZ]; *************** *** 565,570 **** --- 582,588 ---- } item->selector = ch; + item->gselector = gch; if (menu_info->new_menu.last) { menu_info->new_menu.last->next = item; *************** *** 580,585 **** --- 598,606 ---- winid window; const char *query; { + char gacc[QBUFSZ], *ap; + x11_menu_item *curr; + struct menu_info_t *menu_info; check_winid(window); menu_info = window_list[window].menu_information; *************** *** 588,593 **** --- 609,624 ---- return; } menu_info->new_menu.query = copy_of(query); + + /* collect the group accelerators into a string */ + for (gacc[0] = 0, ap = gacc, curr = menu_info->curr_menu.base; + curr; curr = curr->next) { + if (curr->gselector) { + *ap++ = curr->gselector; + *ap = 0; + } + } + menu_info->new_menu.gacc = copy_of(gacc); } int *************** *** 641,655 **** labeled = (menu_info->new_menu.query && *(menu_info->new_menu.query)) ? TRUE : FALSE; ! /* Menus don't appear to size components correctly, except * when first created. For 3.2.0 release, just recreate * each time. */ if (menu_info->valid_widgets ! && (window != WIN_INVEN || !flags.perm_invent)) ! { XtDestroyWidget(wp->popup); ! menu_info->valid_widgets=FALSE; } if (!menu_info->valid_widgets) { --- 672,686 ---- labeled = (menu_info->new_menu.query && *(menu_info->new_menu.query)) ? TRUE : FALSE; ! /* ! * Menus don't appear to size components correctly, except * when first created. For 3.2.0 release, just recreate * each time. */ if (menu_info->valid_widgets ! && (window != WIN_INVEN || !flags.perm_invent)) { XtDestroyWidget(wp->popup); ! menu_info->valid_widgets = FALSE; } if (!menu_info->valid_widgets) { *************** *** 903,911 **** --- 934,945 ---- retval = 0; } else { menu_info->is_active = TRUE; /* waiting for user response */ + menu_info->cancelled = FALSE; nh_XtPopup(wp->popup, (int)XtGrabExclusive, wp->w); (void) x_event(EXIT_ON_EXIT); menu_info->is_active = FALSE; + if (menu_info->cancelled) + return -1; retval = 0; for (curr = menu_info->curr_menu.base; curr; curr = curr->next) *************** *** 963,972 **** mp->last = mp->base; mp->base = mp->base->next; ! free(mp->last->str); free((genericptr_t)mp->last); } if (mp->query) free((genericptr_t) mp->query); if (mp->list_pointer) free((genericptr_t) mp->list_pointer); if (mp->sensitive) free((genericptr_t) mp->sensitive); reset_menu_to_default(mp); --- 997,1007 ---- mp->last = mp->base; mp->base = mp->base->next; ! free((genericptr_t)mp->last->str); free((genericptr_t)mp->last); } if (mp->query) free((genericptr_t) mp->query); + if (mp->gacc) free((genericptr_t) mp->gacc); if (mp->list_pointer) free((genericptr_t) mp->list_pointer); if (mp->sensitive) free((genericptr_t) mp->sensitive); reset_menu_to_default(mp); *************** *** 976,982 **** reset_menu_to_default(mp) struct menu *mp; { ! (void) memset((genericptr_t) mp, '\0', sizeof(struct menu)); mp->curr_selector = 'a'; /* first accelerator */ } --- 1011,1022 ---- reset_menu_to_default(mp) struct menu *mp; { ! mp->base = mp->last = (x11_menu_item *)0; ! mp->query = (const char *)0; ! mp->gacc = (const char *)0; ! mp->count = 0; ! mp->list_pointer = (String *)0; ! mp->sensitive = (Boolean *)0; mp->curr_selector = 'a'; /* first accelerator */ } *************** *** 1021,1023 **** --- 1061,1065 ---- wp->menu_information = (struct menu_info_t *) 0; wp->type = NHW_NONE; /* allow re-use */ } + + /*winmenu.c*/ *** Old/win/X11/winmesg.c Tue May 28 17:43:14 1996 --- win/X11/winmesg.c Sun Apr 21 13:22:08 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)winmesg.c 3.2 93/02/02 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)winmesg.c 3.2 96/04/05 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 205,215 **** { if (wp->popup) { nh_XtPopdown(wp->popup); ! XtDestroyWidget(wp->popup); set_circle_buf(wp->mesg_information, 0); /* free buffer list */ ! free((char *)wp->mesg_information); } ! wp->type = NHW_NONE; } --- 205,221 ---- { if (wp->popup) { nh_XtPopdown(wp->popup); ! if (!wp->keep_window) ! XtDestroyWidget(wp->popup), wp->popup = (Widget)0; ! } ! if (wp->mesg_information) { set_circle_buf(wp->mesg_information, 0); /* free buffer list */ ! free((genericptr_t)wp->mesg_information), wp->mesg_information = 0; } ! if (wp->keep_window) ! XtRemoveCallback(wp->w, XtNexposeCallback, mesg_exposed, (XtPointer)0); ! else ! wp->type = NHW_NONE; } *************** *** 290,299 **** * the list is non_empty. */ tail = get_previous(mesg_info->head); ! for (i = mesg_info->num_lines - count; i--; ) { curr = mesg_info->head; mesg_info->head = curr->next; ! if (curr->line) free(curr->line); free((genericptr_t)curr); } if (count == 0) { --- 296,305 ---- * the list is non_empty. */ tail = get_previous(mesg_info->head); ! for (i = mesg_info->num_lines - count; i > 0; i--) { curr = mesg_info->head; mesg_info->head = curr->next; ! if (curr->line) free((genericptr_t)curr->line); free((genericptr_t)curr); } if (count == 0) { *************** *** 541,546 **** --- 547,553 ---- while (XCheckTypedWindowEvent(dpy, win, Expose, &evt)) continue; wp = find_widget(w); + if (wp->keep_window && !wp->mesg_information) return; mesg_check_size_change(wp); redraw_message_window(wp); } *************** *** 614,616 **** --- 621,625 ---- wp->mesg_information->num_lines); #endif } + + /*winmesg.c*/ *** Old/win/X11/winmisc.c Tue May 28 17:43:17 1996 --- win/X11/winmisc.c Tue May 21 16:58:00 1996 *************** *** 145,151 **** player_select_translations, "quit", ps_quit, "random", ps_random, ! num_roles, roles, 0, ps_select, &player_form); ps_selected = 0; positionpopup(popup, FALSE); --- 145,151 ---- player_select_translations, "quit", ps_quit, "random", ps_random, ! num_roles, roles, (Widget **)0, ps_select, &player_form); ps_selected = 0; positionpopup(popup, FALSE); *** Old/win/X11/winstat.c Tue May 28 17:43:20 1996 --- win/X11/winstat.c Wed Apr 24 10:08:23 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)winstat.c 3.2 93/02/04 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)winstat.c 3.2 96/04/05 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 39,44 **** --- 39,45 ---- static void FDECL(update_fancy_status, (struct xwindow *)); static Widget FDECL(create_fancy_status, (Widget,Widget)); + static void FDECL(destroy_fancy_status, (struct xwindow *)); void create_status_window(wp, create_popup, parent) *************** *** 129,139 **** { /* If status_information is defined, then it a "text" status window. */ if (wp->status_information) { ! nh_XtPopdown(wp->popup); ! XtDestroyWidget(wp->popup); ! free((char *) wp->status_information); } ! wp->type = NHW_NONE; } --- 130,147 ---- { /* If status_information is defined, then it a "text" status window. */ if (wp->status_information) { ! if (wp->popup) { ! nh_XtPopdown(wp->popup); ! if (!wp->keep_window) ! XtDestroyWidget(wp->popup), wp->popup = (Widget)0; ! } ! free((genericptr_t)wp->status_information); ! wp->status_information = 0; ! } else { ! destroy_fancy_status(wp); } ! if (!wp->keep_window) ! wp->type = NHW_NONE; } *************** *** 172,186 **** /* Fancy Status -------------------------------------------------------------*/ - static Widget init_info_form(); - static Widget init_column(); - static void set_widths(); - static void get_widths(); - static void create_widget(); - static const char *width_string(); - static void hilight_label(); - static void update_val(); - static int hilight_time = 1; /* number of turns to hilight a changed value */ struct X_status_value { --- 180,185 ---- *************** *** 198,203 **** --- 197,211 ---- #define SV_LABEL 1 /* displays a changable label */ #define SV_NAME 2 /* displays an unchangeable name */ + static void FDECL(hilight_label, (Widget)); + static void FDECL(update_val, (struct X_status_value *,long)); + static const char *FDECL(width_string, (int)); + static void FDECL(create_widget, (Widget,struct X_status_value *,int)); + static void FDECL(get_widths, (struct X_status_value *,int *,int *)); + static void FDECL(set_widths, (struct X_status_value *,int,int)); + static Widget FDECL(init_column, (char *,Widget,Widget,Widget,int *)); + static Widget FDECL(init_info_form, (Widget,Widget,Widget)); + /* * Form entry storage indices. */ *************** *** 564,579 **** update_fancy_status(wp) struct xwindow *wp; { ! const struct X_status_value *sv; long val; int i; if (wp->cursy != 0) return; /* do a complete update when line 0 is done */ - #ifdef GCC_WARN - val = 0; - #endif - for (i = 0, sv = shown_stats; i < NUM_STATS; i++, sv++) { switch (i) { case F_STR: val = (long) ACURR(A_STR); break; --- 572,583 ---- update_fancy_status(wp) struct xwindow *wp; { ! struct X_status_value *sv; long val; int i; if (wp->cursy != 0) return; /* do a complete update when line 0 is done */ for (i = 0, sv = shown_stats; i < NUM_STATS; i++, sv++) { switch (i) { case F_STR: val = (long) ACURR(A_STR); break; *************** *** 638,643 **** --- 642,648 ---- impossible("update_other: unknown shown value"); active = FALSE; } + val = 0; break; } } *************** *** 966,968 **** --- 971,991 ---- return form; } + static void + destroy_fancy_status(wp) + struct xwindow *wp; + { + int i; + struct X_status_value *sv; + + if (!wp->keep_window) + XtDestroyWidget(wp->w), wp->w = (Widget)0; + + for (i = 0, sv = shown_stats; i < NUM_STATS; i++, sv++) + if (sv->type == SV_LABEL) { + free((genericptr_t)sv->name); + sv->name = 0; + } + } + + /*winstat.c*/ *** Old/win/X11/wintext.c Tue May 28 17:43:24 1996 --- win/X11/wintext.c Sun Apr 21 13:22:09 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)wintext.c 3.2 92/3/7 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)wintext.c 3.2 96/04/05 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 329,335 **** if (text_info->blocked || text_info->destroy_on_ack) { XtDestroyWidget(wp->popup); free_text_buffer(&text_info->text); ! free((char *) text_info); wp->type = NHW_NONE; /* allow reuse */ } else { text_info->destroy_on_ack = TRUE; /* destroy on next ACK */ --- 329,335 ---- if (text_info->blocked || text_info->destroy_on_ack) { XtDestroyWidget(wp->popup); free_text_buffer(&text_info->text); ! free((genericptr_t)text_info), wp->text_information = 0; wp->type = NHW_NONE; /* allow reuse */ } else { text_info->destroy_on_ack = TRUE; /* destroy on next ACK */ *************** *** 619,623 **** return imageport; } ! #endif --- 619,624 ---- return imageport; } + #endif /* GRAPHIC_TOMBSTONE */ ! /*wintext.c*/ *** Old/win/share/tilemap.c Tue May 28 17:43:57 1996 --- win/share/tilemap.c Wed Apr 24 14:05:12 1996 *************** *** 398,403 **** --- 398,404 ---- } fprintf(ofp, "\nint total_tiles_used = %d;\n", start); + lastothtile = start - 1; } int main() *************** *** 418,427 **** } fprintf(ofp,"/* This file is automatically generated. Do not edit. */\n"); fprintf(ofp,"\n#include \"hack.h\"\n\n"); ! fprintf(ofp,"#define MAXMONTILE %d\n", lastmontile); ! fprintf(ofp,"#define MAXOBJTILE %d\n", lastobjtile); ! fprintf(ofp,"#define MAXOTHTILE %d\n", lastothtile); ! fprintf(ofp,"\nshort glyph2tile[MAX_GLYPH] = {\n"); for (i = 0; i < MAX_GLYPH; i++) { fprintf(ofp,"%2d,%c", tilemap[i], (i % 12) ? ' ' : '\n'); --- 419,425 ---- } fprintf(ofp,"/* This file is automatically generated. Do not edit. */\n"); fprintf(ofp,"\n#include \"hack.h\"\n\n"); ! fprintf(ofp,"short glyph2tile[MAX_GLYPH] = {\n"); for (i = 0; i < MAX_GLYPH; i++) { fprintf(ofp,"%2d,%c", tilemap[i], (i % 12) ? ' ' : '\n'); *************** *** 429,434 **** --- 427,436 ---- fprintf(ofp,"%s};\n", (i % 12) ? "\n" : ""); process_substitutions(ofp); + + fprintf(ofp,"\n#define MAXMONTILE %d\n", lastmontile); + fprintf(ofp,"#define MAXOBJTILE %d\n", lastobjtile); + fprintf(ofp,"#define MAXOTHTILE %d\n", lastothtile); fprintf(ofp,"\n/*tile.c*/\n"); *** Old/win/tty/termcap.c Tue May 28 17:44:04 1996 --- win/tty/termcap.c Fri May 3 16:19:01 1996 *************** *** 764,779 **** #if defined(TEXTCOLOR) && defined(TERMLIB) # if defined(UNIX) && defined(TERMINFO) /* ! * Sets up color highlighting, using terminfo(4) escape sequences (highlight ! * code found in print.c). It is assumed that the background color is black. */ ! /* terminfo indexes for the basic colors it guarantees, used to map ANSI ! * RGB to terminfo BGR. SCO UNIX already uses RGB for terminfo colors, ! * but still needs black treated specially. */ ! ! # ifndef _M_UNIX ! #define COLOR_BLACK 1 /* fake out to avoid black on black */ #define COLOR_BLUE 1 #define COLOR_GREEN 2 #define COLOR_CYAN 3 --- 764,788 ---- #if defined(TEXTCOLOR) && defined(TERMLIB) # if defined(UNIX) && defined(TERMINFO) /* ! * Sets up color highlighting, using terminfo(4) escape sequences. ! * ! * Having never seen a terminfo system without curses, we assume this ! * inclusion is safe. On systems with color terminfo, it should define ! * the 8 COLOR_FOOs, and avoid us having to guess whether this particular ! * terminfo uses BGR or RGB for its indexes. ! * ! * If we don't get the definitions, then guess. Original color terminfos ! * used BGR. Linux using ncurses and SCO UNIX are known to have RGB terminfos. ! * ! * In any case, treat black specially so we don't try to display black ! * characters on the assumed black background. */ + #include ! # ifdef COLOR_BLACK /* trust include file */ ! #undef COLOR_BLACK ! # else ! # ifndef _M_UNIX /* guess BGR */ #define COLOR_BLUE 1 #define COLOR_GREEN 2 #define COLOR_CYAN 3 *************** *** 781,788 **** #define COLOR_MAGENTA 5 #define COLOR_YELLOW 6 #define COLOR_WHITE 7 ! # else ! #define COLOR_BLACK 4 /* fake out to avoid black on black */ #define COLOR_RED 1 #define COLOR_GREEN 2 #define COLOR_YELLOW 3 --- 790,796 ---- #define COLOR_MAGENTA 5 #define COLOR_YELLOW 6 #define COLOR_WHITE 7 ! # else /* guess RGB */ #define COLOR_RED 1 #define COLOR_GREEN 2 #define COLOR_YELLOW 3 *************** *** 790,796 **** --- 798,806 ---- #define COLOR_MAGENTA 5 #define COLOR_CYAN 6 #define COLOR_WHITE 7 + # endif # endif + #define COLOR_BLACK COLOR_BLUE const int ti_map[8] = { COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW, *** Old/win/tty/topl.c Tue May 28 17:44:08 1996 --- win/tty/topl.c Sun Apr 21 13:22:13 1996 *************** *** 29,38 **** ttyDisplay->dismiss_more = C('p'); /* allowed at --More-- */ do { morc = 0; ! if (cw->data[cw->maxcol]) ! redotoplin(cw->data[cw->maxcol]); ! else if (cw->maxcol == cw->maxrow) redotoplin(toplines); cw->maxcol--; if (cw->maxcol < 0) cw->maxcol = cw->rows-1; if (!cw->data[cw->maxcol]) --- 29,38 ---- ttyDisplay->dismiss_more = C('p'); /* allowed at --More-- */ do { morc = 0; ! if (cw->maxcol == cw->maxrow) redotoplin(toplines); + else if (cw->data[cw->maxcol]) + redotoplin(cw->data[cw->maxcol]); cw->maxcol--; if (cw->maxcol < 0) cw->maxcol = cw->rows-1; if (!cw->data[cw->maxcol]) *************** *** 69,82 **** remember_topl() { register struct WinDesc *cw = wins[WIN_MESSAGE]; ! cw->data[cw->maxrow] = (char*) alloc((unsigned)strlen(toplines)+1); ! Strcpy(cw->data[cw->maxrow], toplines); ! cw->maxcol = cw->maxrow = (cw->maxrow+1) % cw->rows; ! if(cw->data[cw->maxrow]) { ! free((genericptr_t)cw->data[cw->maxrow]); ! cw->data[cw->maxrow] = 0; } } void --- 69,85 ---- remember_topl() { register struct WinDesc *cw = wins[WIN_MESSAGE]; + int idx = cw->maxrow; + unsigned len = strlen(toplines) + 1; ! if (len > (unsigned)cw->datlen[idx]) { ! if (cw->data[idx]) free(cw->data[idx]); ! len += (8 - (len & 7)); /* pad up to next multiple of 8 */ ! cw->data[idx] = (char *)alloc(len); ! cw->datlen[idx] = (short)len; } + Strcpy(cw->data[idx], toplines); + cw->maxcol = cw->maxrow = (idx + 1) % cw->rows; } void *** Old/win/tty/wintty.c Tue May 28 17:44:10 1996 --- win/tty/wintty.c Tue May 28 10:48:00 1996 *************** *** 41,46 **** --- 41,47 ---- #define DEBUG extern const char *roles[]; /* from u_init.c */ + extern char mapped_menu_cmds[]; /* from options.c */ /* Interface definition, for windows.c */ struct window_procs tty_procs = { *************** *** 110,179 **** static char winpanicstr[] = "Bad window id %d"; char defmorestr[] = "--More--"; - /* - * Standard menu manipulation accelerators. These may _not_ be: - * - * + a number - reserved for counts - * + an upper or lower case US ASCII letter - used for accelerators - * + ESC - reserved for escaping the menu - * + NULL, CR or LF - reserved for commiting the selection(s). NULL - * is kind of odd, but xwaitforspace() will return it if someone - * hits a . - * - * Standard letters (for now) are: - * - * < back 1 page - * > forward 1 page - * ^ first page - * $ last page - * - * page all - * + select * - * - deselect % - * ~ invert @ - * - * The above letter display a definite UNIX slant: - * '$' would be great for gold, but is the obvious UNIX choice for last. - * '^' would be good for one of the inverts, but is more logically "top" - * for most UNIX commands. - * '!' would be nice for one of the inverts, but is also the UNIX shell escape. - */ - #define MENU_PREVIOUS_PAGE '<' - #define MENU_NEXT_PAGE '>' - #define MENU_FIRST_PAGE '^' - #define MENU_LAST_PAGE '$' - #define MENU_SET_PAGE '+' - #define MENU_UNSET_PAGE '-' - #define MENU_INVERT_PAGE '~' - #define MENU_SET_ALL '*' - #define MENU_UNSET_ALL '%' - #define MENU_INVERT_ALL '@' - - static const char standard_menu_chars[] = { - MENU_PREVIOUS_PAGE, - MENU_NEXT_PAGE, - MENU_FIRST_PAGE, - MENU_LAST_PAGE, - MENU_SET_PAGE, - MENU_UNSET_PAGE, - MENU_INVERT_PAGE, - MENU_SET_ALL, - MENU_UNSET_ALL, - MENU_INVERT_ALL, - 0 /* must end in null */ - }; - - /* - * Allow the standard menu accelerators to have aliases. Right now, this - * is internal only. We need a way to do it independently. - */ - #define MAX_MENU_MAPPED 16 /* some number */ - static char mapped_menu_accelerators[MAX_MENU_MAPPED+1]; - static char menu_mapped_op[MAX_MENU_MAPPED+1]; - static short n_menu_mapped = 0; - - - #ifdef CLIPPING # if defined(USE_TILES) && defined(MSDOS) boolean clipping = FALSE; /* clipping on? */ --- 111,116 ---- *************** *** 186,195 **** #endif /* CLIPPING */ #if defined(USE_TILES) && defined(MSDOS) - # ifdef SIMULATE_CURSOR - extern int cursor_flag; - # endif extern boolean tiles_on; #endif #if defined(ASCIIGRAPH) && !defined(NO_TERMS) --- 123,130 ---- #endif /* CLIPPING */ #if defined(USE_TILES) && defined(MSDOS) extern boolean tiles_on; + extern void FDECL(adjust_cursor_flags, (struct WinDesc *)); #endif #if defined(ASCIIGRAPH) && !defined(NO_TERMS) *************** *** 208,222 **** static void FDECL(set_item_state, (winid, int, tty_menu_item *)); static void FDECL(set_all_on_page, (winid,tty_menu_item *,tty_menu_item *)); static void FDECL(unset_all_on_page, (winid,tty_menu_item *,tty_menu_item *)); ! static void FDECL(invert_all_on_page, (winid,tty_menu_item *,tty_menu_item *)); ! static void FDECL(add_menu_alias, (CHAR_P, CHAR_P)); ! static char FDECL(map_menu_accelerator, (CHAR_P)); static tty_menu_item *FDECL(reverse, (tty_menu_item *)); static const char * FDECL(compress_str, (const char *)); static void FDECL(tty_putsym, (winid, int, int, CHAR_P)); static char *FDECL(copy_of, (const char *)); static void FDECL(bail, (const char *)); /* __attribute__((noreturn)) */ /* clean up and quit */ static void --- 143,174 ---- static void FDECL(set_item_state, (winid, int, tty_menu_item *)); static void FDECL(set_all_on_page, (winid,tty_menu_item *,tty_menu_item *)); static void FDECL(unset_all_on_page, (winid,tty_menu_item *,tty_menu_item *)); ! static void FDECL(invert_all_on_page, (winid,tty_menu_item *,tty_menu_item *, CHAR_P)); ! static void FDECL(invert_all, (winid,tty_menu_item *,tty_menu_item *, CHAR_P)); static tty_menu_item *FDECL(reverse, (tty_menu_item *)); static const char * FDECL(compress_str, (const char *)); static void FDECL(tty_putsym, (winid, int, int, CHAR_P)); static char *FDECL(copy_of, (const char *)); static void FDECL(bail, (const char *)); /* __attribute__((noreturn)) */ + /* + * A string containing all the default commands -- to add to a list + * of acceptable inputs. + */ + static const char default_menu_cmds[] = { + MENU_FIRST_PAGE, + MENU_LAST_PAGE, + MENU_NEXT_PAGE, + MENU_PREVIOUS_PAGE, + MENU_SELECT_ALL, + MENU_UNSELECT_ALL, + MENU_INVERT_ALL, + MENU_SELECT_PAGE, + MENU_UNSELECT_PAGE, + MENU_INVERT_PAGE, + 0 /* null terminator */ + }; + /* clean up and quit */ static void *************** *** 332,341 **** (void) signal(SIGWINCH, winch); #endif ! /* init accelerator list, then add one */ ! mapped_menu_accelerators[0] = 0; ! menu_mapped_op[0] = 0;; ! add_menu_alias(' ', MENU_NEXT_PAGE); tty_clear_nhwindow(BASE_WINDOW); --- 284,291 ---- (void) signal(SIGWINCH, winch); #endif ! /* add one a space forward menu command alias */ ! add_menu_cmd_alias(' ', MENU_NEXT_PAGE); tty_clear_nhwindow(BASE_WINDOW); *************** *** 682,699 **** if(newwin->maxrow) { newwin->data = (char **) alloc(sizeof(char *) * (unsigned)newwin->maxrow); if(newwin->maxcol) { ! for(i=0; i< newwin->maxrow; i++) ! newwin->data[i] = ! (char *) alloc(sizeof(char) * (unsigned)newwin->maxcol); } else { ! for(i=0; i< newwin->maxrow; i++) ! newwin->data[i] = 0; } if(newwin->type == NHW_MESSAGE) newwin->maxrow = 0; ! } else ! newwin->data = 0; return newid; } --- 632,656 ---- if(newwin->maxrow) { newwin->data = (char **) alloc(sizeof(char *) * (unsigned)newwin->maxrow); + newwin->datlen = + (short *) alloc(sizeof(short) * (unsigned)newwin->maxrow); if(newwin->maxcol) { ! for (i = 0; i < newwin->maxrow; i++) { ! newwin->data[i] = (char *) alloc((unsigned)newwin->maxcol); ! newwin->datlen[i] = newwin->maxcol; ! } } else { ! for (i = 0; i < newwin->maxrow; i++) { ! newwin->data[i] = (char *) 0; ! newwin->datlen[i] = 0; ! } } if(newwin->type == NHW_MESSAGE) newwin->maxrow = 0; ! } else { ! newwin->data = (char **)0; ! newwin->datlen = (short *)0; ! } return newid; } *************** *** 729,739 **** for(i=0; imaxrow; i++) if(cw->data[i]) { free((genericptr_t)cw->data[i]); ! cw->data[i] = 0; } if (free_data) { free((genericptr_t)cw->data); ! cw->data = 0; cw->rows = 0; } } --- 686,699 ---- for(i=0; imaxrow; i++) if(cw->data[i]) { free((genericptr_t)cw->data[i]); ! cw->data[i] = (char *)0; ! if (cw->datlen) cw->datlen[i] = 0; } if (free_data) { free((genericptr_t)cw->data); ! cw->data = (char **)0; ! if (cw->datlen) free((genericptr_t)cw->datlen); ! cw->datlen = (short *)0; cw->rows = 0; } } *************** *** 866,880 **** } static void ! invert_all_on_page(window, page_start, page_end) winid window; tty_menu_item *page_start, *page_end; { tty_menu_item *curr; int n; for (n = 0, curr = page_start; curr != page_end; n++, curr = curr->next) ! if (curr->identifier.a_void) { if (curr->selected) { curr->selected = FALSE; curr->count = -1L; --- 826,841 ---- } static void ! invert_all_on_page(window, page_start, page_end, acc) winid window; tty_menu_item *page_start, *page_end; + char acc; /* group accelerator, 0 => all */ { tty_menu_item *curr; int n; for (n = 0, curr = page_start; curr != page_end; n++, curr = curr->next) ! if (curr->identifier.a_void && (acc == 0 || curr->gselector == acc)) { if (curr->selected) { curr->selected = FALSE; curr->count = -1L; *************** *** 884,914 **** } } static void ! add_menu_alias(from_ch, to_ch) ! char from_ch, to_ch; { ! if (n_menu_mapped < MAX_MENU_MAPPED) { ! if (index(standard_menu_chars, to_ch)) { ! mapped_menu_accelerators[n_menu_mapped] = from_ch; ! menu_mapped_op[n_menu_mapped] = to_ch; ! n_menu_mapped++; ! } else ! pline("add_menu_alias: must map to standard char"); ! } else ! pline("add_menu_alias: overflow"); ! } ! static char ! map_menu_accelerator(ch) ! char ch; ! { ! char *found = index(mapped_menu_accelerators, ch); ! if (found) { ! int idx = found - mapped_menu_accelerators; ! ch = menu_mapped_op[idx]; } - return ch; } /*ARGSUSED*/ --- 845,882 ---- } } + /* + * Invert all entries that match the give group accelerator (or all if + * zero). + */ static void ! invert_all(window, page_start, page_end, acc) ! winid window; ! tty_menu_item *page_start, *page_end; ! char acc; /* group accelerator, 0 => all */ { ! tty_menu_item *curr; ! boolean on_curr_page; ! struct WinDesc *cw = wins[window]; ! invert_all_on_page(window, page_start, page_end, acc); ! ! /* invert the rest */ ! for (on_curr_page = FALSE, curr = cw->mlist; curr; curr = curr->next) { ! if (curr == page_start) ! on_curr_page = TRUE; ! else if (curr == page_end) ! on_curr_page = FALSE; ! ! if (!on_curr_page && curr->identifier.a_void ! && (acc == 0 || curr->gselector == acc)) { ! if (curr->selected) { ! curr->selected = FALSE; ! curr->count = -1; ! } else ! curr->selected = TRUE; ! } } } /*ARGSUSED*/ *************** *** 976,982 **** int curr_page, page_lines; tty_menu_item *page_start, *page_end, *curr; boolean finished, counting, reset_count; ! char *rp, resp[QBUFSZ], *msave, morestr[QBUFSZ]; long count; curr_page = page_lines = 0; --- 944,950 ---- int curr_page, page_lines; tty_menu_item *page_start, *page_end, *curr; boolean finished, counting, reset_count; ! char *rp, resp[QBUFSZ], gacc[QBUFSZ], *msave, morestr[QBUFSZ]; long count; curr_page = page_lines = 0; *************** *** 989,994 **** --- 957,974 ---- reset_count = TRUE; finished = FALSE; + /* collect group accelerators when doing multiple pickups */ + gacc[0] = 0; + if (cw->how == PICK_ANY) { + for (rp = gacc, curr = cw->mlist; curr; curr = curr->next) { + if (curr->gselector && !index(gacc, curr->gselector)) { + *rp++ = curr->gselector; + *rp = 0; + } + } + *rp = 0; + } + /* loop until finished */ while (!finished) { if (reset_count) { *************** *** 1057,1065 **** } /* set extra chars.. */ ! Strcat(resp, standard_menu_chars); Strcat(resp, "0123456789\033\n\r"); /* counts, quit */ ! Strcat(resp, mapped_menu_accelerators); if (cw->npages > 1) Sprintf(cw->morestr, "(%d of %d)", --- 1037,1046 ---- } /* set extra chars.. */ ! Strcat(resp, default_menu_cmds); Strcat(resp, "0123456789\033\n\r"); /* counts, quit */ ! Strcat(resp, gacc); /* group accelerators */ ! Strcat(resp, mapped_menu_cmds); if (cw->npages > 1) Sprintf(cw->morestr, "(%d of %d)", *************** *** 1076,1084 **** xwaitforspace(resp); } ! morc = map_menu_accelerator(morc); switch (morc) { ! case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': count = (count * 10L) + (long) (morc - '0'); /* --- 1057,1072 ---- xwaitforspace(resp); } ! morc = map_menu_cmd(morc); switch (morc) { ! case '0': ! /* special case: '0' is also the default ball class */ ! if (!counting && index(gacc, morc)) { ! invert_all(window, page_start, page_end, morc); ! break; ! } ! /* fall through to count the zero */ ! case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': count = (count * 10L) + (long) (morc - '0'); /* *************** *** 1143,1161 **** curr_page = cw->npages-1; } break; ! case MENU_SET_PAGE: if (cw->how != PICK_ONE) set_all_on_page(window, page_start, page_end); break; ! case MENU_UNSET_PAGE: if (cw->how != PICK_ONE) unset_all_on_page(window, page_start, page_end); break; case MENU_INVERT_PAGE: if (cw->how != PICK_ONE) ! invert_all_on_page(window, page_start, page_end); break; ! case MENU_SET_ALL: if (cw->how == PICK_ONE) break; set_all_on_page(window, page_start, page_end); --- 1131,1149 ---- curr_page = cw->npages-1; } break; ! case MENU_SELECT_PAGE: if (cw->how != PICK_ONE) set_all_on_page(window, page_start, page_end); break; ! case MENU_UNSELECT_PAGE: if (cw->how != PICK_ONE) unset_all_on_page(window, page_start, page_end); break; case MENU_INVERT_PAGE: if (cw->how != PICK_ONE) ! invert_all_on_page(window, page_start, page_end, 0); break; ! case MENU_SELECT_ALL: if (cw->how == PICK_ONE) break; set_all_on_page(window, page_start, page_end); *************** *** 1164,1170 **** if (curr->identifier.a_void && !curr->selected) curr->selected = TRUE; break; ! case MENU_UNSET_ALL: if (cw->how == PICK_ONE) break; unset_all_on_page(window, page_start, page_end); --- 1152,1158 ---- if (curr->identifier.a_void && !curr->selected) curr->selected = TRUE; break; ! case MENU_UNSELECT_ALL: if (cw->how == PICK_ONE) break; unset_all_on_page(window, page_start, page_end); *************** *** 1175,1236 **** curr->count = -1; } break; ! case MENU_INVERT_ALL: { ! boolean on_curr_page = FALSE; ! if (cw->how == PICK_ONE) break; ! ! invert_all_on_page(window, page_start, page_end); ! /* invert the rest */ ! for (curr = cw->mlist; curr; curr = curr->next) { ! if (curr == page_start) ! on_curr_page = TRUE; ! else if (curr == page_end) ! on_curr_page = FALSE; ! if (!on_curr_page && curr->identifier.a_void) { ! if (curr->selected) { ! curr->selected = FALSE; ! curr->count = -1; ! } else ! curr->selected = TRUE; ! } ! } break; - } default: if (cw->how != PICK_NONE && index(resp, morc)) { int nn; /* nth row */ tty_menu_item *ncurr; ! /* find, toggle, and possibly update */ ! for (nn = 0, ncurr = page_start; ncurr != page_end; ! nn++, ncurr = ncurr->next) ! if (morc == ncurr->selector) { ! if (ncurr->selected) { ! if (counting && count > 0) { ! ncurr->count = count; ! set_item_state(window, nn, ncurr); ! } else { /* change state */ ! ncurr->selected = FALSE; ! ncurr->count = -1L; ! set_item_state(window, nn, ncurr); ! } ! } else { /* !selected */ ! if (counting && count > 0) { ! ncurr->count = count; ! ncurr->selected = TRUE; ! set_item_state(window, nn, ncurr); ! } else if (!counting) { ! ncurr->selected = TRUE; ! set_item_state(window, nn, ncurr); } - /* do nothing if counting&&count==0 */ - } ! if (cw->how == PICK_ONE) ! finished = TRUE; ! break; ! } } else tty_nhbell(); break; --- 1163,1211 ---- curr->count = -1; } break; ! case MENU_INVERT_ALL: if (cw->how == PICK_ONE) break; ! invert_all(window, page_start, page_end, 0); break; default: if (cw->how != PICK_NONE && index(resp, morc)) { int nn; /* nth row */ tty_menu_item *ncurr; ! if (index(gacc, morc)) { ! invert_all(window, page_start, page_end, morc); ! } else { ! /* find, toggle, and possibly update */ ! for (nn = 0, ncurr = page_start; ! ncurr != page_end; ! nn++, ncurr = ncurr->next) ! if (morc == ncurr->selector) { ! if (ncurr->selected) { ! if (counting && count > 0) { ! ncurr->count = count; ! set_item_state(window,nn,ncurr); ! } else { /* change state */ ! ncurr->selected = FALSE; ! ncurr->count = -1L; ! set_item_state(window,nn,ncurr); ! } ! } else { /* !selected */ ! if (counting && count > 0) { ! ncurr->count = count; ! ncurr->selected = TRUE; ! set_item_state(window,nn,ncurr); ! } else if (!counting) { ! ncurr->selected = TRUE; ! set_item_state(window,nn,ncurr); ! } ! /* do nothing counting&&count==0 */ } ! if (cw->how == PICK_ONE) ! finished = TRUE; ! break; ! } ! } } else tty_nhbell(); break; *************** *** 1363,1372 **** ttyDisplay->lastwin = window; #if defined(USE_TILES) && defined(MSDOS) ! # ifdef SIMULATE_CURSOR ! if (cw->type == NHW_MAP) cursor_flag = 1; ! else cursor_flag = 0; ! # endif #endif cw->curx = --x; /* column 0 is never used */ cw->cury = y; --- 1338,1344 ---- ttyDisplay->lastwin = window; #if defined(USE_TILES) && defined(MSDOS) ! adjust_cursor_flags(cw); #endif cw->curx = --x; /* column 0 is never used */ cw->cury = y; *************** *** 1711,1721 **** * later. */ void ! tty_add_menu(window, glyph, identifier, ch, attr, str, preselected) winid window; /* window to use, must be of type NHW_MENU */ int glyph; /* glyph to display with item (unused) */ const anything *identifier; /* what to return if selected */ char ch; /* keyboard accelerator (0 = pick our own) */ int attr; /* attribute for string (like tty_putstr()) */ const char *str; /* menu string */ boolean preselected; /* item is marked as selected */ --- 1683,1694 ---- * later. */ void ! tty_add_menu(window, glyph, identifier, ch, gch, attr, str, preselected) winid window; /* window to use, must be of type NHW_MENU */ int glyph; /* glyph to display with item (unused) */ const anything *identifier; /* what to return if selected */ char ch; /* keyboard accelerator (0 = pick our own) */ + char gch; /* group accelerator (0 = no group) */ int attr; /* attribute for string (like tty_putstr()) */ const char *str; /* menu string */ boolean preselected; /* item is marked as selected */ *************** *** 1744,1749 **** --- 1717,1723 ---- item->count = -1L; item->selected = preselected; item->selector = ch; + item->gselector = gch; item->attr = attr; item->str = copy_of(newstr); *************** *** 1796,1803 **** anything any; any.a_void = 0; /* not selectable */ ! tty_add_menu(window, NO_GLYPH, &any, 0, ATR_NONE, "", MENU_UNSELECTED); ! tty_add_menu(window, NO_GLYPH, &any, 0, ATR_NONE, prompt, MENU_UNSELECTED); } lmax = min(52, (int)ttyDisplay->rows - 1); /* # lines per page */ --- 1770,1777 ---- anything any; any.a_void = 0; /* not selectable */ ! tty_add_menu(window, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED); ! tty_add_menu(window, NO_GLYPH, &any, 0, 0, ATR_NONE, prompt, MENU_UNSELECTED); } lmax = min(52, (int)ttyDisplay->rows - 1); /* # lines per page */ *** Old/win/win32/nhprocs.c Tue May 28 17:44:16 1996 --- win/win32/nhprocs.c Tue May 14 16:01:15 1996 *************** *** 976,986 **** */ void ! win32_add_menu(window, glyph, identifier, ch, attr, str, preselected) winid window; int glyph; /* unused (for now) */ const anything *identifier; char ch; int attr; const char *str; boolean preselected; --- 976,987 ---- */ void ! win32_add_menu(window, glyph, identifier, ch, gch, attr, str, preselected) winid window; int glyph; /* unused (for now) */ const anything *identifier; char ch; + char gch; /* group accelerator, 0 => none */ int attr; const char *str; boolean preselected;