Commit Graph

2656 Commits

Author SHA1 Message Date
PatR
e0bf7a01cc nethack.sh: test -e vs test -f
Change the test for whether fonts.dir exists (added to the script
in 3.6.0, for automatically setting up possible use of the NH10 font
under X11) from 'test -e file' to 'test -f file' since the latter
seems to be more universally available.  When present, fonts.dir is
plain text, so a test for "exists and is a regular file" rather than
one for general existance is appropriate.
2019-03-12 14:11:26 -07:00
PatR
8e7fe38dae avoid crash for X11 tombstone
If nethack is built to use graphical tombstone but file rip.xpm is
missing from the playground, there would be a crash if the rip output
was shown.  My first attempt to fix it prevented the crash but didn't
display any tombstone, just the last couple of lines of output which
follow the tombstone.  This keeps that in case of some other Xpm
failure, but checks for rip.xpm via stdio and reverts to genl_outrip
for text tombstone if it can't be opened.
2019-03-12 13:31:00 -07:00
PatR
683226c3c5 curses vs extended commands
Extend the earlier support for Delete/Rubout in getline() to the
text entry for extended commands.  In other words, treat <delete>
and <backspace> as synonyms in both places.

Some reformatting too, but only in a couple of the files.
2019-03-10 14:53:31 -07:00
PatR
8728de2a0a fix #H8330 - kicking obj stack uses wrong weight
Kicking a stack splits off one item (except for gold coins) and
propels it, but the range for how far it would move was calculated
before the split using the entire stack's weight.  So a large stack of
small items might fail with "thump" (which the report suggested hurt
the hero, but it doesn't) and none of the stack would move.  Splitting
sooner looked complicated because of several potential early returns
between the range calculation and the eventual kick, so this hacks the
stack's quantity to get the intended weight instead.
2019-03-06 16:59:39 -08:00
PatR
e2b6cf4066 fix #H8319 - hero-owned container used inside shop
showed non-empty containers in inventory (including the one being
applied) with a 'for sale' suffix during put-in operations, as if the
shop was trying to sell it to the hero.  Amount shown was cumulative
value of its contents.  (Using /menustyle:T doesn't show the container
being applied so this wasn't visible with it unless other non-empty
containers were being carried.)

Two or three fix attempts solved one problem but introduced another.
This one seems to finally get things right but considering that there
was trial and error along the way, my confidence isn't great.
2019-03-04 14:40:01 -08:00
PatR
b211c1b832 fix #H8310 - riding a saddled tripe ration
If steed ate a mimic corpse and started mimicking an object or dungeon
furniture, the hero was able to keep riding.  Force a dismount when
that happens, even if steed takes on monster shape rather than object
or furniture.  After that, #ride to remount non-monster will fail
unless using wizard mode's "force mount to succeed" action, in which
case steed's eating finishes immediately and it returns to normal.

This doesn't address the older report that mounted hero can continue
to move around while the steed is eating.
2019-03-01 18:32:41 -08:00
PatR
23ea5b07fe Guidebook update
number_pad got removed from Guidebook.tex when mouse_support was added
by cc0e7a8750fd4e07d3a44592c38f5912d4e603de; put it back.  Evidently
a cut-and-paste mishap when copy-and-paste was intended, probably
provoked by '\numbox{}'.

Remove \numbox{} from mouse_support; it isn't needed there since the
choices aren't trying to line up with '-1'.

Both Guidebook.mn and Guidebook.tex:

Remove number_pad's "for backward compatibility" from mouse_support
since the latter is brand new.

New petattr list of uppercase letters seemed intrusive when rendered
with a bold font, so switch to lowercase.  (Option processing already
supports either case.)

Mention the '=' prefix for hilite_status 'absolute' threshold.

[As usual, the Guidebook.tex changes haven't been tested.]
2019-03-01 17:09:54 -08:00
PatR
7664d604da fix #H8297 - healer vs undead turning
Report forwarded from spam filter so not included in bugzilla list.
Make corpse revival feedback be more consistent.  Some of the healer-
specific flavor is still there.
2019-02-28 15:12:12 -08:00
PatR
eb1514da15 document curses options
Add curses options to the Guidebook.

The TeX one hasn't been tested (particularly "term_cols and\nterm_rows")
and windowborders #3).
2019-02-27 16:04:51 -08:00
nhmall
be3092bed4 some fish should lay their eggs in the water rather than on land
Generally, fish should lay their eggs in the water and
not on land, but the game was only allowing the opposite.

Eels are catadromous and lay their eggs in the Sargasso Sea,
not in the dungeon.
2019-02-26 19:49:24 -05:00
PatR
5a432d0c97 toggling persistent inventory window
Something else noticed while testing #H8271:  toggling perm_invent on
with 'O' didn't show anything (at least with curses) until some later
action caused it to be updated.  Make updating persistent inventory be
included with full redraw and set the need_redraw flag when toggling
perm_invent.
2019-02-25 15:48:29 -08:00
PatR
4df491e47d more wearing armor vs perm_invent window
Realized while fixing #H8271:  if persistent inventory got an update
while wearing or taking off was in progress (not within user's control
since hero is busy) the item in question was flagged as "(being worn)"
even though it wouldn't be worn if putting on got interrupted.  Update
doname() to show "(being donned)" or "(being doffed)" instead of
"(being worn)" when corresponding operation is in progress. (During
testing, I was able to observe "being doffed" but never managed to see
"being donned".)
2019-02-25 15:44:21 -08:00
PatR
2b2106743e fix #H8271 - wearing armor vs perm_invent window
A relatively recent change moved 'obj->known = 1' when wearing armor
from before setworn(), which issues an update_inventory() call, to
afterwards.  There wasn't any particular update then, so observing
the enchantment of armor by wearing it wasn't being reflected in the
persistent inventory window if that was enabled.
2019-02-25 15:33:43 -08:00
keni
1825f51c4f Minor Guidebook.{tex,mn} wording and typos. UR macro. 2019-02-22 20:00:14 -05:00
PatR
e0db41572a more bz 1604 - re-do vs autoquiver
Take another crack at describing yesterday's do-again fix.  Having
'autoquiver' enabled wasn't necessary to encounter the problem.
Also, 'in_doagain' is an int rather than a boolean.
2019-02-22 12:54:39 -08:00
nhw_cron
c162850c7d This is cron-daily v1-Feb-22-2019. guidebook updated: doc/Guidebook.txt 2019-02-22 08:26:44 -05:00
PatR
2579a3dcbb fix #H8237 - corpse on an invalid trap
It's possible to get a rolling boulder trap which doesn't have any
boulder.  That isn't invalid, but if/when it happens on a shallow
level it shouldn't be covered by the corpse of a fake adventurer
since such a trap won't kill anyone.
2019-02-21 17:53:19 -08:00
PatR
9c4a6afe46 fix bz 1604 - re-do vs autoquiver
One-line fix is much shorter than attempting to describe the problem.
^A could misuse previous input if 'f'<direction> needed to fill the
quiver and there was nothing suitable, so that the sequence became
'f'<what to throw>.  If previous <direction> was an inventory letter
that was occupied, and the item it that slot wasn't already worn in
some other slot, it would be put in quiver slot.  Then player would
be asked for direction rather than immediately throwing it since the
what-to-throw prompt had just used up the last of the ^A queue.

Miscellaneous formatting included....
2019-02-21 13:28:18 -08:00
PatR
8b08378bf7 DECgraphics vs eight_bit_tty
The fuzzer likes to set options randomly; the combination of
DECgraphics symbol set (on a display capable of rendering it) plus
eight_bit_tty produces a bizarre map display.  Make DECgraphics
override eight_bit_tty rather than the other way around.
2019-02-19 18:25:02 -08:00
PatR
b516b5fd9e more #H8215 - monster instrinsics 2019-02-18 15:24:02 -08:00
PatR
a41d63d146 fix #H8183 - leather jacket doesn't show AC
Leather jacket doesn't take multiple turns to wear, so wearing it
wasn't calling Armor_on() and recently moved 'uarm->known = 1' didn't
get executed.  Not reported yet but had the same issue:  fedora and
dented pot wouldn't call Helmet_on().
2019-02-12 15:40:05 -08:00
PatR
1a8a774719 Guidebook tweak - options parsing 2019-02-11 16:30:46 -08:00
nhmall
684fee0f64 typo 2019-02-11 14:35:25 -05:00
nhmall
fb5e6a7bb3 arrange platform/interface fixes alphabetically by platform in fixes36.2 2019-02-11 12:23:00 -05:00
PatR
f3e7f49714 fix #H8167 - shopkeeper message after ending game
Closing nethack's window sets 'program_state.stopprint' to inhibit
disclosure interaction, but shopkeeper claiming hero's stuff or vault
guard claiming hero's gold didn't honor that and just issued normal
pline messages.  For win32, they got delivered in a popup even though
nethack's window had gone away.

Make those two end-of-game situations honor 'program_state.stopprint'.
[Fix not tested on win32...]
2019-02-10 17:45:26 -08:00
nhmall
6675055920 Guidebook date update 2019-02-10 19:02:06 -05:00
nhmall
44b6808580 Guidebook consistency improvement 2019-02-10 18:48:50 -05:00
PatR
da1212077d isaac64 on vms
Not tested yet...
2019-02-10 13:54:16 -08:00
PatR
128d1628a9 fix #H8124 - interrupted donning gives player info
about the armor.  Wearing armor sets obj->known, making its enchantment
be shown when it gets formatted, because the AC value on the status line
lets the player deduce what that is.  It was being set at the beginning
of the wear operation.  If the armor got stolen before it became fully
worn, the enchantment was still shown.  Defer that until the end of the
operation.  An attentive player can still deduce the enchantment if the
item is stolen (because its protection starts immediately) but the hero
won't learn that enchantment unless the donning completes.

This might be suboptimal but it isn't qualitatively different from
watching a pet walk/not-walk over items whose bless/curse state isn't
known or dropping unidentified items in a shop to check their price.
The player can deduce something that the hero doesn't know yet.
2019-02-09 16:07:18 -08:00
PatR
e991dd1b0c curses: getline vs DEL, ESC
Support <delete> (aka <rubout>) during getline().  It doesn't actually
honor the current erase_char value set up for the terminal, just
treats DEL the same as ^H.  (The previous lack of support had nothing
to do with terminfo specifying ^H; the handling is hard-coded.)

tty treats escape while there's already some input as kill_char (erase
the input but get more from scratch) and returns ESC if there isn't.
curses was doing the first half but not the second, so not providing
any way to communicate "cancel" back to the core.  Fix is simple.

Other getline() bug fixes:
1] there was a wprintw("%*something") which was passing the value from
strlen (type 'size_t') to the "%*" argument (type 'int').  That's
always wrong (size_t is guaranteed to be unsigned) and could be severe
(if size_t is different width than int--as on current OSX systems--
depending upon the internals of argument passing).
2] strncpy() only supplies a terminating '\0' if the input is shorter
than the number of characters specified.

A lot of reformatting is warranted but I only did the getline routine
(manually, so might have missed stuff).
2019-02-08 14:54:40 -08:00
PatR
19d737951e curses: change from malloc() to nethack's alloc()
There was no provision for malloc() potentially returning Null and it
wasn't integrated with nethack's MONITOR_HEAP.  'heaputil' shows that
the curses interface is leaking like a sieve.  If some things are
actually being allocated separately and then freed from within curses,
those need to be thoroughly documented and maybe switched back to
malloc().
2019-02-07 16:48:37 -08:00
PatR
b1de94f922 custompline(SUPPRESS_HISTORY,...) for curses
The curses interface already has a hack to keep 'Count: 12', 'Count:
123' intermediate multi-digit counts out of its message recall history
for ^P, but it was flushing real messages when getpos()'s 'autodescribe'
reported what the cursor moved over.  Overload the count hack to support
 putstr(WIN_MESSAGE, ATR_NOHISTORY, text)
(which is what custompline(SUPPRESS_HISTORY, ...) eventually calls).

The conditional logic for when to create the 'count_window' was pretty
convoluted.  This simplification has the same semantics but I don't
have PDCURSES to actually verify that.
2019-02-07 16:04:24 -08:00
PatR
423cf77a37 more message history
Noticed while investigating the issue with DECgraphics characters in
msg_window:full/combination/reverse output for tty which got fixed
by the previous commit.  There was a discrepancy in DUMPLOG because
the pager code bypasses pline() in order to use putmixed().  tty
puts strings from the latter into ^P recall history (although they'll
only render correctly if nothing after the first character needs
special handling), but nothing was putting that same info into
DUMPLOG.  This fix is pretty clumsy but eliminates the discrepancy.
2019-02-04 18:40:55 -08:00
PatR
a8a187f89b tty ^P recall for dolook/whatis feedback
Noticed while testing the history suppression:  if you have DECgraphics
enabled and look at a graphics character on the map, the topline shows
x      description of x
where 'x' is displayed as it appears on the map (line drawing char).
^P for msg_window:single knows about that and reproduces the effect if
you recall such a line.  But msg_window:full/combination/reverse didn't
know about that and dumped it as-is into text output, ending up with a
strange 8-bit character for 'x' instead of the line drawing one.

I think other rendering schemes will be unaffected by this.  It's just
duplicating what is done for msg_window:single.
2019-02-04 18:24:17 -08:00
nhmall
2b6b4c0833 fixes entry for amiga fix
Also, a pull request 175 showed up after the earlier commit for the missing
continuation lines, so mark the pull request as closed.

closes #175
2019-02-04 20:27:18 -05:00
PatR
18cea92a59 tty ^P fixes entry
Left this out of previous commit.
2019-02-04 16:52:37 -08:00
PatR
7cc718ea0e fix #H7173 / github #101 - vault exit
Fixes #101

If you tell the vault guard your name, drop carried gold, wait one
turn, then pick up the gold again, the guard will move a step away
during the wait.  If you teleport away, the guard will seal vault
walls and then park himself on the one-square (so far) temporary
corridor adjacent to the vault wall.  Periodically he'll say "Move
along!" and the hero will hear it, regardless of location on the
level.  Unless you dig a corridor to rescue him, or one or more of
the vault's walls get breached again, he will never move.

The report emphasized that you could use this to steal the vault's
gold, but it relies on being able to teleport beyond the gaurd's
reach and if you can do that, you might as well do so before the
guard comes.  The stranded guard, and him saying "Move along!" when
no longer leading hero out of the vault, are more significant bugs.

Bonus fix:  if the game ends and the guard seals up the vault while
the hero is in a spot that gets fixed up (vault wall or temporary
corridor) don't give the "You are encased in the rock" message if
game end was due to death rather than quit.
2019-02-02 17:37:06 -08:00
PatR
b43b3f617c object classes for wizard mode identify
When ^I was changed to allow picking more than one item to make
its temporary identification become persistent, group accelators got
left out.  So to pick all potions, you needed to select them letter
by letter (or via '.' to select everything, then deselect non-potions
letter by letter).  Now you can use '!' to select all potions.
2019-02-01 18:40:45 -08:00
PatR
6daa6e2de9 curing deafness
Make healing magic which cures blindness also cure deafness.  So,
drinking non-cursed potion of healing or any extra healing or full
healing; breathing fumes from blessed potion of healing or non-cursed
potion of extra healing or any potion of full healing; prayer reward
to cure blindness as a minor trouble.  (Doesn't affect unicorn horns
which already treat deafness and blindness as two distinct troubles
that are eligible to be cured.)

More of a missing feature than a bug fix, so I listed it in the new
features section of the fixes file.
2019-02-01 18:24:23 -08:00
PatR
8bf16b940e stale lock picking context
Lock context wasn't being cleared if it was for a container and that
container got destroyed.  Case discovered was forcelock() ->
breakchestlock() -> delobj() (sometimes the container is destroyed
rather than just breaking its lock) followed by #wizmakemap (replace
current level) and maybe_reset_pick() trying to check whether
xlock.box was being carried.  But being interrupted, destroying the
container or dropping it down a hole to ship it to another level, then
attempting to resume picking the lock would also find a stale pointer.
2019-01-31 15:50:12 -08:00
PatR
48e7643739 fix monstone() ... dealloc_obj() panic
Fuzzer feebdack.  When turning a monster into a statue, monstone()
builds a linked list of mon->minvent items to put into that statue.
It doesn't use obj_extract_self() to take them off again, leaving
obj->nobj non-Null.  Not noticed for the normal case where each item
gets linked into the container's contents, but triggers panic if an
item merges with something already put inside so gets removed.

Suddenly, the dungeon collapses.
dealloc_obj with nobj
[2] 0x01000c4193 panic + 995
[3] 0x0100155427 dealloc_obj + 71
[4] 0x010021d4de obfree + 686
[5] 0x01000f2f92 merged + 834
[6] 0x010015356e add_to_container + 126
[7] 0x01001628ac monstone + 636

I don't know why the petrified monster's mergeable inventory wasn't
already merged while in inventory.
2019-01-31 04:22:04 -08:00
nhmall
af42273b02 fixes36.2 update for added isaac64 prng 2019-01-29 07:38:57 -05:00
PatR
30237c73ec fix #H8072 - failing wish segfaults
Having an artifact wish be refused uses zeroobj and code which
followed was attempting to update its weight, triggering a segfault
now that zeroobj is 'const'.
2019-01-28 09:10:52 -08:00
nhmall
1083971228 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2019-01-27 19:22:28 -05:00
nhmall
f57693a47e simplify and correctly locate fixes entry 2019-01-27 19:16:55 -05:00
PatR
23fba68012 Wine Cellar tweak
User-contributed fix; bypassed the contact form so no #Hnnnn number.

On the Gnome King's Wine Cellar version of Mines' End, a couple of
wall stubs in the lower far right were diggable, unlike all other
walls on the level.  One single-spot wall stub was leftmost of three
undiggable spots, wall+floor+stone.  The floor spot wasn't noticeably
different from normal (not sure whether digging a pit was prohibited)
but the stone one was.
2019-01-27 15:28:31 -08:00
nhmall
55fdfb9200 domove_core() out of domove(); assess domove_core() results
new domove_core() assessment results

potentially smudge engravings

Proceed to wipe engraving after domove_core() now, but only under
all of the following conditions:
    - you can reach the floor
    - preceding domove_core() move attempt was marked as
      having succeeded in domove_core()
    - there is actually an engraving there to impact at
      your original spot, or your new spot, or both
2019-01-27 11:55:23 -05:00
PatR
deed117e7f fix #H6422 - hmonas against shades
I did much of this quite some time ago, as prequisite for a different
bug report about monsters vs shades, then set it aside.  It ended up
being more complicated than I anticipated.

When deciding whether various non-weapon attacks might hit a shade,
hmonas() was not checking for blessed or silver armor that should have
been applicable.  It did check boots when kicking, but not gloves or
rings (when no gloves) when touching, or outermost of cloak/suit/shirt
when hugging, or helmet when head-butting.  (The last one is actually
moot because nothing with a head-butt attack is able to wear a helm.)

The problem was more general than just whether attacks might hit and
hurt shades.  Various undead and/or demons are also affected by blessed
and/or silver attack but weren't for non-weapon attacks by poly'd hero.

At least two unrelated bugs are fixed:  a rope golem's AT_HUGS attack
gives feedback about choking but was fully effective against monsters
which fail the can_be_strangled() test.  And it was possible to hug a
long worm's tail, rendering the entire worm immobile.

The report also suggested that all artifacts be able to hit shades for
full effect, but by the time shades are encountered everyone has an
artifact so that would nullify a shade's most interesting ability.

TODO:  monster against hero and monster against other monster need to
have similar changes.
2019-01-22 18:15:49 -08:00
PatR
d0cc645961 vampshifter resurrection while being held
If poly'd hero is holding a bat/cloud/wolf which dies and revives as a
vampire, release the hold.
2019-01-22 17:54:58 -08:00
Pasi Kallinen
77bc07f579 Make demon gating show a message
This was both an accessibility and comprehensibility issue.
2019-01-20 15:56:44 +02:00