Commit Graph

11524 Commits

Author SHA1 Message Date
PatR
1a2afd21d4 tty: winch_handler vs NO_SIGNAL
While testing something unrelated, I built with NO_SIGNAL
defined and winch_handler() caused an unused function warning.
2020-12-24 17:53:57 -08:00
PatR
5552f141ba 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
2020-12-24 13:41:17 -08:00
Pasi Kallinen
a4184c8684 Prevent monsters from picking up locked containers 2020-12-24 22:37:58 +02:00
nhmall
fe3eb92411 win32: avoid game exit dialog lacking any explanation 2020-12-23 20:31:54 -05:00
PatR
f05e87831c data.base: Croesus date 2020-12-23 15:48:26 -08:00
PatR
1971adbe45 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.
2020-12-23 10:43:58 -08:00
PatR
3922bbf666 remove a solved item from Qt-issues.txt 2020-12-23 08:26:54 -08:00
PatR
1b7c372f5d 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.
2020-12-22 13:48:29 -08:00
PatR
934808be0e 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.
2020-12-22 11:10:32 -08:00
PatR
430edb5a74 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.
2020-12-21 19:02:11 -08:00
PatR
ae23330adc 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.
2020-12-21 14:09:17 -08:00
nhmall
1c7420af7f cron daily Guidebook.txt update 2020-12-20 21:24:51 -05:00
Pasi Kallinen
957990c14d 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.
2020-12-20 12:32:29 +02:00
PatR
4cf6727b4e 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
2020-12-19 17:45:49 -08:00
Pasi Kallinen
44f4085f69 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>.
2020-12-19 13:45:35 +02:00
PatR
803119a72b callable venom
Allow the two venoms to be given type names.  Only matters if
player manages to get either of them into inventory.
2020-12-18 18:04:34 -08:00
nhmall
143850e3c9 cron daily updates to Files and doc/Guidebook 2020-12-18 21:01:10 -05:00
PatR
b9535a84f1 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.
2020-12-18 15:46:13 -08:00
PatR
c709c45780 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.
2020-12-18 15:05:54 -08:00
Pasi Kallinen
f60ecfc3e7 Fix monster hide state when chain is moved 2020-12-18 19:31:47 +02:00
PatR
ee9fa9ebe3 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.
2020-12-17 13:55:10 -08:00
PatR
65763f9bec 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.
2020-12-17 12:21:35 -08:00
PatR
00c4e832c5 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.
2020-12-17 11:38:18 -08:00
PatR
d27b8cb043 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.
2020-12-16 19:22:04 -08:00
PatR
48d39b2ffd 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.
2020-12-16 03:07:55 -08:00
PatR
4f0e47fd0c extra ^X feedback
Report "abnormal" play (wizard mode or explore mode) in ^X output
or end of game dumplog.  Omitted for normal play.
2020-12-16 02:49:00 -08:00
Bart House
3a91d65bb6 Added MSDOS build and made improvements to pipeline configuration. 2020-12-16 00:43:59 -08:00
PatR
5a6cf6a20f '? 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.
2020-12-15 16:33:51 -08:00
Pasi Kallinen
c8164d86af Fix monster hide status when mon relocated 2020-12-15 17:50:32 +02:00
Pasi Kallinen
ec1d01bbe1 Fix monster hide status when moving ball & chain 2020-12-15 17:35:18 +02:00
Bart House
a7b47ff071 Modify mingw makefile to allow caller to specify LUA build parameters. 2020-12-15 02:20:11 -08:00
Bart House
b08b47749f Revert "Switch mingw build to use submodules in default path."
This reverts commit e5fb08ae4e.
2020-12-15 01:57:18 -08:00
Bart House
be1432ad74 Revert "Working on getting WinGW building with Azure pipeline."
This reverts commit d88749e419.
2020-12-15 01:55:53 -08:00
Bart House
bc7922908b Revert "Make compiling the lua interpreter optional."
This reverts commit f89005efd7.
2020-12-15 01:54:27 -08:00
Bart House
bad05e2fb4 Reverting recent changes that hard coded use of submodules. 2020-12-15 01:50:01 -08:00
Bart House
746c313aee Re-enable mingw pipeline build. Use pdcurses submodule for pipeline
mingw build.
2020-12-15 00:53:01 -08:00
Bart House
9db1aff070 Use LUASRC variable when generating nhlua.h. 2020-12-15 00:46:55 -08:00
Bart House
679ffd6719 Disable mingw build while we are still getting it to work. 2020-12-14 20:46:04 -08:00
PatR
1d48b78dd1 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.
2020-12-14 13:12:33 -08:00
PatR
496777384b 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.
2020-12-14 12:32:43 -08:00
Bart House
49460dcafb 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.
2020-12-14 10:17:02 -08:00
Bart House
190f9dc488 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'.
2020-12-14 09:56:59 -08:00
Pasi Kallinen
480c253933 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
2020-12-14 17:51:16 +02:00
nhmall
1b415af302 Makefile.msc update for visual studio 16.8.3 2020-12-14 07:46:23 -05:00
nhmall
6abce574d7 document typo fixes in README.xcode
Closes #424
2020-12-14 07:20:14 -05:00
nhw_cron
b5a085437f This is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt 2020-12-14 07:17:12 -05:00
nhw_cron
0e048b64e6 This is cron-daily v1-Jan-20-2020. files updated: Files 2020-12-14 07:16:50 -05:00
PatR
aa7f01eed7 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
2020-12-14 03:30:58 -08:00
PatR
d4313ff828 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).
2020-12-14 02:11:53 -08:00
PatR
788e21ac43 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.
2020-12-14 01:00:19 -08:00