Issue reported by BartekCupial: segfault occurred and was tracked to
behavior of a rolling boulder trap. Suggested fix was included, but it
assumes that the destination spot is valid so is suspect.
A comment pointed out that the path is validated when a rolling boulder
trap is created so the segfault should be impossible. I didn't find an
explanation but am adding a fix based on the one in the issue report.
Closes#1490
A 37 character field for holding a unique identifier is added
to the save file, as well as to an ancestor field in bones files.
Since it requires installation of libuuid package on Linux,
it requires an exlicit WANT_NHUUID=1 on the Make command line there.
Without the libuuid support, the saved nhuuid is empty, which should
be harmless.
This also moves the save and restore of gm.moves higher up so that it
already has a value the first time it is used against a relative saved
timestamp.
Invalidates savefiles and bones files due to new fields.
I need to get this committed before I can test out the macOS portion,
so there may be some build issues there briefly (hopefully), and
follow-up commits to resolve them.
Increments EDITLEVEL.
Add a pointer to struct you, and put umonst there. Eliminate
the youmonst struct in gy.
The naming convention better matches the other u related fields,
and u.umonst has the same level of indirection as other monst pointers.
The u.umonst pointer is cleared prior to saving the parent u (struct you),
and u.umonst is reestablished upon restore.
Invalidates existing saves and bones due to the presence of the added
pointer field in struct you.
Windows stores things a bit differently.
Use a static function in consoletty.c to preserve that behavior,
but still utilize the core colortable[] array.
declare colortable[] const and no longer static so it can be shared
by code in window ports..
get rid of the Windows console port rgbtable and use the
core colortable[] instead.
utilize function colortable_to_int32() in Windows console instead
of the rgbtable_to_long() in the Windows port.
delete the Windows rgbtable_to_long() function.
remove unused hexval field (show it in a comment)
The rgb values should be the same as they were
previously, just expressed with hex values on the
table initialization.
All the conduct feedback via "you ..." is directed at the character, so
seeing "you have rerolled your character 3 times" in conduct disclosure
looked strange. Change that to "your character was rerolled 3 times."
Switching symset in simple options menu did not reset the
map glyphs corectly. Just call the same routine for resetting
visuals as in the #optionsfull command.
Having it rolled into decl_globals_init() was
causing some early options to misbehave because
those early options were trying to use program_state
fields to determine their behavior, but decl_globals_init()
was resetting the program_state fields that were being used
to do that.
Issue reported by Shrigis1: hero at or close to full HP stepped on
a not-yet-discovered rolling boulder trap and was killed; end-of-game
disclosure reported "You could have avoided a one-shot death via
saving-grace."
Originally, saving grace was completely hidden, so the disclosure
line wouldn't have been included. Once disclosure was incorporated,
having saving grace not work for traps triggered by the hero seems
counter-intuitive, regardless of whether player is aware of the trap.
This makes saving grace apply to any damage applied by losehp(). The
original purpose of unexpectedly survivng by the skin of one's teeth
is still maintained.
Aside from having more of a chance of surviving via saving-grace,
the main difference is that some players might try for "survived by
saving-grace" as an unofficial conduct. As long as we don't start
tracking that as a conduct, I don't think this is a big deal.
Fixes#1499
../sys/windows/windmain.c:226:12: warning: address of array 'gc.chosen_windowtype' will always
evaluate to 'true' [-Wpointer-bool-conversion]
226 | if (gc.chosen_windowtype && *gc.chosen_windowtype)
../sys/windows/consoletty.c:873:27: warning: address of array 'back->utf8str' will always evaluate
to 'true' [-Wpointer-bool-conversion]
873 | if (back->utf8str && front->utf8str
| ~~~~~~^~~~~~~ ~~
../sys/windows/consoletty.c:873:45: warning: address of array 'front->utf8str' will always evaluate
to 'true' [-Wpointer-bool-conversion]
873 | if (back->utf8str && front->utf8str
| ~~ ~~~~~~~^~~~~~~
Issue reported by Tomsod nearly six months ago: missile damage against
hero was not honoring the Half_physical_damage attribute when hero had
that.
Fixes#1459
Change the classification of new weaponstatus, armorstatus, and
terrainstatus from 'OptS_Status' to 'OptS_Advanced' to keep the menu
for the 'O' command shorter. Doesn't affect 'mO'.
Including them in 'O' might make more players notice them though.
armorstatus, and terrainstatus
This adds three special status items to show at a glance what the hero
is wielding, wearing, and standing on.
Each of the three items has its own boolean option rather than try to
fix them in with the existing opttional status conditions. After a
lot of testing, I think the weapon and armor ones will prove useful
but the terrain one probably won't be.
Presently it is implemented for tty and curses. When I developed it
six years ago, it was also working for X11 but I'm not able to test
the resurrection of that part so have left it out.
This removes or updates several true rumors that have become
misleading or inaccurate due to changes to the mechanics they were
describing, and adds several new rumors describing mechanics that
are either new, or are intended to be a larger part of the game
than they were in previous versions.
More oracularities describing the new mechanics are needed, but I
haven't managed to get into the write frame of mind to write in the
Oracle's voice yet...
Any sort of iron footwear now protects from traps, and polymorph
traps change one sort of iron footwear into a different sort of
iron footwear (removing any incentive to try to farm them, because
you will see both options very quickly).