]> granicus.if.org Git - nethack/log
nethack
8 years agoinventory menu tweaks
PatR [Wed, 24 Feb 2016 22:57:00 +0000 (14:57 -0800)]
inventory menu tweaks

Add or revise a couple of comments and make a couple of code tweaks
to display_pickinv().

8 years agonew featurette: '-' in inventory menu
PatR [Wed, 24 Feb 2016 09:02:59 +0000 (01:02 -0800)]
new featurette: '-' in inventory menu

Requested during beta testing last year, include a menu entry of
"- - your bare hands" (or "your gloved hands") for wielding,
"- - empty quiver" for readying quiver,
"- - your fingertip" for engraving, or
"- - your fingers" for applying grease
if the user responds with '?' or '*' at the
"What do you want to {wield|ready|write with|grease}? [- abc or ?*]"
getobj prompt.  (First dash is inventory selector 'letter', second
dash is menu separator between the letter and its choice description.)

8 years agoupdated Guidebook.txt
PatR [Tue, 23 Feb 2016 01:57:00 +0000 (17:57 -0800)]
updated Guidebook.txt

8 years agominor Guidebook update
PatR [Tue, 23 Feb 2016 01:52:55 +0000 (17:52 -0800)]
minor Guidebook update

Miscellaneous changes suggested during beta testing.  There were more,
but I've run out of gas.

Guidebook.mn has been tested, Guidebook.tex has not.

8 years agoremove trailing spaces from Guidebook.mn
PatR [Tue, 23 Feb 2016 00:34:30 +0000 (16:34 -0800)]
remove trailing spaces from Guidebook.mn

I'm not sure whether I'll do the same for Guidebook.tex.

Guidebook.txt wasn't up to date.  I've got some substantive (but minor)
changes coming so am not checking in an updated one yet.

8 years agonasty() again
PatR [Mon, 22 Feb 2016 23:50:34 +0000 (15:50 -0800)]
nasty() again

Even out the summoning distribution by adding more lawful candidates.
There used to be only 4; now there are 10.  Chaotics have 14, so are
still more likely to get "neutral or own alignment" and stop, but the
difference is now pretty small once you factor in the 18 neutral ones.

8 years agotribute: Witches Abroad
PatR [Mon, 22 Feb 2016 23:15:31 +0000 (15:15 -0800)]
tribute: Witches Abroad

8 years agofix #H4246 - nasty() bugs
PatR [Sat, 20 Feb 2016 02:15:45 +0000 (18:15 -0800)]
fix #H4246 - nasty() bugs

In theory nasty() could summon 200 critters at a time, although the
chance seems fairly remote.  But it was biased towards having lawfuls
summon more critters than others since there are fewer lawfuls in the
nasties[] list.  This puts a cap of 8 successful makemon() calls,
enough to completely surround the hero.  More than 8 monsters can be
generated, if any of the makemon() calls produces a group.  (I think
fire giants are the only thing in nasties[] that ever come in groups.)
It's still biased toward lawful summoners trying more times hoping to
produce a lawful creature and generating chaotic ones in the process.

The bug report also thought there was some problem between chaotic
and unaligned or with the Wizard, but unaligned is treated as if it
were chaotic (due to use of sgn() in the two or three places where
alignment type is manipulated) so that isn't an actual problem.

8 years agosys/unix/hints/macosx.sh permissions
PatR [Sat, 20 Feb 2016 01:07:13 +0000 (17:07 -0800)]
sys/unix/hints/macosx.sh permissions

8 years agorepair tribute save-breaking change
PatR [Fri, 19 Feb 2016 18:41:35 +0000 (10:41 -0800)]
repair tribute save-breaking change

I was thinking about iflags rather than context and didn't realize
that the change to maxinum number of passages would breal save files.
Put the tribute context back to 3.6.0 size.

Anyone who grabbed from public git yesterday is potentially in for
some temporary trouble.  That's the risk they take for trying to stay
on the bleeding edge.

8 years agotribute passage limit
PatR [Thu, 18 Feb 2016 22:46:25 +0000 (14:46 -0800)]
tribute passage limit

Death Quotes have reached the current limit of 30 passages per 'book'.
Instead of increasing that, change the selection code to be able to
operate on a subset (dropped from 30 down to 20) at a time while
keeping the excess available for later selection.

Chatting with Death (more than 20 times since he also delivers non-
tribute messages) should cycle through 20 of his 30 passages without
repeating.  After that, another subset of 20 out of the 30 will be
chosen, independent of the first set so might contain all, some, or
none of the 10 that left out before.

8 years agoquest text grammar bit
nhmall [Thu, 18 Feb 2016 12:50:35 +0000 (07:50 -0500)]
quest text grammar bit

8 years agoOSX sysconf bit
PatR [Wed, 17 Feb 2016 22:20:56 +0000 (14:20 -0800)]
OSX sysconf bit

Prefer macports gdb over Xcode gdb.  No effect if macports gdb isn't
installed or if user's sysconf doesn't set PANICTRACE_GDB to 1 or 2.

8 years agosys/share/lev_yacc.c
PatR [Wed, 17 Feb 2016 22:10:36 +0000 (14:10 -0800)]
sys/share/lev_yacc.c

8 years agolev_comp lint redux
PatR [Wed, 17 Feb 2016 22:08:19 +0000 (14:08 -0800)]
lev_comp lint redux

The rest of this accidentally got pushed with the Reaper Man passages.

8 years agotribute: Reaper Man
PatR [Wed, 17 Feb 2016 22:02:51 +0000 (14:02 -0800)]
tribute: Reaper Man

8 years agolev_comp lint
PatR [Wed, 17 Feb 2016 21:45:05 +0000 (13:45 -0800)]
lev_comp lint

8 years agolooking at hidden monsters followup
PatR [Wed, 17 Feb 2016 01:58:15 +0000 (17:58 -0800)]
looking at hidden monsters followup

The new code wasn't handling the Wizard mimicking another monster
correctly for probing.

8 years agolooking at hidden monsters
PatR [Wed, 17 Feb 2016 01:36:51 +0000 (17:36 -0800)]
looking at hidden monsters

Sometimes you can see a hidden monster without bringing it out of
hiding (wand of probing, blessed potion of monster detection) but
look_at wasn't mentioning the fact that the monster was hidden and
probing described mimics accurately but lumped all hiders together
as "concealed".  Describe all hidden monsters more consistently.

8 years agobetter late than never? update fixes36.0
PatR [Wed, 17 Feb 2016 00:52:38 +0000 (16:52 -0800)]
better late than never?  update fixes36.0

8 years agofix for 'R' on armor ignoring 'T's restrictions
PatR [Wed, 17 Feb 2016 00:06:02 +0000 (16:06 -0800)]
fix for 'R' on armor ignoring 'T's restrictions

Reported directly to devteam, the 'R' command would let you take off
a suit from under a cloak or a shirt from under a suit and/or a cloak,
and it didn't require any extra turns.  'T' doesn't allow either of
those.  ('A' lets you take off a suit from under a cloak, adding in
extra turns to implicitly take the cloak off and put it back on,
but doesn't allow the same for shirt.)

'R' also let you attempt to take off embedded dragon scales if you
were wearing 2 or more accessories (or just 1 with paranoid_confirm
set for takeoff/remove), which triggered impossible "select_off:
<scales object> (embedded in skin)???".

9 years agoX11 extended command menu scrolling
PatR [Mon, 15 Feb 2016 08:59:33 +0000 (00:59 -0800)]
X11 extended command menu scrolling

When the extended command menu auto-scrolls as the player types in
characters, scroll so that all matching entries come into view rather
than just the first one.  For example, it someone types 'w', instead
of just highlighting and showing "wipe", it will highlight "wipe"
(because that has become the default response when <return> is used)
but also show "wiz-this", "wiz-that", and "wmode".  It actually shows
one extra entry beyond the last matching one--so you can see that
there aren't any more ambiguous choices--except for 'w' where "wmode"
is the very last extended command.

Previously, on subsequent popups of the extended command menu, the
scrollbar's slider was left drawn in the position it was in during
the previous time even though menu content wasn't scrolled.  Now it's
forced back to the top (non-scrolled) position when that menu is
popped up.

9 years agofix for / command to find names like "Hachi" via screen
nhmall [Mon, 15 Feb 2016 03:23:59 +0000 (22:23 -0500)]
fix for / command to find names like "Hachi" via screen

 Changes to be committed:
modified:   doc/fixes36.1
modified:   src/pager.c

fix bug bz54; this bug had no web ID

Report:
    For /, asking via cursor can't find special named entries like "Hachi"
    because the entry for the monster type like "dog" gets used instead.

Change:
    Instead of "More info?", when applicable it will now do:
    More info about "hachi"? [yn] (n) n
    More info about "little dog"? [yn] (n)

9 years agoanother Deaf bit
nhmall [Sun, 14 Feb 2016 23:13:08 +0000 (18:13 -0500)]
another Deaf bit

 Changes to be committed:
modified:   src/engrave.c

9 years agoWarning and adjacent hiders
nhmall [Sun, 14 Feb 2016 22:45:20 +0000 (17:45 -0500)]
Warning and adjacent hiders

 Changes to be committed:
modified:   include/extern.h
modified:   src/allmain.c
modified:   src/detect.c
modified:   src/display.c

Bug bz22 (no corresponding web id) reported quite some time ago.

Reported:
    Warning stays on when a "lurker above" is co-located with a
    boulder, even when you are adjacent to the spot.  Even though
    you see the warning symbol and not the boulder, an attempt
    to move in that  direction tries to move the boulder, rather
    than attack the creature you know to be there.  What's more,
    you can get the
    "You hear a  monster on the other side of the boulder..."
    preventing anything from happening if there is a monster on
    the other side of the spot.  The player doesn't necessarily
    even know there is a boulder there at the time (because
    warning trumps the boulder display) so it can all be somewhat
    confusing.

Change:
    - Split off a section of the search0() code for monsters into
      a separately callable function, arbitrarily named mfind0(),
      which takes a special arg for this particular scenario.
    - If you have Warning and you get adjacent to an unseen hider
      such as a lurker above with the Warning glyph still displayed,
      a specific search is carried out for the obviously present monster.
    - The boulder concerns in the original report should become moot
      after this.

9 years agoextended command menu for X11
PatR [Sun, 14 Feb 2016 02:06:50 +0000 (18:06 -0800)]
extended command menu for X11

When the extended command menu is big enough to need a scrollbar,
leave more elbow room when forcing its height to fit on screen.
The last entry was frequently obscured by OSX's "docking tray"
desktop decoration and the resize hotspot (bottom right corner of
the menu popup) could be hard to access.

I'm not particularly happy with this code.  There really has to be
a better way to accomplish what's needed.

9 years agosys/share/ dgn_comp and lev_comp code
PatR [Sun, 14 Feb 2016 02:00:44 +0000 (18:00 -0800)]
sys/share/ dgn_comp and lev_comp code

9 years agodgn_comp,lev_comp lint
PatR [Sun, 14 Feb 2016 01:56:57 +0000 (17:56 -0800)]
dgn_comp,lev_comp lint

Newer compiler found new things to complain about.
NHinternal/shared/sys/share/flexhack.h has been updated.

Generated sys/share/ sources have to be committed separately so
they happen after this update fills in new banner comment for
their source.

9 years agofix #H4245 - dipping prompt
PatR [Sat, 13 Feb 2016 23:54:21 +0000 (15:54 -0800)]
fix #H4245 - dipping prompt

Bad punctuation for the "dip <obj> into fountain" and "dip <obj> into
pool" prompts.

9 years agogrammar bit
nhmall [Sat, 13 Feb 2016 22:48:34 +0000 (17:48 -0500)]
grammar bit

9 years agoimprove Deaf messaging for minetown watch and shops
nhmall [Sat, 13 Feb 2016 22:29:15 +0000 (17:29 -0500)]
improve Deaf messaging for minetown watch and shops

 Changes to be committed:
modified:   doc/fixes36.1
modified:   src/fountain.c
modified:   src/monmove.c
modified:   src/shk.c

Fix for H4242, bz352

9 years agounix/hints/macosx10.8
PatR [Sat, 13 Feb 2016 20:58:54 +0000 (12:58 -0800)]
unix/hints/macosx10.8

10.8 is different from 10.7 (major change for X11) and from 10.10
(install issues due to root directory tree), so needs its own hints.

9 years agowin/X11 lint
PatR [Sat, 13 Feb 2016 18:58:44 +0000 (10:58 -0800)]
win/X11 lint

9 years agomakedefs.c lint
PatR [Sat, 13 Feb 2016 10:05:43 +0000 (02:05 -0800)]
makedefs.c lint

Add some missing prototypes and change some 'char *' function paramters
to 'const char *'.

9 years agosrc lint
PatR [Sat, 13 Feb 2016 09:59:51 +0000 (01:59 -0800)]
src lint

Another OS upgrade (OSX 10.6.8 -> 10.8.5) with different toolset,
another change in compiler behavior.  Earlier 'gcc -Wwrite-strings'
didn't complain about passing string literals as 'char *' paremeters
if there was no prototype in scope.  This one found one or two of
those in options.c and several in makedefs.c (fix coming soon in a
separate commit...).  This adds some missing prototypes and reorders
the existing ones to match their order within the file.  There were
also several functions which were declared static in their advance
declarations but not in the definitions, which can be confusing when
reading the source.

9 years agoupdate FIXME to the real locations of the public git repos
keni [Thu, 11 Feb 2016 23:12:15 +0000 (18:12 -0500)]
update FIXME to the real locations of the public git repos

9 years agoformatting for win/X11/dialogs.c
PatR [Thu, 11 Feb 2016 02:25:20 +0000 (18:25 -0800)]
formatting for win/X11/dialogs.c

9 years agotribute: Moving Pictures
PatR [Thu, 11 Feb 2016 02:22:38 +0000 (18:22 -0800)]
tribute: Moving Pictures

9 years agotribute: Eric
PatR [Thu, 11 Feb 2016 00:14:11 +0000 (16:14 -0800)]
tribute: Eric

9 years agofix H2766 - jumping while punished could leave ball in wrong place
David Cohrs [Wed, 10 Feb 2016 21:47:43 +0000 (13:47 -0800)]
fix H2766 - jumping while punished could leave ball in wrong place

Affected both intrinsic and spell-based jumping.
hurtle_step now drags the ball.

9 years agofix #H4237 - color ignored for X11 text map
PatR [Tue, 9 Feb 2016 03:01:26 +0000 (19:01 -0800)]
fix #H4237 - color ignored for X11 text map

Color was only being tracked for locations that had the pile of
objects flag set.  And hilite_pile made a monster on a pile take
on the color of the top object of the pile.

This restores the tracking of color for the whole map, and makes
highlighted piles be drawn in inverse like highligted pets.  The
drawing routine doesn't know the difference (but could tell, if
necessary, by testing whether the glyph is an object or a monster).

Also, variables 'inbuf', 'inptr', and 'incount' were global; limit
their scope to winmap.c.

9 years agowc_tiled_map
PatR [Tue, 9 Feb 2016 01:03:24 +0000 (17:03 -0800)]
wc_tiled_map

Force a screen redraw if the tiled_map option is toggled via the 'O'
command.  The X11 interface switches map modes even without this, but
conceptually it's something that must be done when the option setting
is changed.

9 years agorevise X11 highlight yn prompting
PatR [Tue, 9 Feb 2016 00:32:07 +0000 (16:32 -0800)]
revise X11 highlight yn prompting

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.

9 years agoX11 default resources
PatR [Sun, 7 Feb 2016 08:36:46 +0000 (00:36 -0800)]
X11 default resources

If the user hasn't explicitly loaded application defaults (which I
haven't been doing), the X11 interface behaves differently if invoked
via the shell script than if the executable is run directly, because
the script sets up a path so that X can find $HACKDIR/NetHack.ad.
This hides the difference by reading in that file during initialization
and feeding its contents to XtAppInitialize as fallback resources.

9 years agoX11 scrolling message window
PatR [Sun, 7 Feb 2016 02:25:42 +0000 (18:25 -0800)]
X11 scrolling message window

The scroll bar on the message window doesn't work for me, just like
the one on the extend commands menu.  Moving the pointer to it does
change the cursor, but neither trying to drag the slider nor clicking
above it will make it do anything.  However, at some point I managed
to accidentally scroll the message window, and new messages never
restored it to the unscrolled state.  New messages were hidden until
enough even newer ones had been delivered to push the hidden ones
into view.  So this adds key translations to scroll the message
window via the arrow keys.  Clicking on the scroll bar doesn't change
focus to the right place, so I have to click the text display area of
the message window.  That triggers a beep (I suspect it's interpreted
as an attempt to move the hero beyond the map.)  But then the messages
can be scrolled via the cursor keys.  Getting focus back to the map
seems tricky since doing it via pointer is interpreted as a travel
command.  Not quite optimal....

Anyway, being able to scroll the message window let me figure out how
to unscroll it when new messages are delivered.

9 years agoX11 highlight yn prompting
PatR [Sun, 7 Feb 2016 02:00:27 +0000 (18:00 -0800)]
X11 highlight yn prompting

For the 'slow' config (prompting for single-char input done on a
fixed line at the top of the map rather than via a popup window),
invert the background and foreground when creating it so that it
looks like part of the map, then invert again when a prompt is
active in order to highlight that prompt.

9 years agoglob weight recalc
PatR [Fri, 5 Feb 2016 23:46:24 +0000 (15:46 -0800)]
glob weight recalc

weight() didn't know how to calculate a glob's weight.  When one glob
absorbs another, that isn't used, but when the hero eats part of a
glob, it is, and the result was incorrect.

9 years agoMakefile.utl dependency bug for dlb.o
PatR [Fri, 5 Feb 2016 22:41:16 +0000 (14:41 -0800)]
Makefile.utl dependency bug for dlb.o

For make install or update, dlb.o was being recompiled unnecessarily
when building util/dlb because the dependency in Makefile.utl listed
hack.h instead of config.h for it.  Then attempting to run nethack
under debugger control could cause debugger complaints about dlb.o
being newer than nethack.

Updated for unix and vms.

9 years agoAdd CHECK_PLNAME to sysconf
Pasi Kallinen [Fri, 5 Feb 2016 18:39:13 +0000 (20:39 +0200)]
Add CHECK_PLNAME to sysconf

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.

9 years agoUnify putting a saddle on steed
Pasi Kallinen [Fri, 5 Feb 2016 15:23:22 +0000 (17:23 +0200)]
Unify putting a saddle on steed

9 years agoAllow wizmode creating saddled and invisible monsters
Pasi Kallinen [Fri, 5 Feb 2016 14:58:13 +0000 (16:58 +0200)]
Allow wizmode creating saddled and invisible monsters

9 years agotsurugi vs puddings
PatR [Fri, 5 Feb 2016 09:25:12 +0000 (01:25 -0800)]
tsurugi vs puddings

Another one from 4.5 years ago:  the Tsurugi of Muramasa ought to
be able to split puddings in keeping with its special attack effect
of slicing things in two.  The suggestion was more extreme:  always
split instead of kill.  This generalizes the less extreme version;
METAL weapons (scalpel and tsurugi) can now split puddings like IRON
weapons do even though their user faces no risk of having the weapon
become rusty.  Sam's quest artifact receives no special treatment.

Bashing puddings with wielded iron-tipped projectiles was splitting
them.  This prevents that (and also for metal-tipped ya).

9 years agospell skils for role-specific special spell
PatR [Fri, 5 Feb 2016 08:25:39 +0000 (00:25 -0800)]
spell skils for role-specific special spell

Every role has a specific spell that they having an easier time
casting.  Samurai's special spell is clairvoyance but samurai is
restricted in divination spells.  Requested about 4.5 years ago:
allow samurai to achieve basic skill in divination.

Similar for barbarian, special spell is haste self but escape spells
are restricted.  All the other roles can already get at least basic
in their special spell's category.

There were several choices:
1) leave things as they are;
2) give those two roles different special spells;
3) allow them to reach basic in the spell category of the existing
   special spell;
4) #2 for one of those roles, #3 for the other.

I went with #3.  To compensate, reduce attack spell skill limit from
skilled to basic for both.  (#4 might be better, since the reason to
want divination enhanced is most likely identify and magic mapping,
not interest in clairvoyance.)

9 years agomore X11 memory management
PatR [Fri, 5 Feb 2016 01:55:20 +0000 (17:55 -0800)]
more X11 memory management

Free askname's widgets after use and free getlin's and yn_function's
persistent widgets at end of game.

When loading an entire text file into one long string in memory,
use strcpy on a pointer to the end of the string instead of having
strcat repeatedly churn through the entire string as it grows for
each line.  [Since that's only used for small help files (biggest
is dat/history), this optimization is probably not noticeable.]

Also, a handful of new comments and quite a bit of reformatting.

9 years agoAdd git mailmap file to canonize committer names
Pasi Kallinen [Thu, 4 Feb 2016 07:56:51 +0000 (09:56 +0200)]
Add git mailmap file to canonize committer names

Without rewriting the complete commit history, we cannot adjust
the committer names or emails. Luckily git allows mapping committer
names and email via the .mailmap file in the repo.

Most visible difference is when using "git shortlog -sne"

9 years agolint cleanup to pacify gcc
PatR [Thu, 4 Feb 2016 07:39:24 +0000 (23:39 -0800)]
lint cleanup to pacify gcc

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.

9 years agovortexes and unsolid monsters need not avoid webs
David Cohrs [Wed, 3 Feb 2016 19:50:03 +0000 (11:50 -0800)]
vortexes and unsolid monsters need not avoid webs

Based on a bug report from beta testers in 2010. mintrap()
already had partial checks for this (now fire vortex also burns
a web, as per suggestion in the bug report) but mfndpos()
lacked checks so mintrap() code was almost never exercised.

9 years agomacro symbols instead of numbers for maintenance
nhmall [Wed, 3 Feb 2016 12:27:12 +0000 (07:27 -0500)]
macro symbols instead of numbers for maintenance

9 years agoMerge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Wed, 3 Feb 2016 11:26:07 +0000 (06:26 -0500)]
Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0

9 years agothe old strcmpi in utility complaint again
nhmall [Wed, 3 Feb 2016 11:25:13 +0000 (06:25 -0500)]
the old strcmpi in utility complaint again

9 years agofix #H4094 - shopkeeper "it" message
PatR [Wed, 3 Feb 2016 07:44:58 +0000 (23:44 -0800)]
fix #H4094 - shopkeeper "it" message

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.

9 years agomore other tile name fix-ups
nhmall [Wed, 3 Feb 2016 02:19:29 +0000 (21:19 -0500)]
more other tile name fix-ups

 Changes to be committed:
modified:   win/share/other.txt

9 years agotile names in other.txt
nhmall [Wed, 3 Feb 2016 02:00:26 +0000 (21:00 -0500)]
tile names in other.txt

 Changes to be committed:
modified:   win/share/other.txt
modified:   win/share/tilemap.c
modified:   win/share/tiletext.c

On 2/2/2016 7:27 AM, paxed wrote:
> https://www.reddit.com/r/nethack/comments/43n8i2/can_anyone_tell_me_what_these_zigzag_tiles_are/
>
> Looks like the tiles in question have been labeled as "wall" since
> 3.4.3 at least
>

Put better labels on the 'other' tileset and accept those
labels in the tile processing utilities.

9 years agoX11 memory management
PatR [Tue, 2 Feb 2016 23:19:31 +0000 (15:19 -0800)]
X11 memory management

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.

9 years agoMerge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Tue, 2 Feb 2016 02:58:28 +0000 (21:58 -0500)]
Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0

9 years agoensure raw_printf has visible output
nhmall [Tue, 2 Feb 2016 02:57:35 +0000 (21:57 -0500)]
ensure raw_printf has visible output

 Changes to be committed:
modified:   sys/winnt/nttty.c

9 years agoNH_HEAPLOG vs tile utilities
PatR [Tue, 2 Feb 2016 01:30:09 +0000 (17:30 -0800)]
NH_HEAPLOG vs tile utilities

I just tried to build with MONITOR_HEAP defined in unixconf.h plus
WANT_WIN_X11=1 for make.  tile2x11 wouldn't link.  It doesn't use
alloc() and free(), but it does link with drawing.o, and drawing.o
has calls to free(), so MONITOR_HEAP makes it need nhfree() from
alloc.o.

All the miscellaneous tile utilities seem to link with drawing.o, so
they all need alloc.o too, and that drags in util/panic.o as well.
I've only changed it for Unix where I can actually test the change
but other platforms probably should do this too.  Or we need to redo
drawing.c so that the small subset of stuff utilities want is
separate from the code the core uses for that same stuff.

9 years agoformatting bit for alloc.c
PatR [Tue, 2 Feb 2016 01:28:52 +0000 (17:28 -0800)]
formatting bit for alloc.c

9 years agoVery tiny typofix
Pasi Kallinen [Mon, 1 Feb 2016 11:43:43 +0000 (13:43 +0200)]
Very tiny typofix

9 years agofix bz16 - book becoming cursed while being read
PatR [Mon, 1 Feb 2016 02:22:31 +0000 (18:22 -0800)]
fix bz16 - book becoming cursed while being read

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).

9 years agotypo bit nttty.c
nhmall [Sun, 31 Jan 2016 23:16:13 +0000 (18:16 -0500)]
typo bit nttty.c

9 years agosome updates to nttty.c
nhmall [Sun, 31 Jan 2016 23:08:03 +0000 (18:08 -0500)]
some updates to nttty.c

 Changes to be committed:
modified:   sys/winnt/nttty.c

better attribute support
more functional inverse support

9 years agoX11 menus - support pre-selected menu entries
PatR [Sun, 31 Jan 2016 03:39:29 +0000 (19:39 -0800)]
X11 menus - support pre-selected menu entries

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.)

9 years agotribute: Guards! Guards!
PatR [Sat, 30 Jan 2016 09:37:17 +0000 (01:37 -0800)]
tribute: Guards! Guards!

9 years agocrash fix
PatR [Sat, 30 Jan 2016 01:14:42 +0000 (17:14 -0800)]
crash fix

After the recent shopkeeper fix, I wanted to find out what happens if
you turn to stone in the spot inside the shop door.  It didn't go too
well--a change of mine from three weeks ago caused a crash due to
passing a null pointer to strcmp().  Death from being turned to stone
or from starvation when there was no while-helpless reason (probably
not possible for starving) triggered it.  This fixes that.

As far as the test goes, the shopkeeper takes your inventory and moves
it all the way into the shop, and a statue of the petrified hero is
left without contents in the spot in front of the door.  That shk was
awfully quick....

Post-3.6.0 bug, so no fixes entry.

9 years agofix glob fixes
PatR [Sat, 30 Jan 2016 00:06:32 +0000 (16:06 -0800)]
fix glob fixes

The impossible about partly eaten glob having more nutrition than
an untouched one after another glob had been absorbed into it was
not a 3.6.0 bug, it was an interim situation when I converted glob
nutrition to be based on glob weight rather than on the creature
corpse weight.  So take that fixes36.1 entry out.

Add one about black puddings that was included in the glob patch.

9 years agoFix bz58: Inheritance dispute between shk and risen undead
Pasi Kallinen [Fri, 29 Jan 2016 14:59:21 +0000 (16:59 +0200)]
Fix bz58: Inheritance dispute between shk and risen undead

Prevent shopkeeper from "gratefully inheriting all your possessions"
when your corpse rises as undead.

9 years agomore globs... much more globs
PatR [Fri, 29 Jan 2016 10:07:09 +0000 (02:07 -0800)]
more globs... much more globs

Fix a bunch of glob bugs, probably introduce one or two new ones.

9 years agoavoid crash for long lines in nethackrc
David Cohrs [Fri, 29 Jan 2016 02:38:53 +0000 (18:38 -0800)]
avoid crash for long lines in nethackrc

read_config_file() has used a buffer of size (4 * BUFSZ) since 3.4.x
so parse_config_line() needs a buffer of the same size to avoid
buffer overrun. Allows my old .nethackrc to work again.

9 years agorevisit #H4083 - glob ID and merging
PatR [Fri, 29 Jan 2016 02:13:25 +0000 (18:13 -0800)]
revisit #H4083 - glob ID and merging

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.

9 years agoX11: Attach translations also to menuform
Pasi Kallinen [Thu, 28 Jan 2016 17:44:29 +0000 (19:44 +0200)]
X11: Attach translations also to menuform

Without this, the keyboard commands don't work in the extended
command window on Linux. If the translations are removed from
menuformview, then the keyboard commands don't work on Mac.

Having the translations in both doesn't seem to hurt.

9 years agofix #4206 - feedback for pet's weapon
PatR [Thu, 28 Jan 2016 01:51:02 +0000 (17:51 -0800)]
fix #4206 - feedback for pet's weapon

The report that a tame Archon got two "<pet>'s long sword is not
affected" messages thought there was some duplication error when a
flaming sphere exploded, which was incorrect.  Since an Archon has
two weapon attacks, getting that message twice just meant that both
attacks hit.  However, the player has only 1/6 chance to suffering
passive fire damage to weapon, where monster-on-monster or monster-
on-polyd-hero was inflicting that for every successful hit, so
there was a bug here after all.  Give monsters the same 1/6 chance.
Also, add even more verbosity to that message--now that it won't be
delivered so often--to mention what didn't affect the item.

While investigating this, I noticed that hitting a steam vortex
with a flammable weapon was doing fire damage to that weapon.  Fire
damage in the steam vortex definition makes some sense in that it
allows fire resistance to give protection, but dishing out actual
fire damage makes no sense and is now prevented for passive counter-
effects.

9 years agofix 2nd part of #H4188 - monst fleeing up on lvl 1
PatR [Wed, 27 Jan 2016 03:25:21 +0000 (19:25 -0800)]
fix 2nd part of #H4188 - monst fleeing up on lvl 1

The code to handle monsters fleeing up the upstairs on level 1 was
expecting those stairs to be normal upstairs but they are actually
sstairs like the ones down into the mines.  So monsters fled to the
Plane of Earth instead of escaping the dungeon as intended.

9 years agofix #4189 - burning glob of green slime
PatR [Wed, 27 Jan 2016 02:32:17 +0000 (18:32 -0800)]
fix #4189 - burning glob of green slime

When destroy_item() or destroy_mitem() burned up a glob of green slime,
they had the message index and damage amount reversed.  This could give
a nonsense message ("the glob of green slime freezes and shatters") or
go out of array bounds and wreak havoc.  Even if the message index had
been correct, fatal damage would have produced an incorrect cause of
death since it would have used a potion or scroll string.

Now globs will boil and explode like potions, and damage will be
proportional to the size (weight) of the glob, which seems to be the
original intent.

9 years agorevert fix for #H4041 - decl for has_color()
PatR [Wed, 27 Jan 2016 01:39:41 +0000 (17:39 -0800)]
revert fix for #H4041 - decl for has_color()

Since the attempted fix for the warning about has_color() being
implicitly declared introduced a worse problem of conflicting
declaration in cases where it's already declared, back that change
out.

9 years agoprompting for #dip
PatR [Wed, 27 Jan 2016 01:32:05 +0000 (17:32 -0800)]
prompting for #dip

I noticed that my paniclog had a "Query truncated" entry from testing
the post-3.6.0 changes to #dip prompting.  For
"What do you want to dip <the object> into? [xyz or ?*] "
the use of safe_qbuf() didn't account for getobj() appending the list
of choices, so wasn't ensuring that the formatted object name combined
with the other text couldn't overflow QBUFSZ.

I had a more elaborate fix than this that still used safe_qbuf(), but
the extra complexity just wasn't worth it.  This potentially truncates
the formatted object description more severely than necessary but is
simple enough to be comprehensible.

No fixes36.1 entry.  This is updating a post-3.6.0 revision.

9 years agofix part of #H2343 - youmonst.movement vs poly
PatR [Tue, 26 Jan 2016 02:18:35 +0000 (18:18 -0800)]
fix part of #H2343 - youmonst.movement vs poly

From a July 2011 report listing multiple movement anomalies, fix one
of the easier ones.  If you polymorph from a fast from into a slow
one, pending movement points can let the slow form get in some moves
it shouldn't.

I've deliberately avoided adjusting pending movement when you change
into a faster form, which will get it's own movement boost on the
next turn.

9 years agomind flayer's damage
PatR [Mon, 25 Jan 2016 00:23:33 +0000 (16:23 -0800)]
mind flayer's damage

From a followup to #H2247, April 2011...  Physical damage from a mind
flayer attack was inflicted in the AD_DRIN case for hitmu(), then
being inflicted again in the common code after the switch statement.
The new comment explaining the reason for non-standard damage is just
a guess.

9 years agofix #4191 - flags.verbose vs level change messages
PatR [Sun, 24 Jan 2016 04:16:37 +0000 (20:16 -0800)]
fix #4191 - flags.verbose vs level change messages

Suppress the "you climb/fly up the stairs/ladder" message if the
'verbose' option is off (unless punishment is going to augment the
message by "with great effort").

9 years agofix #H4205 - take-off of covered items
PatR [Sun, 24 Jan 2016 03:38:28 +0000 (19:38 -0800)]
fix #H4205 - take-off of covered items

Bug report subject was "menu interface things" but this isn't related
to menus, just getobj().  Make the requested change to not list worn
suit as a likely candidate for T (and R) if a worn cloak is going to
prevent it from being removed.  (Suit can still be picked, but the
take-off operation for it will be refused, same as when it was being
listed as a candidate.)

In discussion about the request, there was a separate suggestion that
cloaks shouldn't interfere with removing things underneath since
they're generally sleeveless.  I haven't done that; I think it is
better to keep the layering as it is.

The bug report also asked for the likely candidates when writing with
a magic marker to exclude non-blank scrolls and books.  That has been
implemented already (post-3.6.0).

9 years agoanother vampire shape-shifting bit
PatR [Sun, 24 Jan 2016 03:15:38 +0000 (19:15 -0800)]
another vampire shape-shifting bit

Chameleon impersonating a vampire and vampire subject to protection
from shape changers weren't the only ways to have a vampire monster
which isn't a vampshifter.  One-shot polymorph could produce that too.

9 years agotribute: Pyramids
PatR [Sun, 24 Jan 2016 02:37:43 +0000 (18:37 -0800)]
tribute: Pyramids

9 years agoformatting for 'O' commmand menu
PatR [Sun, 24 Jan 2016 00:16:36 +0000 (16:16 -0800)]
formatting for 'O' commmand menu

For !menu_tab_sep, the boolean options were formatted with a different
width than the compound and 'other' options when the menu for 'O' was
active.  Use the same format string for all of them, consider them all
when constructing it, and construct it just once instead of every time.

9 years agotipped ice box corpses
PatR [Sat, 23 Jan 2016 23:23:45 +0000 (15:23 -0800)]
tipped ice box corpses

Reported directly to devteam, with patch:  tipping corpses out of an
ice box wasn't restarting their rot timers, producing corpses that
would last indefinitely.

9 years agotribute: Wyrd Sisters
PatR [Sat, 23 Jan 2016 08:20:15 +0000 (00:20 -0800)]
tribute: Wyrd Sisters

I stumbled across why the Death Quotes hadn't been getting displayed
evenly before being recycled:  ones I've added since 3.6.0--probably
even before the release--were unintentionally missing their '%e passage'
directive, so attempted look-up for those returned the very last one
(terminated by '%e title').  The recent change to read_passage() has
made '%e passage' be optional for one-line death quote passages, so
this patch doesn't bother putting them in.

9 years agotty role selection - 'random' default
PatR [Sat, 23 Jan 2016 02:09:05 +0000 (18:09 -0800)]
tty role selection - 'random' default

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....

9 years agoX11 menus
PatR [Fri, 22 Jan 2016 07:47:42 +0000 (23:47 -0800)]
X11 menus

Make the six buttons (ok, cancel, all, none, invert, search) on
menus for X11 all have the same width.

'ok' should probably be changed to 'okay' to be consistent with
X11_getlin().  (Another inconsistency:  the extended commands
menu uses 'dismiss' rather than 'cancel'.)

9 years agoX11_getlin() missing winX.h diff
PatR [Fri, 22 Jan 2016 07:26:00 +0000 (23:26 -0800)]
X11_getlin() missing winX.h diff

9 years agoX11_getlin()
PatR [Fri, 22 Jan 2016 07:13:49 +0000 (23:13 -0800)]
X11_getlin()

Two cosmetic changes for the X11 version of the getlin() routine:
1) Make the text entry box big enough to hold 60 characters before
   sliding the beginning input off the left edge, instead of just 13,
   so that user can see much more of what is being typed;
2) Make the cancel button be a little wider, and the okay button be
   the same width as the cancel button so they look a little nicer.

9 years agoAdded anagrams for new team members
karnov [Fri, 22 Jan 2016 02:36:18 +0000 (21:36 -0500)]
Added anagrams for new team members