Commit Graph

11862 Commits

Author SHA1 Message Date
PatR
8adb4aa219 blinded Archon gaze bit
From yesterday (old #H3841), the alternate message given when a
monster is being hit by a blind Archon's gaze was checking the
wrong monster for blindness.
2021-03-04 18:07:23 -08:00
PatR
d7be7031a1 Discworld: Sourcery
Include the page number for Sourcery's second passage.  While
in there, add another passage.

For wishing, recognize "sorcery" as an alternate spelling.
2021-03-03 16:38:49 -08:00
PatR
621c9436bc discoveries/#known sorting fix
If the sort order for sortdiscoveries was s ('sortloot' order)
and any artifacts or unique items were discovered, using '\'
to see all discoveries included "Discovered Items" as a spurious
class header between the real header for the last object class with
discoveries and the discoveries for that class:
 |Discoveries, sortloot order (by class with some sub-class groupings)
 |
 |Artifacts
 |  Sunsword [lawful long sword]
 |Potions
 |  water (clear)
 |Gems/Stones
 |Discovered items
 |  diamond (white)
 |  flint stone (gray)

"Discovered items" is supposed to only be shown when sorting
alphabetically across all classes and there are artifacts and/or
unique items before the regular discovered objects.
2021-03-03 15:03:31 -08:00
PatR
cd43027a49 fix #H3841 - inconsistent Archon gaze behavior
From six years ago:  hero is "blinded by the Archon's radiance"
even if the attacking Archon has been blinded, but monsters hit
by same thing were protected from it by that blindness.  Make
monsters attacked by Archons be affected similarly to the hero.

Hypothetical case of hero-as-Archon versus monster is ignored
because hero can't polymorph into that shape.
2021-03-03 14:40:19 -08:00
PatR
10a9d358c5 hypothetical buffer overruns
doprtool() and doprinuse() collect the inventory letters of all
applicable items into a buffer capable of holding 52 letters plus
terminator.  It is possible to have more than 52 items (ignoring
gold) so theoretically possible to have more than 52 separate lit
candles.  Guard against that.

The easiest way to get an item in the overflow slot is to carry
52 non-boulders, polymorph into a giant, and pick up a boulder.
Assigning the latter to one of the three weapon slots would not
impact doprtool() but it will impact doprinuse().  However, that
wasn't enough to cause a crash for me; evidently the overflow
clobbered something innocuous.  (52+boulder is not the only way
to get something into slot '#', just the only guaranteed one I
can think of offhand.)

This also removes a bunch of 'register' type qualifiers.
2021-02-27 17:13:17 -08:00
PatR
a2046669f4 X11 menu handling
In a couple of places, call menu_popdown instead of duplicating
its contents.  I'm fairly sure that executing the is_active bit
that the duplications omitted is safe.

Several minor formatting bits are mixed in.
2021-02-26 17:06:40 -08:00
nhmall
2cf54f54ad bit 2021-02-26 09:47:54 -05:00
nhmall
558b7c27d8 read_simplemail() when SERVER_ADMIN_MSG is defined
Some warnings were mentioned

Add a prototype ahead of the function
Use a non-const copy of SERVER_ADMIN_MSG

quick-tested by:
- uncommenting the following in include/unixconf.h
  /* #define SERVER_ADMIN_MSG "adminmsg" */
- building NetHack
- creating a test message:
  echo "server_admin: system is going down at 2 pm" >~/nh/install/games/lib/nethackdir/adminmsg
- playtested and received the desired message
2021-02-26 09:05:52 -05:00
PatR
05da754b02 fixes37.0 entry about engraving
Revert part of commit f6a30e7b05
that moved a fixes entry from the 'fixes to 3.6.x' section
into the 'post-3.6.x, exposed by git' section.  It wasn't due
to the conversion of engraving from multi-turn action into an
occupation, it was fixing a bug that had been around for 5 or 6
years.  Moot now; the conversion to occupation removed it.
2021-02-26 00:13:22 -08:00
PatR
f6a30e7b05 partly fix github issue #446 - monk gender
The monk role can be either male or female but the monk fake
player monster was flagged as male-only.  Allow both genders.

The male and female monk tiles are identical though and this
doesn't address that.

Fixes #466
2021-02-25 14:11:03 -08:00
PatR
9870399435 tribute bit: Sourcery passage 4
Fix a mistake that led to a bad fix for a perceived mistake that
wasn't really there.

I think having a comma after "moment" would make things clearer,
but style-wise that's optional and leaving it out restores the
book's original wording.
2021-02-24 14:41:51 -08:00
PatR
3be4e49552 [lack of] autopickup inside shops
When being inside a shop inhibits autopickup, menion that in ^X
feedback about autopickup.
2021-02-23 02:42:28 -08:00
PatR
27a0351cd2 fix #H3734 - "see an angry guard" when that guard
is invisible and hero can't see him/her.  Reported for 3.4.3 in
late 2014....
2021-02-23 02:04:21 -08:00
PatR
ed349cd5fe X11 yn_function() again
Widget widths should have type 'Dimension' rather than plain 'int'.

Perform a couple of things once during popup widget creation rather
than every time it gets popped up.
2021-02-22 01:10:14 -08:00
PatR
8195334d65 X11 popup yn_function resizing
When X11_yn_function() re-uses a popup widget to issue a prompt
and get the player's response, make it resize properly.  I'm not
sure why the old hack for that apparently worked for some folks
and not for me, or why this does work for me.  At least it does.

Also, make the minimum popup width be 25 characters so that
really short prompts don't result in tiny popups.  Since the
popup appears at whatever spot the pointer happens to be sitting,
it isn't always immediately noticeable when the player is using
the keyboard rather than the pointer.
2021-02-21 17:30:09 -08:00
PatR
d6d42f56b2 "If you see me running, try to keep up."
Noticed while poking about in read.c for the ^G feedback change:
a relatively recently added apron slogan turns out to be a near
duplicate of an existing T-shirt slogan.  Change the apron one a
little, although they're still nearly identical.
2021-02-20 17:24:25 -08:00
PatR
b9ed4407de ^G feedback
For ^G, if someone replies with empty input to the "Create which
monster?" prompt, give alternate feedback than "I've never heard
of such monsters." before reprompting.
2021-02-20 17:15:58 -08:00
PatR
316a9a1809 X11 getline refinement
X11_getlin() echoing its prompt and response to message window
truncates combined value to maximum allowed pline (rather than
having pline truncate it).  But it was truncating the response
as if the prompt was maximum allowed length instead of its actual
length, so possibly hiding some of the user's text unnecessarily.
2021-02-20 16:25:12 -08:00
nhmall
49c008fcee Windows nmake build - recognize VS 16.8.5 2021-02-20 11:53:17 -05:00
PatR
a32002eb88 X11 getline: log prompt and response
After player has responded to a getline prompt, echo the prompt
and the line of text response to the message window.  Uses pline()
so also gets put into core's message history for dumplog.
2021-02-19 15:38:31 -08:00
PatR
2cedfc9696 X11 update
More issues.  The incorrectly rendered map after panning is one
I haven't seen before.  Normally I only have a clipped map if I
force double size tiles rather and hadn't noticed this behavior
for that case, so manually resizing--and/or the scrollbars which
get added when that occurs--may be what triggers it.
2021-02-19 14:11:32 -08:00
Pasi Kallinen
f9aff476c4 Increment editlevel
Just in case, even though changing joined to boolean shouldn't cause problems.
2021-02-19 17:28:43 +02:00
copperwater
18dc88505d Convert room 'joined' and 'needjoining' into booleans
des.region() accepted booleans for the joined field, whereas des.room
accepted xchars. These were only being used as truth values, so this
converts the room ones into booleans for consistency. I don't think
accidentally using an int or a boolean wrongly would actually crash the
level generator, but consistency is good.

This converts an schar field in struct mkroom into a boolean; on most
systems these are probably 1-byte types and save files won't be broken,
but it might be best to treat this as a save breaker anyway.
2021-02-19 17:09:41 +02:00
copperwater
fa3041c9f9 Make g.coder->lvl_is_joined a boolean
Its value is only used as a boolean, so there's no real need to keep it
as a confusing int.

Shouldn't be a save-breaking change; it doesn't look like g.coder is
saved.
2021-02-19 17:09:41 +02:00
nhmall
7bc8d98ea3 Merge branch 'copperwater-pr464' into NetHack-3.7 2021-02-19 07:50:34 -05:00
nhmall
fb0b535cde fixes37.0 entry for pr#464 2021-02-19 07:49:10 -05:00
nhmall
f716dd8211 Merge branch 'fix-engraving-impossible' of https://github.com/copperwater/NetHack into copperwater-pr464 2021-02-19 07:46:45 -05:00
Patric Mueller
bea69f39f3 Output message when changing fastmove mode while cursor targetting 2021-02-19 10:40:41 +01:00
PatR
bb57bf16f1 'O' feedback for booleans
Give a message for each boolean option toggled via 'O'.  It may
help catch mistakes sooner if/when player types wrong menu letter.

Only applies to 'O', not booleans manipulated during config file
or NETHACKOPTIONS processing.
2021-02-19 00:24:45 -08:00
PatR
f480803970 'wizmgender' flag
"Demote" wizmgender from an obscure wizard mode extended command
to an obscure wizard mode boolean option.  Behaves the same except
that no message is given when the value gets toggled.
2021-02-18 23:54:30 -08:00
copperwater
3219ed1aa8 Fix: engraving with non-blade dulled the weapon anyway
Due to a logic bug introduced when engraving became an occupation - the
code that tests to see whether the player is writing with a weapon that
will get dulled wasn't correctly checking that they were actually
carving an engraving.
2021-02-19 00:25:45 -05:00
PatR
a646764cc7 fix github issue #462 - line not displayed
Fix a latent bug in unreachable code.  As the comment preceding
the cited code states, hero polymorphed into an eel isn't offered
a chance to use #monster to hide, so program execution won't ever
get to the bad code.  Using formatting routine The() where message
delivery routine pline_The() is intended is certainly a bug though.

Fixes #462
2021-02-17 14:27:00 -08:00
PatR
31b0847bd7 X11's yn_function() echoing its response
X11_yn_function() issues a pline() to put the prompt and player's
response into the message window.  Change it to use visctrl() to
make sure that the response character is ledgible when something
like the '&' command allows an arbitrary answer.

This patch adds a leading space and two extra trailing spaces
to the prompt when it's being issued via popup, but that hasn't
affected the issue mentioned next....

The popup prompting when the 'slow' resource is False doesn't
always resize properly.  I saw both too wide and too narrow
[What do you want to throw? [abc] ]b
[       In what direction?        ]
and
[Really quit? [yn] (n) ]y
[Dump core? [ynq] (q) ]n   (size seemed right, but hard to tell)
[Do you want your posses]  (might have shown one more letter;
                            resize doodad in window's bottom right
                            corner on OSX oscures the rightmost
                            column--which is ordinarily a space)
The truncated one did accept responses.  If I answered 'n' then
the next question was truncated too, but for 'y' (plus ensuing
feedback) it would be sized correctly for the question after that.

To be clear:  the popup width issue was present before this change
and is still present after it.  The code already has a hack that's
intended to deal with this but it doesn't do the job for me.
2021-02-15 19:09:00 -08:00
PatR
8fff588ab3 X11 persistent inventory again: initial display
If 'perm_invent' is preset in player's options, have X11 show the
persistent inventory window from the start instead of waiting for
an 'i' command.  moveloop() prolog needed a tweak do deal with it
cleanly.

Require WC_PERM_INVENT in order to honor the perm_invent option.
X11 and curses already set that, tty and curses don't support it,
so only Windows GUI needed to be updated for it.
2021-02-14 00:57:34 -08:00
PatR
36179da82f X11 perm_invent: handle 'O' toggling off perm_invent
When persistent inventory window is up, remove it if 'perm_invent'
option gets set to False.  This has a side-effect of fixing the
end-of-game prompting problem it caused.
2021-02-13 19:17:20 -08:00
PatR
8c0e3b2a8d monster missiles vs sinks
Missiles shot or thrown by monsters already stop at sinks; give
a message if they haven't exhausted their range and hero sees.
2021-02-13 15:16:15 -08:00
PatR
5a8c978b1e scatter() vs sinks
Objects shot, thrown, or kicked by the hero or by monsters stop
short if they try to pass over a sink; make objects launched by
an explosion behave similarly.
2021-02-13 15:15:21 -08:00
Pasi Kallinen
1b7faaf661 Add couple more config tests 2021-02-13 11:51:25 +02:00
nhw_cron
80b82c687b This is cron-daily v1-Jan-20-2020. files updated: Files 2021-02-12 18:36:00 -05:00
PatR
be9a2c2907 X11: persistent inventory issues and hack for OSX
This hack prevents the perm_invent window for X11 on OSX from
creeping every time it gets updated.  It is far from perfect and
at the very least ought be handled via user settable X resources
rather than hardcoded values, but it's as much effort as I'm likely
to spend.

Add a new file containing a list of issues that ought to be fixed.
The initial entries are things I noticed while experimenting with
perm_invent; there is lots of older stuff that could/should be
there too.  I'm not sure whether the first one is OSX-specific; the
others aren't.
2021-02-12 15:07:51 -08:00
Pasi Kallinen
b1097df86d Make runmode option complain, add some tests for it 2021-02-12 19:41:46 +02:00
PatR
2e69789e6d mkroom.c oddity
Replace a strange pline() with impossible().

Remove some ancient MAC special handling for getenv("SHOPTYPE").
2021-02-11 15:38:26 -08:00
PatR
79ca1dc422 mklev.c's mkroom qsort
Get rid of some obsolete qsort hackery.  Use of prototypes makes
it unnecessary.  Even before that it was the only one of a dozen
instances of qsort() usage that cared about pre-ANSI implementation.

Also, reformat a couple of comments.
2021-02-11 15:18:12 -08:00
Pasi Kallinen
7f51e59770 Don't complain about unknown option if param is wrong
When a compound option was given an erroneous parameter,
for example "OPTIONS=runmode:foo",
you first got "Unknown runmode parameter 'foo", and
then "Unknown option 'runmode:foo'".

Prevent the Unknown option complaint, if we actually did
find a match.
2021-02-11 18:22:18 +02:00
nhw_cron
918bfca387 This is cron-daily v1-Jan-20-2020. files updated: Files 2021-02-11 10:48:05 -05:00
nhmall
7a8be551e9 Guidebook date was behind on recent updates so give it a bump 2021-02-11 10:38:43 -05:00
PatR
73ad32abc9 recent X11 bit: X11_bail() doesn't return 2021-02-10 18:52:22 -08:00
PatR
fedc2d5abe nroff Guidebook fix
Options which show lists of possible values using '.CC' were
unintentionally being rendered with bold font.  I tracked it
down to "figure 3" which has been in place for quite a while.
The font setting and resetting wasn't working as I expected.
This change yields the intended results.
2021-02-10 18:48:21 -08:00
nhmall
046ff4129b bump editlevel 2021-02-10 19:54:10 -05:00
nhmall
e512e98966 Merge branch 'copperwater-pr460' into NetHack-3.7 2021-02-10 19:53:07 -05:00