]> granicus.if.org Git - nethack/log
nethack
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

9 years agofix #H4204 - shapeshifter taking vampire form
PatR [Thu, 21 Jan 2016 10:12:47 +0000 (02:12 -0800)]
fix #H4204 - shapeshifter taking vampire form

When a chameleon/doppelganger/sandestin took vampire or vampire lord
shape, it stopped taking on new shapes.  Vampire shapeshifting was
being applied to all vampires rather than just to is_vampshifter().
When is_vampshifter() is false, the vampire is some other shapeshifter
or Protection_from_shape_changers is in effect, so vampire shifting
doesn't apply.

While testing, I noticed that vampires/lords only turned into bats/
wolves during initial creation.  They did turn into fog clouds in
order to pass closed doors but the other alternate forms were ignored.
That's fixed too.

9 years agooverriding message suppression, revisited
PatR [Wed, 20 Jan 2016 02:16:13 +0000 (18:16 -0800)]
overriding message suppression, revisited

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

9 years agolev_comp update for older Unix system
PatR [Wed, 20 Jan 2016 00:27:39 +0000 (16:27 -0800)]
lev_comp update for older Unix system

Increase the lex paramaters in lev_comp.l and replace use of snprintf
with sprintf in lev_comp.y and lev_main.c.

Also some reformatting for lev_comp.y, but I gave up pretty quickly:
some early tab replacement and adjusting of the spacing for casts.

9 years agofix #H4028 - ':' sometimes doesn't work
PatR [Tue, 19 Jan 2016 15:13:18 +0000 (07:13 -0800)]
fix #H4028 - ':' sometimes doesn't work

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.

9 years agomore getpos() help
PatR [Tue, 19 Jan 2016 10:19:33 +0000 (02:19 -0800)]
more getpos() help

Explain the what-is response types in the help provided when typing '?'
during getpos operation.

9 years agostatus conditions in Guidebook
PatR [Tue, 19 Jan 2016 09:46:13 +0000 (01:46 -0800)]
status conditions in Guidebook

Update the Guidebook to reflect the recently added conditions displayed
on the status lines.

9 years agowhatis_coord - rename 'getpos_coord' option
PatR [Tue, 19 Jan 2016 03:27:53 +0000 (19:27 -0800)]
whatis_coord - rename 'getpos_coord' option

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.

9 years agoDeath misquotes
PatR [Sun, 17 Jan 2016 23:05:34 +0000 (15:05 -0800)]
Death misquotes

9 years agoX11: autoscroll extended command menu
Pasi Kallinen [Sun, 17 Jan 2016 11:55:10 +0000 (13:55 +0200)]
X11: autoscroll extended command menu

When you type in the extended command menu to select a command,
scroll the window so that the selected command is always in view.

9 years agotribute streamlining
PatR [Sun, 17 Jan 2016 01:36:48 +0000 (17:36 -0800)]
tribute streamlining

Chatting with Death doesn't always deliver a tribute Death Quote but
when it does, it wasn't giving each of them once before reusing them
even though they should have been treated the same as passage
selections from a novel.  I'm still not sure why it wasn't working
as intended, but after some revision to the tribute parsing code, now
it is.  If you #chat with Death enough times to get 20 tribute quotes,
you will see each of the 20 quotes once (in random order), then
further chatting will give them again (in different random order).

9 years agoX11: Match new extcmd immediately if no match was found
Pasi Kallinen [Sat, 16 Jan 2016 17:04:27 +0000 (19:04 +0200)]
X11: Match new extcmd immediately if no match was found

When entering an extended command, allow the user just type
and match a new command immediately, if no match was found,
instead of needing to wait the 2.5 seconds.

9 years agofixes bit
nhmall [Sat, 16 Jan 2016 11:27:05 +0000 (06:27 -0500)]
fixes bit

9 years agoAdd fixes entries
Pasi Kallinen [Sat, 16 Jan 2016 10:20:25 +0000 (12:20 +0200)]
Add fixes entries

9 years agotribute: Sourcery
PatR [Sat, 16 Jan 2016 09:59:58 +0000 (01:59 -0800)]
tribute: Sourcery

9 years agoLimit aggravate to inside or outside of the Wizard's tower
Pasi Kallinen [Sat, 16 Jan 2016 07:45:08 +0000 (09:45 +0200)]
Limit aggravate to inside or outside of the Wizard's tower

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.

9 years agoanother status bit
PatR [Sat, 16 Jan 2016 05:05:58 +0000 (21:05 -0800)]
another status bit

Accept four digits for spell power rather than hide the amount
exceeding 999.

9 years agomore new status - X11 'fancy' status
PatR [Sat, 16 Jan 2016 04:56:12 +0000 (20:56 -0800)]
more new status - X11 'fancy' status

Update X11's status display to include the expanded set of status
conditions.  This time the order is
 Petrifying   <hunger>       Blind
 Slimed       <encumbrance>  Deaf
 Strangled    Levitating     Stunned
 Food Pois    Flying         Confused
 Term Ill     Riding         Hallucinating
with the application defaults file specifying red text for the first
column and black for the other two.  Previously it was all one column
with seven entries.  [Slimed was missing along with the six new ones
(deaf, stone, strngl, lev, fly, ride) and both types of sickness were
shown as 'FoodPois' or 'Ill' or 'FoodPois Ill' on one line.]

So now basic bot2, #if STATUS_VIA_WINDOWPORT genl_status_update, and
#if !STATUS_VIA_WINDOWPORT X11 fancy status have three different
orderings.  genl_status_update has hunger and encumbrance first
because all the other status conditions are grouped together as one
bitmask item.  bot2 has 'lev', 'fly', 'ride' last so that they're
the first things to be sacrificed if the string of status conditions
ends up being truncated.  (genl_status_update also has those last.)

In addition to updating status conditions, I reordered the Hp, Pw, &c
section too so that it's closer to tty in organization.
 Hit points    Maximum HP
 Power         Maximum Power
 Armor Class   Alignment
 Exp.Level     Exp.Points      (if 'showexp')
 Gold          Moves           (if 'time')
 Score                         (if 'showscore')
I didn't have SCORE_OR_BOTL set so haven't seen the last one, but
it's in the same position as it was before.

9 years agofix whitespace of previous commit
David Cohrs [Sat, 16 Jan 2016 04:50:46 +0000 (20:50 -0800)]
fix whitespace of previous commit

9 years agoOnly print giant snatching boulder message when cansee pos.
David Cohrs [Sat, 16 Jan 2016 04:35:15 +0000 (20:35 -0800)]
Only print giant snatching boulder message when cansee pos.

Reported by a couple times directly to devteam, no bz.

9 years agoFix bz51: Revived unique inherits corpse name
Pasi Kallinen [Fri, 15 Jan 2016 20:02:41 +0000 (22:02 +0200)]
Fix bz51: Revived unique inherits corpse name

9 years agoAllow crawling out of water on Plane of Water after hurtling
Pasi Kallinen [Fri, 15 Jan 2016 13:40:29 +0000 (15:40 +0200)]
Allow crawling out of water on Plane of Water after hurtling

9 years agoFix bz65: Water behaves strangely when hurtling out of air bubble
Pasi Kallinen [Fri, 15 Jan 2016 11:47:16 +0000 (13:47 +0200)]
Fix bz65: Water behaves strangely when hurtling out of air bubble

When levitating on the plane of water, get an unattached iron ball,
and throw it. You'll hurtle in the opposite direction, out of the air
bubble and into water, but don't drown.

9 years agomore new status - update genl_status_update
PatR [Fri, 15 Jan 2016 11:30:40 +0000 (03:30 -0800)]
more new status - update genl_status_update

Make genl_status_update behave approximately the same as basic bot2
when processing the second status line.  Preferred order:
Dlvl  Gold  Hp(HpMax) Pw(PwMax) AC  Xp  Time  Conditions
Alternate orders if above exceeds COLNO (note several extra spaces
get sequeezed out).  First one is used if everything except time fits,
second one is used if everything except experience (which can be wide
if 'showexp' option is on) and time fits, third is last resort:
Dlvl Gold Hp(HpMax) Pw(PwMax) AC Xp Conditions Time
Dlvl Gold Hp(HpMax) Pw(PwMax) AC Conditions Xp Time
Hp(HpMax) Pw(PwMax) AC Conditions Dlvl Gold Xp Time

Basic bot2 currently has Conditions as
Stone Slime Strngl FoodPois TermIll <hunger> <encumbrance> Blind Deaf
 Stun Conf Hallu Lev Fly Ride
genl_status_update has
<hunger> <encumbrance> Stone Slime Strngl FoodPois TermIll Blind Deaf
 Stun Conf Hallu Lev Fly Ride
which is as close as it can get with the current field organization.

Tested by temporarily changing tty_procs.status_init and .status_update
to use genl_* instead of tty_*.

9 years agobz24: Wrong floor descriptions on Planes when levitating and going down
Pasi Kallinen [Fri, 15 Jan 2016 11:15:09 +0000 (13:15 +0200)]
bz24: Wrong floor descriptions on Planes when levitating and going down

9 years agoMinor formatting fix
Pasi Kallinen [Fri, 15 Jan 2016 11:02:42 +0000 (13:02 +0200)]
Minor formatting fix

9 years agoWarning glyph description is wrong when trap symbol is same
Pasi Kallinen [Fri, 15 Jan 2016 10:37:58 +0000 (12:37 +0200)]
Warning glyph description is wrong when trap symbol is same

This fixes bz23: Warning glyph info wrong with TRAPS=50, even
though you don't set the trap symbols via TRAPS anymore, the
bug still existed. To trigger it, use SYMBOL=S_arrow_trap:2
and look at monster that appears as warning '2'.

9 years agowin32gui menu color attribute fix
nhmall [Fri, 15 Jan 2016 04:02:09 +0000 (23:02 -0500)]
win32gui menu color attribute fix

from Alex Kompel...

9 years agoMerge branch 'win32-guitty' into NetHack-3.6.0
nhmall [Fri, 15 Jan 2016 00:07:48 +0000 (19:07 -0500)]
Merge branch 'win32-guitty' into NetHack-3.6.0

9 years agowin32_gui: fix inventory window visibility when perm_invent is set in game
Alex Kompel [Thu, 14 Jan 2016 16:15:56 +0000 (08:15 -0800)]
win32_gui: fix inventory window visibility when perm_invent is set in game

9 years agostatus line update
PatR [Thu, 14 Jan 2016 03:13:10 +0000 (19:13 -0800)]
status line update

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.

9 years agoAdd more color aliases for menucolors and statushilites
Pasi Kallinen [Wed, 13 Jan 2016 18:35:06 +0000 (20:35 +0200)]
Add more color aliases for menucolors and statushilites

9 years agoMake status hilites use same color string matching as menucolors
Pasi Kallinen [Wed, 13 Jan 2016 18:24:40 +0000 (20:24 +0200)]
Make status hilites use same color string matching as menucolors

9 years agoRename getpos_coord values to "compass" and "map"
Pasi Kallinen [Wed, 13 Jan 2016 10:21:27 +0000 (12:21 +0200)]
Rename getpos_coord values to "compass" and "map"

9 years agoMake getpos monster/object coord picker deterministic
Pasi Kallinen [Wed, 13 Jan 2016 08:22:41 +0000 (10:22 +0200)]
Make getpos monster/object coord picker deterministic

...and make it pick coordinates top-left to bottom-right.

9 years agogetpos autodescribe
PatR [Wed, 13 Jan 2016 07:10:31 +0000 (23:10 -0800)]
getpos autodescribe

Move the details of autodescribe out of getpos into a separate
routine.

I think 'cartesian' mode should be renamed 'compass' mode, and
'absolute' mode perhaps should be 'map' mode.  And we should have
a new 'screen' mode which shows rows,columns (1..N rather than
0..N-1).  For tty, row is line+2; message and prompting "window"
is row 1, line 0 of map is row 2.  Columns are straightforward
since column 0 of the map isn't used for map display:  column 1
of map is column 1 of screen.  Non-tty mostly shouldn't care and
might as well use the same conversion.

9 years agoupdate fixes36.1
nhmall [Wed, 13 Jan 2016 05:12:31 +0000 (00:12 -0500)]
update fixes36.1

9 years agoshow deafness indicator on status line
nhmall [Wed, 13 Jan 2016 04:43:28 +0000 (23:43 -0500)]
show deafness indicator on status line

May as well show a deafness indicator.

9 years agosilly thing bit
PatR [Wed, 13 Jan 2016 02:00:43 +0000 (18:00 -0800)]
silly thing bit

Simplify some conditionally excluded, obsolete but not yet
discarded code.

This is something else I thought I'd checked in a long time ago.
I must have clobbered pending changes to invent.c at some point.

9 years agogetobj() magic marker candidate items
PatR [Wed, 13 Jan 2016 01:50:32 +0000 (17:50 -0800)]
getobj() magic marker candidate items

When applying a magic marker, only list known blank scrolls and known
blank spellbooks as likely candidates to write on.  Accepts any scroll
or book (but non-blank ones will get rejected by the writing code).
Attempting to choose some other class of item yields "that is a silly
thing to write on", same as before.

This was requested during beta testing and I'd swear that I checked it
in a long time ago, but it wasn't here.

9 years agobit of X11 reformating
PatR [Tue, 12 Jan 2016 10:20:43 +0000 (02:20 -0800)]
bit of X11 reformating

Cleanup up the copyright notice in dialogs.c, and replace some tabs.

9 years agoX11 extended command menu
PatR [Tue, 12 Jan 2016 10:15:35 +0000 (02:15 -0800)]
X11 extended command menu

Restore the ability to select extended commands by keystroke.
The key translation stuff had gotten attached to the wrong widget.

When using keys to highlight an entry in the extended command menu,
don't reset the key-by-key handling so quickly.  (On second and
subsequent keystrokes, if you waited more than 0.5 second, the new
key started picking an extended command from scratch rather than
continuing the current one, making it pretty hard to disambiguate
commands which have the same initial letter.  Now the delay
threshold is 2.5 seconds.  In theory that should become a user-
preference resource but I don't think it's worth the effort.)

Display the help choice in response to '?'.

Clean up the formatting of the top two buttons (dismiss + help).

Start with a scroll bar if the menu is too big to fit on the screen.
Prior to this, on OSX, the full menu would be constructed but any
of it that was 'displayed' beneath the bottom of the screen was
inaccessible because it couldn't be dragged higher and couldn't be
resized to get a scroll bar (since the way to resize on OSX is by
dragging the bottom right corner--which was off the screen).

The problems I mentioned recently are still present:  when scroll
bar is present, I can click beneath it and it moves down, but
neither dragging it up nor clicking above it will move it back up.
Fortunately the recently implemented up and down arrows both work,
even after clicking/dragging starts failing.

There was a lot of trial and error involved here.  Most of it
eventually got phased out, but the mystery of 'defaultDistance'
(which is reported to be 0 but is actually 4) remains.  The screen
height stuff at the end ought to be fixed up if someone can figure
out how to get the width of a horizontal scroll bar or the height
of a title bar.  (I'm sure I used to know how to do the latter,
but that was 25 or so years ago, and in Fortran with Xlib rather
than Xt or Xaw....)

9 years agoFix get_count: ^H should go left instead of backspacing a count
Pasi Kallinen [Tue, 12 Jan 2016 06:20:13 +0000 (08:20 +0200)]
Fix get_count: ^H should go left instead of backspacing a count

9 years agowin32_gui: cycle accelerator letters on large menues
Alex Kompel [Tue, 12 Jan 2016 04:54:59 +0000 (20:54 -0800)]
win32_gui: cycle accelerator letters on large menues

9 years agoMerge branch 'NetHack-3.6.0' into win32-guitty
nhmall [Mon, 11 Jan 2016 23:35:50 +0000 (18:35 -0500)]
Merge branch 'NetHack-3.6.0' into win32-guitty

9 years agoAdd getpos_coord to fixes file
Pasi Kallinen [Mon, 11 Jan 2016 19:12:52 +0000 (21:12 +0200)]
Add getpos_coord to fixes file

9 years agoAdd getpos_coord option
Pasi Kallinen [Mon, 11 Jan 2016 19:07:33 +0000 (21:07 +0200)]
Add getpos_coord option

Allows showing the coordinate when picking a position on the
map with '/' and autodescribe is on.

This is another blind player request

9 years agogetpos() 'm','M' and 'o','O'
PatR [Sun, 10 Jan 2016 22:42:06 +0000 (14:42 -0800)]
getpos() 'm','M' and 'o','O'

Always include the hero's location in the set of spots for 'm',&c to
cycle through.  This way the set will never be empty so checks for that
can be dropped, and choosing initial index becomes trivial (set to 0,
then increment to reach nearest spot of interest or decrement to reach
farthest).  Also, it makes it easier for player to see when successive
'm's,&c have been through all the interesting locations if there are
multiple monsters or objects clumped near the last one in the cycle.

9 years agoDocument fixes
Pasi Kallinen [Sun, 10 Jan 2016 16:54:35 +0000 (18:54 +0200)]
Document fixes

9 years agoFix bz175: Pile mark is shown when potion is destroyed
Pasi Kallinen [Sun, 10 Jan 2016 16:27:34 +0000 (18:27 +0200)]
Fix bz175: Pile mark is shown when potion is destroyed

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.

9 years agoFix unreferenced variable
Pasi Kallinen [Sun, 10 Jan 2016 16:24:38 +0000 (18:24 +0200)]
Fix unreferenced variable

9 years agoEnable TIMED_DELAY for linux hints files
Pasi Kallinen [Sun, 10 Jan 2016 13:03:23 +0000 (15:03 +0200)]
Enable TIMED_DELAY for linux hints files

runmode is completely useless in TTY without this

9 years agoSmall code cleanup
Pasi Kallinen [Sun, 10 Jan 2016 12:47:06 +0000 (14:47 +0200)]
Small code cleanup

9 years agoAdd compile-time option MSGHANDLER
Pasi Kallinen [Sun, 10 Jan 2016 11:01:46 +0000 (13:01 +0200)]
Add compile-time option MSGHANDLER

This was a feature request from a blind player; he wanted to
play a sound whenever a pline message was given.

9 years agoTTY: Add compile-time option for tile data hinting
Pasi Kallinen [Sun, 10 Jan 2016 08:35:27 +0000 (10:35 +0200)]
TTY: Add compile-time option for tile data hinting

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.

9 years agoAdd missing variable init
Pasi Kallinen [Sun, 10 Jan 2016 08:09:56 +0000 (10:09 +0200)]
Add missing variable init