]> granicus.if.org Git - nethack/log
nethack
4 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Mon, 28 Dec 2020 02:22:48 +0000 (21:22 -0500)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

4 years agosome tile processing fix-ups.
nhmall [Mon, 28 Dec 2020 02:20:44 +0000 (21:20 -0500)]
some tile processing fix-ups.

Some of the new colors added to some monster tiles did not
have gray scale mappings. This fixes the processing by
mapping them to *something*, but optimal gray scale mappings
for the new colors will require follow-up evaluation at some
point.

4 years agoreformat Qt/qt_clust.cpp
PatR [Mon, 28 Dec 2020 01:01:33 +0000 (17:01 -0800)]
reformat Qt/qt_clust.cpp

4 years agoArt Contribution: Differentiating gendered monster tiles PR #430
nhmall [Sun, 27 Dec 2020 23:00:48 +0000 (18:00 -0500)]
Art Contribution: Differentiating gendered monster tiles PR #430

From the pull request author NullCGT:

This pull request is a response to 0c3b964, in which nhmall expressed interest in contributions that would make gendered tiles visually distinguishable from one another. Since I've spent way too many hours editing NetHack's default tileset and the thought of trying to merge this commit into my variant gives me an absurdly massive headache, I thought I would have a go at it!

Making tiles of different genders distinct in NetHack presents an interesting problem. While it would be fun to create highly distinct tiles for every gender, doing so would reduce the accessibility of the game, since players would have to remember many more tiles, and might end up confusing one monster for another. Visual clarity is key.

Therefore, I had the following goals when creating this pull request:

1. If there is an interesting way to differentiate tiles by gender, do so.
2. Any sort of differentiation should be minor enough that a user can still tell what a monster is at a glance. Essentially, visual clarity comes before differentiation by gender.
3. Try to use a "TDTTOE method" of differentiating tiles. For example, female cats are more colorful than males, because generally male cats have only two colors of fur. Basically, I spent a lot of time on wikipedia researching sex characteristics of different species.
4. Try not to fall into "female = longer hair / eyelashes." While this feature will unfortunately require some gender-essentialist visual shorthand, this tropes is overdone and exhausting.

Please let me know what you think; I'm totally open to feedback on all of this and happy to make modifications. I've attached the resulting tiles file to this post in png form.

The alterations made in this pull request are as follows:

- Female ants are slightly larger than male ants, just like in real life. I could have added wings to the male ants, but I felt that doing so would lead to some confusion.
- Female wolves are slightly smaller than male wolves. There wasn't a great way to show this without making winter wolves look very similar to winter wolf cubs, so I just made the female wolves tails slightly shorter.
- Calico cats are almost exclusively female, so I turned the female cats into calico cats. The other piece of logic behind this choice was that players will probably really enjoy seeing different variants of their pets.
- Female hobbits, minotaurs, humans, werecreatures, and aleaxes wear slightly different clothing.
- Dwarfs are not differentiated in any way whatsoever. According to Terry Pratchett (in Unseen Academicals, if I remember correctly) it is almost impossible to tell what gender a dwarf is, even for fellow dwarfs. I strongly believe that NetHack should follow this tradition.
- Female leprechauns, archons, frost giants, guards, and all types of gnomes are clean-shaven. Although of course not one hundred percent accurate, it's convenient visual shorthand.
- Centaur tiles have no differentiation because the different types of centaurs are already extremely difficult to tell apart from one another.
- Female ogre tyrants and elven monarchs have slightly different crowns.
- Female quantum mechanics have a different hairstyle and no beard. Genetic engineers look the same, because the genetic engineer tile is perfect.
- Female barrow wights look like old grandmothers with flyaway hair. I kept the hair color the same and used a similar quantity of pixels so that they look similar enough to the males that you can tell they are barrow wights.
- Female archeologist tile is a reference to a certain archeologist known for raiding tombs.

4 years agoMerge branch 'NullCGT-feature/gendered-tiles' into NetHack-3.7
nhmall [Sun, 27 Dec 2020 22:59:30 +0000 (17:59 -0500)]
Merge branch 'NullCGT-feature/gendered-tiles' into NetHack-3.7

4 years agoMerge branch 'feature/gendered-tiles' of https://github.com/NullCGT/NetHack into...
nhmall [Sun, 27 Dec 2020 22:50:29 +0000 (17:50 -0500)]
Merge branch 'feature/gendered-tiles' of https://github.com/NullCGT/NetHack into NullCGT-feature/gendered-tiles

4 years agosome code cleanup, mostly Qt map
PatR [Sun, 27 Dec 2020 20:33:03 +0000 (12:33 -0800)]
some code cleanup, mostly Qt map

The Qt routine NetHackQtMapViewport::Clear() was broken, but
fixing it hasn't changed the glyph display issue.  None of the
other changes here would be expected to affect that but they
are in/among the sections of code under investigation.

4 years agoMore monster gender tiles additions.
Kestrel [Sun, 27 Dec 2020 19:01:27 +0000 (13:01 -0600)]
More monster gender tiles additions.

4 years agotty unused parameter under some configs
nhmall [Sun, 27 Dec 2020 17:51:40 +0000 (12:51 -0500)]
tty unused parameter under some configs

4 years agoDifferentiate male and female ant tiles.
Kestrel [Sun, 27 Dec 2020 16:56:30 +0000 (10:56 -0600)]
Differentiate male and female ant tiles.

Female ants are larger than male ants. I could have added wings to the male ants, but I felt that doing so would lead to a loss in visual clarity.

4 years agomonster gender-related follow-ups
nhmall [Sun, 27 Dec 2020 15:45:13 +0000 (10:45 -0500)]
monster gender-related follow-ups

remove unintentionally left M2_MALE flag on dwarf lord/lady/leader

provide a way to verify gender information relayed from the core
in debug mode on tty via #wizmgender debugging extended command

4 years agomimics in inaccessible locations
PatR [Sun, 27 Dec 2020 13:27:02 +0000 (05:27 -0800)]
mimics in inaccessible locations

Suppress insane sanity check.

4 years agocurses comment bit
PatR [Sun, 27 Dec 2020 13:09:44 +0000 (05:09 -0800)]
curses comment bit

Don't require c99, even in code that's suppressed via #if 0.

4 years agounix/Makefile.top vs tiles2bmp
PatR [Sun, 27 Dec 2020 13:01:39 +0000 (05:01 -0800)]
unix/Makefile.top vs tiles2bmp

Add a missing update to sys/unix/Makefile.top.  Makefile.dat
only requires that tiles2bmp exist, without knowing anything
about whether it needs to be rebuilt.  So force Makefile.top to
make sure that it's up to date, similar to how tiles2x11 gets
handled.

4 years agoanother follow-up bit - punctuation consistency
nhmall [Sun, 27 Dec 2020 00:21:37 +0000 (19:21 -0500)]
another follow-up bit - punctuation consistency

an uppercase entry was left in the monsters.txt tile file, but
changed elsewhere

4 years agotrailing semicolon bit
nhmall [Sun, 27 Dec 2020 00:09:54 +0000 (19:09 -0500)]
trailing semicolon bit

4 years agoincorporate some pmnames feedback
nhmall [Sun, 27 Dec 2020 00:07:19 +0000 (19:07 -0500)]
incorporate some pmnames feedback

Also an update to a fixes37.0 entry

4 years agoswitch curses port to use the new tty_print_glyph argument
nhmall [Sat, 26 Dec 2020 23:35:09 +0000 (18:35 -0500)]
switch curses port to use the new tty_print_glyph argument

4 years agopmnames mons gender naming plus a window port interface change
nhmall [Sat, 26 Dec 2020 16:23:23 +0000 (11:23 -0500)]
pmnames mons gender naming plus a window port interface change

add MALE, FEMALE, and gender-neutral names for individual monster species
to the mons array. The gender-neutral name (NEUTRAL) is mandatory, the
MALE and FEMALE versions are not.

replace code uses of the mname field of permonst with one of the three
potentially-available gender-specific names.

consolidate some separate mons entries that differed only by species into a
single mons entry (caveman, cavewoman and priest,priestess etc.)

consolidate several "* lord" and "* queen/* king" monst entries into
their single species, and allow both genders on some where it makes some
sense (there is probably more work and cleanup to come out of this at some
point, and the chosen gender-neutral name variations are not cast in stone
if someone has better suggestions).

related function or macro additions:
    pmname(pm, gender) to get the gender variation of the permonst name. It
    guards against monsters that haven't got anything except NEUTRAL naming
    and falls back to the NEUTRAL version if FEMALE and MALE versions are
    missing.

    Ugender to obtain the current hero gender.
    Mgender(mtmp) to obtain the gender of a monster

While the code can safely refer directly to pmnames[NEUTRAL] safely in the
code because it always exists, the other two (pmnames[MALE] and
pmnames[FEMALE] may not exist so use:
    pmname(ptr, gidx)
      where -ptr is a permonst *
            -gidx is an index into the pmnames array field of the
             permonst struct
pmname() checks for a valid index and checks for null-pointers for
pmnames[MALE] and pmnames[FEMALE], and will fall back to pmnames[NEUTRAL] if
the pointer requested if the requested variation is unavailable, or if the
gidx is out-of-range.

Allow code to specify makemon flags to request female or male (via MM_MALE
and MM_FEMALE flags respectively)to makedefs, since the species alone doesn't
distinguish male/female anymore. Specifying MM_MALE or MM_FEMALE won't
override the pm M2_MALE and M2_FEMALE flags on a mons[] entry.

male and female tiles have been added to win/share/monsters.txt.
The majority are duplicated placeholders except for those that were
separate mons entries before. Perhaps someone will contribute artwork in the
future to make the male and female variations visually distinguishable.

tilemapping via has the MALE tile indexes in the glyph2tile[]
array produced at build time. If a window port has information that the
FEMALE tile is required, it just has to increment the index returned
from the glyph2tile[] array by 1.

statues already preserved gender of the monster through STATUE_FEMALE
and STATUE_MALE, so ensure that pmnames takes that into consideration.

I expect some refinement will be required after broad play-testing puts it to
the test.

    consolidate caveman,cavewoman and priest,priestess monst.c entries etc

This commit will require a bump of editlevel in patchlevel.h because it alters
the index numbers of the monsters due to the consolidation of some. Those
index numbers are saved in some other structures, even though the mons[] array
itself is not part of the savefile.

Window Port Interface Change

Also add a parameter to print_glyph to convey additional information beyond
the glyph to the window ports. Every single window port was calling back to
mapglyph for the information anyway, so just included it in the interface and
produce the information right in the display core.

The mapglyph() function uses will be eliminated, although there are still some
in the code yet to be dealt with.

win32, tty, x11, Qt, msdos window ports have all had adjustments done to
utilize the new parameter instead of calling mapglyph, but some of those
window ports have not been thoroughly tested since the changes.

Interface change additional info:

    print_glyph(window, x, y, glyph, bkglyph, *glyphmod)
            -- Print the glyph at (x,y) on the given window.  Glyphs are
               integers at the interface, mapped to whatever the window-
               port wants (symbol, font, color, attributes, ...there's
               a 1-1 map between glyphs and distinct things on the map).
            -- bkglyph is a background glyph for potential use by some
               graphical or tiled environments to allow the depiction
               to fall against a background consistent with the grid
               around x,y. If bkglyph is NO_GLYPH, then the parameter
               should be ignored (do nothing with it).
                -- glyphmod provides extended information about the glyph
               that window ports can use to enhance the display in
               various ways.
                    unsigned int glyphmod[NUM_GLYPHMOD]
               where:
                    glyphmod[GM_TTYCHAR]  is the text characters associated
                                          with the original NetHack display.

                    glyphmod[GM_FLAGS]    are the special flags that denote
                                          additional information that window
                                          ports can use.

                    glyphmod[GM_COLOR] is the text character
                                       color associated with the original
                                       NetHack display.

Support for including the glyphmod info in the display glyph buffer
alongside the glyph itself was added and is the default operation.
That can be turned off by defining UNBUFFERED_GLYPHMOD at compile time.
With UNBUFFERED_GLYPHMOD operation, a call will be placed to map_glyphmod()
immediately prior to every print_glyph() call.

4 years agohelp: dynamic keylist
PatR [Fri, 25 Dec 2020 22:39:13 +0000 (14:39 -0800)]
help: dynamic keylist

Make '?i' show special commands (primarily prefixes) without any
key assigned (^A and ^C are possible by undefining DOAGAIN and
defining NO_SIGNAL, respectively, not sure about any others) or
are blocked because another special command earlier in the list
is bound to the same key or player has tried to bind one to an
active movement command (ie, key used for movement by the current
number_pad setting).

4 years agofix github issue #426 - binding special commands
PatR [Fri, 25 Dec 2020 21:57:05 +0000 (13:57 -0800)]
fix github issue #426 - binding special commands

Binding 'repeat' (DOAGAIN, or redo) to a different key than ^A
didn't work as intended because the code that used it was
checking for DOAGAIN (a key value from config.h) instead of
g.Cmd.spkeys[NHKF_DOAGAIN] (the key currently bound to repeat).

Contrary to the github issue, re-bound prefix keys worked ok for
me if followed by a direction.  However, they behaved strangely
if followed by anything else.  If the keystroke was stolen from
some other command and that command hadn't been bound to another
key, following the prefix with a non-direction could end up
executing the command that used to own the key.  For example,
 BIND=d:nopickup
to use 'd' to move without auto-pickup would work if you used
d<direction> but if you used d<something-else> if would execute
the drop command.

The NHKF_REQMENU prefix could be bound to some key other than
'm' but it only worked as intended if the new key was a movement
prefix.

This also makes DOAGAIN be unconditional.  If it is deleted or
commented out in config.h, the default binding will be '\000' so
unusable (freeing up ^A for something), but still be available
to be bound to some key (perhaps even ^A).

This also includes an unrelated change to mdlib.c.  The comments
added to config.h will force a full rebuild.  Changing mdlib.c
now rather than separately will avoid forcing that twice.

Fixes #426

4 years agotty: winch_handler vs NO_SIGNAL
PatR [Fri, 25 Dec 2020 01:53:57 +0000 (17:53 -0800)]
tty: winch_handler vs NO_SIGNAL

While testing something unrelated, I built with NO_SIGNAL
defined and winch_handler() caused an unused function warning.

4 years agofix github issue #427 - unreadable mail
PatR [Thu, 24 Dec 2020 21:41:17 +0000 (13:41 -0800)]
fix github issue #427 - unreadable mail

The change to make mail objects and monsters separate from mail
delivery (so that toggling the latter wouldn't invalidate save
and bones files) made it possible to wish for scrolls of mail,
find such in bones left by someone who did, or write such via
magic marker.  That was probably unintentional but I've left it
as-is.  The problem was that reading such scrolls issued a
warning:  "What weird effect is this?" because reading scrolls
of mail was only allowed when interacting with MAIL was enabled.

The issue suggested replacing #if MAIL with #if MAIL_STRUCTURES
in seffects(), and then insert #if MAIL in the part of reading
that deals with 'real' (or randomly faked for micros) mail.  I've
done both of those, and also added a couple of message variations
for the unreal cases.

Closes #427

4 years agoPrevent monsters from picking up locked containers
Pasi Kallinen [Thu, 24 Dec 2020 20:37:58 +0000 (22:37 +0200)]
Prevent monsters from picking up locked containers

4 years agowin32: avoid game exit dialog lacking any explanation
nhmall [Thu, 24 Dec 2020 01:31:54 +0000 (20:31 -0500)]
win32: avoid game exit dialog lacking any explanation

4 years agodata.base: Croesus date
PatR [Wed, 23 Dec 2020 23:48:26 +0000 (15:48 -0800)]
data.base: Croesus date

4 years agofeedback for monsters' health
PatR [Wed, 23 Dec 2020 18:43:58 +0000 (10:43 -0800)]
feedback for monsters' health

For farlook description of a monster, and for "killed by monster"
when game ends, include an indication of the monster's health:
  uninjured          full health
  barely wounded     95%+ health
  slightly wounded   80%+
  wounded            20%..80%
  heavily wounded    20%-
  nearly deceased     5%-, or 1HP for really weak monsters
These descriptions and the criteria for choosing which one will
probably need some tuning.

Messages referring to the monster, including combat, do not
include the extra verbosity.

4 years agoremove a solved item from Qt-issues.txt
PatR [Wed, 23 Dec 2020 16:26:54 +0000 (08:26 -0800)]
remove a solved item from Qt-issues.txt

4 years agofix #K3231 - objects vs pits and holes
PatR [Tue, 22 Dec 2020 21:48:29 +0000 (13:48 -0800)]
fix #K3231 - objects vs pits and holes

This got out of hand pretty quickly.  can_reach_floor() had
different criteria than trap activation.  Objects dropped at a
hole locations that don't fall through were treated as if they
were at the bottom of an abyss, so couldn't be examined or
picked up.

This a bunch of changes; it is bound to introduce some new bugs.

4 years agoQt support for changing 'statuslines' dynamically
PatR [Tue, 22 Dec 2020 19:10:32 +0000 (11:10 -0800)]
Qt support for changing 'statuslines' dynamically

Turns out it was nearly as simple as I originally thought.
I just missed one significant detail the first time around.
This leaves DYNAMIC_STATUSLINES as conditionl but now enables
it by default.  Using 'O' to change 'statuslines' from 2 to 3
or vice versa now works for Qt as well as for curses and tty.

4 years agooption help
PatR [Tue, 22 Dec 2020 03:02:11 +0000 (19:02 -0800)]
option help

I stated out by changing dat/opthelp to stop shouting the boolean
defaults: [TRUE] -> [True], [FALSE] -> [False].  I ended up doing
a partical reconcilliation between ?g (dynamic list of options)
and ?h (dat/opthelp).  There were several inapplicable options in
the dynamic list, so this changes option_help() to avoid those.

I barely glanced at the compound options so they may not sync up.

4 years agoAC and obj->spe limits: +127/-128 -> +99/-99
PatR [Mon, 21 Dec 2020 22:09:17 +0000 (14:09 -0800)]
AC and obj->spe limits: +127/-128 -> +99/-99

Cap overall AC at -99 instead of -128.  Put the same limit of 99
on enchantment and charge count of individual objects.

^X now reports if/when AC has reached its limit since players
could see that reaching that limit and then enchanting worn items
will change the worn items but not the total.  (Same thing would
have happened with -128, just without any explanation and less
likely to accomplish.)

Won't affect normal play for any reasonable definition of normal.

4 years agocron daily Guidebook.txt update
nhmall [Mon, 21 Dec 2020 02:24:51 +0000 (21:24 -0500)]
cron daily Guidebook.txt update

4 years agoMore futureproofing hypotheticals
Pasi Kallinen [Sun, 20 Dec 2020 10:23:09 +0000 (12:23 +0200)]
More futureproofing hypotheticals

If you set COLNO larger than BUFSZ, few places cause a buffer overrun.
Add a new buffer size definition, COLBUFSZ, which is the larger of
COLNO and BUFSZ, used in places that care about a screen-wide string.

4 years agore-implement pull req #334 - sorting discoveries
PatR [Sun, 20 Dec 2020 01:45:49 +0000 (17:45 -0800)]
re-implement pull req #334 - sorting discoveries

The pull request changed \ and ` output to unconditionally show
discoveries in alphabetical order.  That's nearly useless except
when looking at prediscovered weapons and armor that fighter
types start out knowing.

This allows the player to choose sorting order via the new
'sortdiscoveries' option.  In addition to setting it via
config file or 'O', it can be set via 'm' prefix for \ and `.
Choices are:
 o - sort by class, by order of discovery in class (default);
 s - sort by 'sortloot' classification which groups sub-class
     items (so all helmets before any other armor, then all
     gloves, then boots, and so on); within each sub-class, or
     whole class for classes which don't subdivide so usefully,
     partly-discovered types (where a name has been assigned)
     come before fully ID'd types;
 c - sort by class, alphabetically within class;
 a - sort alphabetically across all classes.

Turned out to be a large amount of work for fairly little gain,
although I suspect that 'sortdiscoveries:s' will eventually be
more popular than the default.

Invalidates existing save files so that current sort setting can
persist across save/restore cycles.

Closes #334

4 years agoAdd a new themed room: "Twin business"
Pasi Kallinen [Sat, 19 Dec 2020 11:11:36 +0000 (13:11 +0200)]
Add a new themed room: "Twin business"

This themed room boasts two shops, a weapons and an armor store,
that can generate in a number of different configurations.

Makes the random corridor joining routine obey unjoined areas.

Fixes a bug in shopkeeper naming routine, where multiple shops
of the same type on the same level might reuse the shopkeeper name.

This is modified and consolidated commit from xNetHack by
copperwater <aosdict@gmail.com>.

4 years agocallable venom
PatR [Sat, 19 Dec 2020 02:04:34 +0000 (18:04 -0800)]
callable venom

Allow the two venoms to be given type names.  Only matters if
player manages to get either of them into inventory.

4 years agocron daily updates to Files and doc/Guidebook
nhmall [Sat, 19 Dec 2020 02:01:10 +0000 (21:01 -0500)]
cron daily updates to Files and doc/Guidebook

4 years agodisplacing pets into water
PatR [Fri, 18 Dec 2020 23:46:13 +0000 (15:46 -0800)]
displacing pets into water

Don't let hero at water or lava location swap places with a
pet that can't survive there.  This was a regression to 3.4.3
behavior introduced when displacer beast monster was added.
I can't remember whether the regression was intentional at the
time, but guess not because I'm fairly sure that I would have
included a comment about it.

4 years agoconcealed monster sanity checks
PatR [Fri, 18 Dec 2020 23:05:54 +0000 (15:05 -0800)]
concealed monster sanity checks

Add some more checks to sanity_check_single_mon().  If mon->data
is discovered to be bad, panic instead of just issuing a warning
since a subsequent crash would be inevitable.  Make sure hidden
ceiling hiders have a ceiling to hide at (so not on the planes of
air or water; some quest levels should probably be classified as
"no ceiling" but currently aren't).  Perform a few mimic checks.

Protection from shape changers had a couple of minor bugs.  A mimic
hidden at a spot the hero couldn't see would be allowed to remain
hidden (and stay that way once within view because protection from
shape changers isn't re-checked during ordinary activity).  Also,
if a pet was shape-changed while eating a mimic corpse at the time
protection from shape changers started, it would fall into untimed
sleep as part of being forced back to normal shape [rescham()] if
its location could be seen.

4 years agoFix monster hide state when chain is moved
Pasi Kallinen [Fri, 18 Dec 2020 17:31:47 +0000 (19:31 +0200)]
Fix monster hide state when chain is moved

4 years agoQt text window search
PatR [Thu, 17 Dec 2020 21:55:10 +0000 (13:55 -0800)]
Qt text window search

Fix the strangeness where typing ':' in a menu window initiated
the menu search operation but typing ':' in a text window saw
the shift key be pressed but not the ';' that went with it, even
though they both called the same key decoding routine.  That made
typing ':' to initiate text search be impossible.  Menu windows
did more input focus manipulation in their constructor.  Mimicking
that in text windows fixes the problem with keys not being seen by
the text window's keystroke handler.

4 years agofix the tail-less long worm placement warning
PatR [Thu, 17 Dec 2020 20:21:35 +0000 (12:21 -0800)]
fix the tail-less long worm placement warning

Hidden tail segment was taken off the map as intended but the
check and warning in place_wormtail_randonly() didn't expect
to see that.  A post-3.6 issue.

Also fix the spelling error in the warning message.

4 years agoclick_to_cmd() vs #therecmdmenu
PatR [Thu, 17 Dec 2020 19:38:18 +0000 (11:38 -0800)]
click_to_cmd() vs #therecmdmenu

Clicking on an adjacent location while 'herecmd_menu' is On
didn't run therecmd as intended.  If it had, maybe somebody
would have noticed how broken it is.  This reorganizes the mouse
click handling but leaves therecmd commented out since it hasn't
been fixed.

The #therecmdmenu command and tentative click handling for
adjacent spots should probably be removed.  They've been in place
for slightly over three years and nobody has ever reported that
they don't work properly.

4 years agoadopt some orphan commands
PatR [Thu, 17 Dec 2020 03:22:04 +0000 (19:22 -0800)]
adopt some orphan commands

'? i' shows three keyless commands in the General section.  This
makes M-X the key for #exploremode.  #herecmdmenu and #therecmdmenu
are still keyless but now autocomplete.

A ridiculous amount of documentation for a three line code change.

4 years agoallow #exploremode from wizard mode
PatR [Wed, 16 Dec 2020 11:07:55 +0000 (03:07 -0800)]
allow #exploremode from wizard mode

Allow changing form debug mode to explore mode without resorting
to a debugger.  The same caveat, "you won't be able to change back,"
applies as when in normal play.

Character's name will remain "wizard" rather than reverting to
whatever it would have been if not starting in wizard mode.

4 years agoextra ^X feedback
PatR [Wed, 16 Dec 2020 10:49:00 +0000 (02:49 -0800)]
extra ^X feedback

Report "abnormal" play (wizard mode or explore mode) in ^X output
or end of game dumplog.  Omitted for normal play.

4 years agoAdded MSDOS build and made improvements to pipeline configuration.
Bart House [Wed, 16 Dec 2020 08:43:59 +0000 (00:43 -0800)]
Added MSDOS build and made improvements to pipeline configuration.

4 years ago'? i' refinement
PatR [Wed, 16 Dec 2020 00:33:51 +0000 (16:33 -0800)]
'? i' refinement

Make the key bindings help better able to decide whether a key
binding actually works.  If you bind some command to a key that is
used by default for a prefix, the commands array will indicate that
it (the bound key) runs the bound command.  But if you don't bind
some other key to the prefix action, typing that earlier key will
perform the prefix action instead.  The code for displaying the
list of key bindings needs to know that for the case where no other
key runs the command.

BINDINGS=M:takeoffall
will still report 'A'==takeoffall, which continues to work, but it
would not show 'M'==takeoffall because 'M' is still used to run
without autopickup which takes precedence over ordinary commands.

BINDINGS=A:nothing
BINDINGS=M:takeoffall
would omit any mention of takeoffall in the '? i' output.  Now it
will show #takeoffall as a keyless command at the end of the 'Game
commands' section.

4 years agoFix monster hide status when mon relocated
Pasi Kallinen [Tue, 15 Dec 2020 15:50:28 +0000 (17:50 +0200)]
Fix monster hide status when mon relocated

4 years agoFix monster hide status when moving ball & chain
Pasi Kallinen [Tue, 15 Dec 2020 15:35:07 +0000 (17:35 +0200)]
Fix monster hide status when moving ball & chain

4 years agoModify mingw makefile to allow caller to specify LUA build parameters.
Bart House [Tue, 15 Dec 2020 10:20:11 +0000 (02:20 -0800)]
Modify mingw makefile to allow caller to specify LUA build parameters.

4 years agoRevert "Switch mingw build to use submodules in default path."
Bart House [Mon, 14 Dec 2020 04:31:01 +0000 (20:31 -0800)]
Revert "Switch mingw build to use submodules in default path."

This reverts commit e5fb08ae4e2a3f38b831cadd108ebd78248a44db.

4 years agoRevert "Working on getting WinGW building with Azure pipeline."
Bart House [Mon, 14 Dec 2020 04:38:56 +0000 (20:38 -0800)]
Revert "Working on getting WinGW building with Azure pipeline."

This reverts commit d88749e4196a69a24e8cb8287e68f87fce2c0292.

4 years agoRevert "Make compiling the lua interpreter optional."
Bart House [Mon, 14 Dec 2020 08:24:05 +0000 (00:24 -0800)]
Revert "Make compiling the lua interpreter optional."

This reverts commit f89005efd7ce511b90870ae1076e4ec8836a8435.

4 years agoReverting recent changes that hard coded use of submodules.
Bart House [Tue, 15 Dec 2020 09:50:01 +0000 (01:50 -0800)]
Reverting recent changes that hard coded use of submodules.

4 years agoRe-enable mingw pipeline build. Use pdcurses submodule for pipeline
Bart House [Tue, 15 Dec 2020 08:53:01 +0000 (00:53 -0800)]
Re-enable mingw pipeline build.  Use pdcurses submodule for pipeline
mingw build.

4 years agoUse LUASRC variable when generating nhlua.h.
Bart House [Tue, 15 Dec 2020 08:46:55 +0000 (00:46 -0800)]
Use LUASRC variable when generating nhlua.h.

4 years agoDisable mingw build while we are still getting it to work.
Bart House [Tue, 15 Dec 2020 04:46:04 +0000 (20:46 -0800)]
Disable mingw build while we are still getting it to work.

4 years agospell learning feedback
PatR [Mon, 14 Dec 2020 21:12:33 +0000 (13:12 -0800)]
spell learning feedback

Tell the player the spell casting letter when learning a new spell:
|You add "knock" to your repertoire, as 'e'.
Comparable to "k - ring mail" when picking up a suit of ring mail
puts it into inventory slot k.

4 years agoQt paper doll bit
PatR [Mon, 14 Dec 2020 20:32:43 +0000 (12:32 -0800)]
Qt paper doll bit

Override the 'implicit_uncursed' option when formatting an item
of equipment for its paper doll tool tip.  Each tile is outlined
in yellow if known to be uncursed; force "uncursed" in the tool
tip text for the same situation.

Also add or revise some comments.

4 years agoFinal changes needed to enable Windows minGW build.
Bart House [Mon, 14 Dec 2020 18:17:02 +0000 (10:17 -0800)]
Final changes needed to enable Windows minGW build.

Removed some of the temporary changes necessary due to 4 hour delay.
Added the specification of the working directory to avoid the change
in working directory behavior that occurs when checking out one
repository vs. two.

4 years agoModify expectations of where LUA sources are located.
Bart House [Mon, 14 Dec 2020 17:56:59 +0000 (09:56 -0800)]
Modify expectations of where LUA sources are located.

We want the build to assume the same basic layout as the lua repository.
The sources are immediately at the top of the repository and not in
a subdirectory called 'src'.

4 years agoFix segfault when the Wizard tried teleporting on the planes
Pasi Kallinen [Mon, 14 Dec 2020 15:46:57 +0000 (17:46 +0200)]
Fix segfault when the Wizard tried teleporting on the planes

The wizard of Yendor tried teleporting to the stairs on the
plane of Earth, but there are none there.

This was caused by the stairs structure reworking.

Fixes #422

4 years agoMakefile.msc update for visual studio 16.8.3
nhmall [Mon, 14 Dec 2020 12:46:23 +0000 (07:46 -0500)]
Makefile.msc update for visual studio 16.8.3

4 years agodocument typo fixes in README.xcode
nhmall [Mon, 14 Dec 2020 12:20:14 +0000 (07:20 -0500)]
document typo fixes in README.xcode

Closes #424

4 years agoThis is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt
nhw_cron [Mon, 14 Dec 2020 09:24:05 +0000 (04:24 -0500)]
This is cron-daily v1-Jan-20-2020.  guidebook updated: doc/Guidebook.txt

4 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Mon, 14 Dec 2020 04:24:07 +0000 (23:24 -0500)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

4 years agogithub pull request #417 - disclosing apron text
PatR [Mon, 14 Dec 2020 11:30:58 +0000 (03:30 -0800)]
github pull request #417 - disclosing apron text

Adopt the patch to show the writing on any alchemy smocks in
hero's inventory during end of game disclosure.

I also added one more saying among the choices for alchemy
smock/apron.  It's based on a T-shirt descibed in a movie.
(I remember the description of the text but I don't remember
noticing anybody wearing the T-shirt that lead to that.)
Since so many of the smock quotes are about cooking, it seems
better to add it as an alchemy quote instead of just another
T-shirt where there'd be no context to explain it.

Closes #417

4 years agoQt 'game' menu tweak for OSX
PatR [Mon, 14 Dec 2020 10:11:53 +0000 (02:11 -0800)]
Qt 'game' menu tweak for OSX

Change "_Quit-without-saving" in the Game dropdown menu to be
"\177Quit-without-saving".  That makes the prefix used on OSX to
prevent matching "^[&]?[Qq][Uu][Ii][Tt].*" be invisible.

Also change the order of the choices for the command+Q and
application dropdown menu entry "quit nethack" so that "cancel
and return to game" is the default for arbitrary response to the
confirmation prompt.  <return> and <space> select "quit without
saving".  Note that the nethack dropdown menu is OSX-specific
(a Qt feature to emulate other OSX applications) and its
nethack->Quit action is separate-from/in-addition-to Game->Quit
menu action mentioned above (which runs nethack's #quit command).

4 years agohave <del> run #terrain
PatR [Mon, 14 Dec 2020 09:00:19 +0000 (01:00 -0800)]
have <del> run #terrain

Having recently noticed that using <del> aka <delete> aka <rubout>
could work as a command, assign it to #terrain.  #terrain was the
only command in the "game" subset of commands as shown by '? i'
that didn't have any key assignment.

Since <delete> might be swapped with <backspace> on some terminals
and is a keypad key on the typical PC keyboard, it might not work
reliably depending on nethack's number_pad mode or the hardware
Num-Lock setting.  Players in either of those situations haven't
lost anything; they can still use extended command #terrain.

4 years agoAdded mingw build.
Bart House [Mon, 14 Dec 2020 08:28:36 +0000 (00:28 -0800)]
Added mingw build.

4 years agoMake compiling the lua interpreter optional.
Bart House [Mon, 14 Dec 2020 08:24:05 +0000 (00:24 -0800)]
Make compiling the lua interpreter optional.

4 years agoWorking on getting WinGW building with Azure pipeline.
Bart House [Mon, 14 Dec 2020 04:38:56 +0000 (20:38 -0800)]
Working on getting WinGW building with Azure pipeline.

Fix typo recently introduced.  Allow LUATOP to be specified by pipeline.

4 years agoSwitch mingw build to use submodules in default path.
Bart House [Mon, 14 Dec 2020 04:31:01 +0000 (20:31 -0800)]
Switch mingw build to use submodules in default path.

4 years agoMerge branch 'master' into NetHack-3.7
Bart House [Mon, 14 Dec 2020 04:17:12 +0000 (20:17 -0800)]
Merge branch 'master' into NetHack-3.7

4 years agoAdding pdcurses submodule for MinGW build.
Bart House [Mon, 14 Dec 2020 03:44:15 +0000 (19:44 -0800)]
Adding pdcurses submodule for MinGW build.

4 years agoImprovements to azure pipeline.
Bart House [Mon, 14 Dec 2020 02:55:35 +0000 (18:55 -0800)]
Improvements to azure pipeline.

4 years agobargethrough/monster-vs-monster displacing
PatR [Sun, 13 Dec 2020 23:51:23 +0000 (15:51 -0800)]
bargethrough/monster-vs-monster displacing

Fix the regression that monster movement flag unification
introduced for monsters able to swap places with adjacent
monsters.  It used to be restricted in order to prevent
Riders swapping places with other Riders so that they didn't
repeatedly exchange places when one was right behind the other
and the farther one moved first.  Then when displacer beasts
were added, that restriction was extended to prevent them
swapping places with Riders (but not the other way around.)
The flags change inadvertently let any displacer swap with any
other displacer.

4 years agoQt: remove "Search [______]" from Help menu
PatR [Sun, 13 Dec 2020 21:45:04 +0000 (13:45 -0800)]
Qt: remove "Search [______]" from Help menu

Prevent Qt from inserting an extra entry in the Help dropdown
menu displayed in the menu bar across the top of the screen
when nethack has focus.  "Search [______]" lets the user enter
a string to search for but doesn't give nethack any control
over that so we can't have it.

I haven't found a sane way to get rid of it.  The insane way
of not naming any menu "Help" works.  This uses "\177Help" so
that it still looks like "Help" but won't match that string.

4 years agoXcode updates
nhmall [Sun, 13 Dec 2020 17:24:35 +0000 (12:24 -0500)]
Xcode updates

4 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Sun, 13 Dec 2020 16:24:07 +0000 (11:24 -0500)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

4 years agoensure a rebuild of include/nhlua.h after fetching Lua source
nhmall [Sun, 13 Dec 2020 15:40:02 +0000 (10:40 -0500)]
ensure a rebuild of include/nhlua.h after fetching Lua source

4 years agopurge trampoli.h
nhmall [Sun, 13 Dec 2020 15:27:49 +0000 (10:27 -0500)]
purge trampoli.h

4 years agoMake Death revive faster
Pasi Kallinen [Sun, 13 Dec 2020 10:28:42 +0000 (12:28 +0200)]
Make Death revive faster

Death will revive faster than the other riders.
Make all the riders revive after 67 turns, instead of 500.
There was practically a zero chance a rider would revive at 500,
so keep it somewhat sensible.

4 years agoImprove consistency of polearm targeting rules
Michael Meyer [Fri, 11 Dec 2020 23:13:56 +0000 (18:13 -0500)]
Improve consistency of polearm targeting rules

Multiple functions are involved in the process of targeting and
attacking an enemy with a polearm or lance, and these functions
previously used inconsistent tests to determine which targets were
legal.  For instance, find_poleable_mon would give up immediately if the
hero was blind, while neither get_valid_polearm_position nor use_pole
cared as long as the hero could detect a target on the square (e.g. by
ESP).  find_poleable_mon considered warning symbols as potential
targets, but use_pole discarded them.  get_valid_polearm_position
considered moats and pools to be illegal targets, but use_pole would
let the hero successfully hit a monster on those squares; on the
other hand, get_valid_polearm_position would mark squares that were not
visible and did not contain a known monster as legal targets, while
find_poleable_mon and use_pole would exclude them.

Obviously this was inconsistent and could introduce confusion for
polearm users, who would potentially need to explicitly target squares
marked "(illegal)" at some point over the course of their game, among
other problems.  This commit makes polearm targeting tests more
consistent; the following rules are applied to positions within the
appropriate range:

* Monsters which are detected by any means that reveals an actual
  monster glyph are legal to target, even if the hero is blind

* Monsters the hero cannot detect, but is aware of -- i.e. those
  represented by an 'I' -- are similarly legal to target

* Monsters detected via warning are not legal targets, since the hero
  does not have as strong a sense of where exactly they are, their shape
  and size, etc

* Statues are legal targets, but will not be suggested by
  find_poleable_mon unless the hero is impaired (confused, stunned, or
  hallucinating); the same is true of tame/peaceful monsters

* Apparently empty squares, including those containing an undetected
  monster, are legal to target unless they cannot be seen (whether due
  to blindness or a very dark room/level)

* Positions which are otherwise legal but are blocked by an obstruction like a
  tree or pillar are not legal targets

4 years agoFix azure pipeline build for linux/mac.
Bart House [Sun, 13 Dec 2020 05:41:24 +0000 (21:41 -0800)]
Fix azure pipeline build for linux/mac.

4 years agotowel adjustments
PatR [Sat, 12 Dec 2020 22:22:21 +0000 (14:22 -0800)]
towel adjustments

Consolidate a small amount of duplicate code from wet_a_towel()
and dry_a_towel().

4 years agoMakefile vs lua fix
PatR [Sat, 12 Dec 2020 22:10:18 +0000 (14:10 -0800)]
Makefile vs lua fix

I've been ignoring submodules so far.  For the old method of
dealing with lua, the instructions

You might need to do
  make spotless
  make fetch-lua

aren't adequate.  They should be

When lua version has changed in Makefile.top, before running
setup.sh to put that new Makefile in place, do
  make spotless
then
  sys/unix/setup.sh [hints/...]
  make fetch-lua

otherwise it will try to clean up the not yet fetched new lua
version instead of the old one.

4 years agofix github pull request #418 - towel wetness
PatR [Sat, 12 Dec 2020 20:04:20 +0000 (12:04 -0800)]
fix github pull request #418 - towel wetness

Fire damage would dry out a wet towel but never all the way to 0.
Water damage would wet a towel but if it was already wet, its
wetness might decrease.

This uses the pull request's change for increasing the wetness
but changes dry_a_towel so that the original code for decreasing
that will work as is.  Using wet_a_towel() to set wetness to 0
doesn't make much sense, so still won't do so; dry_a_towel() does
and now will.

This also adds missing perm_invent update for towels in inventory
changing wetness.

Fixes #418

4 years agoFix Azure pipeline introduced by only checking out a single repository.
Bart House [Sat, 12 Dec 2020 19:47:44 +0000 (11:47 -0800)]
Fix Azure pipeline introduced by only checking out a single repository.

If checking out a single repository, the repository is checked out
to the path $(Agent.BuildDirectory)\s instead of
$(Agent.BuildDirectory)\s\<name of repository>.  Modified checkout
to hard code path to avoid this change in behavior.

4 years agoAdd some new demonic and angelic maledictions
Pasi Kallinen [Sat, 12 Dec 2020 18:53:48 +0000 (20:53 +0200)]
Add some new demonic and angelic maledictions

From SpliceHack

4 years agofix #H3134 - selling container for credit
PatR [Sat, 12 Dec 2020 06:32:38 +0000 (22:32 -0800)]
fix #H3134 - selling container for credit

If a container holds anything that a shop wouldn't ordinarily
buy and sell and you sell it for gold, the 'foreign' contents
are marked no_charge and hero still owns them.  But selling the
same container+contents for credit instead of gold would take
shop possession of all the contents without increasing the
credit amount.

The fixes entry is longer than the fix.  It solves cited case but
I won't be surprised much if it messes up some other case(s).

4 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Sat, 12 Dec 2020 03:24:07 +0000 (22:24 -0500)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

4 years agouse .Substring to limit maintenance to major Lua version releases only
nhmall [Sat, 12 Dec 2020 03:35:37 +0000 (22:35 -0500)]
use .Substring to limit maintenance to major Lua version releases only

4 years agoFix Windows build break caused by bump to lua 5.4.2.
Bart House [Sat, 12 Dec 2020 02:45:44 +0000 (18:45 -0800)]
Fix Windows build break caused by bump to lua 5.4.2.

Modified Windows build to use submodules/lua for lua source.

4 years agoQt text search crash fix
PatR [Sat, 12 Dec 2020 02:11:27 +0000 (18:11 -0800)]
Qt text search crash fix

About 5 weeks ago, commit e4106bb1613da808ae87780dfeedb4c80e6afc2a
changed Qt's searching in text windows to be able to find a match
on the very first line.  It assumed that the first line would be
the current line except when repeating the same search after a
match.  But after a failed search the current line index is -1 and
starting a new search would crash trying to look that line up.

4 years agodowhatis formatting for Qt
PatR [Sat, 12 Dec 2020 01:15:21 +0000 (17:15 -0800)]
dowhatis formatting for Qt

The '/' command's variants /o, /O, /m, and /M use spaces to
align output in columns and that looks quite bad if rendered in
a proportional font.  Qt normally uses proportional font for
text windows but it watches the supplied lines for any with four
consecutive spaces and forces fixed-width font if it sees any.
So changing the existing separator line from "" to "    " makes
Qt format the dowhatis data as intended.

4 years agowarning suppression - unused static routine
PatR [Sat, 12 Dec 2020 01:01:43 +0000 (17:01 -0800)]
warning suppression - unused static routine

4 years agodon't miss the special furniture checks during liquid flow
nhmall [Fri, 11 Dec 2020 21:28:59 +0000 (16:28 -0500)]
don't miss the special furniture checks during liquid flow

Closes #405