Commit Graph

16833 Commits

Author SHA1 Message Date
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
PatR
f545ca8f22 fix #K4138 - untrapping a monster while blind
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.
2024-04-07 16:56:02 -07:00
nhmall
5294b0a320 follow-up comment wording 2024-04-07 17:22:03 -04:00
nhmall
b573538253 fix reported segfault during configfile processing 2024-04-07 13:14:12 -04:00
Pasi Kallinen
0c29f88d0e Move showdamage to Advanced options 2024-04-07 17:19:25 +03:00
Pasi Kallinen
712a735111 Guidebook: hitpointbar is also available in curses 2024-04-07 12:24:19 +03:00
PatR
f16a5f49ed mfrozen sanity check
Add another monster sanity check case:  if a monster has the mfrozen
counter set to non-zero, make sure that mcanmove is zero.
2024-04-06 18:59:45 -07:00
PatR
97000bd64b leader of orcs that raided mine-town
Changing a newly created monster's peaceful state should call
set_malign().
2024-04-06 18:43:28 -07:00
PatR
2b6b056f0e fix github issue #1230 - sleeping orc catches gold
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
2024-04-06 18:39:11 -07:00
Pasi Kallinen
7ecc778173 Curses: fix pile hilite background color
The curses colorpair rework I did changed the pile hilite background
color from blue to red. Change it back to blue, and use a function
to get the color pair instead of hardcoding the value.
2024-04-05 20:15:21 +03:00
Pasi Kallinen
969c87c0a1 Unblind telepathy range and carried artifacts 2024-04-05 09:44:52 +03:00
nhmall
080c6747fd follow-up bit
minor, but inner loop assignments to glyph and mapsym
are only needed when corr_next2u is TRUE
2024-04-04 16:51:51 -04:00
PatR
2b0459e2b8 undo a dodgy 'O' menu optimization
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.
2024-04-04 13:35:51 -07:00
Pasi Kallinen
28ed8e7962 Unblind telepathy range
Unblind telepathy range depends on the number of telepathy granting
items worn.

Breaks saves.
2024-04-04 23:22:28 +03:00