Commit Graph

10713 Commits

Author SHA1 Message Date
nhmall
d36a127574 .gitattributes for outdated folder 2020-05-10 11:52:00 -04:00
nhmall
0068315131 .gitattributes for outdated/sys/msdos 2020-05-10 11:50:03 -04:00
nhmall
390a531f16 relocate the real mode msdos code to outdated/sys/msdos 2020-05-10 11:46:07 -04:00
nhmall
0422696e67 move currently unmaintained code to outdated subfolder
rename {sys => outdated/sys}/amiga/.gitattributes (100%)
 rename {sys => outdated/sys}/amiga/Build.ami (100%)
 rename {sys => outdated/sys}/amiga/Install.ami (100%)
 rename {sys => outdated/sys}/amiga/Makefile.agc (100%)
 rename {sys => outdated/sys}/amiga/Makefile.ami (100%)
 rename {sys => outdated/sys}/amiga/NetHack.cnf (100%)
 rename {sys => outdated/sys}/amiga/amidos.c (100%)
 rename {sys => outdated/sys}/amiga/amidos.p (100%)
 rename {sys => outdated/sys}/amiga/amifont.uu (100%)
 rename {sys => outdated/sys}/amiga/amifont8.uu (100%)
 rename {sys => outdated/sys}/amiga/amigst.c (100%)
 rename {sys => outdated/sys}/amiga/amii.hlp (100%)
 rename {sys => outdated/sys}/amiga/amimenu.c (100%)
 rename {sys => outdated/sys}/amiga/amirip.c (100%)
 rename {sys => outdated/sys}/amiga/amistack.c (100%)
 rename {sys => outdated/sys}/amiga/amitty.c (100%)
 rename {sys => outdated/sys}/amiga/amiwind.c (100%)
 rename {sys => outdated/sys}/amiga/amiwind.p (100%)
 rename {sys => outdated/sys}/amiga/clipwin.c (100%)
 rename {sys => outdated/sys}/amiga/colorwin.c (100%)
 rename {sys => outdated/sys}/amiga/grave16.xpm (100%)
 rename {sys => outdated/sys}/amiga/ifchange (100%)
 rename {sys => outdated/sys}/amiga/mkdmake (100%)
 rename {sys => outdated/sys}/amiga/txt2iff.c (100%)
 rename {sys => outdated/sys}/amiga/winami.c (100%)
 rename {sys => outdated/sys}/amiga/winami.p (100%)
 rename {sys => outdated/sys}/amiga/winchar.c (100%)
 rename {sys => outdated/sys}/amiga/windefs.h (100%)
 rename {sys => outdated/sys}/amiga/winext.h (100%)
 rename {sys => outdated/sys}/amiga/winfuncs.c (100%)
 rename {sys => outdated/sys}/amiga/winkey.c (100%)
 rename {sys => outdated/sys}/amiga/winmenu.c (100%)
 rename {sys => outdated/sys}/amiga/winproto.h (100%)
 rename {sys => outdated/sys}/amiga/winreq.c (100%)
 rename {sys => outdated/sys}/amiga/winstr.c (100%)
 rename {sys => outdated/sys}/amiga/xpm2iff.c (100%)
 rename {sys => outdated/sys}/atari/.gitattributes (100%)
 rename {sys => outdated/sys}/atari/Install.tos (100%)
 rename {sys => outdated/sys}/atari/atarifnt.uue (100%)
 rename {sys => outdated/sys}/atari/nethack.mnu (100%)
 rename {sys => outdated/sys}/atari/setup.g (100%)
 rename {sys => outdated/sys}/atari/tos.c (100%)
 rename {sys => outdated/sys}/atari/unx2atar.sed (100%)
 rename {sys => outdated/sys}/be/.gitattributes (100%)
 rename {sys => outdated/sys}/be/README (100%)
 rename {sys => outdated/sys}/be/bemain.c (100%)
 rename {sys => outdated/sys}/mac/.gitattributes (100%)
 rename {sys => outdated/sys}/mac/Files.r (100%)
 rename {sys => outdated/sys}/mac/Install.mw (100%)
 rename {sys => outdated/sys}/mac/MacHelp (100%)
 rename {sys => outdated/sys}/mac/NHDeflts (100%)
 rename {sys => outdated/sys}/mac/NHrsrc.hqx (100%)
 rename {sys => outdated/sys}/mac/NHsound.hqx (100%)
 rename {sys => outdated/sys}/mac/News (100%)
 rename {sys => outdated/sys}/mac/README (100%)
 rename {sys => outdated/sys}/mac/carbon.plist (100%)
 rename {sys => outdated/sys}/mac/dprintf.c (100%)
 rename {sys => outdated/sys}/mac/maccurs.c (100%)
 rename {sys => outdated/sys}/mac/macerrs.c (100%)
 rename {sys => outdated/sys}/mac/macfile.c (100%)
 rename {sys => outdated/sys}/mac/machelp.hqx (100%)
 rename {sys => outdated/sys}/mac/macmain.c (100%)
 rename {sys => outdated/sys}/mac/macmenu.c (100%)
 rename {sys => outdated/sys}/mac/mactopl.c (100%)
 rename {sys => outdated/sys}/mac/mactty.c (100%)
 rename {sys => outdated/sys}/mac/macunix.c (100%)
 rename {sys => outdated/sys}/mac/macwin.c (100%)
 rename {sys => outdated/sys}/mac/mgetline.c (100%)
 rename {sys => outdated/sys}/mac/mmodal.c (100%)
 rename {sys => outdated/sys}/mac/mrecover.c (100%)
 rename {sys => outdated/sys}/mac/mrecover.hqx (100%)
 rename {sys => outdated/sys}/mac/mttymain.c (100%)
 rename {sys => outdated/sys}/os2/.gitattributes (100%)
 rename {sys => outdated/sys}/os2/Install.os2 (100%)
 rename {sys => outdated/sys}/os2/Makefile.os2 (100%)
 rename {sys => outdated/sys}/os2/nhpmico.uu (100%)
 rename {sys => outdated/sys}/os2/os2.c (100%)
 rename {sys => outdated/sys}/wince/.gitattributes (100%)
 rename {sys => outdated/sys}/wince/Install.ce (100%)
 rename {sys => outdated/sys}/wince/bootstrp.mak (100%)
 rename {sys => outdated/sys}/wince/ceinc/.gitattributes (100%)
 rename {sys => outdated/sys}/wince/ceinc/assert.h (100%)
 rename {sys => outdated/sys}/wince/ceinc/errno.h (100%)
 rename {sys => outdated/sys}/wince/ceinc/fcntl.h (100%)
 rename {sys => outdated/sys}/wince/ceinc/sys/.gitattributes (100%)
 rename {sys => outdated/sys}/wince/ceinc/sys/stat.h (100%)
 rename {sys => outdated/sys}/wince/celib.c (100%)
 rename {sys => outdated/sys}/wince/cesetup.bat (100%)
 rename {sys => outdated/sys}/wince/cesound.c (100%)
 rename {sys => outdated/sys}/wince/defaults.nh (100%)
 rename {sys => outdated/sys}/wince/keypad.uu (100%)
 rename {sys => outdated/sys}/wince/menubar.uu (100%)
 rename {sys => outdated/sys}/wince/mhaskyn.c (100%)
 rename {sys => outdated/sys}/wince/mhaskyn.h (100%)
 rename {sys => outdated/sys}/wince/mhcmd.c (100%)
 rename {sys => outdated/sys}/wince/mhcmd.h (100%)
 rename {sys => outdated/sys}/wince/mhcolor.c (100%)
 rename {sys => outdated/sys}/wince/mhcolor.h (100%)
 rename {sys => outdated/sys}/wince/mhdlg.c (100%)
 rename {sys => outdated/sys}/wince/mhdlg.h (100%)
 rename {sys => outdated/sys}/wince/mhfont.c (100%)
 rename {sys => outdated/sys}/wince/mhfont.h (100%)
 rename {sys => outdated/sys}/wince/mhinput.c (100%)
 rename {sys => outdated/sys}/wince/mhinput.h (100%)
 rename {sys => outdated/sys}/wince/mhmain.c (100%)
 rename {sys => outdated/sys}/wince/mhmain.h (100%)
 rename {sys => outdated/sys}/wince/mhmap.c (100%)
 rename {sys => outdated/sys}/wince/mhmap.h (100%)
 rename {sys => outdated/sys}/wince/mhmenu.c (100%)
 rename {sys => outdated/sys}/wince/mhmenu.h (100%)
 rename {sys => outdated/sys}/wince/mhmsg.h (100%)
 rename {sys => outdated/sys}/wince/mhmsgwnd.c (100%)
 rename {sys => outdated/sys}/wince/mhmsgwnd.h (100%)
 rename {sys => outdated/sys}/wince/mhrip.c (100%)
 rename {sys => outdated/sys}/wince/mhrip.h (100%)
 rename {sys => outdated/sys}/wince/mhstatus.c (100%)
 rename {sys => outdated/sys}/wince/mhstatus.h (100%)
 rename {sys => outdated/sys}/wince/mhtext.c (100%)
 rename {sys => outdated/sys}/wince/mhtext.h (100%)
 rename {sys => outdated/sys}/wince/mhtxtbuf.c (100%)
 rename {sys => outdated/sys}/wince/mhtxtbuf.h (100%)
 rename {sys => outdated/sys}/wince/mswproc.c (100%)
 rename {sys => outdated/sys}/wince/newres.h (100%)
 rename {sys => outdated/sys}/wince/nhico.uu (100%)
 rename {sys => outdated/sys}/wince/resource.h (100%)
 rename {sys => outdated/sys}/wince/winMS.h (100%)
 rename {sys => outdated/sys}/wince/winhack.c (100%)
 rename {sys => outdated/sys}/wince/winhack.rc (100%)
 rename {sys => outdated/sys}/wince/winhcksp.rc (100%)
 rename {sys => outdated/sys}/wince/winmain.c (100%)
 rename {win => outdated/win}/Qt3/.gitattributes (100%)
 rename {win => outdated/win}/Qt3/Info.plist (100%)
 rename {win => outdated/win}/Qt3/Install.Qt (100%)
 rename {win => outdated/win}/Qt3/knethack.lnk (100%)
 rename {win => outdated/win}/Qt3/knh-mini.xpm (100%)
 rename {win => outdated/win}/Qt3/knh.xpm (100%)
 rename {win => outdated/win}/Qt3/qpe-nethack.control (100%)
 rename {win => outdated/win}/Qt3/qt3_clust.cpp (100%)
 rename {win => outdated/win}/Qt3/qt3_clust.h (100%)
 rename {win => outdated/win}/Qt3/qt3_kde0.h (100%)
 rename {win => outdated/win}/Qt3/qt3_win.cpp (100%)
 rename {win => outdated/win}/Qt3/qt3_win.h (100%)
 rename {win => outdated/win}/Qt3/qt3_xpms.h (100%)
 rename {win => outdated/win}/Qt3/qt3tableview.cpp (100%)
 rename {win => outdated/win}/Qt3/qt3tableview.h (100%)
 rename {win => outdated/win}/Qt3/tileedit.cpp (100%)
 rename {win => outdated/win}/Qt3/tileedit.h (100%)
 rename {win => outdated/win}/gem/.gitattributes (100%)
 rename {win => outdated/win}/gem/Install.gem (100%)
 rename {win => outdated/win}/gem/bitmfile.c (100%)
 rename {win => outdated/win}/gem/gem_rsc.uu (100%)
 rename {win => outdated/win}/gem/gem_rso.uu (100%)
 rename {win => outdated/win}/gem/gr_rect.c (100%)
 rename {win => outdated/win}/gem/gr_rect.h (100%)
 rename {win => outdated/win}/gem/load_img.c (100%)
 rename {win => outdated/win}/gem/tile2img.c (100%)
 rename {win => outdated/win}/gem/title.uu (100%)
 rename {win => outdated/win}/gem/wingem.c (100%)
 rename {win => outdated/win}/gem/wingem1.c (100%)
 rename {win => outdated/win}/gem/xpm2img.c (100%)
 rename {win => outdated/win}/gnome/.gitattributes (100%)
 rename {win => outdated/win}/gnome/README (100%)
 rename {win => outdated/win}/gnome/gn_xpms.h (100%)
 rename {win => outdated/win}/gnome/gnaskstr.c (100%)
 rename {win => outdated/win}/gnome/gnaskstr.h (100%)
 rename {win => outdated/win}/gnome/gnbind.c (100%)
 rename {win => outdated/win}/gnome/gnbind.h (100%)
 rename {win => outdated/win}/gnome/gnglyph.c (100%)
 rename {win => outdated/win}/gnome/gnglyph.h (100%)
 rename {win => outdated/win}/gnome/gnmain.c (100%)
 rename {win => outdated/win}/gnome/gnmain.h (100%)
 rename {win => outdated/win}/gnome/gnmap.c (100%)
 rename {win => outdated/win}/gnome/gnmap.h (100%)
 rename {win => outdated/win}/gnome/gnmenu.c (100%)
 rename {win => outdated/win}/gnome/gnmenu.h (100%)
 rename {win => outdated/win}/gnome/gnmesg.c (100%)
 rename {win => outdated/win}/gnome/gnmesg.h (100%)
 rename {win => outdated/win}/gnome/gnomeprv.h (100%)
 rename {win => outdated/win}/gnome/gnopts.c (100%)
 rename {win => outdated/win}/gnome/gnopts.h (100%)
 rename {win => outdated/win}/gnome/gnplayer.c (100%)
 rename {win => outdated/win}/gnome/gnplayer.h (100%)
 rename {win => outdated/win}/gnome/gnsignal.c (100%)
 rename {win => outdated/win}/gnome/gnsignal.h (100%)
 rename {win => outdated/win}/gnome/gnstatus.c (100%)
 rename {win => outdated/win}/gnome/gnstatus.h (100%)
 rename {win => outdated/win}/gnome/gntext.c (100%)
 rename {win => outdated/win}/gnome/gntext.h (100%)
 rename {win => outdated/win}/gnome/gnworn.c (100%)
 rename {win => outdated/win}/gnome/gnworn.h (100%)
 rename {win => outdated/win}/gnome/gnyesno.c (100%)
 rename {win => outdated/win}/gnome/gnyesno.h (100%)
 rename {win => outdated/win}/gnome/mapbg.xpm (100%)
2020-05-10 11:31:25 -04:00
nhmall
c6d09a58d6 move unmaintained files into outdated folder
If an old port is resurrected to work with current version code, its files
can be relocated to the appropriate sys or win folder as required.

In the meantime, the burden of upkeep can be avoided for the stuff in the
outdated folder for now.
2020-05-10 11:24:51 -04:00
Patric Mueller
6fcb3fc0c7 Only generate shop items on solid floor squares
This commit addresses one issue raised in #338 that shop items were generated
on lava squares.
2020-05-10 14:23:34 +02:00
PatR
6ad4b48ceb add more alternate wish matching
Allow "esp helmet" to find "helm of telepathy" and "power gloves"
to find "gauntlets of power".  Plus add a few item names used in
other games that have a close enough match in nethack.
2020-05-09 16:14:52 -07:00
PatR
4ca707ecf4 fix -Wmissing-prototypes warning
drawing.c doesn't include extern.h, so the def_char_... functions
it defines aren't preceded by a prototype.  Having such guaantees
that code in other files sees the same argument types as in the
defining code.
2020-05-09 15:51:38 -07:00
nhmall
c2fa3c36d8 dependency bit 2020-05-09 18:19:56 -04:00
nhmall
26ac20503c fixup build for platforms without curses after drawing.c split
An Undefined reference to decgraphics_mode_callback was possible
if built for tty only.

drawing.c had an #include "tcap.h" which is what actually defined
TERMLIB. It isn't needed in drawing.c anymore, but it is needed
in symbols.c, in order to get the define for TERMLIB so that
decgraphics_mode_callback variable gets defined.

The undefined reference was from win/tty/termcap.h in code that
was #ifdef TERMLIB, but win/tty/termcap.h has the #include "tcap.h"
2020-05-09 18:07:56 -04:00
PatR
7b4f5ce1c0 temporary light fix
Don't replace a monster that's been temporarily seen via camera
flash or thrown/kicked lit candle/lamp with "unseen, remembered
monster" glyph if it can be sensed via telepathy, warning, or
extended monster detection.
2020-05-09 13:36:22 -07:00
PatR
59818fb6ab implement #986 - camera flash 'tweak'
Implement the suggested feature that a camera's flash actually update
hero's memory of the map as it traverses across the level.  Turned
out to be more work than anticipated despite having the code for a
thrown or kicked lit candle or lamp to build upon.

Among other things it needed to update the circle code to handle
previously unused radius 0 to operate on the center point only.  I've
never touched that before and hope this hasn't introduced any bugs.

Also removes several instances of vision code operating on column #0.
(At least one is still present.)
2020-05-09 13:07:35 -07:00
nhmall
d564fa8ac7 extern.h obsolete bit 2020-05-06 17:03:06 -04:00
nhmall
7178d2c9e2 extern.h updates to reflect drawing.c split 2020-05-06 16:40:24 -04:00
nhmall
044b55a8ba sys/winnt/Makefile.gcc updates for new file (mingw) 2020-05-06 16:24:03 -04:00
nhmall
aa3a859bef remove obsolete global variable declaration 2020-05-06 12:44:12 -04:00
nhmall
c831522e94 Xcode fixes 2020-05-06 11:35:55 -04:00
nhmall
e06e042151 from cron-daily 2020-05-06 11:30:45 -04:00
nhmall
e2ccebb0cf move some text strings from drawing.c over to the file that uses them 2020-05-06 11:15:25 -04:00
nhmall
cdf280628c split symbols bits from drawing.c; new file src/symbols.c 2020-05-06 10:55:54 -04:00
PatR
a51e44e532 move lua context out of dungeons[]
and out of save files so restore doesn't need to clear stale data.
Behavior should be the same as before, except that when entering
the endgame branch and discarding the main dungeon and its other
branches, lua theme context is now discarded for those too.
2020-05-05 18:06:00 -07:00
PatR
19529ffb2f extern.h bits
Clean up a few things I recently noticed:
  obsolete monstr.c was still present;
  mdlib.c was out of alphabetical order;
  monst_global_init() was listed under the wrong file.
2020-05-05 12:39:24 -07:00
nhmall
f1d7676bfb more CROSSCOMPILE fixes 2020-05-05 14:04:29 -04:00
PatR
116642ce1e track eight more achievements
Record reaching experience level 3, 6, 10, 14, 18, 22, 26, and 30,
the levels where the character gets a new rank title, and report
those as achievements at end of game.  These achievements persist
even if enough levels to lose a rank are lost, and if lost ranks
are regained the original achievement is the one that gets tracked
and disclosed.
2020-05-04 16:35:40 -07:00
PatR
16562b2892 displacer beast as food
Make eating a displacer beast corpse or a tin of displacer beast
meat confer temporary Displacement lasting 6d6 turns.
2020-05-04 09:50:11 -07:00
PatR
88461e1923 makemon and goodpos flags
I added another goodpos flag to simplify handling displacer beast
and that pushed the total number of makemon and goodpos flags past
16.  'int' and 'unsigned' might be too small, so change the flags
and several function arguments to 'long'.
2020-05-04 09:19:37 -07:00
nhmall
28ae203ad7 directory correction bit in Cross-compiling doc
panic.c is in util
2020-05-04 09:16:33 -04:00
nhmall
e440e9569d change is_safepet macro name
Leaving the word "pet" in the macro name, when it applied to non-pets
seemed too contradictory, even for NetHack.
2020-05-03 21:52:41 -04:00
nhmall
aa5eb5a355 yet another host-side crosscompile fix
The host build portion using sys/msdos/Makefile1.cross) was failing because it
was attempting to compile the generated tile.o which is using hack.h.

gcc  -o../util/tilemap host_o/tilemap.o
A new ../src/tile.c has been created
gcc -c -O -I../include -I../sys/msdos -DDLB  -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST -ohost_o/tile.o ../src/tile.c
In file included from ../include/hack.h:201:0,
                 from ../src/tile.c:3:
../include/dungeon.h:70:5: error: unknown type name ‘lua_State’
     lua_State *themelua;   /* themerms compiled lua */
     ^
../sys/msdos/Makefile1.cross:286: recipe for target 'host_o/tile.o' failed
make: *** [host_o/tile.o] Error 1

I don't think think the tile.o is required on the host build build portion,
so it is probably an error in the Makefile. Try removing it.
2020-05-03 21:22:55 -04:00
PatR
b8da4e9294 amulet tiles
Replace the octagonal amulet placeholder for the two new tiles.
Give the "cubical amulet" a hint of being cube shaped and rename
"pentagonal amulet" to "perforated amulet" because it's easier to
draw that way.

Bump EDITLEVEL now for the extra objects and monsters because I
forgot to do so earlier.
2020-05-03 16:34:54 -07:00
PatR
7817e69c41 two new monsters from slash'em
Adds two monsters originally from slash'em.  I used the slash'em
tiles this time, also its code as a starting point but made various
revisions.  Both the tiles could benefit from some touch-ups.

displacer beast:  blue 'f'.  Attempting a melee hit (ie, trying to
  move to its spot) has a 50:50 chance for it to swap places with you.
  Fairly tough monster to begin with, then half your ordinary attacks
  effectively miss and if you try to face a mob by retreating to a
  corridor or backing into a corner you can end up being drawn back
  into the open.  I added bargethrough capability, and also it won't
  be fooled about hero's location by Displacement.  [It only swaps
  places during combat when contact is initiated by the hero, not
  when attacked by another monster or when attacking.]

genetic engineer:  green 'Q'.  Its attack causes the target to be
  polymorphed unless that target resists.  Hero will almost always
  have magic resistance by the time this monster is encountered, but
  it can make conflict become risky by hitting and polymorphing other
  monsters.  Slash'em flagged it hell-only but I took that flag off;
  I also took away its ability to teleport.  Slash'em polymorphs the
  hero if a genetic engineer corpse is eaten; that's included and I
  introduced that for monsters too.

I added both of these to the list of candidates for monster spell
'summon nasties' and for post-Wizard harassment.

I also gave all the 'f's infravision.  Probably only matters if the
hero polymorphs into a feline.

Displacer beast is originally from AD&D which depicts it as a six-
legged cougar with a pair of tentacles; it has Displacement rather
be able to affect an attacker's location.  I think genetic engineer
is original to slash'em where it expands Q class but seems mainly to
be the base monster for Dr.Frankenstein (a unique monster with a
one-level side-branch lair in slash'em's incarnation of Gehennom).
2020-05-03 14:13:08 -07:00
PatR
d31e3d172a win/share/safeproc.c 2020-05-03 12:40:10 -07:00
PatR
65d45b21b3 new amulet tiles
The lines intended as comments which weren't treated as comments
were the problem with the revised tiles.  Taking them out fixes the
"psychedelic" tiles map for X11.

The two new amulets still need their own distinct artwork.  Probably
at least one could be 'borrowed' from the slash'em sources although
it wouldn't match either of the new descriptions (assuming any of
them do; their too tiny for me to see well enough to tell).
2020-05-03 12:25:52 -07:00
PatR
3c6deed5e9 eliminate hack.h usage from win/share/*.c
Switch win/share/*.c from hack.h to config.h plus miscellaenous
other headers.  It's possible that there is conditional code that
didn't get exercised in my testing.  The Unix Makefiles don't deal
with safeproc.c or tileset.c so I just compiled those without any
attempt to link.
2020-05-03 10:52:54 -07:00
PatR
8caaf894e5 makedefs vs dungeon.h
This works for me.  It might be better to move d_level into its
own header and include that instead including dungeon.h.
2020-05-02 16:50:50 -07:00
nhmall
e15b30e9c5 Revert "build fix for platforms that have no LUA awareness during makedefs compile"
This reverts commit eb704832a9.

That fix was insufficient.

The addition of
    lua_State *themelua;
to the dungeon struct in dungeon.h prevents the build of host-side utilities that
include "hack.h" via the CROSSCOMPILER_HOST. Unfortunately, it is no longer possible
to cross-compile NetHack 3.7. That includes the cross-compiled MSDOS build.
2020-05-02 17:17:40 -04:00
PatR
4d52332dda add two new types of amulet: flying and guarding
We haven't added any new objects or monsters in a really long time.
This adds two new useful amulets, putting more pressure on the
decision over which type of amulet to wear.

amulet of flying:  idea from slash'em, implemented from scratch.
  Should be self-explanatory.  Polymorphing into a form capable of
  eating amulets and then eating one does not confer intrinsic
  flight.  (I've no idea how slash'em behaves is in that regard.)

amulet of guarding:  adds +2 AC, which is fairly negligible, also
  +2 MC, which is not.  Initially called amulet of protection but MC
  of 2 is referred to as 'guarded' by enlightenment so I changed it.
  (By that reasoning, rings of protection ought to be called rings of
  warding; oh, well.)  Successfully eating one confers +2 AC without
  any MC benefit.  When wearing one of these, rings of protection
  only confer AC, their +1 MC gets superseded rather than combined.

Monsters will wear an amulet of guarding and gain both the AC and
MC benefit, but if not cursed and they acquire one of life-saving or
reflection, they'll swap.  They won't wear an amulet of flying.

I cloned two extra copies of the tile for one of the existing amulets
and ran sys/share/objects.txt through renumtiles.pl.  The result
appears to be ok but on X11 the tiles map ends up looking psychedelic
so something beyond the tile art itself needs to be fixed here.
2020-05-02 02:07:33 -07:00
nhmall
eb704832a9 build fix for platforms that have no LUA awareness during makedefs compile
gcc -c -O -I../include -I../sys/msdos -DDLB  -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST -ohost_o/makedefs.o ../util/makedefs.c
In file included from ../util/makedefs.c:18:0:
../include/dungeon.h:68:5: error: unknown type name ‘lua_State’
     lua_State *themelua;   /* themerms compiled lua */
     ^
2020-05-01 20:36:11 -04:00
PatR
488e045156 Double Trouble trouble
From the newsgroup:  if cloned Wizard arrives out of view of the
hero (and vice versa), it will sit and wait until hero moves into
his view or until suffering some damage (usually via pet).  So if a
mob causes the clone to arrive on the far side of a wall, he might
not come into play until the hero goes to another level and some
future harassment action pulls him off the migrating monsters list.
Treat clones like the resurrected Wizard:  don't start out waiting.
2020-05-01 12:12:47 -07:00
PatR
5457cbe0e3 liquid_flow when digging pit
Part of github issue #338 that isn't about shops:  objects at the
spot where a dug pit fills with lava (or water) weren't being
effected by that.

While fixing it, I noticed that hero's steed wasn't affected either.
Also, when conjoined pits are filled in, monsters other than the
steed are at risk but weren't being handled.  Presumably they fell
in on their next move.
2020-05-01 00:42:18 -07:00
PatR
49df1e184e monster eating (2 of 2)
Some instances of monsters eating nurse corpses or tins of nurse
caused blindness to be cured, others didn't.  Always do that to
match the effect on the hero.

Also, fix a couple more obsolete references to green slime corpses.
2020-04-29 13:24:31 -07:00
PatR
e726cc22c6 monster eating (1 of 2)
Move the recently adopted swallower-eats-dropped-corpse code into
a separate routine to unclutter dropz().  Eat all corpses (also
globs and meatball/meat ring/meat stick/huge chunk of meat) rather
than just the few types which trigger special effects (polymorph,
turn to stone, etc).

Also guard against using a freed pointer if somehow a dropped edible
item merges with an existing inventory item (something carried prior
to shape change perhaps?) before having the worm eat it.
2020-04-29 13:22:27 -07:00
nhmall
dfcccfcf54 x64 64 bit pointers, 32 bit longs
../src/sp_lev.c: In function 'flip_level':
../src/sp_lev.c:816:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             long ty = ((long) timer->arg.a_void) & 0xffff;
                        ^
../src/sp_lev.c:817:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             long tx = (((long) timer->arg.a_void) >> 16) & 0xffff;
                         ^
../src/sp_lev.c:823:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             timer->arg.a_void = (genericptr_t) ((tx << 16) | ty);
2020-04-29 15:58:55 -04:00
PatR
696858346a failure to hold another object when swallowed
If hold_another_object() decides that the object must be droped, drop
it into u.ustuck's minvent when swallowed instead of magically through
the engulfer direct to the floor.
2020-04-29 12:43:54 -07:00
nhmall
d87675c94c get rid of unused variable warnings in topten.c 2020-04-29 10:18:46 -04:00
PatR
fe230d84ad comment tidbit 2020-04-28 13:26:41 -07:00
PatR
b2b8d508dd comment typo 2020-04-27 11:54:52 -07:00
PatR
54cfb86936 fix pull request #340 - untrap steed sanity
When a failed #untrap attempt while mounted caused hero to be moved
onto the trap, it neglected to set the steed's coordinates to match.
If 'sanity_check' was On, that would trigger warnings about steed's
anomalous position.  Eventually a normal move would put steed's
coordinates back in sync with the hero's.

The pull request code set u.usteed->{mx,my} directly.  I've used
u_on_newpos() instead.  I also replaced some direct manipulations of
u.{ux,uy} with u_on_newpos() so that if clipping is in effect it will
be updated.

Fixes #340
2020-04-27 11:48:55 -07:00
PatR
c17301a75c Sting vs level teleport revisted
This reverses all of c67f1dd710
except for the fixes37.0 entry and does a better job in a cleaner
fashion.  If Sting is going to start glowing and "you materialize
on a different level" is pending, give the materialize message
before the glowing message.  Otherwise handle both stop-glowing
and/or you-materialize in the normal fashion.
2020-04-27 10:49:34 -07:00
PatR
c67f1dd710 Sting vs level teleport's "materialize" message
When level teleporting, Sting/Orcrish/Grimtooth would start or stop
glowing based on occupants of the new level before "you materialize
on another level".  That wasn't necessarily incorrect for the glow
stopping but was clearly wrong for it starting.  This fix uses a flag
as a hack to avoid finding and changing all the calls to docrt() and
see_monsters().  It ought to be fixed properly....
2020-04-27 05:09:19 -07:00