Commit Graph

2283 Commits

Author SHA1 Message Date
Pasi Kallinen
6ec55a3624 Rework stairs structure
Use a linked list to store stair and ladder information, instead
of having fixed up/down stairs/ladders and a single "special" (branch)
stair.

Breaks saves and bones.

Adds information to migrating objects and monsters for the dungeon
and level where they are migrating from.
2020-11-13 20:27:17 +02:00
PatR
096511b509 github pull request #406 - polyfodder() macro
Some eggs and tins could cause an out of bounds index into the
mons[] array.  Post-3.6 bug: the faulty part of the test is only
relevant for 3.7 genetic engineer monster.  Earlier versions just
called pm_to_cham() which does it's own index validation.

Fixes #406
2020-11-05 16:03:05 -08:00
Pasi Kallinen
c9ac5bc48a Increase EDITLEVEL post Zombie Apocalypse
I forgot to increase EDITLEVEL, as the Zombie Apocalypse added a timeout
routine, messing up saves and bones.
2020-11-04 11:36:52 +02:00
PatR
c8d05ac352 ignitable() macro
ignitable() was excluding magic lamp and then every place that
used it did so as 'ignitable(obj) || obj->otyp == MAGIC_LAMP'
so just include magic lamp.

I noticed that while hunting for an explanation for report #K2734
where returning to a previously visited level triggered the
warning "begin_burn: unexpected eggs".  I've decided that the
zombie apocalypse is probably the cause.  It inserted a new type
of timer in the list of such but it didn't bump EDITLEVEL to
invalidate save and bones files which relied on indices into the
old list.  I'm not sure whether we should bump that now.
2020-11-03 14:25:06 -08:00
PatR
87b378bb33 more Amask2align()
Recent change to Amask2align() was only masking the shrine bit
off its argument some of the time.
2020-11-01 14:30:25 -08:00
PatR
8907a5df9c more alignment conversion
The overview code could reveal the true alignment of an altar
if hero saw a mimic pretending to be an altar on that spot, or
reveal junk for the alignment when mimicking at altar on some
other spot.

Avoid passing macros that might evaluate their arguments more
than once to other macros which might also do that.  The hidden
code expansion can easily get out of hand (although in this case
it was modest).

Also, get rid of the unused MSA_foo alignment values since two
of them had the values swapped.  Lastly, make Amask2align() more
robust in case a value with the shrine bit set gets passed to it.
2020-10-30 17:46:21 -07:00
Patric Mueller
7086427aaa Enable checkpointing again by default
This was accidentally changed in the options refactoring in commit 68fdc3bbcb.
2020-10-30 20:30:21 +01:00
nhmall
96ba25241c revert to numeric 2020-10-30 09:14:23 -04:00
nhmall
01c4a50f98 warning and a bit of alignment-related header consolidation 2020-10-30 09:08:23 -04:00
PatR
0e713dc4e9 fix #K2617 - metallivores eating iron bars
Monsters with rust attacks (rust monster) and corrosion attacks
(black pudding, gray ooze) can eat or otherwise destroy iron bars
but xorns could only move through the iron bars spot without being
able to eat the metal there.  Change xorn to eat bars instead of
phazing through them.  Lets rock moles eat bars too.

Hero polymorphed into a rust monster would eat bars if trying to
move to their location but couldn't do so if already there (maybe
was in xorn form and now in rust monster form).  Xorns could pass
through them but not eat them.  Allow hero metallivores to eat
bars at the current location via 'e', similar to eating food off
the floor.  Hero as rock mole behaves like rust monster.
2020-10-23 19:43:10 -07:00
Pasi Kallinen
aeb0ea65e3 Mild Zombie Apocalypse
When a zombie (or lich) kills a monster in melee without a weapon,
the monster can rise few turns later as a zombie.

The only creatures that can be zombified are ones that actually have
a zombie counterpart monster. A zombie cannot turn a jackal into
a zombie, for instance. But it could turn a shopkeeper into a human
zombie, or a dwarf king into a dwarf zombie.

Zombies will fight with monsters that can be turned into zombies.

Originally this was a SliceHack feature, but this is based on xNetHack
version of it, with some modifications.
2020-10-23 19:47:10 +03:00
Bart House
7e3a739ef9 Add stringization of nhassert expression. 2020-10-20 20:14:27 -07:00
Pasi Kallinen
566dde8683 Match object description via single function
making the code more readable.

Instead of doing strcmp(OBJ_DESCR(objects[otyp]), "foo"),
just call objdescr_is(obj, "foo")

(via xNetHack)
2020-10-20 19:19:57 +03:00
Bart House
93ce6857d3 Tweaks to nhassert implementation. Change to warnings on MSC build. 2020-10-19 15:55:32 -07:00
Bart House
3842da9dbd Added nhassert to core. 2020-10-19 15:51:41 -07:00
Bart House
783efd3524 Remove the remapping of snprintf to _snprintf when compiling with MSC.
_snprintf and snprintf have one very important semantic difference.
_snprintf does NOT add terminating null character when the buffer limit
is reached while snprintf guarantees a terminating null character.  It
was a mistake to make this naming change hiding the fact that the
semantics don't match what the developer might expect.
2020-10-19 15:32:58 -07:00
Bart House
7795d82be6 Improved readability of topline state management. 2020-10-19 15:19:09 -07:00
PatR
42b466e87b artifact.h formatting
The automated reformatting way back when left artifact.h in need
of manual fixup, particularly SPFX_HPHDAM.
2020-10-14 09:25:45 -07:00
nhmall
48fa4fa5dd more warning bits 2020-10-10 16:28:17 -04:00
PatR
c154dd2609 fix #K2393 - brass lantern hit by water
Don't extinguish a brass lantern when hit by water unless it is
being submerged.
2020-10-09 12:02:26 -07:00
nhmall
5dcc328759 be more consistent with CROSS_TO_target macro names for cross-compiles
-DCROSS_TO_MSDOS	msdos cross-compile (djgpp cross-compiler)
-DCROSS_TO_AMIGA	Amiga cross-compile
-DCROSS_TO_WASM		wasm cross-compile (emscripten)
2020-10-08 13:49:24 -04:00
Pasi Kallinen
37339abebd Fix dropping const from params 2020-10-05 17:17:07 +03:00
Adam Powers
dc2d757399 libnethack pr385
roll parts of pr385 into source tree

This does not take the PR as is.

Unlike the PR, this streamlines and minimizes the integration somewhat:

- use hints/include mechanism instead of creating alternative
  Makefile.dat, Makefile.src, Makefile.top, Makefile.utl in sys/lib;
  those would have been a maintenance nightmare.

- don't have alternative mkmkfile.sh and setup.sh in sys/lib.

- sys/lib/libnethackmain.c differed from sys/unix/unixmain.c by
  very little, so just place a small bit of conditional code at the
  top of sys/unix/unixmain.c instead.

- changed the conditional code bits from __EMSCRIPTEN__ to
  CROSS_TO_WASM.

- You should be able to build the wasm result by:
    cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
    make fetch-lua    (<-one time)
    make WANT_LIBNH all

- You should be able to build LIBNBH by:
    cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
    make fetch-lua    (<-one time)
    make CROSS_TO_WASM=1 all

As it is currently coded, winshim.c requires C99.
2020-10-04 14:46:32 -04:00
Adam Powers
741e6fd5b7 initial shim graphics 2020-10-04 14:46:31 -04:00
Pasi Kallinen
40648503b2 Increment EDITLEVEL due to safe_wait 2020-10-02 19:11:15 +03:00
Pasi Kallinen
396b819988 Add safe_wait to toggle search and wait prevention 2020-10-02 19:00:40 +03:00
PatR
9045ccb63d venom fixes
Noticed when fixing 'D$'.  Some commands, including D, which should
have been handling venom weren't doing so.

I'm not sure whether I got all the applicable cases.
2020-10-01 16:41:56 -07:00
Pasi Kallinen
6a35a84c56 Fire sources can ignite candles, lamps, and potions of oil
... on the floor, in monster inventory, and in hero's inventory.

Items in your inventory being ignited produce a message even if you're
blind - you can see the lit-state by viewing inventory anyway, so just
give player the message.

(via xNetHack)
2020-09-30 19:49:10 +03:00
nhmall
d33cc59c64 move some left-over outdated files from old Mac 2020-09-28 18:42:27 -04:00
nhmall
5eada896e2 Merge branch 'crosscompile-integration-amiga' into NetHack-3.7 2020-09-28 18:08:15 -04:00
nhmall
ba34897fa6 Merge branch 'crosscompile-integration-core' into NetHack-3.7 2020-09-28 18:07:19 -04:00
nhmall
cb223271cb add cross-compile recipe for amiga
Disclaimer: This is a minimal recipe, just to get someone else
started if they have a desire to get a full cross-compile of
NetHack-3.7 going for the Amiga. Some NetHack code bitrot was
corrected, and it does seem able to compile the game itself
to a point. See caveats below.

- If you want to obtain the cross-compiler and tools/libs for Amiga
         https://github.com/bebbo/amiga-gcc

  To our knowledge, a pre-built copy isn't available, so you have to
  obtain the source via git and build it on your system.

  The build prerequisite packages for Ubuntu are easily obtained:

    sudo apt install make wget git gcc g++ lhasa libgmp-dev \
        libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev \
        autoconf rsync

  The build prerequisite packages for macOS are apparently easily
  obtained via homebrew, but that was not tested:

    brew install bash wget make lhasa gmp mpfr libmpc flex gettext \
    texinfo gcc make autoconf

  After installing the prerequite packages and the cross-compiler
  it was a straightforward build:

        git clone https://github.com/bebbo/amiga-gcc.git
        cd amiga-gcc
        make update
    [Note that you may have to take ownership of the files in the
     bebbo repo via chown before succesfully carrying out the next
     steps]
        make clean
        make clean-prefix
        date; make all -j3 >&b.log; date
  The compiler pieces are installed in /opt/amiga by default which
  was satisfactory for our initial attempt, but if you want you can
  alter the prefix before you build if you want. That is all
  spelled out on the page at: https://github.com/bebbo/amiga-gcc

  The Amiga cross-compile can then be carried out by specifying
  CROSS_TO_AMIGA=1 on the make command line.

  For example:
       make CROSS_TO_AMIGA=1 all
       make CROSS_TO_AMIGA=1 package

You can explicitly include tty and curses support if desired, otherwise
you'll end up with a tty-only cross-compile build. The SDL1 pdcurses
support has not been tested.

       make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_AMIGA=1 all

Also note that building the amiga targets using the make command
above, does not preclude you from building local linux or macOS
targets as well. Just drop the CROSS_TO_AMIGA=1 from the make
command line.

The cross-compiler hints additions are enclosed inside ifdef sections
and won't interfere with the non-cross-compile build in that case.

CAVEATS: The original NetHack Amiga build steps included the source for
some utilities that were built and executed on the amiga: txt2iff and
xpm2iff as part of the NetHack build procedure on amiga. Those did not
compile out-of-the-box on the linux host. They will either have to be:
    - ported to build and run on the linux or macOS cross-compile host

   or

    - their functionality will have to be rolled into amiga NetHack
      itself and executed on the target Amiga the first time the game
      is run, perhaps.

Good luck amiga aficionados, perhaps you'll be able to take this
initial effort forward and get NetHack-3.7 available on the amiga or
amiga-emulator. Let us know if you do, and we can roll changes in
if you provide them.
2020-09-28 17:30:22 -04:00
nhmall
b9b4755fe3 expand sys/unix Makefiles scope
Expand the use of the sys/unix Makefiles to be used for both normal
local builds and installs, as well as cross-compiles for other
platforms/targets.

Up until now, the primary unix Makefiles have treated util/host-side
component compiles, links and target object files just the same as
the game component compiles, links, and target object files.

Unfortunately, that meant that cross-compile effort typically had
to re-invent Makefiles specific to the cross-compile, creating a
maintenance burden and deviation from the typical local unix build
and providing a daunting obstacle to those that want to establish
build for a target environment/platform.

This change distinguishes between util/host-side component builds,
links, and component builds and targets object files destined for
the game (and other target platforms) in the Makefiles.

In theory, this will ease the effort for people that want to try to
resurrect NetHack perhaps on an old platform where it is no longer
viable to build NetHack-3.7 on the platform itself using old, outdated
compile tools, possibly with an old, outdated C dialect.

Some details:

-  Game-related targets in the Makefiles (as opposed to util/host-side
   targets that will be executed on the host), which could be destined
   for another platform in a cross-compile scenario are prefixed with
   $(TARGETPFX) so that they are distinguished.

   The default scenario where no cross-compiler is involved, is to
   define TARGETPFX to nothing, and therefore meant to have no effect.

-  Game-related compile and link commands in the Makefiles and their
   associated command line flags are distinguished from util/host-side
   compile and link commands in the Makefiles by using $(TARGET_CC),
   $(TARGET_CFLAGS), $(TARGET_LINK), $(TARGET_LFLAGS), $(TARGET_CXX),
   $(TARGET_CXXFLAGS), $(TARGET_LIBS).

   Those are used in the Makefile in place of $(CC), $(CFLAGS), $(LINK),
   $(LFLAGS), $(CXX), $(CXXFLAGS), $(LIBS).

   The default scenario where no cross-compiler is involved, defines
   the TARGET_ version of those Makefile variables to match their
   typical non-TARGET_ ounterparts.

-  The dependency lists in the Makefiles includes the $(TARGETPFX)
   prefix for stuff that would potentially be produced from a
   cross-compile build.

-  It adds pregame targets and $(PREGAME) variable, so that hints files
   can add some additional stuff if required for a cross-compile
   scenario.

   The default scenario where no cross-compiler is involved doesn't
   do anything for $(PREGAME).

-  It adds $(BUILDMORE) target and variable, so that hints files
   can add some additional things to be built for a cross-compile
   scenario.

-  It adds a "package" target and $(PACKAGE) variable, so that hints files
   can add steps for the target platform in a cross-compile
   scenario.

   The "install" target assumes local build and placement and
   isn't really applicable to a cross-compile scenario where the results
   really just need to be bundled up for transport to the target platform.

-  Also, this adds a pair of include files that can be updated with some
   cross-compile recipes as they evolve. They are named "cross-pre.2020"
   (for stuff to be included in the PRE section) and "cross-post.2020"
   for stuff to be included in the POST section via sys/unix/setup.sh.

   Those are included in sys/unix/hints/linux.2020 and
   sys/unix/hints/macOS.2020 hints files.
2020-09-28 16:25:31 -04:00
copperwater
9bb515f196 Prevent any type of terrain overwrite from replacing stairs/ladders
Consider the following scenario: There's a level where there's a zone of
des.replace_terrain() between the stairs and some other objective, and
the terrain is something non-walkable like trees. There's a chance that
the path is entirely blocked off by random replace_terrain, so you
make the level set terrain to '.' along a randline (or normal line, or
whatever) between the randomly placed stairs and the other side of the
replace_terrain zone. The problem: this overwrote the stairs with a '.'
as well.

This can be worked around in the lua file by first picking the desired
location of the stairs, then setting the terrain that overlaps with the
stairs, then doing des.stair() after that, but this is awkward and hard
to read.

So this makes it impossible for anything calling SET_TYPLIT (only called
in sp_lev.c) to overwrite stairs. I can't really think of a situation
where a level designer would want to define stairs, then maybe overwrite
them.
2020-09-28 20:00:12 +03:00
copperwater
0fef8fce9f Unify all special level filling options
The existing system was a confusing mess of competing names (filled,
needfill, prefilled, etc) that had varying semantics, with prefilled
being the worst offender as it meant at least three different things in
various contexts. This commit unifies everything in the code under
"needfill", and everything in Lua under "filled", which defaults to 0
everywhere.

This also removes the second argument to fill_special_room; that
function now just checks the needfill of the room it's passed. As
before, a filled == 2 value is used for a special room to indicate that
the room should set the appropriate level flag, but shouldn't actually
be stocked with anything (for instance, King Arthur's throne room); the
difference is that this now comes directly from the lua script instead
of being manipulated within sp_lev.c.

The prefilled argument had one use case that is occasionally used in the
level files: if the level designer had specified an ordinary region with
prefilled = 1, it would become a room to control monster arrivals on a
level -- monsters that arrive within the bounds of a room are supposed
to stay there.
However, not all of the places where the comments indicated this was
being used were using it correctly; I tested this by letting a few
monsters fall through the knox portal (they're supposed to be
constrained to the entry room) and waiting a hundred turns, then going
through the portal; they were not constrained to the room and had
"wandered" through its walls.
Instead of trying to maintain this special case, I have added an
optional "arrival_room" boolean argument to des.region, which forces it
to create a room for the purposes of constraining monster arrival.

I have gone through and replaced occurrences of prefilled in lua files
with the appropriate filled option (or arrival, as needed). In some
cases, that resulted in questionable regions such as a filled ordinary
area in a non-themeroom (I just dropped the filled=1), or an area which
didn't do anything, not even lighting (which I deleted).
2020-09-27 18:54:15 +03:00
copperwater
0b2b0965a8 Allow themed room subrooms to be filled
I noticed that any subrooms created within a themed room were bare -
they never had any monsters, objects, traps, or anything really,
regardless of whether filled = 1 was set on them. As a result, they're
pretty boring.

It turns out that the code in makelevel() responsible for stocking
ordinary rooms with stuff only looped through g.rooms, and completely
ignored subrooms. (Subrooms would not get stocked with items by virtue
of being part of the larger room; I tested this by dialing the item
generation in rooms way up, and none of those items ever got placed in a
subroom.)

To fix this, I've extracted the code that populates an ordinary room
into its own function, fill_ordinary_room, and made it recurse into its
own subrooms. (I also renamed fill_rooms and fill_room to include the
word "special" in their names, because they only deal with special
rooms.) Note that since special rooms follow a separate codepath, an
ordinary subroom of a special room won't get stocked; perhaps these
functions should be unified in the future.

The fill_ordinary_room code is pretty much a verbatim cut and paste from
makelevel, so there is not currently any consideration for the size of
the subroom or the fact that it is a subroom with respect to how many
monsters, traps, objects, etc get placed.

I'm not sure whether other things such as stair selection will ever
select themed room subrooms, or whether they too only look at g.rooms.
2020-09-27 18:54:14 +03:00
PatR
5df5079700 peacefuls witnessing attack against peaceful mon
The short exclamations ("Gasp!", "Why?", &c) led to ambiguity
about which monster was vocalizing them.  Use full sentences
which refer to the speaker.  It can become quite a bit more
verbose but is less likely to lead to confusion.  Perhaps it
should cut those off after a modest number of them have been
issued?
2020-09-24 00:44:07 -07:00
PatR
cf482f1f42 fix #K2203 - animals can talk
The code for peaceful monsters witnessing the hero attack another
peaceful monster and getting angry had a 20% of making them gasp in
surprise or exclaim "why?" in shock.  It was only requiring them to
have humanoid shape rather than checking for speech capability, so
peaceful zruty or minotaur, possibly other animals, could exclaim
comprehensibly.  Other things which shouldn't talk, like mummies,
would behave similarly.

This categorizes how a bunch of MS_foo types should react.  It has
only been lightly tested.
2020-09-20 18:38:31 -07:00
PatR
81ec2bfa2a pull request #386 - discovering teleport scroll
Since teleporation gives a "you matrialize" message even when
arriving close by, the old behavior of not learning a scroll of
teleportation when you land quite close to your original spot
no longer made sense.  Always [almost] discover teleport scroll
when reading it.

Also adds one-shot teleport control when reading a blessed scroll
of teleportation.  I changed that to be prevented when hero is
stunned, same as with full-fledged teleport control.

I reworded or reformatted several of the comments.  And removed
the EDITLEVEL increment in patchlevel.h; save and bones file
contents are not affected.

I've also added an unrelated comment about reading mechanics to
doread().

Closes #386
2020-09-18 15:34:29 -07:00
PatR
239b7aaf66 pick-a-color in color
Similar to how the pick-an-attribute menu for menu colors and
status highlights shows the attribute names using the attribute
so that you can see how it looks (or whether it is supported),
have the pick-a-color menu show the color names in the
corresponding color.  Does so by temporarily removing any
user-specified menu colors and setting up another list of such
for matching color names.

Forces the 'menucolors' option On while the pick-a-color menu is
in use, then restores the previous setting along with the user's
menu colorings.  Might need some way to avoid setting that for a
configuration where colors don't work.
2020-09-10 16:01:18 -07:00
PatR
a48b4aa8ba fix #K1963 - warning after placing worm tail
Report described this as a panic triggered by the sanity_check
option, but that's because it was running under the fuzzer, which
escalates any impossible() to panic(), rather than because nethack
panicked.

I couldn't find anything wrong--which doesn't mean that there
isn't something wrong--with place_worm_tail_randomly() and
random_dir().  They use xchar for map coordinates which should be
fine as long as no negative values are generated and I couldn't
discover any such.  The suggested fix of changing xchar to int
might indicate a compiler bug (although the odds of that are low).
The bogus coordinate of -15000 in the report suggests that
 typedef short int schar;
(which changes xchar too) is being used in the configuration but
I don't recall having any problems attributable to that.

This switches from xchar to int as a side-effect of replacing the
offending code entirely.  The new code might produce an 'ny' of -1
before goodpos() rejects it, so xchar would be inappropriate now.
The old code is commented out via #if 0 _after_ changing it from
xchar to int.

This also adds an extra sanity_check for worm tails, unrelated to
the current bug.  I'm not aware of any instance where it fails.
EXTRA_SANITY_CHECKS needs to be defined for it to do anything.
2020-09-08 03:03:03 -07:00
PatR
f20a6bb491 special level's lit state when changing terrain
Part of pull request #308:  when using des.terrain to set terrain,
default for lit state becomes 'unchanged' rather than 'unlit'.
des.replace_terrain already operates that way.  Replace lit state
magic numbers -1 and -2 with SET_LIT_RANDOM and SET_LIT_NOCHANGE.

Also change SET_TYPLIT() to not operate on map column 0 and move
it from rm.h to sp_lev.h.  It never belonged there, is only used
in sp_lev.c, and now because of the SET_LIT_ macros it couldn't be
used anywhere else unless sp_lev.h gets included too.
2020-09-06 16:17:33 -07:00
PatR
c062822a7c Qt tombstone bugs
Infrastructure bits:  Qt tombstone uses a short buffer; make sure that
the plname value fits instead of relying on snprintf() to truncate it.
A warning about gold, if any, was iffy but this should guarantee no
reason for future complaint.  Year was safe but a compiler sensitive
to buffer overflows wouldn't know that.

Actual bugs:  Qt used money in inventory for gold amount on tombstone;
that overlooks gold in containers and will be 0 by tombstone stage if
bones get saved.  Year was recalculated from current date+time instead
of using the value that gets passed in--blindly flagging that variable
as UNUSED was a mistake.
2020-08-20 16:56:50 -07:00
PatR
3a07880684 paper doll inventory display vs hallucination
During hallucination, actions which triggered update of persistent
inventory made Qt's display of map tiles for equipped objects have
those tiles switch randomly, but ordinary move-by-move fluctations
applied to floor objects left them alone.

Initially I took out hallucination of inventory items altogether,
but ended up putting that back and changing the floor hallucination
to affect Qt's paper doll too.  The display.h change isn't needed
but I've left it in.
2020-08-17 14:48:00 -07:00
PatR
0f65db801c tile2x11.h comment 2020-08-12 16:15:28 -07:00
PatR
264cbed2cc Qt menu sanity
The Qt menu entries which were executing nethack's help command
(the '?' menu) were doing so because their command keystroke was
a meta-character and such characters are being converted to '?'
to indicate an error in conversion to Latin1 character set.  The
old Qt3 code didn't perform any such conversion.

This fix feels fragile because there are two different places
deciding how to disambiguate partial extended commands (the code
for Qt's '#' handling and a new routine in the core).  Qt menus
now send '#' and enough letters to satisfy '#' handling for any
command which uses M-c or has no regular keystroke nor M-c one.
(If it were to send the full extended command name, the letters
after the unambiguous prefix would be left in the input queue to
be processed as subsequent commands.)

There is a fundamental problem that this doesn't address:  if
the player uses BIND directives in the run-time config file, the
Qt menu bindings will break unless the BINDs are all done before
selecting windowtype.  Qt's menu bindings translate a click on
a menu entry into the keystroke used to invoke the corresponding
command, so using BIND to change that after the menus are set up
will result in the wrong commands being executed.
2020-08-10 07:24:16 -07:00
nhmall
ac9ba38449 file header bump from "NetHack 3.6" to "NetHack 3.7" 2020-08-03 22:07:36 -04:00
PatR
30da367b80 udpate nethack's URL
This was changed in the Guidebook and dat/history some time back but
the value in the code was overlooked.  Switch protocol from http to
https and add trailing slash.
2020-08-02 10:59:50 -07:00
PatR
427f8e42d8 ^X vs hunger, encumbrance
When hunger state is "not hungry" (so omitted from the status line),
say so in the status section of ^X output.  Mainly so that wizard
mode can append the internal nutrition value without inserting an
entire line that [previously] wouldn't be present in regular play.

Show an internal value for encumbrance too, although that would be
better if it also included some indication of the amount where the
encumbrance state changes.  Encumbrance is confusing and I didn't
pursue that.
2020-08-01 19:17:56 -07:00
PatR
97cc689553 tin identification
Tin handling code used tin->cknown to indicate that the variety
(soup, deep fried, pureed, &c) was known, but neither object
identification nor end of game disclosure was setting cknown for
that type of object.

^I behaves as if cknown is set, so the problem was hidden during
times when anyone was likely to be paying attention.
2020-07-31 13:14:09 -07:00