Dead monsters that had traits saved with the corpse would revive as
the same gender, but ordinary corpses revived with random gender so
could be different from before they got killed.
Since corpses of monsters lacked gender, those for monsters with
gender-specific names were described by the neuter name.
This is a fairly big change for a fairly minor problem and needs a
lot more testing.
Fixes#531
^X feedback and end of game disclosure reported
Your two weapon skill {is,was} [also] limited by being <skill rating>
with with <secondary weapon>.
when the skill rating for the secondary weapon is/was less than the
skill rating for two-weapon combat. The corresponding message for
primary weapon did not duplicate the word "with".
Fixes#530
Change the default value of autopickup to off. Having it on is
harmful for new players, making them very easily burdened.
We can't expect new players to know how to configure
pickup_types, pickup_burden, and pickup exceptions.
Change the default value of color to on. We can safely assume
new users have a terminal that supports color, and most people
want color.
Have curses call the core get_count() routine instead rolling its
own so that backspace and delete are supported. That part was
trivial to accomplish. Unfortunately it brought the disappearing
menu phenomenon back so it became more complicated overall.
This fixes the disappearing menu, but not curses menu count entry
failing to honor backspace/delete. Entering two or more digits
to get a "Count:12" message, followed by non-digit which removes
that, resulted in the menu for apply/loot in-out container operation
vanishing while it was still waiting for a choice. (Typing a choice
blindly did work.)
The code intended to handle this. I don't understand why refresh()
wasn't working. Reordering stuff didn't help until I changed that
from refresh() to wrefresh(win).
The original Count:123 display was limited to 25 characters and
menus to half the main window, so they didn't overlap. I made the
count display wider--because it is now also used for 'autodescribe'
feedback when moving the cursor around the map--so made something
that originally was impossible become possible. One line of the
menu does get erased while "Count:" is displayed, but then gets put
back by the wrefresh().
The stair handling reorganization changed drinking a cursed potion
of levitation to only check whether stairs up existed on the level
instead of whether the hero drank the potion while at their spot.
That resulted in always attempting to go up and then getting "you
can't go up here" when not at stairs instead of the intended "you
hit your head on the ceiling".
Fixes#527
being given when it shouldn't be. A change for perm_invent handling
back in March screwed up the if/then/else logic for code executed
when finishing MENUCOLOR manipulation via the 'O' command. That
resulted in the reminder to set menucolors to True being given even
when it was already True if perm_invent happened to be False.
I noticed this myself recently, then neglected to investigate it or
even write it down anywhere.
Fixes#526
On terminals with at least 16 colors there should be no need for special
handling dark gray.
The curses code uses COLORS < 16, COLORS <= 16, COLORS > 16, or COLORS >= 16
at several places although I'm not sure if they are correct or which could
possibly be off-by-one errors.
But realistically in this case, we only need to distinguish between 8 color
terminals and terminals supporting more than 8 colors as this will mean the
terminal supports at least 256 colors.
Quit is not a commmand you usually need very often, and generally
don't want to use by accident.
Apparently, on Spanish keyboard layout, n-with-tilde is interpreted
by the Windows NetHack as M-q, and the key is next to l. Loot also
asks for confirmation, just like quit.
Prevent stuff like this by not binding the quit command to any key.
rename sys/winnt to sys/windows
move vs (visual studio) folder out of win/win32 and into sys/windows
rename include/ntconf.h to include/windconf.h
rename winnt.c to windsys.c
place visual studio projects into individual subfolders.
This will hopefully resolve GitHub issue #484 as well.
% make spotless
% sh sys/unix/setup.sh sys/unix/hints/macOS.2020
% make fetch-Lua
worked, but the last ended with
|rm include/nhlua.h
|rm: include/nhlua.h: No such file or directory
|make: [fetch-Lua] Error 1 (ignored)
which might frighten skittish users (like me). Check whether the
constructed header file exists (so is assumed to be for an earlier
Lua version) and only delete it in that case. No more scary report
of benign failure when it isn't there (after 'make spotless' or for
brand new source setup).
Also, some time ago we came to the conclusion that 'if [ ]' was an
extension for GNU 'bash' and wouldn't work with some older actual
'sh' implementations. This replaces the one post-3.6 instance of
|if [ ! -d foo ] then bar; fi
in Makefile.top with
|if test -d foo; then true; else bar; fi
Testing was successful but done with bash rather than an old sh. :-}
On some platforms this may require:
make spotless
make fetch-lua
I did attempt to force a reminder message about the latter to
Makefile.top this time, and hope that works correctly for everyone.
Valkyrie player monster was set to be chaotic even though valk
hero is lawful by default and can also be neutral but not chaotic.
Change it to be lawful. Warrior quest monsters attending leader
were also chaotic; change to lawful to match revised valk. If
hero is a neutral valk then both the player monster and warriors
get changed to neutral at start of game (and stay that way even
if hero changes alignment). The leader defaults to neutral but
gets changed to lawful for lawful valk hero.
Attentdant quest monsters with the healer leader were lawful but
if they gain enough experience they get promoted to healer, so
make them neutral like the latter.
I've added some miscellaneous comments and done a small amount of
reformatting. Comment about alignment changing in bones applies
to all roles that can be played with different alignments, not
just to valkyries. It isn't new; I just thought that it ought to
be mentioned somewhere.
Fixes#521
More for issue #524.
The revised append_str() was still vulnerable to unsigned subtraction
overflowing from small negative value to huge positive one, if caller
ever passed an outbuf buffer which already had more than BUFSZ
characters in it.
Also the semantics were changed. If there wasn't room for the whole
" or "+string to be appended, it used to add as much as would fit.
The revised version changed that to all-or-nothing. This changes it
back, although players will probably never know the difference.
Add a page citation for passage #1 and change the wording of that
passage to match the book: the second "does not need" should be
"doesn't even need".
Also make the comments about various added passages (for other
books) be more consistent.
Like /m for nearby monsters and /O for all objects, implement /^
and /" to view a list of nearby traps or all known traps. Only
lists discovered traps (or mimics immitating traps, or detected
door or chest traps iff still shown as such on map), but lists
map traps even when an object or monster at the same location is
blocking view of them.
For traps on the Water and Air levels that have been mapped, they
will only be listed when within line of sight so that this feature
can't be used to track portal location as it moves around. However,
when within line of sight it does allow the portal to be recognized
if that has become covered.
When using '//' or ';' to examine the map and player uses '^' to
move the cursor to the next displayed trap, have cursor go to
locations containing webs, the vibrating square, or other non-'^'
trap when such is the next trap symbol up. Otherwise looking at
webs is very tedious because '"' is treated as a look-at command
rather than than a target symbol.
For the baalz 'lit=0' fix, I first tried 'lit=false'. That isn't
supported and triggered an error, but the error reporting passed
a null pointer to sprintf() for a %s argument. OSX's stdio shows
"null" instead of crashing in that situation; most implementations
wouldn't be so forgiving.
It intends to complain about "false" but that won't work if the
unexpected value doesn't get put into the lua table. I don't know
how to fix that aspect of this. This fix just avoids passing a
null pointer to sprintf. Plus some miscellaneous reformatting.
Revise Makefile.top to remove the obsolete commands which change
the last modified date of save and bones files during 'make update'.
Using file dates to validate save files against nethack hasn't been
useful for many years.
Also, update assorted comments.
Allow killing your quest leader, just to make games winnable if you
converted before doing the quest.
Boost the quest leaders and give them some equipment. King Arthur
gets Excalibur. Killing quest leader gives really bad luck and
makes your god angry at you, and killing quest guardians gives
smaller penalties.
This is based on both the EvilHack implementation by
k21971 <keith.simpson1971@gmail.com>, and xNetHack
implementation by copperwater <aosdict@gmail.com>.
Another SliceHack feature. However, the math implemented by SliceHack
seemed incorrect, so I tweaked it.
Pets previously attacked monsters of up to one level higher than them as
long as they were above 25% health. Now, they will attack monsters as
follows:
100%: up to level + 2 (pets could not attack this high before)
80%+: up to level + 1
60%+: up to same level
40%+: up to level - 1
25%+: up to level - 2
The case that prevents any attacks below 25% health still exists.
Despite active explosion attacks being called explosions in-game,
they only affected a single target, and were handled differently
from actual explosions. Make them do an actual explosion instead.
This should make spheres more interesting and inspire different
tactics handling them.
Because spheres deal more damage on average and can destroy items
in their explosions, their difficulty has been increased slightly.
Polyselfed hero exploding won't cause elemental damage to their
own gear.
Originally from xNetHack by copperwater <aosdict@gmail.com>.
Adds possible callbacks for "start_new_game", "restore_old_game",
"moveloop_turn", and "game_exit" which when defined, will be called
from core code at the appropriate time.
Adds lua hooks for dump_fmtstr (only if DUMPLOG), dnum_name, u.moves,
u.uhave_amulet, and u.depth.
The #version command retrieves the lua version number to include
in its output, but it was leaving the 'in_lua' flag set. So if a
later 'O' command tried to complain about a bad option value, the
error reporting routine crashed.
Grappling hook used to have an undiscovered description of "iron hook"
and when that was removed, the oc_name_known flag was left set as if
for something that could become discovered. I'm not sure whether that
made any difference anywhere.
Gold piece was in a similar situation, except that it wasn't because
an alternate description had been present and then removed. That one
definitely didn't make any difference anywhere.
Fixes#515
... and make them actually deal damage based on the energy
it would've drained, if you have Antimagic.
Also prevent them appearing too early in the dungeon.
Allow drain energy attacks (and anti-magic traps) drain more
than your level of energy.
Make eating magical monsters such as wizards and shamans give
the same tiny buzz bonus as eating a newt.