PatR [Tue, 28 May 2019 08:52:37 +0000 (01:52 -0700)]
curses message window
Fix a 'FIXME': don't follow a message with two spaces in anticipation
of combining with the next one, precede the next one with two spaces
when they're being combined. Keeps nethack's message window <mx,my>
coordinates in sync with curses' internal coordinates.
PatR [Mon, 27 May 2019 01:44:25 +0000 (18:44 -0700)]
end of game oddities: thrownobj, ball&chain
If you died while Punished but with attached ball and chain temporarily
off the map (changing levels and when swallowed are the cases I looked
at; there may be others), the ball and chain objects would not appear
in bones (for the falling-down-stairs case; bones are never saved if
hero dies while swallowed) and they weren't being freed. Put them
back on the map so that they'll be included in bones and also freed as
part of normal map cleanup.
This caused a problem if the attached ball had state OBJ_FREE due to
being thrown rather than being temporarily off the map. 'thrownobj'
was being deallocated without first cancelling punishment, so uball
object was freed via thrownobj pointer but stale uball pointer still
referenced it. Unpunishing would introduce sequencing issues because
that would need to be after attribute disclosure. So instead of
deallocating thrown or kicked object, put it/them (can't actually have
both at the same time) back on the map. This has a side-effect of
saving thrown Mjollnir in bones if it kills hero when failing to be
caught upon return. (I thought that that had been fixed ages ago?)
PatR [Sun, 26 May 2019 07:40:40 +0000 (00:40 -0700)]
free level.bonesinfo
Bones information for the current level was freed during save but not
at end of game. Have freedynamicdata() call savelev(,,FREE_SAVE) to
throw away current level instead of trying to duplicate the actions
that performs.
PatR [Sun, 26 May 2019 06:43:42 +0000 (23:43 -0700)]
free overview->final_resting_place
The #overview command can provide some feedback about levels loaded
from bones files; that data wasn't being released at end of game.
(There are two copies of that data, one set always in memory with
the overview data [final_resting_place field in the 'mapseen' data],
and another set with portions attached to each relevant level [via
level.bonesinfo]. Neither set was being properly freed; this only
addresses one of them, so far. The per-level data can probably be
eliminated--for post-3.6--since DUNGEON_OVERVIEW isn't a conditional
feature as it was when that was implemented.)
Pasi Kallinen [Sat, 25 May 2019 16:15:53 +0000 (19:15 +0300)]
Make sure the correct luckstone is the prize
The first generated luckstone is marked as the prize in mines' end.
Make sure we generate the intended one first, before any other
(possibly randomly generated) luckstones.
nhmall [Sat, 25 May 2019 15:58:32 +0000 (11:58 -0400)]
do not mark multiple luckstones as the prize in mines-end
if one of the random objects happened to be a luckstone then
it and the explicit one got marked as a prize.
Following this change, only one will be marked as the prize,
but a follow-up on the order of things in mines.des may be
warranted to ensure it is the explicitly placed luckstone.
PatR [Sat, 25 May 2019 14:37:08 +0000 (07:37 -0700)]
curses memory leak
Back in February, my e991dd1b0c4192495c7e9092c10fa83bb6d81a24 added
ESC (when there's no input) as an early return for curses' getline,
but it neglected to clean up some allocated memory.
PatR [Fri, 24 May 2019 01:56:20 +0000 (18:56 -0700)]
curses message window refresh
Sometimes curses tears down and recreates all its windows (when the
display is resized, for instance) and after doing that it repopulates
the message window with data saved for use by ^P. But it was showing
the oldest messages available rather than the most recent ones.
There is still room for improvement. That process combines short
messages but the refresh is based on the available number of lines;
combining messages can result in lines at the bottom of the message
window being left blank. This could be fixed by reverse-scrolling the
window and inserting more messages at the top, or by combining short
messages in history data instead of at refresh time. The second seems
easier but won't handle changing the message window's width sensibly,
and neither method handles wrapped, long lines well. A More>> prompt
(possibly more than one) is issued if the refresh shows too many lines
(either because long messages already took multiple lines or because
the window has become narrower and ones which used to fit now need to
be wrapped).
PatR [Wed, 22 May 2019 21:59:43 +0000 (14:59 -0700)]
fix #H8769 - steed drowns on Plane of Water
Air bubble movement on the Plane of Water manipulated <u.ux,u.uy>
directly when changing hero's coordinates, leaving steed with old
coordinates, resulting in dunking it when the old spot switched from
air to water. Switch to u_on_newpos() which moves the steed with
the hero and also handles clipping when the screen is too small to
show the whole map at once.
PatR [Mon, 20 May 2019 12:26:19 +0000 (05:26 -0700)]
more #H8609 - tty status condition rendering
The earlier fix removed a valid optimization which happened to be
implemented incorrectly. Put that back. It also left an invalid
optimization when applied to conditions. Remove that one.
I don't think either of these explains truncating 'y' off of "Hungry"
which was shown in one of the reports.
nhmall [Mon, 20 May 2019 03:35:21 +0000 (23:35 -0400)]
fix a botl status display issue
Reported as #H8609 (1679)
Some code recently added to render_status() for BL_CONDITION:
if (!tty_condition_bits)
continue;
was short-circuiting the required copy of NOW
values to BEFORE values for later comparison
further down in the for-loop.
tty_status[BEFORE][idx] = tty_status[NOW][idx];
This caused some fields to be bypassed for rendering
once no more tty_condition_bits were set because the
length comparisons would match.
PatR [Sat, 18 May 2019 15:12:43 +0000 (08:12 -0700)]
curses followup
Some prompts were being overwritten by the message that followed.
And clear_nhwindow(WIN_MESSAGE) gets called for just about every
keystroke so try to reduce the overhead I unwittingly added. The
"scroll up one line earlier than the next message" mentioned in
the prior commit is much more obvious that I realized and prompt
erasure might need to be redone.
PatR [Sat, 18 May 2019 09:25:48 +0000 (02:25 -0700)]
fix #H8753 - curses message window anomalies
Autodescribe feedback and multi-digit count prompts are always shown
on the last line of the message window and are suppressed from message
history (both ^P and DUMPLOG). When the message window is using all
available lines, the last one was being overwritten (until the count
or the feedback was completed or dismissed, then last line returned).
Adopt the suggestion that it be scrolled up a line instead of being
overwritten. [I haven't been able to reproduce the reported problem
where shorter overlaid text left some of longer underlying text visible
but that should now become moot.]
Bonus fix: while testing, I noticed that if your screen only has room
for a one-line message window and you used ESC to cancel 'pick a spot
with cursor' prompting before moving the cursor, the prompt was left
intact on the message line. tty erases it in that situation, but the
clear_nhwindow(WIN_MESSAGE) was a no-op for curses because it usually
doesn't erase old messages. This changes the curses behavior when the
core asks it to erase the message window: now it forces one blank line
of fake autodesribe feedback (causing the prompt or other most recent
message to scroll off top), then removes that fake feedback (leaving
a blank message line). For multi-line message window, the old messages
scroll up by one line sooner than they would when waiting for the next
real message but are otherwise unaffected.
PatR [Fri, 17 May 2019 20:38:34 +0000 (13:38 -0700)]
unpaid glob formatting
Make unpaid (shop owned, that is) globs show same weight information
as for-sale globs. And don't treat required arguments to globwt() as
if they were optional.
PatR [Fri, 17 May 2019 20:28:41 +0000 (13:28 -0700)]
obj sanity checking specific to globs
Verify that objects with the globby bit set are actually glob objects,
that their quantity is 1, and that their weight at least superficially
makes sense.
PatR [Thu, 16 May 2019 22:26:35 +0000 (15:26 -0700)]
farlook feedback for overloaded symbols
When using '/' or ';' and picking--not just viewing the autodescribe
feedback for--a space or '#' on the map, the game would produce
That can be many things (stone)
or
That can be many things (corridor)
unlike the usual
- the interior of a monster or a wall or an open door (wall)
when the symbol matched more than 4 things. I first changed it to
append the full sentence's missing period, but ultimately switched to
# can be many things (corridor)
so that the symbol that "many things" refers to isn't hidden. This
works better for ^P where player isn't looking at the symbol anymore.
nhmall [Sun, 12 May 2019 18:51:26 +0000 (14:51 -0400)]
support version-specific dlb file
There was a post-3.6.2 discussion on a forum where someone had
tried to copy the NetHack 3.6.2 exe file overtop of an
existing NetHack 3.6.0 playground, and then try to run it.
We have never suggested trying that, nor do we attempt to
provide any backward or forward compatibility between the
supporting files found in nhdat that would allow that. Any
particular version of NetHack expects to have matching
support files designed and matched to that version.
This adds optional support for helping to prevent the
opening of nhdat containing support files from an
unmatched version of NetHack.
If you #define VERSION_IN_DLB_FILENAME in your
platform's include/*conf.h file, it will use a
name such as nhdat362, instead of plain nhdat, and
will exit more gracefully than the fault/crash
mentioned in the discussion if it doesn't find the
file it is looking for.
Developers - please note that if you do
to cause NetHack to look for an nhdat* file with
the version info appended to the name, you will likely
have to modify your build/clean/spotless mechanics
beyond the C compile itself to properly deal with the
new generated file name.
PatR [Sat, 11 May 2019 10:04:53 +0000 (03:04 -0700)]
fix #H8712 - curses menu selector overflow
The curses interface would assign menu selector characters a-z, A-Z,
and then 0-9, but trying to type 0-9 would start a count rather than
select an entry, and if the display was tall enough for more than 62
entries, the ones after '9' were ASCII punctuation characters.
Limit the number of entries per page to 52 + number_of_'$'_entries
(which should be 0 or 1) so that it won't run out of normal letters.
The perm_invent window, if enabled, ought to allow more than that
because it isn't used to make selections and might have an arbtirary
number of '#' overflow entries. But I'll leave that for somebody
else to tackle.
Tested by temporarily setting the limit to 26 instead of 52 since
I'm not able to display anything tall enough to exercise the latter.
PatR [Fri, 10 May 2019 22:21:59 +0000 (15:21 -0700)]
place_object vs multiple boulders
When place_object() puts a non-boulder underneath a boulder, make it
put the non-boulder under all the boulders there rather than just under
the topmost one. Otherwise the map display will show the non-boulder
rather than the 2nd boulder if the top boulder gets moved away by some
means other than pushing. (Pushing explicitly brings lower boulder to
top of pile in order to try to push it next.)
Reproduce by: wish for boulder--it will drop. Drop something else--
the something-else will end up under the boulder. Repeat. The second
boulder will be on top but the second something-else will be next in
the pile, above the first boulder. Now polymorph into a giant and pick
up the first boulder, then move away from that spot. Map will show
second something-else instead of the remaining boulder.
This fairly simple fix should work reliably on new games since boulders
will end up being consecutive on the top of piles. For old games,
boulders after the topmost could be anywhere and still yield a display
glitch, but since that's all the problem is (I hope...), we ought to
be able to live with that until old games eventually go away.
[A map display glitch doesn't explain a corrupted 'uball' so this fix
doesn't solve that.]
PatR [Fri, 10 May 2019 00:15:14 +0000 (17:15 -0700)]
fixes36.2 update for posterity
Change of couple entries which describe fixed bugs to use past tense
instead of present tense. Fix a typo or two and a couple of instances
of clumsy wording. Move a dead-fake-hero-on-trap entry from normal
fixes section to exposed-by-git section since it was a post-3.6.1 bug.
Move two VMS entries from exposed-by-git section to interface-specific
section where they were intended.
I didn't make it through the whole file so there may be more room for
improvement. It's too late for 3.6.2 but the copy of doc/fixes36.2 in
later versions will be 'better'.
PatR [Sun, 5 May 2019 21:48:43 +0000 (14:48 -0700)]
bones bit: crysknife vs green slime
Being turned into green slime never drops hero's inventory so invent
objects shouldn't be subject to obj_not_held() handling.
obj_not_held() does apply to undead. Arising as a mummy or vampire
doesn't go through the trouble of dropping everything and picking it
back up, but there is a point in the die...arise sequence where the
hero is implicitly a corpse so nobody is holding his/her stuff.
PatR [Sun, 5 May 2019 20:33:30 +0000 (13:33 -0700)]
ball&chain sanity checking
Add a bc sanity check. It seems to work ok--in other words, not
trigger--under normal punishment. I don't have any test cases to
exercise its warnings.
This dragged in a couple of minor bc changes that were pending. I
should have cleared those out before tackling the sanity checking.
Pasi Kallinen [Sun, 5 May 2019 19:49:21 +0000 (22:49 +0300)]
Fix monster trapped state being wrong
When cloning a monster, clear the clone trapped and hiding states.
When splitting a monster (eg. a black pudding), the clone could
be placed on a trap, so do mintrap.
When removing a monster from the map, clear the trapped state.
The change to fix setting SEDUCE=0 in sysconf broke chatting with
seductive demons by unintentionally changing the way Null attack
argument was handled. It's still handled differently than it used
to be, but I think this difference is correct.
Qt5 gave "status 'reassess' before init" panic at start of new game.
Don't call status_initialize(REASSESS) from set_usamon()--used for
hero setup as well as for hero polymorph--unless it was previously
called from display_gamewindows() with !REASSESS [which happens when
windowprocs.wincap2 has WC2_STATUS_HILITES or WC2_FLUSH_STATUS set].
If a poly'd hero spits venom and it lands at a 'soft' spot such as
water, it would remain as an intact venom object. (Venom spat by
monsters seems to always be used up regardless of where it lands.)
Vlad keeps his own form when carrying the Candelabrum, but if you
manage to get that away from him he should behave like other vampires.
He wasn't though; a high level wizard casting polymorph on him would
change him into an arbitrary monster rather than into a wolf/bat/cloud
that revives as Vlad when killed.
|The seemingly dead vampire bat rises as a vampire.
was overriding hallucination when describing both old and new forms.
In 3.6.0 it only overrode the dying shape (explicitly so, presumeably
because the feature was brand new) and honored hallucination for the
revived shape. The 3.6.1 fix to prevent non-hallucinating: 'The
seemingly dead Foo rises as Foo.' for a named vampire unintentionally
overrode hallucination for the revived shape.
Change it to honor hallucination for both before and after monsters
|The seemingly dead grid bug rises as a microscopic space fleet.