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....
while 'mention_decor' is enabled. When stepping onto different
terrain and one or more objects remained on the new spot after
autopickup, describe_decor() was issuing its new-terrain message
right before look_here()'s similar under-the-objects message. If
autopickup grabbed everything or there weren't any objects to begin
with, look_here() doesn't issue any dfeature (terrain) message.
describe_decor() isn't smart enought to know whether that is going
to happen. Give look_here() a new flag argument so that its caller
can ask for the dfeature message to be skipped for the case where a
similar message has already been given.
One monster hitting another with an artifact within the hero's view
gave "<Mon1> swings his <Artifact> at <Mon2>." followed either by
"<Mon1> misses <Mon2>." _or_ the two messages "<Mon1> hits <Mon2>."
and "The <Artifact> hits <Mon2>." Defer the <Mon1> hits <Mon2> one
when Mon1 is using an artifact and only deliver it if there is no
artifact hit message.
Tested but not exhaustively so....
Fixes#332
After some discussion with Alex Smith, it seems like a good change for
both gameplay and realism that candles' light radius should decay
quadratically instead of exponentially. Now a light radius of 4 from
candles can be accomplished by burning 9 candles, and players who find a
lot of candles might even be able to get up to 5 (16 candles) or 6 (25
candles).
The main impetus for this change is that with the existing formula, the
more candles -> more light mechanic was more or less useless outside of
wizard mode, because you needed 49 candles to do better than a lamp.
Introducing two new xlogfile fields "achieveX" and "conductX" which encode
achievements and conducts as a series of comma-separated strings which are
more easily parseable and also somewhat interpretable independent from knowing
the source code.
Example for a player that died shortly after picking up the luckstone from the
gnomisch mines:
achieveX=entered_the_gnomish_mines,entered_mine_town,entered_a_shop,entered_a_temple,obtained_the_luckstone_from_the_mines
conductX=polyless,polyselfless,wishless,artiwishless,genocideless
Change obj->oextra->omid from a usually-Null pointer field in
oextra to a simple 'unsigned' that doesn't need any allocation
beyond obj->oextra itself. Value 0 means that it is not in use;
it is used to hold a monst.m_id and those are always non-zero.
Delete unused obj->oextra->olong. 'olong' used to be the last
field in struct obj, put there to force alignment of anything
which followed it back when obj structures were over-allocated to
append extra information. It had a comment about being used for
temporary gold but whatever that was, temporary gold was gone long
before obj->oextra got introduced.
Bump EDITLEVEL since this invalidates existing 3.7 save files.
Remove a bunch of tabs from obj.h and save.c.
Add some prototypes and add a new include to a couple of files that
use config.h instead of hack.h. So sys/unix/Makefile.src has been
changed slightly.
Issue was for dropping glob of green slime while swallowed by a
purple worm but also applied to pet eating habits. Green slime
corpse doesn't exist any more; check for glob instead.
Fixes#333
Applying a bullwhip down while levitating or riding gives a chance
to pick up items from the unreachable floor. Doing so over water
yields "you wrap your bullwhip around <item> on the water" when
that item is actually on the bottom. Same for lava. Don't fetch
items from beneath the surface. Also, for the lava case subject
the whip to fire damage.
This has actually broken the seal on a can of worms. Every item
at a water location sinks to the bottom even if it should float.
I'm not opening that can....
Fixes#319
Fix "objects[0] class #1 not in order!" panic. The new check to
make sure that the elements of objects[] were in ascending order
by object class uses a plain 'char' index so -1 to indicate 'no
previous value' didn't work on a system using unsigned chars.
Verfied by temporarily adding '-funsigned-char' to CFLAGS before
and after the revision. Before: panic, after: no panic.
Fixes#337
I added -Wmissing-prototypes to my CFLAGS and got a bunch of warnings.
This fixes the core ones (there are more for X11 that I haven't looked
at yet). While fixing these, I discovered a few option processing
issues: the non-Amiga 'altmeta' should be settable while the game is
in progress (not sure about the Amiga variation so left that as-is),
'altmeta' and 'menucolor' are booleans so shouldn't have had optfn_XXX
functions; 'MACgraphics' and 'subkeyvalue' were conditionally defined
differently in options.c than in optlist.h.
This matches the nurses' hitting behavior with their chatting messages.
Chatting to them suggested that the heal attack would happen but the check in
mhitu.c was just for wielding anything.
This opens up the possibility of a YAFM in MS_NURSE when wielding something
that allos the heal attack to proceed. But I couldn't come up with a good
one.
Allow crystal ball to search for furniture (stairs and ladders,
altar, throne, sink, fountain) as well as for a class or objects
or of monsters or all traps. Giving any of '<','>','_','\','#',
or '{' will find all of those rather than just the individual type
specified. Because of the default character conflict, '_' can no
longer be used to find chains; looking for altars is more useful.
The chance of getting the cursed effect due to failing a saving
throw against intelligence when the ball isn't actually cursed has
been reduced. If it is the hero's own quest artifact, it will
happen if rnd(8) is greater than Int, so Int of 8 or more will
never yield that effect. Otherwise if it is blessed, rnd(16) is
used so 16 or better Int means it can't act like it is cursed.
When uncursed and not hero's quest artifact, the old rnd(20) > Int
test is still used.
Crystal balls now start with 3..7 charges rather than 1..5, and
blessed charging sets the amount to 7 charges rather than 6 and
also blesses the ball. Recharing with uncursed scroll of charging
is slightly better (adds 1..2 charges instead of always just 1,
caps the amount at 7 rather than 5) and uncurses the ball. Cursed
scroll strips off all charges even if the ball is blessed and also
curses the ball so is harsher than before.
Crystal balls now cancel to -1 instead of 0, like wands, and using
one effect will destroy it, like zapping cancelled wands.
Also a minor tweak to the initial charges for can of grease (5..25
instead of 1..25) and horn of plenty and bag of tricks (both now
3..20 instead of 1..20).
Have 'makedefs -m' output default mons[].difficulty values in the
stub 'monstr.c' that still gets generated for that option. It
would be better to allow specifying which monsters are of interest
but I didn't want to get bogged down by interface issues.
I needed it for mons[PM_ELF].difficulty after changing that monster's
level, so it still has a purpose. Code is from 3.4.3, reformatted
manually.
Remove an obsolete comment about soldiers since they haven't been
contiguous for over 15 years as the 'ants in barracks' bug report
revealed.
Do some reformatting, mostly for attacks among the '@' class.
Only one actual change: reduce the level for 'elf' (placeholder
for zombie and mummy corpses) from 10 to 0 (and corresponding
difficulty from 12 to 2). I don't think that level is ever used
anywhere and the one for humans is already zero. Having it be
higher than Elvenking's level was absurd.
'@' section should either be completely reordered to obey 'rule #2'
or nurse should be moved back to where it once was (in front of
shopkeeper). I haven't done either but only because I couldn't
which of the two should be done.
Monster detection skipped dead monsters during fmon traversal but
found semi-dead guard parked at <0,0> waiting to remove temporary
vault corridor. If that happened to be the only monster found then
the feedback was incorrect (a blank map showing no found monsters
instead of a strange feeling). Object detection found semi-dead
guard's inventory and might report incorrectly too although the
chance of that being the only objects found on the level is a lot
less than it being the only monster.