]> granicus.if.org Git - nethack/log
nethack
8 years agofix #H4139 - commands missing in help menu
PatR [Fri, 25 Mar 2016 00:31:35 +0000 (17:31 -0700)]
fix #H4139 - commands missing in help menu

The meta keystroke commands which use an uppercase letter were all
missing from dat/hh:
 M-A annotate level
 M-C show conduct
 M-N name something (synonym for M-n, which is a synonyn for 'C'all)
 M-O display dungeon overview
 M-R ride/unride steed
 M-T tip a container

(All meta keystroke command shortcuts are missing from dat/help.)

8 years ago'O' for regexp options
PatR [Wed, 23 Mar 2016 01:22:39 +0000 (18:22 -0700)]
'O' for regexp options

Noticed when testing tty menucolor changes recently, using the 'O'
command to interactively add a new entry would accept one and then
quit, unlike remove which accepts multiple at a time and then goes
back to the menu where you could choose 'remove' all over again.
Adding is still done one entry at a time, but instead of finishing,
it goes back to the menu where you can choose to add another.

8 years agomore fixes for revised 'sortloot'
PatR [Tue, 22 Mar 2016 08:19:27 +0000 (01:19 -0700)]
more fixes for revised 'sortloot'

After some permutation of commands which displayed items, the 'd'
command presented a prompt with the list of letters scrambled (in
loot order or pack order rather than invlet order), so explicitly
sort when getobj operates.  Done for ggetobj too.

For menustyle:Traditional, ',' followed by 'm' presented a pickup
list in pile order even when sortloot was 'l' or 'f'.  That was an
unintentional change during the 'revamp'.

8 years agotty menu coloring
PatR [Tue, 22 Mar 2016 01:26:48 +0000 (18:26 -0700)]
tty menu coloring

There was a report during beta testing that menu lines which were
displayed in color showed the whole line in color, unless/until an
item was selected or unselected, in which case the '-', '+', or '#'
was rendered in monochrome.  The suggestion then was to redraw the
selection character in color, but I went the other way.  Menu
entries will render the selector letter and selection indicator in
monochrome all the time, and only the text of the menu entry will
honor menucolors.

8 years agofix "object lost" panic after query_objlist
PatR [Sun, 20 Mar 2016 20:01:56 +0000 (13:01 -0700)]
fix "object lost" panic after query_objlist

Reported directly to devteam for recent git code, the "sortloot
revamp" patch could trigger an object lost panic after calling
query_objlist() when menustyle was full or partial and player
picked up a subset of available items.  Modified head-of-list was
not being propagated to its source in pickup().  Use an extra layer
of indirection.

8 years agofix scatter feedback
PatR [Sat, 19 Mar 2016 22:46:33 +0000 (15:46 -0700)]
fix scatter feedback

Reported directly to devteam (for 3.4.3 but still present in 3.6.0):
an unseen landmine explosion which caused scatter() to break a
boulder or statue would give feedback as if the hero could see the
boulder or statue being destroyed.

Also, a couple of landmine explosion messages didn't take deafness
into account.

8 years agofix #4279 - kicked daggers are lost
PatR [Sat, 19 Mar 2016 21:47:36 +0000 (14:47 -0700)]
fix #4279 - kicked daggers are lost

A kicked object which hits a monster wasn't placed back on map,
removing it from play.

8 years agotuning: succubi
PatR [Fri, 18 Mar 2016 22:50:13 +0000 (15:50 -0700)]
tuning: succubi

This one had been intended for longer than several years, but I
hadn't gotten around to it.  When consorting with succubi and
incubi, very high Cha+Int no longer guarantees that a positive
outcome will occur.

Chance of positive outcome is still quite high and most of the
negative outcomes are pretty easy to repair, so this isn't likely
to make a significant impact.  However, the possibility of losing
spell power will matter for some players....

8 years agotuning: thrones
PatR [Fri, 18 Mar 2016 22:46:11 +0000 (15:46 -0700)]
tuning: thrones

This was sitting around for several years.  When positive luck
lessens a negative effect from sitting on a throne, reduce luck so
that repeated occurances will eventually get the intended result.

8 years agofix #H4274 - monster growing up changes gender
PatR [Wed, 16 Mar 2016 22:03:37 +0000 (15:03 -0700)]
fix #H4274 - monster growing up changes gender

Most of the humanoid species have Lords and several have Kings,
but none of them have Ladies or Queens.  When a female grows up
to reach that level of monster, she changes into male.  This fix
gives an alternate message acknowledging that change rather than
prevent taking on the stronger form.  A better fix would be to
add ogre ladies and dwarf queens as separate monsters, but doing
so will break 3.6.0 save file compatibility.

(I started out with an alternate fix, adding mons[].fname for the
dozen or so creatures which warrant an alternate name for females.
But that requires statues, figurines, corpses, tins, and maybe
even eggs to track gender [some statues already do, and corpses
and statues with attached mtraits also implicitly do] and to not
stack with equivalent ones of the opposite gender.  Plus glyphs
to track them, and new tiles.  It was becoming too complicated
for such a relatively unimportant feature.  Separate monsters is
the way to go, deferred until save file format changes again.)

8 years agofix #H4275 - blinded, stunned, confused timers
PatR [Tue, 15 Mar 2016 08:00:36 +0000 (01:00 -0700)]
fix #H4275 - blinded, stunned, confused timers

Blindness due to face covered by pie was ignored for several cases
of magically curing blindness--cleaning the face seems better than
adjusting timeout to account for u.ucreamed for those cases.  A few
instances of taking stun or confusion damage overrode existing stun
or confusion rather than increasing it.  Plus a copy/paste mistake
for dual stun+confusion when casting an expired spell.

There was also a suggestion that vomiting when already nauseated
should decrement the timer instead of increasing it.  But there is a
negative effect for as long as it's in effect, so I left that as is.

8 years agomonster sanity checking
PatR [Mon, 14 Mar 2016 22:42:03 +0000 (15:42 -0700)]
monster sanity checking

Add some more checks for monsters when the sanity_check option
is enabled.

8 years agomonst.h formatting
PatR [Mon, 14 Mar 2016 22:39:18 +0000 (15:39 -0700)]
monst.h formatting

Clean up the formatting in monst.h.  Provoked by the M_AP_NOTHING
absurdity.

8 years agosortloot fixes
PatR [Mon, 14 Mar 2016 22:32:17 +0000 (15:32 -0700)]
sortloot fixes

Fix some typos in the sort-by-invlet code and a logic error in the
lately added subclass sorting for sort-by-pack.  Regular inventory
display only works correctly for the latter if invlet is the tie-
breaker within object classes.  When helmet/gloves/boots/&c and
ammo/launcher/missile/&c sub-categories already break ties for armor
and weapon classes, inventory ended up out of alphabetical order.

8 years agolooting gold
PatR [Mon, 14 Mar 2016 00:45:18 +0000 (17:45 -0700)]
looting gold

When removing items from a container via menu, list gold as '$'
instead of 'a' when it is the first item.  Requested during beta
testing last year....

When gold isn't first ('sortpack' false, or custom 'inv_order[]'),
it uses the next letter in sequence instead of '$', otherwise it
would be the only item out of sequence.

8 years ago'sortloot' revamp
PatR [Sun, 13 Mar 2016 23:23:38 +0000 (16:23 -0700)]
'sortloot' revamp

Change the sortloot option to use qsort() instead of naive insertion
sort.  After sorting, it reorders the linked list into the sorted
order, so might have some subtle change(s) in behavior since that
wasn't done before.

pickup.c includes some formatting cleanup.

modified:
  include/extern.h, hack.h, obj.h
  src/do.c, do_wear.c, end.c, invent.c, pickup.c

8 years ago^G enhancement
PatR [Fri, 11 Mar 2016 01:50:09 +0000 (17:50 -0800)]
^G enhancement

Accept "male" or "female" when specifying monster type for ^G.
Groundwork for testing and hopefully eventually fixing "female
gnome" grows up into "gnome lord" and becomes male.

8 years agofix #H4272 - "you turn into a Elvenking"
PatR [Thu, 10 Mar 2016 01:15:32 +0000 (17:15 -0800)]
fix #H4272 - "you turn into a Elvenking"

Polyself with gender change into a creature with fixed gender
would deliver a message containing "a <creature>" regardless of
whether "an" was warranted.

(Into any creature which supports both genders it yielded
"a male <creature>" or "a female <creature>" so "an" was never
needed.  And when no gender change was involved, it used an()
so got "a <creature>" or "an <creature>" as applicable.)

8 years agofix #H4057 - rusting amulets
PatR [Thu, 10 Mar 2016 00:37:43 +0000 (16:37 -0800)]
fix #H4057 - rusting amulets

There have been two or three reports on getting feedback about
amulets rusting.  Object formatting doesn't display erosion for
them, so being told about damage then not seeing that damage
feels like a bug.  Even if damage was displayed, it has no effect
on them so would still feel somewhat strange.  It does display
erosion for wands and rings, which is strange too.

This limits erosion damage--and its feedback--to items which are
actually impacted by erosion:  armor, weapons and weapon-tools;
also heavy iron balls and iron chains since they've traditionally
shown rust even though it has little effect.

A side-effect of this change is that flammable items (other than
armor and weapons) which don't burn up immediately will no longer
become burnt, then very burnt, thorougly burnt, and finally be
destroyed.  Since the player couldn't see or possibly repair the
erosion state, it seemed incomplete.  It could be reinstated by
making other flammable items be subject to erosion and displayed
as such by xname() & co.

Wishing now avoids applying erosion and erosion-proofing to items
that aren't affected by it, regardless of material.  It also now
allows wishing for "rusty rustproof <iron-object>" which used to
suppress "rusty" in that combination and triggered a couple of
old bug reports.

Heavy iron balls and iron chains can have rust repaired and can
be made rustproof by wielding, then reading enchant weapon while
confused, as if they were weapons.

8 years agofix #H4062, pt 2 - zaps at edge on Plane of Air
PatR [Wed, 9 Mar 2016 00:22:05 +0000 (16:22 -0800)]
fix #H4062, pt 2 - zaps at edge on Plane of Air

Pt 1 was about the wrong message delivered when a high priest
rejects being given a name by the player, and was fixed weeks ago.
Pt 2 is about zaps on the Elemental Plane of Air which reach the
edge of the map not having their temporary display effect removed
after "the <zap> vanishes in the aether".  There was a 'goto' in
use which bypassed the tmp_at(DISP_END) call.  I guess Dijkstra
earns an "I told you so" here.

8 years agouse_containers() comments
PatR [Tue, 8 Mar 2016 01:35:52 +0000 (17:35 -0800)]
use_containers() comments

Catch the comments up with the 'loot many containers' fix.

8 years agofix bz238 - looting many containers
PatR [Tue, 8 Mar 2016 00:38:05 +0000 (16:38 -0800)]
fix bz238 - looting many containers

"Looting many containers via menu cannot be stopped".  When the
player uses #loot command at a location with multiple containers,
a menu of which ones to loot is presented and player can pick any
or all of them.  But if you terminate the looting of a particular
container with ESC, it goes on to the next selected one rather than
stopping the loot action because that's what the 'q' choice does.

The simplest fix would be to allow choosing only one container
from the "loot which?" menu, but this retains the ability to loot
multiple containers on a pile in one turn.  It makes looting
stoppable by extending the ":iobrsq or ?" prompt, adding 'n' for
"next container" and changing 'q' from "done with this container"
to "done looting" (with ESC still a synonym for 'q').  When just
one container is being looted, or when on the last of N containers,
'n' is not shown but is still accepted (and treated as 'q').

Also, use_container() was using a menu for ":iobrsq" if player had
menustyle set to Full when it was intended to be for Partial (name
confusion...).  This switches Partial to use menu for loot action,
and leaves Full with that since that's how 3.6.0 has been behaving.
Traditional and Combination use the prompt string and single char
response.

8 years agofix post-3.6.0 shopkeeper message when deaf
nhmall [Mon, 7 Mar 2016 23:21:25 +0000 (18:21 -0500)]
fix post-3.6.0 shopkeeper message when deaf

8 years agocut and paste error
nhmall [Mon, 7 Mar 2016 13:46:57 +0000 (08:46 -0500)]
cut and paste error

8 years agoadd giftiles.c to Files
nhmall [Mon, 7 Mar 2016 13:41:39 +0000 (08:41 -0500)]
add giftiles.c to Files

8 years agogiftiles.c
nhmall [Mon, 7 Mar 2016 13:40:03 +0000 (08:40 -0500)]
giftiles.c

8 years agomissed a file MSDOS
nhmall [Mon, 7 Mar 2016 13:36:24 +0000 (08:36 -0500)]
missed a file MSDOS

8 years agomore bz130 - muse of horns
PatR [Sun, 6 Mar 2016 09:02:18 +0000 (01:02 -0800)]
more bz130 - muse of horns

The bug report was actually about letting monsters use fire horns
without checking whether they could actually use wind instruments.
The previous fix probably handled most cases by excluding animals
and mindless creatures, but this is a more specific fix for MUSE
of fire and frost horns--they must pass the same test as the hero
and it's not limited to stopping being turned into slime.

8 years agofix bz130 - muse: sliming and fire horns
PatR [Sun, 6 Mar 2016 03:57:25 +0000 (19:57 -0800)]
fix bz130 - muse: sliming and fire horns

There was no check for being capable of using items when an attempt
to cure being turned into green slime picked scroll, wand, or horn
of fire.

Also, implement a 'TODO' in the same section of code.  Monsters
can enter fire traps to cure themselves from slime.  I made that
be for monsters smart enough to use items too, even though there's
no actual item involved.

8 years agoAnother file for support of Ray Chason's patch
nhmall [Sat, 5 Mar 2016 20:38:44 +0000 (15:38 -0500)]
Another file for support of Ray Chason's patch

8 years agosome of Ray Chason's MSDOS and other fixes
nhmall [Sat, 5 Mar 2016 19:44:50 +0000 (14:44 -0500)]
some of Ray Chason's MSDOS and other fixes

8 years agoX11 extcmd_height_delta resourse
PatR [Fri, 4 Mar 2016 08:13:23 +0000 (00:13 -0800)]
X11 extcmd_height_delta resourse

Umpteenth revision of the X11 extended command menu.  Add a new
resource to NetHack.ad to control its initial size.

I still hope there's a better way to do this, but this is my last
shot at it.

8 years agofix #H4262 - mon weapon attacks for non-weapon dmg
PatR [Thu, 3 Mar 2016 08:07:57 +0000 (00:07 -0800)]
fix #H4262 - mon weapon attacks for non-weapon dmg

Let monsters who have a weapon attack for non-physical damage dish
out physical damage instead of doing the drain life or drain
strength they usually do if they happen to be wielding cockatrice
corpses or a couple of particular aritfacts that do more harm
than just level drain.  (Other artifacts are candidates, but I
don't think it's worth checking for them since the monsters
involved have such a small chance of acquiring and wielding them.)
Also switch to physical if monster's ability has been cancelled.

Only barrow wight, Nazgul, and erinys are affected.  Yeenoghu and
the Master Assassin have a weapon attack for physical damage and
another one for non-physical damage (not necessarily delivered in
that order).  They haven't been changed--only the physical damage
attack has a chance to apply their weapon's special damage.

8 years agomonmove.c tweaks
PatR [Wed, 2 Mar 2016 23:01:21 +0000 (15:01 -0800)]
monmove.c tweaks

While looking at #H4265 ("Bug - Monsters opening doors" about
feedback naming the unseen monster who opened a door), I didn't
find the the problem.  But I did notice a couple of suspicious
constructs.  Fix an assignment that gave a boolean variable a
value of 16, and add parentheses around 'a & b' in (a & b && c).
The latter isn't incorrect, it just looks strange.

8 years agoaddress #H4266 - build problem with clang Modules
PatR [Wed, 2 Mar 2016 08:37:56 +0000 (00:37 -0800)]
address #H4266 - build problem with clang Modules

Report states that using OSX Xcode IDE results in use of 'clang
Modules', whatever those are, and role.c's 'filter' struct ends up
conflicting with a function declared by <curses.h> (or possibly
<ncurses.h> since one includes the other).  src/role.c does not
include <curses.h>, so this smacks of the problems caused by using
precompiled headers on pre-OSX Mac.

Instead of trying to import nethack into Xcode, I temporarily
inserted '#include <curses.h>' at the end of unixconf.h.  gcc did
complain about 'filter' in role.c (but not in invent.c, despite
-Wshadow), and then complained about termcap.c using TRUE when it
wasn't defined (after in had been #undef'd, where there's a comment
stating that it won't be used in the rest of that file), and also
complained about static function winch() in wintty.c conflicting
with external winch() in curses.

This renames 'filter' and 'winch()' to things that won't conflict.
Also, our winch() is a signal handler but had the wrong signature
for one.  And the troublesome use of TRUE was in code that was
supposed to be dealing with int rather than boolean.

8 years agotribute typo
PatR [Tue, 1 Mar 2016 01:18:37 +0000 (17:18 -0800)]
tribute typo

8 years agofix #H4219 - renegade Angel banter
PatR [Mon, 29 Feb 2016 02:47:01 +0000 (18:47 -0800)]
fix #H4219 - renegade Angel banter

Lawful angels deliver taunt messages from a pool of messages which
might mention the lawful god; demons and non-lawful angels draw from
another pool which doesn't mention any gods.  Since it is odd for a
'renegade' angel to claim to be operating for its god, choose taunts
from the other pool of messages for renegade lawful angels.

Not related:  some formatting fixups in include/mextra.h.

8 years agomonk vs shuriken
PatR [Mon, 29 Feb 2016 01:42:12 +0000 (17:42 -0800)]
monk vs shuriken

One entry among many in #H4216:  make shuriken be a pre-discovered
item for monk role.  The word "shuriken" comes from Japanese and
martial-arts monk is primarily Chinese, but shuriken/throwing-star
is a martial-arts type of weapon and monks get a multi-shot bonus
for it (even though they can't advance its skill beyond basic...).

8 years agoaddress #H4247 & #4248 - theft of quest artifact
PatR [Sun, 28 Feb 2016 00:23:24 +0000 (16:23 -0800)]
address #H4247 & #4248 - theft of quest artifact

Two different reports complaining that having the Wizard steal the
hero's quest artifact is a bad thing.  This doesn't change that,
but it does make all quest artifacts become equal targets so that
wishing for other roles' artifacts doesn't offer such a safe way to
have whichever special attributes they provide.

Quest artifacts are actually higher priority targets for theft than
the Amulet.  I suspect that probably wasn't originally intended,
but I left things that way.  Taking quest artifacts leaves the hero
more vulnerable to future thefts, and once they're gone the Amulet
has priority over the invocation tools.

8 years agocloak rumor
nhmall [Sat, 27 Feb 2016 13:08:56 +0000 (08:08 -0500)]
cloak rumor

H4243 bz 353
This just makes the rumor wording sound a bit less absolute than it did.

8 years agosegment feedback when probing long worms
PatR [Fri, 26 Feb 2016 23:16:49 +0000 (15:16 -0800)]
segment feedback when probing long worms

When using a stethoscope or wand of probing on a long worm, report
the number of segments it has in the feedback given.

Some of the extra bhitpos and/or notonhead assigments may not be
necessary.  They were added when I was trying to figure out the
question of why probing of a tail segment revealed a long worm's
inventory even though the code explicitly prevents that.  (Answer:
it didn't; I had misinterpreted bz 12 to think that that was what
was being reported.  You need to use wand of probing--or "insigtful"
Magicbane hit--on the head in order to see its inventory or be told
"not carrying anything".)

8 years agofix bz 12 - long worm inventory feedback
PatR [Fri, 26 Feb 2016 22:37:07 +0000 (14:37 -0800)]
fix bz 12 - long worm inventory feedback

I initially misunderstood this bug report about a nymph who was
polymorphed into a long worm while carrying a cursed figurine.
It wasn't about a long worm having inventory or about probing of
the worm's tail revealing that it had inventory, it was about the
message given when the cursed figurine activated itself.  If that
happened while the head was out of view but at least one tail
segment was visible, the message about the new monster emerging
from the long worm's backpack implied that that pack was carried
by the tail segment.

Only give the emerge-from-backpack message when the worm's head
is visible.  Likewise if a carried egg hatches.

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