To-be-3.6.1 bug, caused by a patch (of mine...) incorporated about
a week after 3.6.0 was released that was intended to be for naming
Sting or Orcist. Any artifact creation ended up breaking illiterate
conduct whether user-assigned naming was involved or not (because
oname() is always used to apply the name, not just when do_name() is
executing).
This should be handled differently but I don't want to go through
the dozen and half or so calls to oname() to add an extra argument.
The previous fix to use highc(UNCTRL(x)) worked for ^A through ^Z,
but not for NUL (yielded ^` instead of usual ^@) or ^[ through ^_
(yielded lowercase ^{ and so on). The problem was UNCTRL(); it
shouldn't have been forcing on the lowercase bit to begin with.
Also, the code that used UNMETA() for formatting wouldn't work as
intended for M-control char since it stripped off the 8th bit but
didn't apply any fixup for control chars.
Just get rid of ISCTRL/ISMETA/UNCTRL/UNMETA and use the existing
visctrl() routine instead. (Its 3.6.0 edition didn't handle
M-control char, but the to-be-3.6.1 branch has done so since a
week or two after the 3.6.0 release.)
Separate the message logging out of pline so that other things (for
instance, one-line summary for quest block messages) can be logged.
The code that utilizes this isn't ready for prime time yet.
For FREE_ALL_MEMORY, release DUMPLOG message history when saving.
(Actually, this frees it unconditionally rather just doing so for
FREE_ALL_MEMORY.) It was being freed when logged at end of game,
but not during save. If dumplog message history and interface
message history get integrated, the existing message history
save/restore handling should become applicable instead.
Use the same terminology ("creatures" rather than "monsters") for
the two "no <foo> {have been, were} vanquished" messages as for the
"disclose vanquished <foo>" prompt and its "M <foo> vanquished"
summary.
The dumplog data was including a final tombstone unconditionally,
which looked awfully strange for characters who didn't die. Make
it conditional, like actual end-of-game tombstone. (One difference
though: dumplog has a tombstone for hero who died from genocide,
end-of-game does not. I think the latter should display one even
though no grave gets generated.) [Potential for future enhancement:
add some alternate ascii art in place of tombstone for survivors.]
The list of genocided and/or extincted species was never shown
since caller passed 'a' to list_genocided() and it expected 'y'.
Also, once shown, the list entries were lacking indentation that
other sections of the dump generally have.
Both vanquished monsters and genocided/extinct monsters included
a blank line separator even when there was no feedback, making a
noticeable gap in the dumplog text. Have them report "no creatures
vanquished" and "no species genocided", when applicable, so that
their separator lines always have something to separate.
When dumping, omit a couple of blank lines each from vanquished
creatures list, genocided species list, and tombstone so the
relevant sections of the dump are more compact.
The recently added dumplog code assumed that 'time_t' is 'long int'
or at least will give sensible results when formatted with '%ld'.
This is more of a Band-Aid(tm) than a proper fix.
Use a simple ring buffer instead of a flat array that needed to have
49 pointers shifted down a slot every time a pline message was issued.
'saved_plines[saved_pline_index]' is the oldest message in the buffer
and the next slot to use when adding a new one.
When a female dwarf grows (via level gain) into a dwarf lord, it
changes sex as well as base monster form because all dwarf lords
are male. The earlier fix for #H4276 (16-Mar-2016, to give an
alternate grow-up message acknowledging the change) used the wrong
monster form (monst's old one instead of new one).
Back when dead green slime left a corpse, gelatinous cubes wouldn't
eat that, but they would eat globs of green slime without being
affected. Add the missing glob check so g.cubes will engulf globs
of green slime instead of eating those.
Bug report was:
> "Completed sokoban" achievement was logged when picking up
> a randomly generated bag of holding in the gnomish mines.
The picking-up code was missing checks for the branches, so
you could get the achievements outside the correct branches.
It's apparently somehow possible to have a leash "attached" to
a monster not present on the current level. Complain instead of
segfaulting. (This is a post-3.6.0 bug)
Apparently some screen readers keep reading the status lines
at the bottom of the screen when parts of those change.
Add an option to prevent updates to those lines.
While fuzz testing, I've seen segfault a handful of times in here,
coming from do_takeoff(). Looks like context.takeoff.what is stale,
having WORN_BLINDF, but we're not wearing the blindfold anymore.
Haven't been able to trace it down yet, so guard it with impossible.
For "the poison was deadly" against hero, hit points were set to -1
(which gets displayed as 0 when shown) but the status lines weren't
being updated, so stale positive HP value was visible during final
disclosure.
The pointer keeping tabs of monster's current weapon was
not cleared.
How to trigger: Get hit by a monster wielding a weapon,
teleport to another level, poly into disenchanter, get hit
by any monster with AD_PHYS attack and not wielding any weapon.
This segfault happened when a detected monster such as a garter snake was
hiding under an unknown/unseen armor of a type that has no description
field (eg. a leather armor), and you farlooked at the monster.
At the same time, simplifies the code a tiny bit.
This fixes melee kiting more comprehensively (it now doesn't work
against slower monsters either), and prevents you doing things like
opening up a gap when running from an imp (you couldn't do that in
3.4.3).
Post-3.6.0 change made practically all corpses taste okay.
Change it so there's always a 10% chance for the corpse
to taste terrible, and increase the chance if the corpse
is slightly old.
If you attack a monster under Elbereth protection, and it wasn't
scuffed by the attack itself, then it'll be automatically removed
with an alignment penalty. It no longer fades from scaring monsters;
only from being abused to attack monsters while protected.
setmangry() and wakeup() were being used for multiple purposes. Add an
extra parameter to track which. This fixes several minor bugs (e.g.
whether monsters with no eyes were angered by (useless) gaze attacks
against them previously depended on the state of a UI option, and
the Minetown guards would be annoyed if you used a cursed scroll of
tame monster on a shopkeeper). It's also a prerequisite for the
Elbereth changes I'm working on.
Elbereth now has to be on a square by itself; it's hard to justify
why text before it would prevent it working if text after it fails
to prevent it working.