The three line change I made previously to implement highlighting for
prompts that ask for single-character input was easy and worked well
for a tiles map, but it didn't look very good for a text map. This
handles both text map and tile map and also adds a configurable
'highlight_prompt' X resource to let the user enable or disable the
feature. The resource template file (win/X11/NetHack.ad, copied to
$HACKDIR during install) now has it enabled by default.
The highlighting--more specifically, the "lowlighting" when no prompt
is active--still looks bad if the map window has a vertical scrollbar
on left edge. I don't have any inspiration about how to fix that up.
Setting CHECK_PLNAME to 1 makes WIZARDS, EXPLORERS, and SHELLERS
check the player name instead of the user's login name.
This is mostly useful for public servers which have external
login system and don't create user accounts for players.
I upgraded from OSX 10.5.8 via 10.6.3 to 10.6.8, plus Xcode to whatever
version was on the 10.6 dvd, and ended up with a more recent version of
gcc that is configured to use 64 bit longs and 64 bit pointers (by
default; presumably that can be changed if necessary). It triggered
several warnings about converting int to pointer of different size or
vice versa even when explicit casts were in use, and a couple of other
things.
Most shop messages use shkname() to give the shopkeeper's accurate
name (or hallucinatory substitute) even if he or she can't be seen.
stolen_value() was using mon_nam(), which calls shkname() if the
monster is a shopkeeper who can be seen, but produces "it" when not
seen. Change it to use shkname() like the rest of the shop routines.
Also, replace Monnam() (quite a few instances) with new Shknam() to
do the same duty when the name is at the start of a sentence.
There was also a very obscure bug where if you could see two
shopkeepers at the same time, you could probe the map one spot at
a time with repeated use of the 'p' command to locate monsters in
general and other shopkeepers in particular. Very tedious and not
very useful, but now fixed.
The big memory allocation for tiles that was unfreed according to
heaputil was actually freed by X according to a comment in the code.
But free it explicitly for #if MONITOR_HEAP so that the alloc/free
tracking stays accurate.
Also, the cached extended commands menu was not being freed, so take
care of that. I wasn't sure where to handle it; I ended up making it
happen when the map window is torn down.
Attempting to read a cursed spellbook fails with a nasty effect. But
a non-cursed book can become cursed while being read (malignant aura
after Wizard has been killed). Assuming no interruption for other
reasons, the read would finish, the spell be learned, and then the
nasty effect would be given. This changes things so that if the book
being read becomes cursed and the hero notices (book's bknown flag is
set), the read-in-progress will be interrupted. Resuming will take
the attempting-to-read-a-cursed-book path. Unfortunately, if the
hero doesn't notice, the old behavior still applies. Maybe the new
behavior should happen even if bknown isn't set (but then player
won't be told why the interruption occurred).
X11 had been ignoring add_menu(..., MENU_SELECTED) to specify a
pre-selected menu entry. This adds support for that.
Attempt to implement pre-selected entry for PICK_ONE menu sanely by
returning the pre-selected entry instead of toggling it off if the
user chooses it explicitly. Inner workings of menus are convoluted
so I'm not sure it's 100% correct, although testing hasn't found any
problems. (tty currently returns 0 for "nothing picked" when
explicitly picking a pre-selected entry in a PICK_ONE menu, and the
core jumps through hoops to handle it. That can't be cleaned up until
all interfaces which support pre-selected entries achieve sanity.)
Make "random" be chosen for <return> or <enter> during role selection
and highlight it to reflect that. (Role selection for X11 uses its
own code instead of nethack menus, so pre-selection isn't applicable.)
Globs on the floor used different criteria (anything goes) than globs
in inventory (mostly requiring same ownership when in shops and same
curse/bless state--other stuff generally isn't applicable) when
deciding whether two globs should merge. That was okay as long as
the globs on the floor were from being left behind when a pudding or
ooze was killed, but not if the player had picked some up, dipped
them in holy or unholy water, and dropped them again. This changes
things so that globs on the floor use the same criteria as globs in
inventory when deciding whether to coallesce.
Also, my earlier fix was modifying globs in the mergeable() test (to
make bknown and rknown match) rather than during actual merge, which
would be a problem if the merger didn't take place for some reason.
Instead of just using 'random' as the default choice if the user hits
<return> when picking role, race, gender, or alignment, flag it as
pre-selected in the menu so that it can be seen to be the default.
Someday somebody is going to have to fix up the interaction between
PICK_ONE menu and pre-selected choice....
This is more robust than the previous hack. The issue of whether to
use it in other places is still unexplored. Ultimately it's the user's
fault if overzealous message suppression hides something important.
[For an eerie game, try 'MSGTYPE=hide .'.]
User had
MSGTTYPE=norep "You see here"
and complained that once the message had been given while walking
over an object, using ':' to intentionally look at something would
end up doing nothing if its feedback was a repeat of "You see here".
Trying to classify which actions should deliberately override
no-repeat (or no-show) will be an ordeal. This fixes the case for
the ':' command where the user obviously expects feedback. I think
it could be done better but am settling for something quick and easy.
Rename the option for adding coordinates to autodescribe feedback for
the '/' and ';' commands from 'getpos_coord' to 'whatis_coord', after
the '/' command that uses it instead of after the internal routine
that implements it. The 'whatis' name was only in dat/hh as far as I
could find, so this changes it to 'what-is' and also updates dat/help
and the Guidebook to mention the name too.
Add a 'screen' choice to the option to show coordinates as row,column
rather than x,y or compass direction(s). Revise the /m, /M, /o, /O
operations of 'what-is' to honor the whatis_coord option (mostly; a
value of 'none' gets overridden by 'map' to force coordinates).
Also, update the description of the functionality of the '/' command
in the Guidebook. The .mn version is tested, the .tex one isn't.
There have been several comments on IRC how the Wizard is a very
light sleeper now; aggravate cast by monsters makes him wake up
and come out of the tower. So, lets limit aggravate to either
outside or inside of the tower, depending on which side the player is.
Adding deafness to the status line spurred me on to something I've
wanted to do for a long time. This adds 'Stone' and 'Strngl' as
new status conditions, and moves the five fatal ones: "Stone Slime
Strngl FoodPois TermIll" to the front of the status list since
information about them is more important than any of the others.
"Ill" has been renamed "TermIll"; "Df" has been renamed "Deaf";
"Lev", "Fly", and "Ride" are three additional new conditions, with
Lev and Fly being mutually exclusive. After the fatal ones, the
order of the rest is now
<hunger> <encumbrance> Blind Deaf Stun Conf Hallu Lev Fly Ride
To handle the longer potential status line, the basic bot2() is now
smarter. If the line is wider than the map, 'T:moves' is moved from
the middle to the end. If the line without time is still wider than
the map, then experience (HD if polyd, Xp:M/nnnnnn is showexp is on,
or Exp:M) is moved in front of time at the end. If the line without
experience and time is still wider than the map, dungeon level plus
gold is moved from the beginning to be in front of experience. The
fields are just reordered, not truncated, so if the interface code
can display lines wider than the map they'll retain the extra info.
The gist is than health and associated fields (Hp, Pw, Ac) get first
priority, status conditions get second priority, then the rest. In
the usual case where there aren't many conditions, status display is
the same as it has been in the past.
STATUS_VIA_WINDOWPORT has been updated too, and it builds for tty
and X11. But the bot2() revision to reorder sections has not been
implemented for that.
win/win32/mswproc.c has been updated but not tested.
STATUS_VIA_WINDOWPORT without STATUS_HILITES had several compile
problems; now fixed for core and tty. STATUS_VIA_WINDOWPORT with
STATUS_HILITES has not been tested.
Original bug report:
> When killing something that's carrying a potion, or death-drops a potion,
> or stands on top of a potion, with a force bolt or a wand of striking,
> "you hear something shatter" or "a potion of foo shatters" but the corpse
> is inverse as if it's (still) a pile.
Unfortunately the newsym() checks for already existing glyph, and
the gbuf doesn't distinguish between object piles and single items,
so newsym doesn't mark the location for update.
This is a dirty hack to force the newsym to update the glyph.
The glyph buffering should be revisited in a future version.
Several people have asked if 3.6.0 supports playing with tiles on
a public server. Because there's no way for the user's end to know
what that white @ is, this adds special console escape codes for
tile hinting.
The idea was originally a patch called TelnetTiles by Justin Hiltscher,
but this expanded version comes via NAO, where it's been in use for years.
This is basically an interim hack, which should go away when/if
we support actual client-server model.
This was a request from a blind player. It's hard to find
the left edge of the menu when it's drawn on the map, so
clear the screen and align menus to the left edge of the screen
when this option is turned off.
Originally this was called the window edge patch.
Allow 'msgtype=show' for messages that nethack uses Norep() for.
I don't know whether anyone will ever want to do that, but if felt
strange to have two different message suppression mechanisms that
were completely disconnected from each other.
For a user with no msgtype filter, there'll be no difference in
behavior.
Fix several warnings. Accept ASCII RUBOUT (aka DELETE) in addition
to backspace. [Should use erase_char (and add support for kill_char)
but that means pushing get_count() into the interface code.] Guard
against user causing the count to wrap if someone ever adds a call to
get_count() which doesn't specifying a maximum value.
This happens when levelporting to the first Sokoban level in wizard mode
before visiting the level, causing the branch stairs to not appear until
the space it is in comes in sight of the player.
The issue was that levels flagged premapped would cause the special
level coder to call sokoban_detect() before fixup_special() had a chance
to place the branch stairs properly.
Fix from Dynahack by Tung Nguyen.
ck_server_admin_msg() is only available for '#if (UNIX && MAIL)' but
moveloop() tried to call it unconditionally. Call if from the UNIX
edition of ckmailstatus() instead.
It's occasionally important for public servers to notify
all the players. Sending a mail is not reliable, as not everyone
wants to break conduct, or have mail on.
This adds a compile-time defined filename, which NetHack
will monitor. The contents of the file are in the same
format as SIMPLE_MAIL: "sender:message" on one line.
Changes to be committed:
modified: doc/fixes36.1
modified: include/extern.h
modified: src/mon.c
Fixes H4148 (bz246) and H4150 (bz248)
comments:
I wielded a c-corpse against a shapeshifting vampire bat (checked with a
stethoscope, it said "shapeshifter".) The bat turned to stone and spawned a
vampire. I hit the vampire and it also turned to stone, so I had two statues
from one monster (vampire bat and vampire.) Not sure if this is a bug or a
feature...
comments:
Engulfed by a fog cloud that was actually a Vampire,
and got the message: "You break out of the vampire!"
In light of the recent 'bad options' feedback issue where \r messed
up message display, try to to make newline handling be more consistent.
I'm sure there are lots of places that still handle \n manually, but
it's a start.
Duplicate of another recent report as far as drain resistance from
Excalibur/Stormbringer/Staff of Aesculapius not being shown by
enlightenment goes, but this one mentioned that it also wasn't being
shown for lycanthropy. Being inflicted by that does confers level-
drain resistance. were_change() wasn't calling set_uasmon() since
it isn't changing youmonst.data, but set_uasmon() is were intrinsics
conferred by creature form are set up. So call it when changing
were-form. Direct access to u.ulycn wasn't calling it either, so add
a new routine to assign the value to that instead doing so directly.
Some people are confused by the boulder -option, and
SYMBOLS=S_boulder, so allow defining symbols with
OPTION-lines in addition to the SYMBOLS.
So these are the same thing:
SYMBOLS=S_boulder:0
OPTIONS=S_boulder:0
Test case: U-shaped corridor, with a known trap in it.
Before this change, travel would try to move straight at
the target, bumping the wall or walking into a dead-end.
After this, travel will go along the corridor and then stop
right before the trap.
Original patch via AceHack by Alex Smith.