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.
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.
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.
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"
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.
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.)
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.
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.
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.
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'.
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.
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.
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).
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).
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.
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.
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.
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.
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.
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.
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.
../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);
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.
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
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.
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....