Commit Graph

15909 Commits

Author SHA1 Message Date
nhmall
2a48859de2 include the PM_ index in mons (permonst)
This is useful for debugging and it allows the index
to be used directly instead of calculated in a
monsndx() function, which has been removed.

I left monsndx() in as a simple short-hand macro for the value
and didn't change the use cases, the reasoning being that this:
    monsndx(mon->data)
is arguably a little easier on the eyes than:
    mon->data->pmidx

LOW_PM, NON_PM, SPECIAL_PM have been included in the 'enum monnums'
now, instead of as individual macro definitions.

I chose to add the pmidx field as an instance of the enum declaration,
because that has very advantageous results in some debuggers, where it is
then shown as:
    pmidx PM_GRAND_MASTER (349) monnums
instead of the less-informative:
    pmidx 349 int

Adding the element count to the extern declaration for mons from:
    'extern struct permonst *mons[];'
to the more specific declaration to that in src/monst.c:
    'extern struct permonst *mons[NUMMONS + 1];'
then allows navigation through the mons array in one of the debuggers.
2023-11-23 12:22:47 -05:00
Alex Smith
99141b3242 Add magic traps to the list of traps marked with victims early
These can generate on dlvl1 and be immediately fatal, so should be
marked to prevent near-unavoidable early game instadeaths.
2023-11-23 16:34:47 +00:00
PatR
300d936fb0 pull request #1146 - choose_classes_menu()
Pull request from argrath would have made sure that an uninitialized
buffer wasn't used after choose_classes_menu() issued an impossible
warning, but there was no point in continuing if bad (or not yet
supported) arguments were passed, so panic instead.  Bypass the pull
request's commit because it would have been immediately replaced.

Closes #1146
2023-11-23 02:39:22 -08:00
PatR
4fc88f3cbc TEXTCOLOR removal followup
Macros to conditionally include color fields in defsyms[] and objects[]
are no longer needed.  The one for mons[] was already gone but traces
were present in a comment.
2023-11-22 23:58:13 -08:00
nhmall
aa026e0f89 fixes update 2023-11-22 17:55:27 -05:00
nhmall
b09d663f71 placeholder copies of doc/*.txt until cron job gets repaired 2023-11-22 17:00:09 -05:00
nhmall
d7bd85c492 remove extraneous file committed 2023-11-22 16:02:41 -05:00
nhmall
04082a2033 Remove TEXTCOLOR build option 2023-11-22 16:01:58 -05:00
nhmall
6272e18d7b updated doc/*.txt from cron job 2023-11-22 09:32:38 -05:00
PatR
c8c963afe6 refine PR #1135 - encumbrance messages
When picking up multiple items (or looting multiple items) in one
operation, only show encumbrance for the first item that causes that
to change instead of complaining about non-zero encumbrance on every
item.  The very first item is treated as if it caused a change, so
you get "you have a little trouble lifting <obj>" even if you were
already burdened, same as before.

Only lightly tested.
2023-11-21 14:59:08 -08:00
nhmall
28a4afb3bb remove redundant assignment in macOS.370 and linux.370 2023-11-21 10:26:17 -05:00
nhmall
0915626964 remove a (now) unnecessary line from Makefile.check 2023-11-21 10:23:57 -05:00
nhmall
74340e0de5 follow-up to Makefile out-of-date checking
linux.370 and macOS.370 pass the name of the hints file
and the list of included files, that they use, to Makefile.check.

The name of the hints file is in variable HINTSFILE, the
definition of which is now inserted by setup.sh

The list of hints include files is in variable HINTSINCLFILES.
2023-11-21 10:18:24 -05:00
nhw_cron
589b960892 This is cron-daily v1-May-8-2022. 000files updated: Files 2023-11-20 22:27:11 -05:00
nhmall
7e3398c85d macOS follow-up 2023-11-20 22:18:35 -05:00
nhmall
4a08f20090 do the Makefile checking using make itself 2023-11-20 22:14:22 -05:00
PatR
18962b41d9 decl.h comment
Sync with decl.c.  dbridge.c never had anything to do with these
variables.  They were part of decl.c before they got collected into
struct g, then split among struct ga to gz.  (This only fixes up
the comment in gl; there may be more, possibly quite a few more.)

These might be better classified as /*dungeon.c*/ although they
weren't defined there.
2023-11-20 16:23:51 -08:00
nhmall
d00707984b more follow-up from -Wno-missing-field-initializers avoidance 2023-11-20 19:09:02 -05:00
PatR
eb89388b35 pull request #1135 - tweak encumbrance messages
Pull request from AndrioCelos:  for feedback during pickup, add a
separate message from stressed instead of sharing the burdened one
and issue messages at higher encumbrance levels.

This 'tweak' will probably need more tweaking to reduce verbosity
when picking up multiple items in one operation.

Closes #1135
2023-11-20 13:21:37 -08:00
Andrio Celos
e10a648ca9 Code style fix 2023-11-20 13:21:37 -08:00
Andrio Celos
b4aee17578 Use encumbrance prefix in pickup_object when above burdened also 2023-11-20 13:21:36 -08:00
Andrio Celos
f2f4fa06dd Separate messages for becoming burdened and stressed 2023-11-20 13:21:36 -08:00
nhmall
4c9d5a752a more follow-up 2023-11-20 16:19:54 -05:00
nhmall
d5b0c9a5a2 some follow-up for -Wno-missing-field-initializers avoidance
I wasn't getting a warning on this line myself, I just had it reported.
Because of that, I can't be certain this fixes it either.
2023-11-20 16:12:28 -05:00
PatR
d49e923986 engraving #whatis bit
The symbol/tile renaming for engravings made this unnecessary.
2023-11-20 12:26:51 -08:00
nhmall
033c6981d8 some minor files.c cleanup 2023-11-20 14:59:03 -05:00
nhmall
2f167a4672 allow clean build without using -Wno-missing-field-initializers 2023-11-20 14:25:09 -05:00
nhmall
983000618c another general-pre.370 follow-up 2023-11-20 11:53:58 -05:00
nhw_cron
c6e2d0f8ec This is cron-daily v1-May-8-2022. 000files updated: Files 2023-11-20 11:40:27 -05:00
nhmall
90c08ab6d3 follow-up to general-pre.370 change 2023-11-20 11:07:32 -05:00
nhmall
3fc24d937b inform the builder if their Makefiles need updating 2023-11-20 10:48:31 -05:00
PatR
e723a4aafa rename engraving symbols and tiles
"engraved part of a room" and "engraved part of a corridor" sound
silly.  Change to "engraving in a room" and "engraving in a corridor".
Still displayed to player as just "engraving".

An orhpaned wintype.h tweak got dragged in.  Renumbers to_core_flags.
2023-11-20 00:47:12 -08:00
PatR
490b60da4d whatis fix for boulders
In the past couple of days the code for '/' and ';' to examine
objects was changed to handle ROCK_CLASS differently (as part of
revising looking at map spots showing the engraving symbol).  It
could potentially set up a static buffer in the object classes loop
and then overwrite that when processing another class.  I couldn't
trigger any feedback anomalies, even when changing bouldersym to
various values including class characters both before and after '`',
but this redoes the suspect code to make it more robust.

Also, refine the test for whether a screen symbol matches an object
symbol.
2023-11-20 00:29:16 -08:00
nhmall
5c8b36e95a Revert "don't build in support for obsolete makedefs options"
This reverts commit 13f49bdd92.
2023-11-19 17:36:25 -05:00
nhmall
a42d3dadce Revert "remove pasted comment"
This reverts commit c33c49295d.
2023-11-19 17:36:00 -05:00
nhmall
2cbbfbe648 Revert "comment typo"
This reverts commit bca8720c6e.
2023-11-19 17:35:30 -05:00
nhmall
bca8720c6e comment typo 2023-11-19 10:56:26 -05:00
nhmall
c33c49295d remove pasted comment 2023-11-19 10:10:27 -05:00
nhmall
13f49bdd92 don't build in support for obsolete makedefs options
unless OLD_MAKEDEFS_OPTIONS is defined during the compile of makedefs.c
2023-11-19 10:05:01 -05:00
PatR
d3e80bf9bf expand Plane of Fire to fill entire map
The other three elemental planes go all the way to the map edges.
Fire was 76x20 rather than full 79x21.  This adds new two columns on
the left (necessitating some coordinate adjustments) and one on the
right plus one new row on the bottom.  Not particularly interesting,
just padding.
2023-11-19 04:54:20 -08:00
PatR
f23176155c tty: fix 'statuslines' off by 1 error
With CLIPPING disabled you should need a terminal or window with at
least 25 lines to change the 'statuslines' option from 2 to 3, but
it was being allowed on tty when there were only 24 lines available.

I think the other interfaces always have clipping capability enabled
so aren't affected.

Not many level maps extend to the bottom row (line 22 for a 1-based
count) so it wasn't likely to be noticed during play.  That points
that maps which don't use all rows and/or all columns could get by
without clipping by adjusting their position.  However, implementing
adaptive clipping is not something that I'm going to try to tackle.
2023-11-19 01:11:43 -08:00
PatR
3021423a5f github issue #1145 - ^C-induced panic on tty
Issue reported by entrez:  on tty, ^C while a menu was open followed
by 'yes' to "Really quit?" would lead to a bad window panic.

Brought on by screen erasure changes included with recent SIGWINCH
(window resize signal) changes.

Closes #1145
2023-11-18 17:45:43 -08:00
Alex Smith
86c29f5b47 Allow identifying stackable items by comparison to identical items
NetHack has historically had problems (both in terms of interface
and in terms of gameplay exploits) caused by unidentified items
not stacking with identified items.  The 3.7 change to cause items
picked up by monsters to become unidentified has exacerbated this,
e.g. there's an undesirable strategy in which players give
ammunition to hostile monsters in order to unidentify it, allowing
it to stack with other unidentified ammunition so that the whole
stack can be enchanted with a single scroll.

This commit makes it possible to stack items with different
identification statuses (unles Blind), in effect causing the
unidentified items to be identified by comparing them to the
identified items (this is consistent with the mechanic via which
two stacks of unidentified items can be determined to be the same
as each other).  The hope is that this will prevent any gain from
exploits involving intentionally unidentifying (or intentionally
failing to identify) items, that it will prevent interface clutter
caused by (e.g.) a Ranger's main projectiles becoming partially
unidentified as a nymph picks them up and subsequently failing to
stack, and that it will reduce the incentive to backtrack to an
altar to merge, e.g., a stack of formally-known-uncursed and a
stack of informally-known-uncursed food rations to stack.
2023-11-19 01:21:53 +00:00
nhmall
11ad859c4c nothing actually depends on options anymore 2023-11-18 19:21:54 -05:00
PatR
ed102b3b81 comment typo 2023-11-18 11:57:30 -08:00
PatR
1fc56e4be8 new bugs - implement 'whatis' of engravings
'/ e' (or '/ `') lists nearby engravings (including headstones) that
  the hero has read or felt (even if currently covered up) or can see
  on the map;
'/ E' (or '/ |') lists all such on the level.

If the hero remembers an engraving and then monsters scuff it out of
existence, it will magically disappear from the list of remembered
engravings when deleted.  I don't think that's worth bothering with.

[During testing, my pet seemed extremely reluctant to step on a
corridor engraving.  That could have been coincidence but it seemed
to keep happening until I moved so close that it had no choice.  I
wasn't carrying tripe.]
2023-11-18 00:35:30 -08:00
PatR
389f03e90e farlook of engravings
Report headstone engraving when using farlook to examine a grave:
| a grave (grave whose headstone reads: "foo")
or
| a grave (grave whose headstone you haven't read)

Make the farlook of ordinary engravings operate more like farlook of
other things:
| a boulder or a statue or an engraving (engraving with text: "bar")
rather than
| a boulder or a statue or an engraving with text: "bar"
The "or a statue" phrase will now be suppressed because statues aren't
shown as backtick anymore, so the parenthesized form isn't quite as
long as it would otherwise have been.  If OPTIONS=boulder:symbol is in
use, the "a boulder" part will be gone too.
| an engraving (engraving with text: "bar")
or
| an engraving (engraving that you haven't read)

Make quicklook include engraving text.  It's quick because it doesn't
ask the player to pick additional spots or whether to look up relevant
data.base quote, not because it skimps on useful information.

Autodescribe still does not include engraving text.
2023-11-17 17:36:04 -08:00
nhmall
a784a06cf6 remove a band from an earlier test 2023-11-17 14:22:40 -05:00
nhmall
a92c1b7163 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2023-11-17 14:21:42 -05:00
nhmall
d7ed474fa7 2nd follow-up to alternative fix for menu search (':') 2023-11-17 14:13:58 -05:00