For tty, make hitpointbar blink if current HP falls to the critical
HP threshold. Doesn't require status highlighting. Not changed:
when status highlighting is active, use the HP color but force the
attribute to be inverse (plus blink if the criterium is met) rather
than whatever the HP highlight specifies.
For curses, do the same thing. It used to honor HP attribute for
hitpointbar, now it behaves the same as tty: always inverse, maybe
combined with blink. The new code assumes that inverse and color
can be turned off without turning off active blink in the process.
I had intended to make hitpointbar be a full-fledged status field
(which happens to be rendered on top of title) so that it could be
highlighted differently from hit points (mainly so that one could
highlight up and down changes while the other showed percentages).
This is less versatile than that but much simpler.
Take advantage of the ability of some compilers to warn if
not all values are covered in a switch statement, to draw
attention to the need to update make_corpse() when new
monsters are added to NetHack.
This adds explicit entries for the current "default" handling
in make_corpse().
It might be a good idea to review the explicit entries to see
if any of them represent others that are not being handled,
but should be.
To test this, I temporarily reverted 85c86444, and I did receive the
following warning:
mon.c:545:13: warning: enumeration value 'PM_GOLD_DRAGON' not handled in switch [-Wswitch]
545 | switch (mndx) {
| ^~~~
1 warning generated.
Noticed when trying all the extended commands. #wizbury didn't have
any feedback (other than clearing the adjacent floor if any objects
were present).
Also, prevent #wizbury from burying boulders.
If a tame or peaceful monster was trapped and blind hero hadn't seen
the trap yet, attempting to swap places would report that the monster
couldn't "move out of that trap". And if the 'tips' option was True,
the game would suggest attempting #untrap. But #untrap would report
that the hero wasn't aware of any trap at the spot, and fail.
Change the original message to "move out of that <type-of-trap>" and
if hero hasn't seen it yet, map it and vary the wording slightly
"... a|an <type-of-trap>". If #untrap is attempted, it will now be
dealing with a known trap.
Issue reported by Ryton: a sleeping orc caught a thrown gold piece.
Throwing one at some other sleeping monster woke it up.
That is actually intentional. Sleeping monsters with the 'greedy'
attribute will wake up without becoming angry and catch thrown or
kicked gold that is aimed at hit them. The fix here is to augment
the catch message to say so. Non-greedy monsters wake up and treat
it as an attack, but the gold always misses.
Both cases only happen for monsters who are asleep for an indefinite
period of time. Any monster that is asleep (or paralyzed, or busy
putting on armor) for N turns effectively doesn't notice. If it can
be seen, the gold "harmlessly hits" (if it can't be seen, the gold
misses), and the target continues doing--or not doing--whatever it
is doing. That's suboptimal; another case where lumping multiple
can't-move situations into a single monst->mfrozen countdown timer
causes timed sleep to be indistinguishable from timed paralysis.
Closes#1230
Normally the 'O' menu covers the status display, but not always.
Toggling 'time' or 'showexp' via the "simple 'O'" menu should update
the status lines.
Toggling 'hitpointbar' already does so so. I didn't try to figure out
why. Presumeably it triggers a different bot() call somewhere and the
code here sees 'disp.bot' as reset to False.
I didn't check the behavior when adding or removing a status highlight
but those can change the current status display.
When you attempt #offer at a non-altar location, the feedback
"you are not standing on an altar" made it sound as if you wouldn't
be able to #offer if you were levitating. Since that is possible,
change the feedback.
wizcmds.c: In function 'wiz_custom':
wizcmds.c:1845:40: warning: format '%d' expects argument of type 'int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
1845 | Sprintf(bufa, "%s: colorcount=%d %s", wizcustom, iflags.colorcount,
| ~^ ~~~~~~~~~~~~~~~~~
| | |
| int uint32_t {aka long unsigned int}
| %ld
wizcmds.c: In function 'wizcustom_callback':
wizcmds.c:1895:32: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32' {aka 'long unsigned int'} [-Wformat=]
1895 | Sprintf(bufc, "%011x", cgm->customcolor);
| ~~~~^ ~~~~~~~~~~~~~~~~
| | |
| | uint32 {aka long unsigned int}
| unsigned int
| %011lx
wizcmds.c:1899:37: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32' {aka 'long unsigned int'} [-Wformat=]
1899 | Sprintf(bufu, "U+%04x", cgm->u->utf32ch);
| ~~~^ ~~~~~~~~~~~~~~~
| | |
| | uint32 {aka long unsigned int}
| unsigned int
| %04lx
In 3.6.2 parts of the wakeup code were merged together, and this
caused pets consider any noise made by the hero - such as hitting
iron bars or digging - as whistling for them to come to the hero.
Change it to only consider actual whistling and ringing a bell.
Support aiming at self (to become blinded) and aiming up/down (to
light the hero's current map spot only, persistently rather than
temporarily). Also, recognize cancel at the "direction?" prompt to
not leave the #invoke cooldown count set when aborted.
Aiming at self was a little trickier than expected to test because
you're blindness-resistant when wielding Sunsword. But it doesn't
have to be wielded to be invoked.
The code doesn't handle zapping blinding ray at yourself;
maybe it should be changed to handle it, but for now just
prevent Sunsword blinding the hero.
Program terminated with signal SIGSEGV, Segmentation fault.
77 ../sysdeps/x86_64/multiarch/strlen-evex.S: No such file or directory.
(gdb) bt
at glyphs.c:419
at glyphs.c:173
op=0x5a34af30a574 "DECgraphics") at options.c:3418
This doesn't directly affect nethack, but it should prevent HTML
dumplog for variants that include that from showing T-shirt and
apron slogan text in tooltips for the 'gameover' map. And it makes
end-of-game attribute disclosure slightly less susceptible to being
unintentionally reverted.
Code in pull request #300 shows that it uses do_screen_description()
for tooltips and do_screen_description() uses distant_name() for
objects so that's where I added this change that will trigger the
code from commit c6992777f5.
From a reddit thread: after genociding "arch-lich", player's next
target was "master-lich". The character was a monk who immediately
died of genocide.
("Master<almost anything>" other than "master mind[ ]flayer" or
"Master Thief" or "Master Assassin" matches level 30 monk rank "Master".)
Rather than muck about with fairly complicated matching code, just add
"master-lich" and "masterlich" as explicit variations.
Disclosing final inventory while wearing an alchemy smock reported
the apron's slogan accurately but then disclosing attributes gave
different text if it was conferring poison resistance and/or acid
resistance. The extra text was unneeded/unwanted there anyway, so
simply suppress it rather than force it to be accurate.
3.6.x had the same issue but it wasn't detectable there because it
only had extra text for T-shirts and they don't confer attributes.