Commit Graph

16846 Commits

Author SHA1 Message Date
PatR
ea8ebea2d3 simplify a couple of monster naming bits 2024-04-18 12:34:03 -07:00
PatR
14c1cafdf8 undo part of "alternate symbol parsing"
Commit fddc966a3e included:
Add S_suit as another alternate for S_armor.

I got fooled by the description "suit or piece of armor" and was
thinking that each of the 7 armor slots had their own symbol that
could be overridden.

There's no need for S_suit when there isn't any S_helm, S_boots, &c.
2024-04-18 12:28:14 -07:00
Pasi Kallinen
4f271c912f Fuzzer vs repeat deaths, again
Even 100 deaths wasn't enough, as the fuzzer was still quitting.
If we're in wizmode, just execute wizmakemap to recreate the level,
getting rid of whatever was blocking hero from teleporting to safety.
2024-04-18 18:10:40 +03:00
Pasi Kallinen
08588a14f8 Prevent error when vault guard fails to relocate monster 2024-04-18 17:12:28 +03:00
Pasi Kallinen
bb3b9b7271 CHANGE_COLOR: Save the palette with #saveoptions 2024-04-18 09:24:34 +03:00
Pasi Kallinen
7db8f7c6a5 Fix mention_map and hiders causing a light source error
Prevent glyph change messages while loading a level file.
Otherwise a monster hiding under an item triggered a vision recalc
before light sources were linked to their sources, leading into
strange errors looking like pointer corruption.

getlev -> hide_monst -> hideunder -> newsym -> show_glyph ->
 pline_xy -> vision_recalc -> do_light_sources -> get_obj_location

Add in_getlev program state variable, analogous to in_mklev
2024-04-18 09:01:11 +03:00
PatR
064523e162 mon name of monster appearing as another monster
When a monster mimicks another monster (traditionally Double Trouble
Wizard, since 3.6.x also pet that eats a mimic corpse), using farlook
or getpos+autodescribe revealed the monster's real identity.  Hard to
believe that nobody ever noticed, but it was obvious when a pet dog
quick-mimicked a cat or vice versa.

Add an extra x_monnam() flag to ignore monst->m_ap_type==M_AP_MONSTER
plus monst->mappearance.  Only the m_monnam() variation of x_monnam()
includes it (via EXACT_NAME); monnam() and the rest will now describe
an M_AP_MONSTER by its appearance rather than as its true self.
2024-04-17 14:40:20 -07:00
PatR
7198981afd quickmimic bit
Improve the feedback for an unnamed pet eating a mimic corpse.
|You see a tripe ration where Rover was.
is ok.
|You see a tripe ration where the dog was.
looks somewhat odd.  Change that to be
|You see a tripe ration where your dog was.
2024-04-16 23:52:29 -07:00
PatR
29b4c47bdf fix #K4142 - camera flash vs mimic
When a camera flash hit a mimic which was posing as something, the
feedback mentioned the mimic but didn't bring it out of hiding.

Change to make light pass over a mimic impersonating an object but
unhide one impersonating furniture.  Ones impersonating some other
monster are woken up but wakeup doesn't force it back to mimic shape.

Trying to get the messages right brought on more code changes than
antipated.  I changed one of the arguments to mhidden_description()
so had to change its callers; fortunately there aren't very many.
2024-04-16 23:34:26 -07:00
nhmall
e20774e16f updated workaround for vs conflict 2024-04-15 12:52:08 -04:00
nhmall
7e6dab38c5 work around a conflict with visual studio build 2024-04-15 12:45:49 -04:00
nhmall
2ce6df8be5 yet another follow-up 2024-04-15 12:28:00 -04:00
nhmall
8b48032e74 follow-up for Makefile.mingw32 2024-04-15 12:24:59 -04:00
nhmall
53e4e2e12a update Makefile.mingw32 res file dependencies 2024-04-15 12:12:47 -04:00
nhmall
453eacdcb6 include the manifest in NetHackW res 2024-04-15 12:09:23 -04:00
PatR
cf8ab3137f 'fix typos' fix
The big typos fix commit changed the misspelling "wharever" to
"wherever" but it should have been "whatever".

Plus a punctuation bit I had sitting around.
2024-04-14 11:21:24 -07:00
nhmall
141dc9e52e Merge branch 'NetHack-3.7' of https://github.com/RainRat/NetHack into NetHack-3.7 2024-04-14 06:37:30 -04:00
Pasi Kallinen
bad63a0d36 Hallu Banana 2024-04-14 10:14:27 +03:00
RainRat
af3a321acb Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-13 23:45:32 -07:00
nhmall
f2d0dbcc09 revise alt_color_spec() so digit count limits work 2024-04-13 13:06:38 -04:00
RainRat
262c9e763c Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-13 09:15:39 -07:00
nhmall
86cb8dba60 use COLORVAL macro in change_palette() 2024-04-13 12:09:45 -04:00
nhmall
c30dbb2caa alt_color_spec follow-up 2024-04-13 12:00:37 -04:00
nhmall
936096d5e3 Windows build fix
consoletty.o : error LNK2005: _tty_change_color already defined in wintty.o
consoletty.o : error LNK2005: _tty_get_color_string already defined in wintty.o
2024-04-13 09:11:27 -04:00
nhmall
3364ac7cdb CHANGE_COLOR:allow #rrggbb hex color specification 2024-04-13 09:08:14 -04:00
Pasi Kallinen
3086f16386 Shopkeepers bill you for using their bear trap or land mine 2024-04-13 15:10:15 +03:00
Pasi Kallinen
a57d0e6f4f Curses: add support for the palette config option
Depends on CHANGE_COLOR compile-time option.

Also allow multiple palette-definitions in the config file.
2024-04-13 12:01:43 +03:00
nhmall
ebd200ecc2 follow-up: preprocessor conditional 2024-04-12 21:59:59 -04:00
nhmall
15db874f71 CHANGE_COLOR palette option adjustments
It was too early to call the windowport change_color() routine
while processing the config file. The windowport was not yet
fully operational.

Now the palette option processing will just place the rgb
value into the appropriate ga.altpalette[CLR_MAX] entry.

init_sound_disp_gamewindows(void) [allmain.c] calls
change_palette() [coloratt.c] and it will call the windowport
change_color() function for each ga.altpalette[] entry that
has been set.

Notes:
The rgb values stored in ga.altpalette[] have the NH_ALTPALETTE bit set
so that the rgb value of 0 can be stored and be distinguishable from
a "not set" entry.

The NH_ALTPALETTE bit is cleared from the rgb value in change_palette()
prior to calling the windowport change_color() function.

The syntax for palette is colorname/r-g-b.
For example: palette:black/12-12-12

colorname must be one of the NH_BASIC_COLOR names or a suitable
alias for one of those 16 entries.

Some of the windowport CHANGE_COLOR functions had the wrong parameters,
perhaps due to bitrot. Those have been corrected to match the prototype.
2024-04-12 21:57:27 -04:00
PatR
749f2ffb0e update 'hitpointbar' documentation 2024-04-12 11:52:26 -07:00
RainRat
6445c97a4e Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-12 09:03:48 -07:00
Pasi Kallinen
00d0700e75 Pit fiends can easily climb out of pits 2024-04-12 11:13:24 +03:00
RainRat
ef7046e9bf Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-11 18:29:38 -07:00
nhmall
8bbbe38fb5 fix garbled message on symset change from O menu 2024-04-11 20:24:38 -04:00
RainRat
7b0ba4a562 Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-11 14:00:18 -07:00
Pasi Kallinen
f15035868c Change Nalzok and Minion of Huhetotl to bright red
Disambiguate them from all the other red major demons.
The tiles are already bright red.
2024-04-11 21:39:22 +03:00
PatR
7da370d74a experimental hitpointbar change
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.
2024-04-11 11:06:29 -07:00
nhmall
16c693eedf fix lingering error on Windows nmake command line build
src\cmd.c(3453) : warning C4701: potentially uninitialized local variable 'func' used
src\cmd.c(3453) : error C4703: potentially uninitialized local pointer variable 'func' used
2024-04-11 12:23:56 -04:00
Pasi Kallinen
7cf7fe3c9b Init a possibly uninitialized variable 2024-04-11 18:52:51 +03:00
Pasi Kallinen
f1c77aa2fd Pets avoid a location hero just kicked
If hero kicks a location, pets and peacefuls will avoid moving
into that location for that turn.
2024-04-11 18:05:18 +03:00
RainRat
2787bfdcbd Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-10 23:26:14 -07:00
Pasi Kallinen
62b78ba037 Hero movement affects water bubble direction 2024-04-10 21:57:05 +03:00
nhmall
46370fc124 another follow-up: move values that can't be indexes
Move the values that are not legal mons indexes out of the default
handling case in make_corpse().
2024-04-10 11:34:41 -04:00
nhmall
125208d30b follow-up bit to explit mon entries in make_corpse() 2024-04-10 11:29:31 -04:00
nhmall
a85cd7d5c8 let compiler catch missing additions during development
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.
2024-04-10 11:07:40 -04:00
RainRat
7656804ae9 fix typos 2024-04-10 00:46:21 -07:00
Pasi Kallinen
85c8644469 Gold dragon should drop scales 2024-04-09 08:40:56 +03:00
PatR
6cc8630c22 feedback for #wizbury
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.
2024-04-08 17:16:21 -07:00
PatR
fc56ca0767 barbded devil and ice devil difficulty ratings
I enabled 'extmenu' and went through all the extended commands under
curses and try to find out what github issue #1229 refers to and
didn't spot anything out of the ordinary, except for #wizmondiff
which reported that the calculated diffculty ratings for ice devil
and barbed devil didn't match the values in their definitions.  They
were each given an extra ability about 6 months ago and it was enough
to have a higher rating.

Issue #1239 remains open.
2024-04-08 15:59:05 -07:00
PatR
c96f2e7eb5 horses can't vomit
No idea about unicorns though...
2024-04-08 12:46:41 -07:00