Give an alternate message if Sting starts or stops glowing while the
hero can't see. It probably ought to give an immediate message when
blindness toggles but that looks like it could get messy.
Having an 'o' die or migrate off level should probably also redo the
Sting message immediately, otherwise we see things like:
The little dog kills the goblin.
The little dog eats a goblin corpse.
Sting stops glowing.
(There could be lots of additional intervening messages depending on
other monster activity at the time.) Calling see_monsters() in the
relevant places--probably m_detach() and migrate_to_level()--would
address this but won't do because that could result in hallucinating
monsters changing appearance mid-turn.
'Du' in a shop was listing hero-owned containers that didn't contain
any unpaid items. At least one unpaid item must be carried; bug
manifested iff one or more unpaid items followed the container in
the invent list.
Recently revised allow_category() was using count_unpaid() for
container contents incorrectly, inadvertently checking the rest of
inventory after the container in addition to its contents.
MSGTYPE allows the user to define how messages in the message
area behave. For example:
MSGTYPE=stop "You swap places with "
would always make that message prompt for -more-. Allowed types
are "show" (normal message), "hide" (do not show), "stop" (wait
for user), and "norep" (do not repeat message).
Adding this, because it's relatively simple, proven to work, and
it seemed to be the major thing betatesters felt was lacking when
compared to NAO.
hacklib.c took a beating in the reformatting, so clean it up.
A tweak to the anti-predictability hack in setrandom() is the only
change in the actual code.
gcc complained about mixing && with || without parantheses. After
scratching my head a bit, I think this change yields the intended
result.
'omit_buc' is a bad option name. It's cryptic and it doesn't even
describe the function. At a minimum it ought to be changed to
'omit_uncursed' to accurately describe what it does.
'implicit_uncursed' or 'explicit_uncursed' (with opposite boolean
value) would be even more precise but probably not any clearer.
The option defaults to on, which is the old-style behaviour.
Turning the option off will never omit the "uncursed" -status
from inventory lines. This is pretty much required if users
want to use menucolors based on the BUC state.
The code that intended to have mimics occasionally take on the form
of "strange object" always produced downstairs instead because
S_MIMIC_DEF is greater than MAXOCLASSES.
This problem was present in 3.4.3. I didn't try to go back to see
how long it's been there, but strange objects used to occur once
upon a time. Either nobody noticed that they'd gone away or there's
an alternate way to produce them.
Replace static in_line[] and out_line[] with local variables that are
released when the quest pager code returns to caller. QTEXT_IN_SIZ
was already removed from makedefs; now QTEXT_OUTSIZ is removed from
nethack. Use regular BUFSZ for them instead of trying to maintain a
separate size for quest text.
If a trap is created on top of another trap, maketrap reuses
the trap struct in place, instead of deleting and recreating it.
If a squeaky trap was created on top of another trap, maketrap
first set the trap type to squeaky board, and then tried to
look through all squeaky boards on the level, to determine
what note the new trap should play. Unfortunately, the union
with the trap note most likely contained a rolling boulder
coordinate or something else outside the 12 note range, so
then the tavail-array lookup would cause a segfault.
Suppress some mostly longstanding "unused parameter" warnings where
the usage was generally conditional.
restlevl() had a conditional closing brace that confused the recent
reformat, resulting in some code inside a funciton ending up flush
against the left border (first column, that is, as if outside of the
function).
makedefs.c: In function 'fgetline':
makedefs.c:2630: warning: comparison between signed and unsigned
makedefs.c: At top level:
makedefs.c:2638: warning: ISO C does not allow extra ';' outside of a function
fgetline() makes my recent check for quest line truncation become
redundant, so strip that out. I haven't taken the corresponding
macro out of qtext.h though.
[I didn't see any patch introducing 'fgetline'. Was it hidden as
part of some big merge?]
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.
The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
Fixes a bug reported by ais523. Rather than account for individual
segments, I opted just to make them unleashable, because it's not very
useful behaviour anyhow.
Most of the time, rloc() is used for teleporting monsters and it's not a
big deal if they can't find somewhere to go. In a few cases, it is. I
went through all the callsites and made calls to rloc() not cause
impossible()s if they don't need to.
Fixes a bug/suite of bugs reported by ais523.
Also clean up come ternaries while I'm here.
My first attempt to fix was to add AD_SLEE to explode(), but that failed
because do_break_wand() already does the sleeping portion. I don't
generally like the duplication between explode() and do_break_wand as a
result, but I consider that issue a project for another day.